feat: table允许通过props动态变化data数据
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"bootstrap": "pnpm install",
|
||||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
||||||
"build:analyze": "turbo build:analyze",
|
"build:analyze": "turbo build:analyze",
|
||||||
"build:antd": "pnpm run build --filter=@vben/web-antd",
|
"build:antd": "pnpm run build --filter=@vben/web-antd",
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ const {
|
|||||||
gridEvents,
|
gridEvents,
|
||||||
formOptions,
|
formOptions,
|
||||||
tableTitle,
|
tableTitle,
|
||||||
|
tableData,
|
||||||
tableTitleHelp,
|
tableTitleHelp,
|
||||||
showSearchForm,
|
showSearchForm,
|
||||||
separator,
|
separator,
|
||||||
@@ -229,6 +230,9 @@ const options = computed(() => {
|
|||||||
}
|
}
|
||||||
if (mergedOptions.formConfig) {
|
if (mergedOptions.formConfig) {
|
||||||
mergedOptions.formConfig.enabled = false;
|
mergedOptions.formConfig.enabled = false;
|
||||||
|
if (tableData.value && tableData.value.length > 0) {
|
||||||
|
mergedOptions.data = tableData.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return mergedOptions;
|
return mergedOptions;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user