mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-27 21:44:52 +08:00
fix(apiSelect): remove attribute warning, fixed #2247
This commit is contained in:
parent
fd9450304d
commit
5292838fcd
@ -59,7 +59,7 @@
|
|||||||
immediate: propTypes.bool.def(true),
|
immediate: propTypes.bool.def(true),
|
||||||
alwaysLoad: propTypes.bool.def(false),
|
alwaysLoad: propTypes.bool.def(false),
|
||||||
},
|
},
|
||||||
emits: ['options-change', 'change'],
|
emits: ['options-change', 'change', 'update:value'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const options = ref<OptionsItem[]>([]);
|
const options = ref<OptionsItem[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -91,6 +91,13 @@
|
|||||||
props.immediate && !props.alwaysLoad && fetch();
|
props.immediate && !props.alwaysLoad && fetch();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => state.value,
|
||||||
|
(v) => {
|
||||||
|
emit('update:value', v);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.params,
|
() => props.params,
|
||||||
() => {
|
() => {
|
||||||
|
@ -460,27 +460,27 @@
|
|||||||
span: 8,
|
span: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
field: 'field36',
|
// field: 'field36',
|
||||||
component: 'ApiTree',
|
// component: 'ApiTree',
|
||||||
label: '远程Tree',
|
// label: '远程Tree',
|
||||||
helpMessage: ['ApiTree组件', '使用接口提供的数据生成选项'],
|
// helpMessage: ['ApiTree组件', '使用接口提供的数据生成选项'],
|
||||||
required: true,
|
// required: true,
|
||||||
componentProps: {
|
// componentProps: {
|
||||||
api: treeOptionsListApi,
|
// api: treeOptionsListApi,
|
||||||
params: {
|
// params: {
|
||||||
count: 2,
|
// count: 2,
|
||||||
},
|
// },
|
||||||
afterFetch: (v) => {
|
// afterFetch: (v) => {
|
||||||
//do something
|
// //do something
|
||||||
return v;
|
// return v;
|
||||||
},
|
// },
|
||||||
resultField: 'list',
|
// resultField: 'list',
|
||||||
},
|
// },
|
||||||
colProps: {
|
// colProps: {
|
||||||
span: 8,
|
// span: 8,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
field: 'divider-linked',
|
field: 'divider-linked',
|
||||||
component: 'Divider',
|
component: 'Divider',
|
||||||
|
Loading…
Reference in New Issue
Block a user