fix bug 22/4 2
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
<template>
|
||||
<div class="setting-value-field">
|
||||
<a-switch
|
||||
<SettingToggle
|
||||
v-if="fieldType === 'switch'"
|
||||
:checked="switchChecked"
|
||||
:labels="labels"
|
||||
:disabled="disabled"
|
||||
@change="onSwitchChange"
|
||||
>
|
||||
<template #checkedChildren>{{ labels.on }}</template>
|
||||
<template #unCheckedChildren>{{ labels.off }}</template>
|
||||
</a-switch>
|
||||
/>
|
||||
|
||||
<SupportMessengersField
|
||||
v-else-if="isSupportMessengers"
|
||||
@@ -38,6 +36,15 @@
|
||||
@update:value="emit('update:value', $event)"
|
||||
/>
|
||||
|
||||
<TemplateTextField
|
||||
v-else-if="isTemplateField"
|
||||
:model-value="modelValue"
|
||||
:setting-key="settingKey || ''"
|
||||
:disabled="disabled"
|
||||
@update:value="emit('update:value', $event)"
|
||||
@blur="emit('blur')"
|
||||
/>
|
||||
|
||||
<a-select
|
||||
v-else-if="fieldType === 'select'"
|
||||
:value="modelValue || undefined"
|
||||
@@ -124,8 +131,11 @@
|
||||
<script setup lang="ts">
|
||||
import MainWalletProductsField from './MainWalletProductsField.vue'
|
||||
import PartnerServerUrlsField from './PartnerServerUrlsField.vue'
|
||||
import SettingToggle from './SettingToggle.vue'
|
||||
import SupportMessengersField from './SupportMessengersField.vue'
|
||||
import TemplateTextField from './TemplateTextField.vue'
|
||||
import ZaarboxPriceKeyField from './ZaarboxPriceKeyField.vue'
|
||||
import { hasTemplateField } from './templateFields'
|
||||
import {
|
||||
parseSelectOptions,
|
||||
resolveSettingFieldType,
|
||||
@@ -163,6 +173,7 @@ const isZaarboxPriceKey = computed(() => props.settingKey === 'zaarbox_price_key
|
||||
const isMainWalletProducts = computed(() => props.settingKey === 'main_wallet_products')
|
||||
const isSupportMessengers = computed(() => props.settingKey === 'support_messengers')
|
||||
const isPartnerServerUrls = computed(() => props.settingKey === 'zaarbox_api_url')
|
||||
const isTemplateField = computed(() => hasTemplateField(props.settingKey))
|
||||
|
||||
const selectItems = computed(() =>
|
||||
parseSelectOptions({
|
||||
|
||||
Reference in New Issue
Block a user