提交 5292838f 编写于 作者: 无木

fix(apiSelect): remove attribute warning, fixed #2247

上级 fd945030
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册