@skyfox2000/webui 1.3.19 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AceEditor.d.ts +1 -0
- package/lib/BasicLayout.d.ts +1 -0
- package/lib/Error403.d.ts +1 -0
- package/lib/Error404.d.ts +1 -0
- package/lib/ExcelForm.d.ts +1 -0
- package/lib/MenuLayout.d.ts +1 -0
- package/lib/UploadForm.d.ts +1 -0
- package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/lib/assets/modules/baseLayout-Bz3oRE5o.js +79 -0
- package/lib/assets/modules/file-upload-CmnCEJze.js +204 -0
- package/lib/assets/modules/index-CAqiqqdd.js +380 -0
- package/lib/assets/modules/index-CvQ24Mzh.js +112 -0
- package/lib/assets/modules/index-D0njzOzQ.js +109 -0
- package/lib/assets/modules/menuTabs-NVgroqVO.js +671 -0
- package/lib/assets/modules/toolIcon-BuqRfX4F.js +50 -0
- package/lib/assets/modules/uploadList-B6MIYOtN.js +2411 -0
- package/lib/assets/modules/uploadList-KG6kpOaY.js +382 -0
- package/lib/components/common/alert/index.vue.d.ts +13 -0
- package/lib/components/common/button/index.vue.d.ts +41 -0
- package/lib/components/common/icon/appicon.vue.d.ts +11 -0
- package/lib/components/common/icon/fullscreen.vue.d.ts +3 -0
- package/lib/components/common/icon/helper.vue.d.ts +23 -0
- package/lib/components/common/icon/index.vue.d.ts +243 -0
- package/lib/components/common/icon/layoutIcon.vue.d.ts +43 -0
- package/lib/components/common/icon/projectIcon.vue.d.ts +59 -0
- package/lib/components/common/icon/toolIcon.vue.d.ts +43 -0
- package/lib/components/common/index.d.ts +22 -0
- package/lib/components/common/loading/index.vue.d.ts +3 -0
- package/lib/components/common/tooltip/index.vue.d.ts +21 -0
- package/lib/components/content/dialog/index.vue.d.ts +35 -0
- package/lib/components/content/drawer/index.vue.d.ts +28 -0
- package/lib/components/content/form/formItem.vue.d.ts +28 -0
- package/lib/components/content/form/index.vue.d.ts +25 -0
- package/lib/components/content/index.d.ts +22 -0
- package/lib/components/content/search/index.vue.d.ts +32 -0
- package/lib/components/content/search/searchItem.vue.d.ts +23 -0
- package/lib/components/content/table/index.vue.d.ts +127 -0
- package/lib/components/content/table/tableOperate.vue.d.ts +18 -0
- package/lib/components/content/toolbar/icontool.vue.d.ts +7 -0
- package/lib/components/content/toolbar/index.vue.d.ts +18 -0
- package/lib/components/content/tree/index.vue.d.ts +46 -0
- package/lib/components/form/aceEditor/aceConfig.d.ts +8 -0
- package/lib/components/form/autoComplete/index.vue.d.ts +101 -0
- package/lib/components/form/cascader/index.vue.d.ts +80 -0
- package/lib/components/form/checkbox/index.vue.d.ts +100 -0
- package/lib/components/form/datePicker/index.vue.d.ts +6 -0
- package/lib/components/form/index.d.ts +41 -0
- package/lib/components/form/input/index.vue.d.ts +29 -0
- package/lib/components/form/input/inputIcon.vue.d.ts +10 -0
- package/lib/components/form/input/inputNumber.vue.d.ts +3 -0
- package/lib/components/form/input/inputPassword.vue.d.ts +3 -0
- package/lib/components/form/propEditor/index.vue.d.ts +15 -0
- package/lib/components/form/radio/index.vue.d.ts +105 -0
- package/lib/components/form/radio/radioStatus.vue.d.ts +31 -0
- package/lib/components/form/rangePicker/index.vue.d.ts +16 -0
- package/lib/components/form/select/index.vue.d.ts +119 -0
- package/lib/components/form/switch/index.vue.d.ts +76 -0
- package/lib/components/form/textarea/index.vue.d.ts +3 -0
- package/lib/components/form/timePicker/index.vue.d.ts +6 -0
- package/lib/components/form/transfer/index.vue.d.ts +38 -0
- package/lib/components/form/transfer/transferTable.vue.d.ts +38 -0
- package/lib/components/form/treeSelect/index.vue.d.ts +47 -0
- package/lib/components/form/upload/uploadList.vue.d.ts +488 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/layout/breadcrumb/index.vue.d.ts +3 -0
- package/lib/components/layout/content/index.vue.d.ts +22 -0
- package/lib/components/layout/datetime/index.vue.d.ts +3 -0
- package/lib/components/layout/header/headerExits.vue.d.ts +3 -0
- package/lib/components/layout/header/index.vue.d.ts +3 -0
- package/lib/components/layout/header/user.vue.d.ts +3 -0
- package/lib/components/layout/index.d.ts +14 -0
- package/lib/components/layout/menu/index.vue.d.ts +6 -0
- package/lib/components/layout/menu/menuTabs.vue.d.ts +3 -0
- package/lib/const/options.d.ts +32 -0
- package/lib/directives/enter-submit.d.ts +4 -0
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/permission.d.ts +5 -0
- package/lib/es/AceEditor/index.js +167 -0
- package/lib/es/BasicLayout/index.js +54 -0
- package/lib/es/Error403/index.js +39 -0
- package/lib/es/Error404/index.js +39 -0
- package/lib/es/ExcelForm/index.js +491 -0
- package/lib/es/MenuLayout/index.js +54 -0
- package/lib/es/UploadForm/index.js +110 -0
- package/lib/index.d.ts +46 -0
- package/lib/router/index.d.ts +15 -0
- package/lib/stores/appInfo.d.ts +31 -0
- package/lib/stores/hostInfo.d.ts +11 -0
- package/lib/stores/pageInfo.d.ts +18 -0
- package/lib/stores/pinia.d.ts +3 -0
- package/lib/stores/settingInfo.d.ts +8 -0
- package/lib/stores/userInfo.d.ts +25 -0
- package/lib/typings/data.d.ts +80 -0
- package/lib/typings/form.d.ts +206 -0
- package/lib/typings/menu.d.ts +7 -0
- package/lib/typings/option.d.ts +209 -0
- package/lib/typings/page.d.ts +70 -0
- package/lib/typings/table.d.ts +181 -0
- package/lib/typings/tools.d.ts +130 -0
- package/lib/typings/tree.d.ts +76 -0
- package/lib/typings/upload.d.ts +161 -0
- package/lib/typings/urls.d.ts +69 -0
- package/lib/utils/cache.d.ts +23 -0
- package/lib/utils/data.d.ts +6 -0
- package/lib/utils/download.d.ts +6 -0
- package/lib/utils/eventbus.d.ts +16 -0
- package/lib/utils/excel-preview.d.ts +24 -0
- package/lib/utils/excel-view.d.ts +25 -0
- package/lib/utils/export-table.d.ts +12 -0
- package/lib/utils/file-upload.d.ts +17 -0
- package/lib/utils/form-csv.d.ts +18 -0
- package/lib/utils/form-excel.d.ts +36 -0
- package/lib/utils/form-validate.d.ts +29 -0
- package/lib/utils/form.d.ts +9 -0
- package/lib/utils/icon-loader.d.ts +125 -0
- package/lib/utils/isEmpty.d.ts +1 -0
- package/lib/utils/main-openapis.d.ts +8 -0
- package/lib/utils/menu.d.ts +6 -0
- package/lib/utils/options.d.ts +7 -0
- package/lib/utils/page.d.ts +30 -0
- package/lib/utils/table.d.ts +21 -0
- package/lib/utils/tools.d.ts +18 -0
- package/lib/utils/tree.d.ts +3 -0
- package/lib/vite-env.d.ts +8 -0
- package/lib/webui.css +1 -0
- package/lib/webui.es.js +2345 -0
- package/package.json +1 -1
- package/src/components/content/dialog/excelForm.vue +1 -1
- package/src/components/content/form/formItem.vue +5 -0
- package/src/typings/form.d.ts +1 -1
- package/src/typings/tree.d.ts +4 -0
- package/src/utils/form.ts +7 -1
- package/src/utils/table.ts +7 -2
- package/src/utils/tree.ts +4 -2
- package/.cursorignore +0 -8
- package/scripts/userInput.py +0 -2
package/package.json
CHANGED
|
@@ -81,6 +81,11 @@ const required = computed(() => {
|
|
|
81
81
|
errInfo.value.msg = `规则 \`${props.rule}\` 不存在,请检查代码!`;
|
|
82
82
|
return true;
|
|
83
83
|
}
|
|
84
|
+
if (!rule.required) {
|
|
85
|
+
// 如果rule.required为false,则表示该字段是可选字段,不需要验证
|
|
86
|
+
errInfo.value.errClass = '';
|
|
87
|
+
errInfo.value.msg = '';
|
|
88
|
+
}
|
|
84
89
|
return rule.required ?? true;
|
|
85
90
|
});
|
|
86
91
|
|
package/src/typings/form.d.ts
CHANGED
package/src/typings/tree.d.ts
CHANGED
package/src/utils/form.ts
CHANGED
|
@@ -95,7 +95,7 @@ export const saveForm = async <T>(editorCtrl: EditorControl<T>): Promise<void> =
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
if (editorCtrl.afterSave) {
|
|
98
|
-
editorCtrl.afterSave();
|
|
98
|
+
editorCtrl.afterSave(result);
|
|
99
99
|
}
|
|
100
100
|
if (editorCtrl!.autoClose !== false) {
|
|
101
101
|
editorCtrl!.visible.value = false;
|
|
@@ -128,8 +128,14 @@ export const saveForm = async <T>(editorCtrl: EditorControl<T>): Promise<void> =
|
|
|
128
128
|
}
|
|
129
129
|
message.error(`保存失败!数据 \`${fieldValue}\` 已存在!`);
|
|
130
130
|
} else message.error(result?.msg ?? '保存失败!');
|
|
131
|
+
if (editorCtrl.afterSave) {
|
|
132
|
+
editorCtrl.afterSave(result);
|
|
133
|
+
}
|
|
131
134
|
} else {
|
|
132
135
|
message.error(result?.msg ?? '保存失败!');
|
|
136
|
+
if (editorCtrl.afterSave) {
|
|
137
|
+
editorCtrl.afterSave(result);
|
|
138
|
+
}
|
|
133
139
|
}
|
|
134
140
|
});
|
|
135
141
|
};
|
package/src/utils/table.ts
CHANGED
|
@@ -140,14 +140,19 @@ export const gridQueryFind = <T>(gridCtrl: GridControl<T>): Promise<FindResult>
|
|
|
140
140
|
total: gridCtrl.total.value,
|
|
141
141
|
rows: result.data as unknown as Record<string, any>[],
|
|
142
142
|
};
|
|
143
|
-
|
|
144
|
-
if (gridCtrl.afterLoad) gridCtrl.afterLoad(findResult);
|
|
145
143
|
}
|
|
144
|
+
if (gridCtrl.afterLoad) gridCtrl.afterLoad(findResult);
|
|
146
145
|
return findResult;
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
gridCtrl.tableData.value = [];
|
|
150
149
|
gridCtrl.total.value = 0;
|
|
150
|
+
if (gridCtrl.afterLoad) {
|
|
151
|
+
gridCtrl.afterLoad({
|
|
152
|
+
total: 0,
|
|
153
|
+
rows: [],
|
|
154
|
+
});
|
|
155
|
+
}
|
|
151
156
|
return {
|
|
152
157
|
total: 0,
|
|
153
158
|
rows: [],
|
package/src/utils/tree.ts
CHANGED
|
@@ -20,9 +20,11 @@ export const queryTree = (treeCtrl: TreeControl, params?: ReqParams): Promise<Tr
|
|
|
20
20
|
},
|
|
21
21
|
}).then((result: ApiResponse<TreeNode> | null) => {
|
|
22
22
|
if (result?.status === ResStatus.SUCCESS) {
|
|
23
|
-
treeCtrl.data.value = result.data as unknown as TreeNode[];
|
|
24
|
-
|
|
23
|
+
treeCtrl.data.value = (result.data as unknown as TreeNode[]) || [];
|
|
24
|
+
if (treeCtrl.afterLoad) treeCtrl.afterLoad(treeCtrl.data.value);
|
|
25
|
+
return treeCtrl.data.value;
|
|
25
26
|
}
|
|
27
|
+
if (treeCtrl.afterLoad) treeCtrl.afterLoad((result?.data as unknown as TreeNode[]) || []);
|
|
26
28
|
return [];
|
|
27
29
|
});
|
|
28
30
|
};
|
package/.cursorignore
DELETED
package/scripts/userInput.py
DELETED