parent
2f94ba9ddb
commit
ad08851397
|
@ -2,7 +2,7 @@
|
|||
<div :class="prefixCls">
|
||||
<a-select
|
||||
v-if="query"
|
||||
v-model:value="value"
|
||||
v-model:value="state"
|
||||
:options="selectOptions"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"
|
||||
|
@ -18,7 +18,7 @@
|
|||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||
import { useDesign } from '/@/hooks/web/useDesign';
|
||||
|
||||
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||
const { prefixCls } = useDesign('j-switch');
|
||||
const props = defineProps({
|
||||
// v-model:value
|
||||
|
@ -36,7 +36,7 @@
|
|||
const emit = defineEmits(['change', 'update:value']);
|
||||
|
||||
const checked = ref<boolean>(false);
|
||||
|
||||
const [state] = useRuleFormItem(props, 'value', 'change');
|
||||
watch(
|
||||
() => props.value,
|
||||
(val) => {
|
||||
|
|
Loading…
Reference in New Issue