@dt-frames/ui 2.0.10 → 2.0.11
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/es/components/curd/index.js +7 -2966
- package/es/components/curd/src/components/Curd.d.ts +13 -889
- package/es/components/curd/src/hooks/useCurd.d.ts +2 -2
- package/es/components/curd/src/props.d.ts +3 -3
- package/es/components/curd/src/types/curd.type.d.ts +2 -2
- package/es/components/drawer/index.d.ts +9 -166
- package/es/components/drawer/index.js +20 -458
- package/es/components/drawer/src/components/DrawerFooter.d.ts +1 -84
- package/es/components/drawer/src/index.d.ts +9 -166
- package/es/components/drawer/src/types/index.type.d.ts +1 -1
- package/es/components/form/index.d.ts +5 -1
- package/es/components/form/index.js +50 -473
- package/es/components/form/src/components/formIcon.d.ts +3 -3
- package/es/components/form/src/components/formInputUseDialog.d.ts +2 -2
- package/es/components/form/src/props.d.ts +4 -4
- package/es/components/form/src/types/form.type.d.ts +2 -0
- package/es/components/modal/index.d.ts +2 -1
- package/es/components/modal/index.js +13 -470
- package/es/components/modal/src/components/Modal.d.ts +1 -1
- package/es/components/modal/src/components/ModalFooter.d.ts +2 -95
- package/es/components/modal/src/components/ModalWrap.d.ts +1 -75
- package/es/components/modal/src/index.d.ts +10 -177
- package/es/components/table/index.js +46 -1827
- package/es/components/table/src/components/TableAction.d.ts +1 -1
- package/es/components/table/src/components/editTable/EditTableCell.d.ts +1 -1
- package/es/components/table/src/components/tableSetting/DownloadCtrl.d.ts +1 -877
- package/es/components/table/src/index.d.ts +10 -10
- package/es/components/tree/index.js +29 -39
- package/es/components/tree/src/components/TreeHeader.d.ts +1 -1
- package/es/components/tree/src/index.d.ts +2 -2
- package/es/components/upload/index.d.ts +2 -0
- package/es/components/upload/index.js +16 -0
- package/es/components/upload/index.less +0 -0
- package/es/components/upload/src/index.d.ts +2 -0
- package/es/theme/index.d.ts +2 -1
- package/es/theme/index.js +95 -144
- package/es/theme/src/hooks/useMenu.d.ts +1 -1
- package/index.js +21 -1
- package/manualContentPath.js +110 -0
- package/package.json +5 -2
- package/vite.config.ts +16 -4
- package/vite.config.ts.timestamp-1678694558071.mjs +59 -0
- package/vite.config.ts.timestamp-1678700851971.mjs +61 -0
- package/es/components/curd/index.less +0 -2
- package/es/components/form/src/index.d.ts +0 -2922
- package/es/components/table/src/components/TableHeader.d.ts +0 -1136
- package/es/components/table/src/components/tableSetting/Download.d.ts +0 -922
- package/es/components/table/src/components/tableSetting/index.d.ts +0 -1030
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RadioButton, RadioGroup, Button, FormItem as FormItem$1, Col as Col$1, Row, Form as Form$1 } from "ant-design-vue/es";
|
|
2
2
|
import "ant-design-vue/es/form/style";
|
|
3
3
|
import "ant-design-vue/es/row/style";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { computed, unref, getCurrentInstance, reactive, readonly, watchEffect, nextTick, toRaw, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode, createVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, isVNode, ref, watch, resolveDirective, normalizeStyle, withDirectives, normalizeClass, onMounted, withKeys, createSlots, renderSlot } from "vue";
|
|
5
|
+
import { useAppStore, isNumber, useI18n, isString, isFunction, error, useSlots, isArray, isBoolean, isNull, dispatchResize, isObject, deepMerge, isNullAndUnDef, isEmpty, useTimeoutFn } from "@dt-frames/core";
|
|
6
|
+
import { merge, isEqual, omit, cloneDeep, upperFirst, uniqBy, set } from "lodash-es";
|
|
7
7
|
import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem } from "ant-design-vue";
|
|
8
|
-
import {
|
|
8
|
+
import { useHeader, UiSize } from "../../theme";
|
|
9
9
|
import "ant-design-vue/es/radio/style";
|
|
10
10
|
import "ant-design-vue/es/cascader/style";
|
|
11
11
|
import "ant-design-vue/es/input-number/style";
|
|
@@ -17,471 +17,6 @@ import "ant-design-vue/es/date-picker/style";
|
|
|
17
17
|
import "ant-design-vue/es/col/style";
|
|
18
18
|
import "ant-design-vue/es/button/style";
|
|
19
19
|
import dayjs from "dayjs";
|
|
20
|
-
var Theme = /* @__PURE__ */ ((Theme2) => {
|
|
21
|
-
Theme2["DARK"] = "dark";
|
|
22
|
-
Theme2["LIGHT"] = "light";
|
|
23
|
-
return Theme2;
|
|
24
|
-
})(Theme || {});
|
|
25
|
-
var MenuType = /* @__PURE__ */ ((MenuType2) => {
|
|
26
|
-
MenuType2["SIDE"] = "sidebar";
|
|
27
|
-
MenuType2["TOP_MENU"] = "top-menu";
|
|
28
|
-
MenuType2["MIX"] = "mix";
|
|
29
|
-
MenuType2["MIX_SIDEBAR"] = "mix-sidebar";
|
|
30
|
-
return MenuType2;
|
|
31
|
-
})(MenuType || {});
|
|
32
|
-
var MenuMode = /* @__PURE__ */ ((MenuMode2) => {
|
|
33
|
-
MenuMode2["INLINE"] = "inline";
|
|
34
|
-
MenuMode2["HORIZONTAL"] = "horizontal";
|
|
35
|
-
MenuMode2["VERTICAL"] = "vertical";
|
|
36
|
-
return MenuMode2;
|
|
37
|
-
})(MenuMode || {});
|
|
38
|
-
var ContentMode = /* @__PURE__ */ ((ContentMode2) => {
|
|
39
|
-
ContentMode2["FULL"] = "full";
|
|
40
|
-
ContentMode2["FIXED"] = "fixed";
|
|
41
|
-
return ContentMode2;
|
|
42
|
-
})(ContentMode || {});
|
|
43
|
-
var UiSize = /* @__PURE__ */ ((UiSize2) => {
|
|
44
|
-
UiSize2["LARGE"] = "large";
|
|
45
|
-
UiSize2["MIDDLE"] = "middle";
|
|
46
|
-
UiSize2["SMALL"] = "small";
|
|
47
|
-
return UiSize2;
|
|
48
|
-
})(UiSize || {});
|
|
49
|
-
const defaultThemeConf = {
|
|
50
|
-
content: {
|
|
51
|
-
contentMode: ContentMode.FULL
|
|
52
|
-
},
|
|
53
|
-
headOptions: {
|
|
54
|
-
fixed: true,
|
|
55
|
-
theme: Theme.LIGHT,
|
|
56
|
-
showLogo: true,
|
|
57
|
-
showBackToTop: true,
|
|
58
|
-
useLockPage: true,
|
|
59
|
-
size: UiSize.SMALL,
|
|
60
|
-
showSize: true,
|
|
61
|
-
showBreadCrumb: true,
|
|
62
|
-
showFullScreen: true,
|
|
63
|
-
showSearch: true,
|
|
64
|
-
showNotice: true,
|
|
65
|
-
showLocaleSwitch: true,
|
|
66
|
-
showSettingTheme: true,
|
|
67
|
-
showLoginOut: true
|
|
68
|
-
},
|
|
69
|
-
menuOptions: {
|
|
70
|
-
fixed: true,
|
|
71
|
-
theme: Theme.DARK,
|
|
72
|
-
collapsed: false,
|
|
73
|
-
collapsedShowTitle: false,
|
|
74
|
-
canDrag: true,
|
|
75
|
-
show: true,
|
|
76
|
-
hidden: false,
|
|
77
|
-
split: false,
|
|
78
|
-
menuWidth: 240,
|
|
79
|
-
trigger: true,
|
|
80
|
-
type: MenuType.SIDE,
|
|
81
|
-
mode: MenuMode.INLINE,
|
|
82
|
-
mixSideTrigger: "hover"
|
|
83
|
-
},
|
|
84
|
-
footerOptions: {
|
|
85
|
-
show: false,
|
|
86
|
-
height: 48,
|
|
87
|
-
title: "Copyright(C) 2021 by www.ithinkdt.com. All rights reserved.",
|
|
88
|
-
subTitle: "Privacy Statement"
|
|
89
|
-
},
|
|
90
|
-
routeReuse: {
|
|
91
|
-
show: true,
|
|
92
|
-
cache: false,
|
|
93
|
-
canDrag: true,
|
|
94
|
-
showQuick: true,
|
|
95
|
-
showRedo: true,
|
|
96
|
-
showFold: true
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const useThemeStore = defineStore({
|
|
100
|
-
id: "dt-theme",
|
|
101
|
-
state: () => ({
|
|
102
|
-
themeConf: DtCache.getLocal(CacheKey.THEME) ?? cloneDeep(defaultThemeConf),
|
|
103
|
-
pageLoading: false,
|
|
104
|
-
mixSiderHasSubMenu: false
|
|
105
|
-
}),
|
|
106
|
-
getters: {
|
|
107
|
-
getThemeConf() {
|
|
108
|
-
return this.themeConf;
|
|
109
|
-
},
|
|
110
|
-
getHeaderConf() {
|
|
111
|
-
return this.themeConf.headOptions;
|
|
112
|
-
},
|
|
113
|
-
getMenuConf() {
|
|
114
|
-
return this.themeConf.menuOptions;
|
|
115
|
-
},
|
|
116
|
-
getFooterConf() {
|
|
117
|
-
return this.themeConf.footerOptions;
|
|
118
|
-
},
|
|
119
|
-
getRouteReuseConf() {
|
|
120
|
-
return this.themeConf.routeReuse;
|
|
121
|
-
},
|
|
122
|
-
getPageLoading() {
|
|
123
|
-
return this.pageLoading;
|
|
124
|
-
},
|
|
125
|
-
getMixSiderIsHasMenu() {
|
|
126
|
-
return this.mixSiderHasSubMenu;
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
actions: {
|
|
130
|
-
setThemeConf(options = {}) {
|
|
131
|
-
let newThemeConf = deepMerge(this.themeConf, options);
|
|
132
|
-
this.themeConf = deepMerge(defaultThemeConf, newThemeConf);
|
|
133
|
-
DtCache.setLocal(CacheKey.THEME, this.themeConf);
|
|
134
|
-
},
|
|
135
|
-
setMixSiderIsHasMenu(val) {
|
|
136
|
-
this.mixSiderHasSubMenu = val;
|
|
137
|
-
},
|
|
138
|
-
resetState() {
|
|
139
|
-
DtCache.removeLocal(CacheKey.THEME);
|
|
140
|
-
this.themeConf = cloneDeep(defaultThemeConf);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
function handleGotoPage(router) {
|
|
145
|
-
const go = useGo(router);
|
|
146
|
-
go(unref(router.currentRoute).path, true);
|
|
147
|
-
}
|
|
148
|
-
defineStore({
|
|
149
|
-
id: "route-reuse",
|
|
150
|
-
state: () => ({
|
|
151
|
-
cacheTabList: /* @__PURE__ */ new Set(),
|
|
152
|
-
tabList: DtCache.getLocal(CacheKey.ROUTE_REUSE) || [],
|
|
153
|
-
lastDragEndIndex: 0
|
|
154
|
-
}),
|
|
155
|
-
getters: {
|
|
156
|
-
getTabList() {
|
|
157
|
-
return this.tabList;
|
|
158
|
-
},
|
|
159
|
-
getCachedTabList() {
|
|
160
|
-
return Array.from(this.cacheTabList);
|
|
161
|
-
},
|
|
162
|
-
getLastDragEndIndex() {
|
|
163
|
-
return this.lastDragEndIndex;
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
actions: {
|
|
167
|
-
async addTab(route) {
|
|
168
|
-
const { path, name, fullPath, params, query, meta } = route;
|
|
169
|
-
if (path === Pages.NOT_FOUND || path === Pages.LOGIN || path === Pages.BASE_PAGE) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
let updateIndex = -1;
|
|
173
|
-
const tabHasExits = this.tabList.some((tab, index) => {
|
|
174
|
-
updateIndex = index;
|
|
175
|
-
return (tab.fullPath || tab.path) === (fullPath || path);
|
|
176
|
-
});
|
|
177
|
-
if (tabHasExits) {
|
|
178
|
-
const curTab = toRaw(this.tabList)[updateIndex];
|
|
179
|
-
curTab.params = params || curTab.params;
|
|
180
|
-
curTab.query = query || curTab.query;
|
|
181
|
-
curTab.fullPath = fullPath || curTab.fullPath;
|
|
182
|
-
this.tabList.splice(updateIndex, 1, curTab);
|
|
183
|
-
} else {
|
|
184
|
-
this.tabList.push(JSON.parse(JSON.stringify(route)));
|
|
185
|
-
}
|
|
186
|
-
this.updateCacheTab();
|
|
187
|
-
},
|
|
188
|
-
closeTab(route, router) {
|
|
189
|
-
const go = useGo(router);
|
|
190
|
-
const index = this.tabList.findIndex((item) => item.path === route.path);
|
|
191
|
-
let page;
|
|
192
|
-
if (index === 0) {
|
|
193
|
-
if (this.tabList.length !== 1) {
|
|
194
|
-
page = this.tabList[index + 1];
|
|
195
|
-
}
|
|
196
|
-
} else {
|
|
197
|
-
page = this.tabList[index - 1];
|
|
198
|
-
}
|
|
199
|
-
this.bulkCloseTabs([route.path]);
|
|
200
|
-
this.updateCacheTab();
|
|
201
|
-
route.path === router.currentRoute.value.path && go(page.path);
|
|
202
|
-
},
|
|
203
|
-
closeAllTab(currentRoute, router) {
|
|
204
|
-
const go = useGo(router);
|
|
205
|
-
let filterTabList = this.tabList.filter((item) => item?.meta?.affix ?? false);
|
|
206
|
-
const route = filterTabList.length > 0 ? filterTabList[filterTabList.length - 1] : unref(currentRoute);
|
|
207
|
-
this.tabList = [route];
|
|
208
|
-
this.updateCacheTab();
|
|
209
|
-
go(route.path);
|
|
210
|
-
},
|
|
211
|
-
closeLeftTabs(route, router) {
|
|
212
|
-
const index = this.tabList.findIndex((item) => item.path === route.path);
|
|
213
|
-
if (index > 0) {
|
|
214
|
-
const leftTabs = this.tabList.slice(0, index);
|
|
215
|
-
const pathList = [];
|
|
216
|
-
for (const item of leftTabs) {
|
|
217
|
-
const affix = item?.meta?.affix ?? false;
|
|
218
|
-
if (!affix) {
|
|
219
|
-
pathList.push(item.fullPath);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
this.bulkCloseTabs(pathList);
|
|
223
|
-
}
|
|
224
|
-
this.updateCacheTab();
|
|
225
|
-
handleGotoPage(router);
|
|
226
|
-
},
|
|
227
|
-
closeRightTabs(route, router) {
|
|
228
|
-
const index = this.tabList.findIndex((item) => item.path === route.path);
|
|
229
|
-
if (index >= 0 && index < this.tabList.length - 1) {
|
|
230
|
-
const rightTabs = this.tabList.slice(index + 1, this.tabList.length);
|
|
231
|
-
const pathList = [];
|
|
232
|
-
for (const item of rightTabs) {
|
|
233
|
-
const affix = item?.meta?.affix ?? false;
|
|
234
|
-
if (!affix) {
|
|
235
|
-
pathList.push(item.fullPath);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
this.bulkCloseTabs(pathList);
|
|
239
|
-
}
|
|
240
|
-
this.updateCacheTab();
|
|
241
|
-
handleGotoPage(router);
|
|
242
|
-
},
|
|
243
|
-
closeOtherTabs(route, router) {
|
|
244
|
-
const pathList = [];
|
|
245
|
-
for (let item of this.tabList) {
|
|
246
|
-
const affix = item?.meta?.affix ?? false;
|
|
247
|
-
if (item.path !== route.path && !affix) {
|
|
248
|
-
pathList.push(item.path);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
this.bulkCloseTabs(pathList);
|
|
252
|
-
this.updateCacheTab();
|
|
253
|
-
handleGotoPage(router);
|
|
254
|
-
},
|
|
255
|
-
closeTabByKey(path, router) {
|
|
256
|
-
const go = useGo(router);
|
|
257
|
-
const index = this.tabList.findIndex((item) => item.path === path);
|
|
258
|
-
let page;
|
|
259
|
-
if (index === 0) {
|
|
260
|
-
if (this.tabList.length !== 1) {
|
|
261
|
-
page = this.tabList[index + 1];
|
|
262
|
-
}
|
|
263
|
-
} else {
|
|
264
|
-
page = this.tabList[index - 1];
|
|
265
|
-
}
|
|
266
|
-
this.bulkCloseTabs([path]);
|
|
267
|
-
this.updateCacheTab();
|
|
268
|
-
path === router.currentRoute.value.path && go(page.path);
|
|
269
|
-
},
|
|
270
|
-
bulkCloseTabs(pathList) {
|
|
271
|
-
this.tabList = this.tabList.filter((item) => !pathList.includes(item.fullPath));
|
|
272
|
-
},
|
|
273
|
-
updateCacheTab() {
|
|
274
|
-
DtCache.setLocal(CacheKey.ROUTE_REUSE, this.tabList);
|
|
275
|
-
const cacheMap = /* @__PURE__ */ new Set();
|
|
276
|
-
for (const tab of this.tabList) {
|
|
277
|
-
if (tab.meta?.hideTab) {
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
const name = tab.name;
|
|
281
|
-
cacheMap.add(name);
|
|
282
|
-
}
|
|
283
|
-
this.cacheTabList = cacheMap;
|
|
284
|
-
},
|
|
285
|
-
async refreshPage(router) {
|
|
286
|
-
const findTab = this.getCachedTabList.find((item) => item === unref(router.currentRoute).name);
|
|
287
|
-
if (findTab) {
|
|
288
|
-
this.cacheTabList.delete(findTab.toString());
|
|
289
|
-
}
|
|
290
|
-
const redo = useRedo(router);
|
|
291
|
-
await redo();
|
|
292
|
-
},
|
|
293
|
-
sortTabs(oldIndex, newIndex) {
|
|
294
|
-
const currentTab = this.tabList[oldIndex];
|
|
295
|
-
this.tabList.splice(oldIndex, 1);
|
|
296
|
-
this.tabList.splice(newIndex, 0, currentTab);
|
|
297
|
-
this.lastDragEndIndex = this.lastDragEndIndex + 1;
|
|
298
|
-
},
|
|
299
|
-
resetState() {
|
|
300
|
-
this.tabList = [];
|
|
301
|
-
this.updateCacheTab();
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
function useMenu() {
|
|
306
|
-
const { setThemeConf } = useThemeStore();
|
|
307
|
-
const getCollapsedShowTitle = computed(() => useThemeStore().getMenuConf.collapsedShowTitle);
|
|
308
|
-
const getIsSidebarType = computed(() => useThemeStore().getMenuConf.type === MenuType.SIDE);
|
|
309
|
-
const getMenuFixed = computed(() => useThemeStore().getMenuConf.fixed);
|
|
310
|
-
const getShowMenu = computed(() => useThemeStore().getMenuConf.show);
|
|
311
|
-
const getShowSidebar = computed(() => {
|
|
312
|
-
return unref(getSplit) || unref(getShowMenu) && unref(getMenuMode) !== MenuMode.HORIZONTAL;
|
|
313
|
-
});
|
|
314
|
-
const getMenuHidden = computed(() => useThemeStore().getMenuConf.hidden);
|
|
315
|
-
const getMenuTheme = computed(() => useThemeStore().getMenuConf.theme);
|
|
316
|
-
const getTrigger = computed(() => useThemeStore().getMenuConf.trigger);
|
|
317
|
-
const getCanDrag = computed(() => useThemeStore().getMenuConf.canDrag);
|
|
318
|
-
const getIsMixMode = computed(() => {
|
|
319
|
-
return unref(getMenuMode) === MenuMode.INLINE && unref(getMenuType) === MenuType.MIX;
|
|
320
|
-
});
|
|
321
|
-
const getIsMixSidebar = computed(() => unref(getMenuType) === MenuType.MIX_SIDEBAR);
|
|
322
|
-
const getMenuWidth = computed(() => {
|
|
323
|
-
if (unref(getIsMixMode)) {
|
|
324
|
-
return Number(useThemeStore().getMenuConf.menuWidth) - 40;
|
|
325
|
-
} else if (unref(getIsMixSidebar)) {
|
|
326
|
-
return Number(useThemeStore().getMenuConf.menuWidth) - 10;
|
|
327
|
-
} else {
|
|
328
|
-
return Number(useThemeStore().getMenuConf.menuWidth);
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
const getMixSideTrigger = computed(() => useThemeStore().getMenuConf.mixSideTrigger);
|
|
332
|
-
const getLogoWidth = computed(() => unref(getIsMixSidebar) ? "80px" : useThemeStore().getMenuConf.menuWidth);
|
|
333
|
-
const getMenuType = computed(() => useThemeStore().getMenuConf.type);
|
|
334
|
-
const getIsTopMenu = computed(() => unref(getMenuType) === MenuType.TOP_MENU);
|
|
335
|
-
const getMenuMode = computed(() => useThemeStore().getMenuConf.mode);
|
|
336
|
-
const getSplit = computed(() => useThemeStore().getMenuConf.split);
|
|
337
|
-
const getCollapsed = computed(() => useThemeStore().getMenuConf.collapsed);
|
|
338
|
-
const getIsHorizontal = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL);
|
|
339
|
-
const setThemeStore = (conf = {}) => setThemeConf(conf);
|
|
340
|
-
const toggleCollapsed = () => setThemeStore({
|
|
341
|
-
menuOptions: {
|
|
342
|
-
collapsed: !unref(getCollapsed)
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
const getMiniWidthNumber = computed(() => useThemeStore().getMenuConf.collapsedShowTitle ? 80 : 48);
|
|
346
|
-
const getRealWidth = computed(() => {
|
|
347
|
-
return unref(getCollapsed) ? unref(getMiniWidthNumber) : unref(getMenuWidth);
|
|
348
|
-
});
|
|
349
|
-
const getCalcContentWidth = computed(() => {
|
|
350
|
-
const width = unref(getIsTopMenu) || !unref(getShowMenu) || unref(getSplit) && unref(getMenuHidden) ? 0 : unref(getRealWidth);
|
|
351
|
-
return `calc(100% - ${unref(width)}px)`;
|
|
352
|
-
});
|
|
353
|
-
return {
|
|
354
|
-
getCollapsedShowTitle,
|
|
355
|
-
getIsSidebarType,
|
|
356
|
-
getMenuFixed,
|
|
357
|
-
getShowMenu,
|
|
358
|
-
getShowSidebar,
|
|
359
|
-
getMenuHidden,
|
|
360
|
-
getMenuTheme,
|
|
361
|
-
getTrigger,
|
|
362
|
-
getMenuWidth,
|
|
363
|
-
getLogoWidth,
|
|
364
|
-
getMenuType,
|
|
365
|
-
getIsTopMenu,
|
|
366
|
-
getMenuMode,
|
|
367
|
-
getSplit,
|
|
368
|
-
getCollapsed,
|
|
369
|
-
getIsHorizontal,
|
|
370
|
-
getMiniWidthNumber,
|
|
371
|
-
getRealWidth,
|
|
372
|
-
getCalcContentWidth,
|
|
373
|
-
getIsMixMode,
|
|
374
|
-
getIsMixSidebar,
|
|
375
|
-
getCanDrag,
|
|
376
|
-
getMixSideTrigger,
|
|
377
|
-
toggleCollapsed,
|
|
378
|
-
setThemeStore
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
function useMultipleTab() {
|
|
382
|
-
const { getRouteReuseConf } = useThemeStore();
|
|
383
|
-
const getShowMultipleTab = computed(() => getRouteReuseConf.show);
|
|
384
|
-
const getShowQuick = computed(() => getRouteReuseConf.showQuick);
|
|
385
|
-
const getMultipleTabPosIsTop = computed(() => getRouteReuseConf.position === "top");
|
|
386
|
-
const getShowRedo = computed(() => getRouteReuseConf.showRedo);
|
|
387
|
-
const getCanCache = computed(() => getRouteReuseConf.cache);
|
|
388
|
-
const getCanDrag = computed(() => getRouteReuseConf.canDrag);
|
|
389
|
-
return {
|
|
390
|
-
getShowMultipleTab,
|
|
391
|
-
getShowQuick,
|
|
392
|
-
getMultipleTabPosIsTop,
|
|
393
|
-
getShowRedo,
|
|
394
|
-
getCanCache,
|
|
395
|
-
getCanDrag
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
function useHeader() {
|
|
399
|
-
const HEADER_HEIGHT = 48;
|
|
400
|
-
const TABS_HEIGHT = 33;
|
|
401
|
-
const { getHeaderConf = {} } = useThemeStore();
|
|
402
|
-
const {
|
|
403
|
-
getIsSidebarType,
|
|
404
|
-
getMenuType,
|
|
405
|
-
getShowMenu,
|
|
406
|
-
getMenuHidden,
|
|
407
|
-
getTrigger,
|
|
408
|
-
getMenuMode,
|
|
409
|
-
getSplit,
|
|
410
|
-
getIsTopMenu,
|
|
411
|
-
getIsMixSidebar
|
|
412
|
-
} = useMenu();
|
|
413
|
-
const { getShowMultipleTab, getMultipleTabPosIsTop } = useMultipleTab();
|
|
414
|
-
const getHeaderTheme = computed(() => getHeaderConf.theme);
|
|
415
|
-
const getFixed = computed(() => getHeaderConf.fixed);
|
|
416
|
-
const getShowHeaderLogo = computed(() => unref(getShowLogo) && !unref(getIsSidebarType) && !unref(getIsMixSidebar));
|
|
417
|
-
const getShowSearch = computed(() => getHeaderConf.showSearch);
|
|
418
|
-
const getShowHeaderTrigger = computed(() => {
|
|
419
|
-
if (unref(getMenuType) === MenuType.TOP_MENU || !unref(getShowMenu) || unref(getMenuHidden)) {
|
|
420
|
-
return false;
|
|
421
|
-
}
|
|
422
|
-
return unref(getTrigger);
|
|
423
|
-
});
|
|
424
|
-
const getShowBreadCrumb = computed(() => getHeaderConf.showBreadCrumb);
|
|
425
|
-
const getShowBread = computed(
|
|
426
|
-
() => unref(getMenuMode) !== MenuMode.HORIZONTAL && !unref(getSplit) && unref(getShowBreadCrumb)
|
|
427
|
-
);
|
|
428
|
-
const getShowTopMenu = computed(() => unref(getMenuMode) === MenuMode.HORIZONTAL || unref(getSplit));
|
|
429
|
-
const getShowNotice = computed(() => getHeaderConf.showNotice);
|
|
430
|
-
const getShowFullScreen = computed(() => getHeaderConf.showFullScreen);
|
|
431
|
-
const getShowLocale = computed(() => getHeaderConf.showLocaleSwitch);
|
|
432
|
-
const getShowSettingTheme = computed(() => getHeaderConf.showSettingTheme);
|
|
433
|
-
const getShowFullHeaderRef = computed(() => {
|
|
434
|
-
return !unref(getIsSidebarType) && !unref(getIsMixSidebar) && !unref(getIsTopMenu);
|
|
435
|
-
});
|
|
436
|
-
const getHeaderHeight = computed(() => {
|
|
437
|
-
let height = 0;
|
|
438
|
-
height += HEADER_HEIGHT;
|
|
439
|
-
if (unref(getShowMultipleTab) && !unref(getSplit) && !unref(getMultipleTabPosIsTop)) {
|
|
440
|
-
height += TABS_HEIGHT;
|
|
441
|
-
}
|
|
442
|
-
return height;
|
|
443
|
-
});
|
|
444
|
-
const getTabsHeight = computed(() => TABS_HEIGHT);
|
|
445
|
-
const getShowInsetHeaderRef = computed(() => {
|
|
446
|
-
return unref(getIsSidebarType) || unref(getIsTopMenu) || unref(getIsMixSidebar);
|
|
447
|
-
});
|
|
448
|
-
const getShowBackToTop = computed(() => getHeaderConf.showBackToTop);
|
|
449
|
-
const getIsZH = computed(() => {
|
|
450
|
-
let local = DtCache.getLocal(CacheKey.LOCALE);
|
|
451
|
-
if (!local)
|
|
452
|
-
return true;
|
|
453
|
-
return local === Language.ZH;
|
|
454
|
-
});
|
|
455
|
-
const getUiSize = computed(() => getHeaderConf?.size ?? UiSize.SMALL);
|
|
456
|
-
const getShowUiSize = computed(() => getHeaderConf?.showSize);
|
|
457
|
-
const getShowLogo = computed(() => getHeaderConf.showLogo);
|
|
458
|
-
const getShowLoginOut = computed(() => getHeaderConf.showLoginOut);
|
|
459
|
-
const loginOutClick = getHeaderConf.logoutClick;
|
|
460
|
-
return {
|
|
461
|
-
getHeaderTheme,
|
|
462
|
-
getFixed,
|
|
463
|
-
getShowSearch,
|
|
464
|
-
getShowHeaderLogo,
|
|
465
|
-
getShowHeaderTrigger,
|
|
466
|
-
getShowBread,
|
|
467
|
-
getShowTopMenu,
|
|
468
|
-
getShowFullScreen,
|
|
469
|
-
getShowLocale,
|
|
470
|
-
getShowSettingTheme,
|
|
471
|
-
getShowNotice,
|
|
472
|
-
getShowFullHeaderRef,
|
|
473
|
-
getHeaderHeight,
|
|
474
|
-
getTabsHeight,
|
|
475
|
-
getShowInsetHeaderRef,
|
|
476
|
-
getShowBackToTop,
|
|
477
|
-
getIsZH,
|
|
478
|
-
getUiSize,
|
|
479
|
-
getShowLogo,
|
|
480
|
-
getShowLoginOut,
|
|
481
|
-
getShowUiSize,
|
|
482
|
-
loginOutClick
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
20
|
function useLabelWidth(schemaItemRef, propsRef) {
|
|
486
21
|
const { getIsZH } = useHeader();
|
|
487
22
|
const { appConf } = useAppStore();
|
|
@@ -581,7 +116,7 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
|
|
|
581
116
|
});
|
|
582
117
|
return [state, setState, defaultState];
|
|
583
118
|
}
|
|
584
|
-
const _sfc_main$
|
|
119
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
585
120
|
__name: "radioButton",
|
|
586
121
|
props: {
|
|
587
122
|
value: {
|
|
@@ -632,8 +167,49 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
632
167
|
};
|
|
633
168
|
}
|
|
634
169
|
});
|
|
170
|
+
const _hoisted_1$1 = { class: "input-with-dialog" };
|
|
171
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
172
|
+
__name: "formInputUseDialog",
|
|
173
|
+
setup(__props) {
|
|
174
|
+
const { t } = useI18n("UI");
|
|
175
|
+
const attrs = useAttrs();
|
|
176
|
+
const bindProps = computed(() => {
|
|
177
|
+
return {
|
|
178
|
+
...omit(attrs, [
|
|
179
|
+
"formValues"
|
|
180
|
+
]),
|
|
181
|
+
disabled: true
|
|
182
|
+
};
|
|
183
|
+
});
|
|
184
|
+
function onClickInput() {
|
|
185
|
+
const { model, schema = {} } = attrs.formValues;
|
|
186
|
+
if (!schema.openDialog || !isFunction(schema.openDialog)) {
|
|
187
|
+
error(t("MUSE_FUNCTION"));
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
schema.openDialog(model);
|
|
191
|
+
}
|
|
192
|
+
function clearProps() {
|
|
193
|
+
const { model, schema = {} } = attrs.formValues;
|
|
194
|
+
[...schema.extraName, schema.name].forEach((it) => model[it] = null);
|
|
195
|
+
}
|
|
196
|
+
return (_ctx, _cache) => {
|
|
197
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
198
|
+
createElementVNode("div", { onClick: onClickInput }, [
|
|
199
|
+
createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
|
|
200
|
+
]),
|
|
201
|
+
unref(attrs).formValues?.schema?.extraName?.length ? (openBlock(), createElementBlock("i", {
|
|
202
|
+
key: 0,
|
|
203
|
+
class: "i mdi:close-circle",
|
|
204
|
+
onClick: clearProps
|
|
205
|
+
})) : createCommentVNode("", true)
|
|
206
|
+
]);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
});
|
|
635
210
|
const components = {
|
|
636
211
|
Input,
|
|
212
|
+
InputWithDialog: _sfc_main$3,
|
|
637
213
|
InputTextArea: Input.TextArea,
|
|
638
214
|
InputSearch: Input.Search,
|
|
639
215
|
InputGroup: Input.Group,
|
|
@@ -642,7 +218,7 @@ const components = {
|
|
|
642
218
|
TreeSelect,
|
|
643
219
|
Radio,
|
|
644
220
|
RadioGroup: Radio.Group,
|
|
645
|
-
RadioButtonGroup: _sfc_main$
|
|
221
|
+
RadioButtonGroup: _sfc_main$4,
|
|
646
222
|
Checkbox,
|
|
647
223
|
CheckboxGroup: Checkbox.Group,
|
|
648
224
|
AutoComplete,
|
|
@@ -1501,7 +1077,7 @@ function useFormActions(opt) {
|
|
|
1501
1077
|
schemas,
|
|
1502
1078
|
minShowColumn = appConf.ui.form?.minShowColumn || 2,
|
|
1503
1079
|
showAdvancedButton = true
|
|
1504
|
-
} = unref(
|
|
1080
|
+
} = unref(getProps);
|
|
1505
1081
|
let schema = [...schemas];
|
|
1506
1082
|
if (showAdvancedButton) {
|
|
1507
1083
|
schema = schemas.reduce((t, it, index) => {
|
|
@@ -1758,7 +1334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1758
1334
|
buttonList = [...buttons];
|
|
1759
1335
|
} else if (mode === "search" && !buttons) {
|
|
1760
1336
|
SEARCH_BTNS.forEach((it) => {
|
|
1761
|
-
it.loading = it.
|
|
1337
|
+
it.loading = it.label === SEARCH_BTN_NAME ? loading?.onSearch : loading?.onReset;
|
|
1762
1338
|
buttonList.push(it);
|
|
1763
1339
|
});
|
|
1764
1340
|
}
|
|
@@ -1939,5 +1515,6 @@ function useForm(props) {
|
|
|
1939
1515
|
}
|
|
1940
1516
|
export {
|
|
1941
1517
|
_sfc_main as DtForm,
|
|
1518
|
+
_sfc_main$1 as DtFormButtons,
|
|
1942
1519
|
useForm
|
|
1943
1520
|
};
|
|
@@ -10,7 +10,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
10
10
|
(key: string, list: unknown[]): string;
|
|
11
11
|
(key: string, named: Record<string, unknown>): string;
|
|
12
12
|
};
|
|
13
|
-
getUiSize: import("vue").ComputedRef<import(
|
|
13
|
+
getUiSize: import("vue").ComputedRef<import('../../../../theme').UiSize>;
|
|
14
14
|
iconRef: any;
|
|
15
15
|
props: any;
|
|
16
16
|
state: any;
|
|
@@ -457,7 +457,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
457
457
|
inputPrefixCls: StringConstructor;
|
|
458
458
|
enterButton: import("vue-types").VueTypeValidableDef<any>;
|
|
459
459
|
onSearch: {
|
|
460
|
-
type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent |
|
|
460
|
+
type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
|
|
461
461
|
};
|
|
462
462
|
id: StringConstructor;
|
|
463
463
|
prefixCls: StringConstructor;
|
|
@@ -529,7 +529,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
529
529
|
inputPrefixCls: StringConstructor;
|
|
530
530
|
enterButton: import("vue-types").VueTypeValidableDef<any>;
|
|
531
531
|
onSearch: {
|
|
532
|
-
type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent |
|
|
532
|
+
type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
|
|
533
533
|
};
|
|
534
534
|
id: StringConstructor;
|
|
535
535
|
prefixCls: StringConstructor;
|
|
@@ -410,7 +410,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
410
410
|
inputPrefixCls: StringConstructor;
|
|
411
411
|
enterButton: import("vue-types").VueTypeValidableDef<any>;
|
|
412
412
|
onSearch: {
|
|
413
|
-
type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent |
|
|
413
|
+
type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
|
|
414
414
|
};
|
|
415
415
|
id: StringConstructor;
|
|
416
416
|
prefixCls: StringConstructor;
|
|
@@ -482,7 +482,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
482
482
|
inputPrefixCls: StringConstructor;
|
|
483
483
|
enterButton: import("vue-types").VueTypeValidableDef<any>;
|
|
484
484
|
onSearch: {
|
|
485
|
-
type: import("vue").PropType<(value: string, event?: import("ant-design-vue/lib/_util/EventInterface").ChangeEvent |
|
|
485
|
+
type: import("vue").PropType<(value: string, event?: MouseEvent | import("ant-design-vue/lib/_util/EventInterface").ChangeEvent | KeyboardEvent) => void>;
|
|
486
486
|
};
|
|
487
487
|
id: StringConstructor;
|
|
488
488
|
prefixCls: StringConstructor;
|
|
@@ -16,7 +16,7 @@ export declare const BasicProps: {
|
|
|
16
16
|
default: () => {};
|
|
17
17
|
};
|
|
18
18
|
layout: {
|
|
19
|
-
type: PropType<"
|
|
19
|
+
type: PropType<"inline" | "horizontal" | "vertical">;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
labelWidth: {
|
|
@@ -41,8 +41,8 @@ export declare const BasicProps: {
|
|
|
41
41
|
};
|
|
42
42
|
rowProps: {
|
|
43
43
|
type: PropType<Partial<import("vue").ExtractPropTypes<{
|
|
44
|
-
align: PropType<"
|
|
45
|
-
justify: PropType<"
|
|
44
|
+
align: PropType<"bottom" | "top" | "stretch" | "middle">;
|
|
45
|
+
justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
|
|
46
46
|
prefixCls: StringConstructor;
|
|
47
47
|
gutter: {
|
|
48
48
|
type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
@@ -60,7 +60,7 @@ export declare const BasicProps: {
|
|
|
60
60
|
default: () => {};
|
|
61
61
|
};
|
|
62
62
|
size: {
|
|
63
|
-
type: PropType<"
|
|
63
|
+
type: PropType<"large" | "small" | "middle">;
|
|
64
64
|
};
|
|
65
65
|
disabled: {
|
|
66
66
|
type: BooleanConstructor;
|
|
@@ -13,6 +13,8 @@ export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' |
|
|
|
13
13
|
export declare type ColEx = {
|
|
14
14
|
style?: any;
|
|
15
15
|
span?: number | string;
|
|
16
|
+
pull?: number;
|
|
17
|
+
push?: number;
|
|
16
18
|
order?: number | string;
|
|
17
19
|
offset?: number | string;
|
|
18
20
|
md?: number | string;
|