mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +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),
|
||||
alwaysLoad: propTypes.bool.def(false),
|
||||
},
|
||||
emits: ['options-change', 'change'],
|
||||
emits: ['options-change', 'change', 'update:value'],
|
||||
setup(props, { emit }) {
|
||||
const options = ref<OptionsItem[]>([]);
|
||||
const loading = ref(false);
|
||||
@ -91,6 +91,13 @@
|
||||
props.immediate && !props.alwaysLoad && fetch();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => state.value,
|
||||
(v) => {
|
||||
emit('update:value', v);
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.params,
|
||||
() => {
|
||||
|
@ -460,27 +460,27 @@
|
||||
span: 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'field36',
|
||||
component: 'ApiTree',
|
||||
label: '远程Tree',
|
||||
helpMessage: ['ApiTree组件', '使用接口提供的数据生成选项'],
|
||||
required: true,
|
||||
componentProps: {
|
||||
api: treeOptionsListApi,
|
||||
params: {
|
||||
count: 2,
|
||||
},
|
||||
afterFetch: (v) => {
|
||||
//do something
|
||||
return v;
|
||||
},
|
||||
resultField: 'list',
|
||||
},
|
||||
colProps: {
|
||||
span: 8,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// field: 'field36',
|
||||
// component: 'ApiTree',
|
||||
// label: '远程Tree',
|
||||
// helpMessage: ['ApiTree组件', '使用接口提供的数据生成选项'],
|
||||
// required: true,
|
||||
// componentProps: {
|
||||
// api: treeOptionsListApi,
|
||||
// params: {
|
||||
// count: 2,
|
||||
// },
|
||||
// afterFetch: (v) => {
|
||||
// //do something
|
||||
// return v;
|
||||
// },
|
||||
// resultField: 'list',
|
||||
// },
|
||||
// colProps: {
|
||||
// span: 8,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: 'divider-linked',
|
||||
component: 'Divider',
|
||||
|
Loading…
Reference in New Issue
Block a user