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