fix: 🐛 共享下拉数据,避免重复请求

This commit is contained in:
超凡
2025-04-24 00:18:42 +08:00
parent 2899e13ecd
commit 0ab21ab02c
11 changed files with 84 additions and 65 deletions

View File

@@ -790,7 +790,11 @@ function handleToolbar(name: string) {
function handleOperate(data: IOperateData) {
switch (data.name) {
case "delete":
props.contentConfig?.deleteAction && handleDelete(data.row[pk]);
if (props.contentConfig?.deleteAction) {
handleDelete(data.row[pk]);
} else {
emit("operateClick", data);
}
break;
default:
emit("operateClick", data);

View File

@@ -196,12 +196,7 @@ export type IFormItems<T = IComponentType> = Array<{
// 组件属性
attrs?: IObject;
// 组件可选项(只适用于select,radio,checkbox组件)
options?: Array<{
label: string;
value: any;
disabled?: boolean;
[key: string]: any;
}>;
options?: Array<{ label: string; value: any; [key: string]: any }> | Ref<any[]>;
// 验证规则
rules?: FormItemRule[];
// 初始值