@zjhc/ui 0.0.0-stage → 0.1.0
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/LICENSE +51 -0
- package/NOTICE +23 -0
- package/README.md +177 -2
- package/dist/component.d.ts +3 -0
- package/dist/components/autocomplete/index.d.ts +5 -0
- package/dist/components/autocomplete/src/autoComplete.vue.d.ts +511 -0
- package/dist/components/autocomplete/src/autocomplete.d.ts +50 -0
- package/dist/components/collapse-container/index.d.ts +6 -0
- package/dist/components/collapse-container/src/collapseContainer.vue.d.ts +47 -0
- package/dist/components/collapse-container/src/instance.d.ts +2 -0
- package/dist/components/collapse-panel/index.d.ts +6 -0
- package/dist/components/collapse-panel/src/collapsePanel.vue.d.ts +68 -0
- package/dist/components/collapse-panel/src/instance.d.ts +2 -0
- package/dist/components/complex-table/index.d.ts +7 -0
- package/dist/components/complex-table/src/ComplexTable.vue.d.ts +1428 -0
- package/dist/components/complex-table/src/TableOperator.vue.d.ts +41 -0
- package/dist/components/complex-table/src/instance.d.ts +4 -0
- package/dist/components/dialog/index.d.ts +5 -0
- package/dist/components/dialog/src/dialog-content.d.ts +20 -0
- package/dist/components/dialog/src/dialog.d.ts +76 -0
- package/dist/components/dialog/src/dialog.vue.d.ts +456 -0
- package/dist/components/dialog/src/dialogContent.vue.d.ts +74 -0
- package/dist/components/dialog/src/use-dialog.d.ts +23 -0
- package/dist/components/edit-table-column/EditTableColumn.vue.d.ts +79 -0
- package/dist/components/edit-table-column/index.d.ts +6 -0
- package/dist/components/edit-table-column/registerComp.d.ts +3 -0
- package/dist/components/edit-table-column/type.d.ts +14 -0
- package/dist/components/group-container/index.d.ts +6 -0
- package/dist/components/group-container/src/groupContainer.vue.d.ts +43 -0
- package/dist/components/group-container/src/instance.d.ts +2 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/loading/index.d.ts +11 -0
- package/dist/components/loading/src/directive.d.ts +13 -0
- package/dist/components/loading/src/loading.d.ts +27 -0
- package/dist/components/loading/src/service.d.ts +3 -0
- package/dist/components/loading/src/types.d.ts +61 -0
- package/dist/components/search-layout/index.d.ts +6 -0
- package/dist/components/search-layout/src/instance.d.ts +2 -0
- package/dist/components/search-layout/src/searchLayout.vue.d.ts +22 -0
- package/dist/components/search-panel/index.d.ts +6 -0
- package/dist/components/search-panel/src/instance.d.ts +2 -0
- package/dist/components/search-panel/src/searchPanel.vue.d.ts +17 -0
- package/dist/components/search-panel-layout/index.d.ts +6 -0
- package/dist/components/search-panel-layout/src/layout.d.ts +95 -0
- package/dist/components/sticky-toolbar/index.d.ts +6 -0
- package/dist/components/sticky-toolbar/src/instance.d.ts +2 -0
- package/dist/components/sticky-toolbar/src/stickyToolbar.vue.d.ts +43 -0
- package/dist/components/switch-mode/index.d.ts +7 -0
- package/dist/components/switch-theme/index.d.ts +7 -0
- package/dist/components/table-toolbar/index.d.ts +7 -0
- package/dist/components/table-toolbar/src/buttonGroup.vue.d.ts +79 -0
- package/dist/components/table-toolbar/src/interface.d.ts +21 -0
- package/dist/components/table-toolbar/src/tableToolbar.vue.d.ts +71 -0
- package/dist/constants/aria.d.ts +17 -0
- package/dist/constants/date.d.ts +3 -0
- package/dist/constants/event.d.ts +3 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/key.d.ts +1 -0
- package/dist/constants/size.d.ts +7 -0
- package/dist/defaults.d.ts +5 -0
- package/dist/hooks/complex-table/index.d.ts +33 -0
- package/dist/hooks/get-cookie/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/oper-modal/index.d.ts +8 -0
- package/dist/hooks/post-message/index.d.ts +19 -0
- package/dist/hooks/set-theme/index.d.ts +2 -0
- package/dist/hooks/use-draggable-resize/index.d.ts +10 -0
- package/dist/hooks/use-loading/index.d.ts +4 -0
- package/dist/hooks/use-namespace/index.d.ts +20 -0
- package/dist/icons/arrow-down.vue.d.ts +2 -0
- package/dist/icons/arrow-up.vue.d.ts +2 -0
- package/dist/icons/check.vue.d.ts +2 -0
- package/dist/icons/close.vue.d.ts +2 -0
- package/dist/icons/copy-document.vue.d.ts +2 -0
- package/dist/icons/filter.vue.d.ts +2 -0
- package/dist/icons/full-screen.vue.d.ts +2 -0
- package/dist/icons/index.d.ts +9 -0
- package/dist/icons/loading.vue.d.ts +2 -0
- package/dist/icons/minus.vue.d.ts +2 -0
- package/dist/index.cjs +3985 -0
- package/dist/index.css +2661 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +3985 -0
- package/dist/make-installer.d.ts +5 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/types/enhance/accessory.d.ts +45 -0
- package/dist/types/enhance/biztrace.d.ts +75 -0
- package/dist/types/enhance/form.d.ts +83 -0
- package/dist/types/enhance/heai.d.ts +47 -0
- package/dist/types/enhance/workflow.d.ts +385 -0
- package/dist/types/extension/extension.d.ts +58 -0
- package/dist/types/extension/frame.d.ts +48 -0
- package/dist/types/extension/job.d.ts +36 -0
- package/dist/types/framework/auth.d.ts +38 -0
- package/dist/types/framework/config.d.ts +13 -0
- package/dist/types/framework/core.d.ts +24 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/style.d.ts +10 -0
- package/dist/utils/tools/istype.d.ts +11 -0
- package/dist/utils/tools/security.d.ts +2 -0
- package/dist/utils/tools/throw-error.d.ts +1 -0
- package/dist/utils/tools/tree.d.ts +2 -0
- package/dist/utils/vue/index.d.ts +2 -0
- package/dist/utils/vue/install.d.ts +6 -0
- package/dist/utils/vue/shared.d.ts +10 -0
- package/dist/utils/vue/typescript.d.ts +5 -0
- package/dist/version.d.ts +1 -0
- package/package.json +76 -4
- package/theme-chalk/autocomplete.css +144 -0
- package/theme-chalk/base-var.css +1037 -0
- package/theme-chalk/base.css +120 -0
- package/theme-chalk/collapse-container.css +71 -0
- package/theme-chalk/collapse-panel.css +49 -0
- package/theme-chalk/complextable.css +72 -0
- package/theme-chalk/dark.css +134 -0
- package/theme-chalk/dialog.css +0 -0
- package/theme-chalk/document-tables.css +175 -0
- package/theme-chalk/group-container.css +159 -0
- package/theme-chalk/index.css +2661 -0
- package/theme-chalk/loading.css +86 -0
- package/theme-chalk/page.css +34 -0
- package/theme-chalk/pub-class.css +417 -0
- package/theme-chalk/reset.css +152 -0
- package/theme-chalk/search-panel.css +31 -0
- package/theme-chalk/searchlayout.css +125 -0
- package/theme-chalk/src/autocomplete.scss +103 -0
- package/theme-chalk/src/base-var.scss +489 -0
- package/theme-chalk/src/base.scss +1 -0
- package/theme-chalk/src/black/index.scss +4 -0
- package/theme-chalk/src/collapse-container.scss +44 -0
- package/theme-chalk/src/collapse-panel.scss +26 -0
- package/theme-chalk/src/common/var.scss +154 -0
- package/theme-chalk/src/complextable.scss +47 -0
- package/theme-chalk/src/dark/css-vars.scss +35 -0
- package/theme-chalk/src/dark/var.scss +198 -0
- package/theme-chalk/src/dialog.scss +0 -0
- package/theme-chalk/src/document-tables.scss +133 -0
- package/theme-chalk/src/group-container.scss +139 -0
- package/theme-chalk/src/index.scss +17 -0
- package/theme-chalk/src/light/css-vars.scss +4 -0
- package/theme-chalk/src/light/var.scss +158 -0
- package/theme-chalk/src/loading.scss +68 -0
- package/theme-chalk/src/mixins/_var.scss +48 -0
- package/theme-chalk/src/mixins/config.scss +5 -0
- package/theme-chalk/src/mixins/function.scss +133 -0
- package/theme-chalk/src/mixins/mixins.scss +211 -0
- package/theme-chalk/src/page.scss +8 -0
- package/theme-chalk/src/pub-class.scss +127 -0
- package/theme-chalk/src/reset.scss +155 -0
- package/theme-chalk/src/search-panel.scss +10 -0
- package/theme-chalk/src/searchlayout.scss +114 -0
- package/theme-chalk/src/sticky-toolbar.scss +59 -0
- package/theme-chalk/src/table-toolbar.scss +36 -0
- package/theme-chalk/src/var.scss +32 -0
- package/theme-chalk/src/zjhc/alert.scss +16 -0
- package/theme-chalk/src/zjhc/anchor.scss +10 -0
- package/theme-chalk/src/zjhc/autocomplete.scss +11 -0
- package/theme-chalk/src/zjhc/backtop.scss +8 -0
- package/theme-chalk/src/zjhc/breadcrumb.scss +3 -0
- package/theme-chalk/src/zjhc/button.scss +82 -0
- package/theme-chalk/src/zjhc/calendar.scss +5 -0
- package/theme-chalk/src/zjhc/card.scss +5 -0
- package/theme-chalk/src/zjhc/cascader.scss +26 -0
- package/theme-chalk/src/zjhc/checkbox.scss +59 -0
- package/theme-chalk/src/zjhc/collapse.scss +8 -0
- package/theme-chalk/src/zjhc/dateEditor.scss +14 -0
- package/theme-chalk/src/zjhc/descriptions.scss +32 -0
- package/theme-chalk/src/zjhc/dialog.scss +148 -0
- package/theme-chalk/src/zjhc/drawer.scss +4 -0
- package/theme-chalk/src/zjhc/dropdown.scss +16 -0
- package/theme-chalk/src/zjhc/empty.scss +3 -0
- package/theme-chalk/src/zjhc/fontsize.scss +42 -0
- package/theme-chalk/src/zjhc/form.scss +33 -0
- package/theme-chalk/src/zjhc/index.scss +48 -0
- package/theme-chalk/src/zjhc/input.scss +47 -0
- package/theme-chalk/src/zjhc/link.scss +20 -0
- package/theme-chalk/src/zjhc/main.scss +3 -0
- package/theme-chalk/src/zjhc/mention.scss +9 -0
- package/theme-chalk/src/zjhc/menu.scss +0 -0
- package/theme-chalk/src/zjhc/message-box.scss +57 -0
- package/theme-chalk/src/zjhc/message.scss +13 -0
- package/theme-chalk/src/zjhc/notification.scss +4 -0
- package/theme-chalk/src/zjhc/number.scss +9 -0
- package/theme-chalk/src/zjhc/overlay.scss +3 -0
- package/theme-chalk/src/zjhc/page.scss +3 -0
- package/theme-chalk/src/zjhc/pagination.scss +64 -0
- package/theme-chalk/src/zjhc/picker.scss +85 -0
- package/theme-chalk/src/zjhc/popover.scss +13 -0
- package/theme-chalk/src/zjhc/popper.scss +13 -0
- package/theme-chalk/src/zjhc/radio.scss +49 -0
- package/theme-chalk/src/zjhc/scrollbar.scss +5 -0
- package/theme-chalk/src/zjhc/segmented.scss +18 -0
- package/theme-chalk/src/zjhc/select.scss +49 -0
- package/theme-chalk/src/zjhc/steps.scss +40 -0
- package/theme-chalk/src/zjhc/switch.scss +11 -0
- package/theme-chalk/src/zjhc/table-v2.scss +16 -0
- package/theme-chalk/src/zjhc/table.scss +44 -0
- package/theme-chalk/src/zjhc/tabs.scss +15 -0
- package/theme-chalk/src/zjhc/tags.scss +25 -0
- package/theme-chalk/src/zjhc/timeline.scss +16 -0
- package/theme-chalk/src/zjhc/tour.scss +9 -0
- package/theme-chalk/src/zjhc/tree.scss +6 -0
- package/theme-chalk/src/zjhc/upload.scss +6 -0
- package/theme-chalk/sticky-toolbar.css +71 -0
- package/theme-chalk/table-toolbar.css +53 -0
- package/theme-chalk/var.css +120 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3985 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const elementPlus = require("element-plus");
|
|
5
|
+
const lodashEs = require("lodash-es");
|
|
6
|
+
const ElFocusTrap = require("element-plus/lib/components/focus-trap/index.js");
|
|
7
|
+
const index = require("element-plus/lib/utils/index.js");
|
|
8
|
+
const core = require("@vueuse/core");
|
|
9
|
+
const index$1 = require("element-plus/lib/hooks/index.js");
|
|
10
|
+
const index$2 = require("element-plus/lib/components/config-provider/index.js");
|
|
11
|
+
const index$4 = require("element-plus/lib/components/form/index.js");
|
|
12
|
+
const index$3 = require("element-plus/lib/components/tooltip/index.js");
|
|
13
|
+
const config = require("element-plus/lib/components/table/src/config.js");
|
|
14
|
+
const CryptoJS = require("crypto-js");
|
|
15
|
+
const EVENT_CODE = {
|
|
16
|
+
tab: "Tab",
|
|
17
|
+
enter: "Enter",
|
|
18
|
+
space: "Space",
|
|
19
|
+
left: "ArrowLeft",
|
|
20
|
+
// 37
|
|
21
|
+
up: "ArrowUp",
|
|
22
|
+
// 38
|
|
23
|
+
right: "ArrowRight",
|
|
24
|
+
// 39
|
|
25
|
+
down: "ArrowDown",
|
|
26
|
+
// 40
|
|
27
|
+
esc: "Escape",
|
|
28
|
+
delete: "Delete",
|
|
29
|
+
backspace: "Backspace",
|
|
30
|
+
numpadEnter: "NumpadEnter",
|
|
31
|
+
pageUp: "PageUp",
|
|
32
|
+
pageDown: "PageDown",
|
|
33
|
+
home: "Home",
|
|
34
|
+
end: "End"
|
|
35
|
+
};
|
|
36
|
+
const datePickTypes = [
|
|
37
|
+
"year",
|
|
38
|
+
"years",
|
|
39
|
+
"month",
|
|
40
|
+
"months",
|
|
41
|
+
"date",
|
|
42
|
+
"dates",
|
|
43
|
+
"week",
|
|
44
|
+
"datetime",
|
|
45
|
+
"datetimerange",
|
|
46
|
+
"daterange",
|
|
47
|
+
"monthrange",
|
|
48
|
+
"yearrange"
|
|
49
|
+
];
|
|
50
|
+
const WEEK_DAYS = [
|
|
51
|
+
"sun",
|
|
52
|
+
"mon",
|
|
53
|
+
"tue",
|
|
54
|
+
"wed",
|
|
55
|
+
"thu",
|
|
56
|
+
"fri",
|
|
57
|
+
"sat"
|
|
58
|
+
];
|
|
59
|
+
const UPDATE_MODEL_EVENT = "update:modelValue";
|
|
60
|
+
const CHANGE_EVENT = "change";
|
|
61
|
+
const INPUT_EVENT = "input";
|
|
62
|
+
const INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
63
|
+
const componentSizes = ["", "default", "small", "large"];
|
|
64
|
+
const componentSizeMap = {
|
|
65
|
+
large: 40,
|
|
66
|
+
default: 32,
|
|
67
|
+
small: 24
|
|
68
|
+
};
|
|
69
|
+
const version$1 = "0.1.0";
|
|
70
|
+
const makeInstaller = (components = []) => {
|
|
71
|
+
const install2 = (app) => {
|
|
72
|
+
if (app[INSTALLED_KEY]) return;
|
|
73
|
+
app[INSTALLED_KEY] = true;
|
|
74
|
+
components.forEach((c) => app.use(c));
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
version: version$1,
|
|
78
|
+
install: install2
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
const NOOP = () => {
|
|
82
|
+
};
|
|
83
|
+
const isString$1 = (val) => typeof val === "string";
|
|
84
|
+
const isObject$1 = (val) => val !== null && typeof val === "object";
|
|
85
|
+
const camelize = (str) => str.replace(/-(\w)/g, (_, c) => c ? c.toUpperCase() : "");
|
|
86
|
+
const hyphenate = (str) => str.replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
87
|
+
const withInstall = (main, extra) => {
|
|
88
|
+
main.install = (app) => {
|
|
89
|
+
for (const comp of [main, ...Object.values(extra ?? {})]) {
|
|
90
|
+
app.component(comp.name, comp);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
if (extra) {
|
|
94
|
+
for (const [key, comp] of Object.entries(extra)) {
|
|
95
|
+
main[key] = comp;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return main;
|
|
99
|
+
};
|
|
100
|
+
const withInstallFunction = (fn, name) => {
|
|
101
|
+
fn.install = (app) => {
|
|
102
|
+
fn._context = app._context;
|
|
103
|
+
app.config.globalProperties[name] = fn;
|
|
104
|
+
};
|
|
105
|
+
return fn;
|
|
106
|
+
};
|
|
107
|
+
const withInstallDirective = (directive, name) => {
|
|
108
|
+
directive.install = (app) => {
|
|
109
|
+
app.directive(name, directive);
|
|
110
|
+
};
|
|
111
|
+
return directive;
|
|
112
|
+
};
|
|
113
|
+
const withNoopInstall = (component) => {
|
|
114
|
+
component.install = NOOP;
|
|
115
|
+
return component;
|
|
116
|
+
};
|
|
117
|
+
const opt = Object.prototype.toString;
|
|
118
|
+
function isFunction(obj) {
|
|
119
|
+
return typeof obj === "function";
|
|
120
|
+
}
|
|
121
|
+
function isString(obj) {
|
|
122
|
+
return opt.call(obj) === "[object String]";
|
|
123
|
+
}
|
|
124
|
+
function isObject(obj) {
|
|
125
|
+
return opt.call(obj) === "[object Object]";
|
|
126
|
+
}
|
|
127
|
+
function isArray(obj) {
|
|
128
|
+
return opt.call(obj) === "[object Array]";
|
|
129
|
+
}
|
|
130
|
+
function isNumber$1(obj) {
|
|
131
|
+
return opt.call(obj) === "[object Number]" && obj === obj;
|
|
132
|
+
}
|
|
133
|
+
function isFile(obj) {
|
|
134
|
+
return opt.call(obj) === "[object File]";
|
|
135
|
+
}
|
|
136
|
+
function isRegExp(obj) {
|
|
137
|
+
return opt.call(obj) === "[object RegExp]";
|
|
138
|
+
}
|
|
139
|
+
function isBlob(obj) {
|
|
140
|
+
return opt.call(obj) === "[object Blob]";
|
|
141
|
+
}
|
|
142
|
+
function isWindow(obj) {
|
|
143
|
+
return obj === window;
|
|
144
|
+
}
|
|
145
|
+
function toTreeRecursion(list, item, codeProp, parentProp, leafProp, mergeFunc) {
|
|
146
|
+
if (leafProp && item[leafProp]) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const children = list.filter((t) => t[parentProp] === item[codeProp]).map((t) => {
|
|
150
|
+
if (mergeFunc) {
|
|
151
|
+
return Object.assign({}, t, mergeFunc(t));
|
|
152
|
+
} else {
|
|
153
|
+
return Object.assign({}, t);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
if (!leafProp && children.length === 0) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
children.forEach(
|
|
160
|
+
(t) => toTreeRecursion(list, t, codeProp, parentProp, leafProp, mergeFunc)
|
|
161
|
+
);
|
|
162
|
+
item.children = children;
|
|
163
|
+
}
|
|
164
|
+
function toTree(list, rootCode, codeProp, parentProp, leafProp, mergeFunc) {
|
|
165
|
+
return list.filter((t) => t[parentProp] === rootCode).map((t) => {
|
|
166
|
+
const item = mergeFunc ? Object.assign({}, t, mergeFunc(t)) : Object.assign({}, t);
|
|
167
|
+
toTreeRecursion(list, item, codeProp, parentProp, leafProp, mergeFunc);
|
|
168
|
+
return item;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
const securityKey = "aubVseoLz3BkkeXKCXNzMg==";
|
|
172
|
+
function serialize(obj) {
|
|
173
|
+
const json = JSON.stringify(obj);
|
|
174
|
+
return CryptoJS.AES.encrypt(json, securityKey).toString();
|
|
175
|
+
}
|
|
176
|
+
function deserialize(input) {
|
|
177
|
+
const json = CryptoJS.AES.decrypt(input, securityKey).toString(
|
|
178
|
+
CryptoJS.enc.Utf8
|
|
179
|
+
);
|
|
180
|
+
return JSON.parse(json);
|
|
181
|
+
}
|
|
182
|
+
class ZjhcUIError extends Error {
|
|
183
|
+
constructor(m) {
|
|
184
|
+
super(m);
|
|
185
|
+
this.name = "ZjhcUIError";
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function throwError(scope, m) {
|
|
189
|
+
throw new ZjhcUIError(`[${scope}]${m}`);
|
|
190
|
+
}
|
|
191
|
+
const isNumber = (val) => typeof val === "number";
|
|
192
|
+
const isStringNumber = (val) => {
|
|
193
|
+
if (!isString$1(val)) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
return !Number.isNaN(Number(val));
|
|
197
|
+
};
|
|
198
|
+
const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
|
|
199
|
+
const hasClass = (el, cls) => {
|
|
200
|
+
if (!el || !cls) return false;
|
|
201
|
+
if (cls.includes(" ")) throw new Error("classname should not contain space.");
|
|
202
|
+
return el.classList.contains(cls);
|
|
203
|
+
};
|
|
204
|
+
const addClass = (el, cls) => {
|
|
205
|
+
if (!el || !cls.trim()) return;
|
|
206
|
+
el.classList.add(...classNameToArray(cls));
|
|
207
|
+
};
|
|
208
|
+
const removeClass = (el, cls) => {
|
|
209
|
+
if (!el || !cls.trim()) return;
|
|
210
|
+
el.classList.remove(...classNameToArray(cls));
|
|
211
|
+
};
|
|
212
|
+
const getStyle = (element, styleName) => {
|
|
213
|
+
var _a;
|
|
214
|
+
if (!core.isClient || !element || !styleName) return "";
|
|
215
|
+
let key = camelize(styleName);
|
|
216
|
+
if (key === "float") key = "cssFloat";
|
|
217
|
+
try {
|
|
218
|
+
const style = element.style[key];
|
|
219
|
+
if (style) return style;
|
|
220
|
+
const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
|
|
221
|
+
return computed ? computed[key] : "";
|
|
222
|
+
} catch {
|
|
223
|
+
return element.style[key];
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const setStyle = (element, styleName, value) => {
|
|
227
|
+
if (!element || !styleName) return;
|
|
228
|
+
if (isObject$1(styleName)) {
|
|
229
|
+
Object.entries(styleName).forEach(
|
|
230
|
+
([prop, value2]) => setStyle(element, prop, value2)
|
|
231
|
+
);
|
|
232
|
+
} else {
|
|
233
|
+
const key = camelize(styleName);
|
|
234
|
+
element.style[key] = value;
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
const removeStyle = (element, style) => {
|
|
238
|
+
if (!element || !style) return;
|
|
239
|
+
if (isObject$1(style)) {
|
|
240
|
+
Object.keys(style).forEach(
|
|
241
|
+
(prop) => removeStyle(element, prop)
|
|
242
|
+
);
|
|
243
|
+
} else {
|
|
244
|
+
setStyle(element, style, "");
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
function addUnit(value, defaultUnit = "px") {
|
|
248
|
+
if (!value) return;
|
|
249
|
+
if (isNumber(value) || isStringNumber(value)) {
|
|
250
|
+
return `${value}${defaultUnit}`;
|
|
251
|
+
} else if (isString$1(value)) {
|
|
252
|
+
return value;
|
|
253
|
+
}
|
|
254
|
+
console.warn(
|
|
255
|
+
"@zjhc/ui/utils/dom/style",
|
|
256
|
+
"binding value must be a string or number"
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
const defaultNamespace = "zjhc";
|
|
260
|
+
const statePrefix = "is-";
|
|
261
|
+
const _bem = (namespace, block, blockSuffix, element, modifier) => {
|
|
262
|
+
let cls = `${namespace}-${block}`;
|
|
263
|
+
if (blockSuffix && blockSuffix !== "") {
|
|
264
|
+
cls += `-${blockSuffix}`;
|
|
265
|
+
}
|
|
266
|
+
if (element) {
|
|
267
|
+
cls += `__${element}`;
|
|
268
|
+
}
|
|
269
|
+
if (modifier) {
|
|
270
|
+
cls += `--${modifier}`;
|
|
271
|
+
}
|
|
272
|
+
return cls;
|
|
273
|
+
};
|
|
274
|
+
const useNamespace = (block) => {
|
|
275
|
+
const namespace = vue.computed(() => defaultNamespace);
|
|
276
|
+
const b = (blockSuffix = "") => {
|
|
277
|
+
return _bem(vue.unref(namespace), block, blockSuffix, "", "");
|
|
278
|
+
};
|
|
279
|
+
const e = (element) => {
|
|
280
|
+
return element ? _bem(vue.unref(namespace), block, "", element, "") : "";
|
|
281
|
+
};
|
|
282
|
+
const m = (modifier) => {
|
|
283
|
+
return modifier ? _bem(vue.unref(namespace), block, "", "", modifier) : "";
|
|
284
|
+
};
|
|
285
|
+
const be = (blockSuffix, element) => {
|
|
286
|
+
return blockSuffix && element ? _bem(vue.unref(namespace), block, blockSuffix, element, "") : "";
|
|
287
|
+
};
|
|
288
|
+
const em = (element, modifier) => {
|
|
289
|
+
return element && modifier ? _bem(vue.unref(namespace), block, "", element, modifier) : "";
|
|
290
|
+
};
|
|
291
|
+
const bm = (blockSuffix, modifier) => {
|
|
292
|
+
return blockSuffix && modifier ? _bem(vue.unref(namespace), block, blockSuffix, "", modifier) : "";
|
|
293
|
+
};
|
|
294
|
+
const bem = (blockSuffix, element, modifier) => {
|
|
295
|
+
return blockSuffix && element && modifier ? _bem(vue.unref(namespace), block, blockSuffix, element, modifier) : "";
|
|
296
|
+
};
|
|
297
|
+
const is = (name, ...args) => {
|
|
298
|
+
const state = args.length >= 1 ? args[0] : true;
|
|
299
|
+
return name && state ? `${statePrefix}${name}` : "";
|
|
300
|
+
};
|
|
301
|
+
return {
|
|
302
|
+
namespace,
|
|
303
|
+
b,
|
|
304
|
+
e,
|
|
305
|
+
m,
|
|
306
|
+
be,
|
|
307
|
+
em,
|
|
308
|
+
bm,
|
|
309
|
+
bem,
|
|
310
|
+
is
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
const useDraggableAndResizable = (targetRef, dragRef, draggable, resizable, isFullscreen, alignCenter, overflow) => {
|
|
314
|
+
const fullscreen = vue.ref(false);
|
|
315
|
+
const varWidth = "width";
|
|
316
|
+
const varHeight = "height";
|
|
317
|
+
const minus = vue.ref(false);
|
|
318
|
+
const dividerWidth = 5;
|
|
319
|
+
let dialogBody;
|
|
320
|
+
let transform = {
|
|
321
|
+
offsetX: 0,
|
|
322
|
+
offsetY: 0
|
|
323
|
+
};
|
|
324
|
+
let dialogWidth = "";
|
|
325
|
+
let dialogHeight = "";
|
|
326
|
+
let lastDialogStatus = 2;
|
|
327
|
+
const minSize = {
|
|
328
|
+
width: 200,
|
|
329
|
+
height: 72
|
|
330
|
+
};
|
|
331
|
+
const setTransform = () => {
|
|
332
|
+
if (targetRef.value) {
|
|
333
|
+
targetRef.value.style.left = transform.offsetX + "px";
|
|
334
|
+
targetRef.value.style.top = transform.offsetY + "px";
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
const onMousedown = (e) => {
|
|
338
|
+
var _a;
|
|
339
|
+
e.stopPropagation();
|
|
340
|
+
const downX = e.clientX;
|
|
341
|
+
const downY = e.clientY;
|
|
342
|
+
const marginTop = parseFloat(getComputedStyle(targetRef.value).marginTop);
|
|
343
|
+
const targetRect = targetRef.value.getBoundingClientRect();
|
|
344
|
+
const targetLeft = targetRect.left;
|
|
345
|
+
const targeTop = targetRect.top;
|
|
346
|
+
const targeWidth = targetRect.width;
|
|
347
|
+
const targeHeight = targetRect.height;
|
|
348
|
+
const clientWidth = document.documentElement.clientWidth;
|
|
349
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
350
|
+
const minLeft = 0;
|
|
351
|
+
const minTop = 0 - marginTop;
|
|
352
|
+
const maxLeft = clientWidth - targeWidth;
|
|
353
|
+
const maxTop = clientHeight - targeHeight - marginTop;
|
|
354
|
+
const activeIframe = getFirstVisibleIframe();
|
|
355
|
+
dialogBody = (_a = targetRef.value) == null ? void 0 : _a.querySelector(".el-dialog__body");
|
|
356
|
+
const onMousemove = (e2) => {
|
|
357
|
+
if (activeIframe) {
|
|
358
|
+
activeIframe.style.pointerEvents = "none";
|
|
359
|
+
}
|
|
360
|
+
if (dialogBody) {
|
|
361
|
+
dialogBody.style.pointerEvents = "none";
|
|
362
|
+
}
|
|
363
|
+
document.body.style.userSelect = "none";
|
|
364
|
+
let moveX = targetLeft + e2.clientX - downX;
|
|
365
|
+
let moveY = targeTop + e2.clientY - downY - marginTop;
|
|
366
|
+
if (!(overflow == null ? void 0 : overflow.value)) {
|
|
367
|
+
moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
|
|
368
|
+
moveY = Math.min(Math.max(moveY, minTop), maxTop);
|
|
369
|
+
}
|
|
370
|
+
transform = {
|
|
371
|
+
offsetX: moveX,
|
|
372
|
+
offsetY: moveY
|
|
373
|
+
};
|
|
374
|
+
if (targetRef.value) {
|
|
375
|
+
targetRef.value.style.left = `${index.addUnit(moveX)}`;
|
|
376
|
+
targetRef.value.style.top = `${index.addUnit(moveY)}`;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
const onMouseup = () => {
|
|
380
|
+
if (activeIframe) {
|
|
381
|
+
activeIframe.style.pointerEvents = "";
|
|
382
|
+
}
|
|
383
|
+
if (dialogBody) {
|
|
384
|
+
dialogBody.style.pointerEvents = "";
|
|
385
|
+
}
|
|
386
|
+
document.body.style.userSelect = "";
|
|
387
|
+
document.removeEventListener("mousemove", onMousemove);
|
|
388
|
+
document.removeEventListener("mouseup", onMouseup);
|
|
389
|
+
};
|
|
390
|
+
document.addEventListener("mousemove", onMousemove);
|
|
391
|
+
document.addEventListener("mouseup", onMouseup);
|
|
392
|
+
};
|
|
393
|
+
const onResizeMousemove = (e) => {
|
|
394
|
+
if (!resizable.value) return;
|
|
395
|
+
if (minus.value) return;
|
|
396
|
+
const { offsetWidth, offsetHeight, offsetLeft, offsetTop } = targetRef.value;
|
|
397
|
+
if (e.clientX - offsetLeft < offsetWidth && e.clientX - offsetLeft > offsetWidth - dividerWidth && e.clientY - offsetTop < offsetHeight && e.clientY - offsetTop > offsetHeight - dividerWidth) {
|
|
398
|
+
targetRef.value.style.cursor = "se-resize";
|
|
399
|
+
} else if (e.clientX - offsetLeft <= dividerWidth && e.clientX - offsetLeft > 0 && e.clientY - offsetTop < offsetHeight && e.clientY - offsetTop > offsetHeight - dividerWidth) {
|
|
400
|
+
targetRef.value.style.cursor = "sw-resize";
|
|
401
|
+
} else if (e.clientX - offsetLeft <= dividerWidth) {
|
|
402
|
+
targetRef.value.style.cursor = "w-resize";
|
|
403
|
+
} else if (e.clientX - offsetLeft > offsetWidth - dividerWidth) {
|
|
404
|
+
targetRef.value.style.cursor = "e-resize";
|
|
405
|
+
} else if (e.clientY - offsetTop > offsetHeight - dividerWidth) {
|
|
406
|
+
targetRef.value.style.cursor = "s-resize";
|
|
407
|
+
} else {
|
|
408
|
+
targetRef.value.style.cursor = "";
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
const onResizeMousedown = (e) => {
|
|
412
|
+
var _a;
|
|
413
|
+
if (!resizable.value) return;
|
|
414
|
+
if (minus.value) return;
|
|
415
|
+
const activeIframe = getFirstVisibleIframe();
|
|
416
|
+
const { clientX, clientY } = e;
|
|
417
|
+
const marginTop = parseFloat(getComputedStyle(targetRef.value).marginTop);
|
|
418
|
+
const targetRect = targetRef.value.getBoundingClientRect();
|
|
419
|
+
const transX = targetRect.left;
|
|
420
|
+
const transY = targetRect.top;
|
|
421
|
+
const offsetWidth = targetRect.width;
|
|
422
|
+
const offsetHeight = targetRect.height;
|
|
423
|
+
const offsetX = clientX - transX;
|
|
424
|
+
const offsetY = clientY - transY;
|
|
425
|
+
transform = {
|
|
426
|
+
offsetX: transX,
|
|
427
|
+
offsetY: transY - marginTop
|
|
428
|
+
};
|
|
429
|
+
const maxWidth = document.documentElement.clientWidth;
|
|
430
|
+
const maxHeight = document.documentElement.clientHeight;
|
|
431
|
+
dialogBody = (_a = targetRef.value) == null ? void 0 : _a.querySelector(".el-dialog__body");
|
|
432
|
+
const onDocumentMouseup = () => {
|
|
433
|
+
document.removeEventListener("mousemove", onDocumentMousemove);
|
|
434
|
+
document.removeEventListener("mouseup", onDocumentMouseup);
|
|
435
|
+
targetRef.value.style.userSelect = "auto";
|
|
436
|
+
if (dialogBody) {
|
|
437
|
+
dialogBody.style.pointerEvents = "";
|
|
438
|
+
}
|
|
439
|
+
if (activeIframe) {
|
|
440
|
+
activeIframe.style.pointerEvents = "";
|
|
441
|
+
}
|
|
442
|
+
document.body.style.userSelect = "";
|
|
443
|
+
};
|
|
444
|
+
const onDocumentMousemove = (e2) => {
|
|
445
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
446
|
+
if (!targetRef.value) return;
|
|
447
|
+
if (e2.clientX > maxWidth - 2 || e2.clientX < 1 || e2.clientY > maxHeight || e2.clientY < 1) {
|
|
448
|
+
document.removeEventListener("mousemove", onDocumentMousemove);
|
|
449
|
+
document.removeEventListener("mouseup", onDocumentMouseup);
|
|
450
|
+
targetRef.value.style.userSelect = "auto";
|
|
451
|
+
if (dialogBody) {
|
|
452
|
+
dialogBody.style.pointerEvents = "";
|
|
453
|
+
}
|
|
454
|
+
if (activeIframe) {
|
|
455
|
+
activeIframe.style.pointerEvents = "";
|
|
456
|
+
}
|
|
457
|
+
document.body.style.userSelect = "";
|
|
458
|
+
} else {
|
|
459
|
+
if (dialogBody) {
|
|
460
|
+
dialogBody.style.pointerEvents = "none";
|
|
461
|
+
}
|
|
462
|
+
if (activeIframe) {
|
|
463
|
+
activeIframe.style.pointerEvents = "none";
|
|
464
|
+
}
|
|
465
|
+
document.body.style.userSelect = "none";
|
|
466
|
+
let moveX = transX;
|
|
467
|
+
if (offsetX >= 0 && offsetX <= dividerWidth) {
|
|
468
|
+
if (clientX > e2.clientX) {
|
|
469
|
+
(_a2 = targetRef.value) == null ? void 0 : _a2.style.setProperty(
|
|
470
|
+
varWidth,
|
|
471
|
+
offsetWidth + (clientX - e2.clientX) + "px"
|
|
472
|
+
);
|
|
473
|
+
moveX = transX + (e2.clientX - clientX);
|
|
474
|
+
} else if (clientX < e2.clientX) {
|
|
475
|
+
if (offsetWidth - (e2.clientX - clientX) <= minSize.width) {
|
|
476
|
+
(_b = targetRef.value) == null ? void 0 : _b.style.setProperty(varWidth, minSize.width + "px");
|
|
477
|
+
moveX = transform.offsetX;
|
|
478
|
+
} else {
|
|
479
|
+
(_c = targetRef.value) == null ? void 0 : _c.style.setProperty(
|
|
480
|
+
varWidth,
|
|
481
|
+
offsetWidth - (e2.clientX - clientX) + "px"
|
|
482
|
+
);
|
|
483
|
+
moveX = Math.round(transX + (e2.clientX - clientX));
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
transform = {
|
|
487
|
+
offsetX: moveX,
|
|
488
|
+
offsetY: transform.offsetY
|
|
489
|
+
};
|
|
490
|
+
setTransform();
|
|
491
|
+
fullscreen.value = false;
|
|
492
|
+
} else if (offsetX >= offsetWidth - 5 && offsetX <= offsetWidth) {
|
|
493
|
+
if (clientX > e2.clientX) {
|
|
494
|
+
if (offsetWidth - (clientX - e2.clientX) <= minSize.width) {
|
|
495
|
+
(_d = targetRef.value) == null ? void 0 : _d.style.setProperty(varWidth, minSize.width + "px");
|
|
496
|
+
} else {
|
|
497
|
+
(_e = targetRef.value) == null ? void 0 : _e.style.setProperty(
|
|
498
|
+
varWidth,
|
|
499
|
+
offsetWidth - (clientX - e2.clientX) + "px"
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
} else if (clientX < e2.clientX) {
|
|
503
|
+
if (clientX < e2.clientX && e2.clientX < maxWidth) {
|
|
504
|
+
if (offsetWidth + (e2.clientX - clientX) >= maxWidth) {
|
|
505
|
+
(_f = targetRef.value) == null ? void 0 : _f.style.setProperty(varWidth, maxWidth + "px");
|
|
506
|
+
} else {
|
|
507
|
+
(_g = targetRef.value) == null ? void 0 : _g.style.setProperty(
|
|
508
|
+
varWidth,
|
|
509
|
+
offsetWidth + (e2.clientX - clientX) + "px"
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
fullscreen.value = false;
|
|
515
|
+
}
|
|
516
|
+
if (offsetY > offsetHeight - dividerWidth && offsetY < offsetHeight) {
|
|
517
|
+
if (clientY > e2.clientY) {
|
|
518
|
+
if (offsetHeight - (clientY - e2.clientY) > minSize.height) {
|
|
519
|
+
(_h = targetRef.value) == null ? void 0 : _h.style.setProperty(
|
|
520
|
+
varHeight,
|
|
521
|
+
offsetHeight - (clientY - e2.clientY) + "px"
|
|
522
|
+
);
|
|
523
|
+
} else {
|
|
524
|
+
(_i = targetRef.value) == null ? void 0 : _i.style.setProperty(
|
|
525
|
+
varHeight,
|
|
526
|
+
minSize.height + "px"
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
} else if (clientY < e2.clientY && e2.clientY < maxHeight) {
|
|
530
|
+
if (offsetHeight + (e2.clientY - clientY) >= maxHeight) {
|
|
531
|
+
(_j = targetRef.value) == null ? void 0 : _j.style.setProperty(varHeight, maxHeight + "px");
|
|
532
|
+
} else {
|
|
533
|
+
(_k = targetRef.value) == null ? void 0 : _k.style.setProperty(
|
|
534
|
+
varHeight,
|
|
535
|
+
offsetHeight + (e2.clientY - clientY) + "px"
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
fullscreen.value = false;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
if (offsetX > dividerWidth && offsetX < offsetWidth - dividerWidth && offsetY > dividerWidth && offsetY < offsetHeight - dividerWidth) {
|
|
544
|
+
return;
|
|
545
|
+
} else {
|
|
546
|
+
targetRef.value.style.userSelect = "none";
|
|
547
|
+
document.addEventListener("mousemove", onDocumentMousemove);
|
|
548
|
+
document.addEventListener("mouseup", onDocumentMouseup);
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
const onDraggable = () => {
|
|
552
|
+
if (dragRef.value && targetRef.value) {
|
|
553
|
+
dragRef.value.addEventListener("mousedown", onMousedown);
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
const offDraggable = () => {
|
|
557
|
+
if (dragRef.value && targetRef.value) {
|
|
558
|
+
dragRef.value.removeEventListener("mousedown", onMousedown);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
const onResizable = () => {
|
|
562
|
+
if (targetRef.value) {
|
|
563
|
+
targetRef.value.addEventListener("mousemove", onResizeMousemove);
|
|
564
|
+
targetRef.value.addEventListener("mousedown", onResizeMousedown);
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const offResizable = () => {
|
|
568
|
+
if (targetRef.value) {
|
|
569
|
+
targetRef.value.removeEventListener("mousemove", onResizeMousemove);
|
|
570
|
+
targetRef.value.removeEventListener("mousedown", onResizeMousedown);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
const resetPosition = () => {
|
|
574
|
+
if (targetRef.value) {
|
|
575
|
+
transform = {
|
|
576
|
+
offsetX: 0,
|
|
577
|
+
offsetY: 0
|
|
578
|
+
};
|
|
579
|
+
const targetRect = targetRef.value.getBoundingClientRect();
|
|
580
|
+
const width = targetRect.width;
|
|
581
|
+
const height = targetRect.height;
|
|
582
|
+
const winWidth = window.innerWidth;
|
|
583
|
+
const winHeight = window.innerHeight;
|
|
584
|
+
targetRef.value.style.left = (winWidth - width) / 2 + "px";
|
|
585
|
+
if (alignCenter.value) {
|
|
586
|
+
targetRef.value.style.top = (winHeight - height) / 2 + "px";
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
const resetSize = () => {
|
|
591
|
+
fullscreen.value = false;
|
|
592
|
+
minus.value = false;
|
|
593
|
+
};
|
|
594
|
+
const fullscreenFn = () => {
|
|
595
|
+
if (targetRef.value) {
|
|
596
|
+
targetRef.value.style.left = "";
|
|
597
|
+
targetRef.value.style.top = "";
|
|
598
|
+
targetRef.value.style.setProperty(varWidth, "100%");
|
|
599
|
+
targetRef.value.style.setProperty(varHeight, "100%");
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
const minusFn = () => {
|
|
603
|
+
if (targetRef.value) {
|
|
604
|
+
targetRef.value.style.left = "";
|
|
605
|
+
targetRef.value.style.top = "";
|
|
606
|
+
targetRef.value.style.setProperty(varWidth, null);
|
|
607
|
+
targetRef.value.style.setProperty(varHeight, null);
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
const onExpand = () => {
|
|
611
|
+
if (targetRef.value) {
|
|
612
|
+
const style = window.getComputedStyle(targetRef.value);
|
|
613
|
+
dialogWidth = style.getPropertyValue(varWidth);
|
|
614
|
+
dialogHeight = style.getPropertyValue(varHeight);
|
|
615
|
+
}
|
|
616
|
+
minus.value = false;
|
|
617
|
+
fullscreen.value = true;
|
|
618
|
+
vue.nextTick(() => {
|
|
619
|
+
fullscreenFn();
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
const onCompress = () => {
|
|
623
|
+
minus.value = false;
|
|
624
|
+
if (lastDialogStatus == 1) {
|
|
625
|
+
fullscreen.value = true;
|
|
626
|
+
lastDialogStatus = 2;
|
|
627
|
+
vue.nextTick(() => {
|
|
628
|
+
fullscreenFn();
|
|
629
|
+
});
|
|
630
|
+
} else {
|
|
631
|
+
fullscreen.value = false;
|
|
632
|
+
vue.nextTick(() => {
|
|
633
|
+
if (targetRef.value) {
|
|
634
|
+
targetRef.value.style.setProperty(varWidth, dialogWidth);
|
|
635
|
+
targetRef.value.style.setProperty(varHeight, dialogHeight);
|
|
636
|
+
resetPosition();
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
const onMinus = () => {
|
|
642
|
+
if (fullscreen.value) {
|
|
643
|
+
lastDialogStatus = 1;
|
|
644
|
+
} else {
|
|
645
|
+
lastDialogStatus = 2;
|
|
646
|
+
if (targetRef.value) {
|
|
647
|
+
const style = window.getComputedStyle(targetRef.value);
|
|
648
|
+
dialogWidth = style.getPropertyValue(varWidth);
|
|
649
|
+
dialogHeight = style.getPropertyValue(varHeight);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
fullscreen.value = false;
|
|
653
|
+
minus.value = true;
|
|
654
|
+
vue.nextTick(() => {
|
|
655
|
+
minusFn();
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
vue.onMounted(() => {
|
|
659
|
+
vue.watchEffect(() => {
|
|
660
|
+
fullscreen.value = isFullscreen.value;
|
|
661
|
+
});
|
|
662
|
+
vue.watchEffect(() => {
|
|
663
|
+
if (draggable.value) {
|
|
664
|
+
onDraggable();
|
|
665
|
+
} else {
|
|
666
|
+
offDraggable();
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
vue.watchEffect(() => {
|
|
670
|
+
if (resizable.value) {
|
|
671
|
+
onResizable();
|
|
672
|
+
} else {
|
|
673
|
+
offResizable();
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
vue.onBeforeUnmount(() => {
|
|
678
|
+
offDraggable();
|
|
679
|
+
});
|
|
680
|
+
return {
|
|
681
|
+
resetPosition,
|
|
682
|
+
resetSize,
|
|
683
|
+
onExpand,
|
|
684
|
+
onCompress,
|
|
685
|
+
onMinus,
|
|
686
|
+
fullscreen,
|
|
687
|
+
minus
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
function getFirstVisibleIframe() {
|
|
691
|
+
const iframes = document.getElementsByTagName("iframe");
|
|
692
|
+
if (iframes.length > 0) {
|
|
693
|
+
for (let i = 0; i < iframes.length; i++) {
|
|
694
|
+
if (iframes[i].offsetWidth > 0 && iframes[i].offsetHeight > 0) {
|
|
695
|
+
return iframes[i];
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return null;
|
|
699
|
+
} else {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
function useLoading(initValue = false) {
|
|
704
|
+
const loading = vue.ref(initValue);
|
|
705
|
+
const setLoading = (value) => {
|
|
706
|
+
loading.value = value;
|
|
707
|
+
};
|
|
708
|
+
return {
|
|
709
|
+
loading,
|
|
710
|
+
setLoading
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
function useOperModal(initValue) {
|
|
714
|
+
const mode = vue.ref("");
|
|
715
|
+
const visible = vue.ref(false);
|
|
716
|
+
const info = vue.ref(initValue);
|
|
717
|
+
const setOperModal = (m, v, i) => {
|
|
718
|
+
mode.value = m;
|
|
719
|
+
visible.value = v;
|
|
720
|
+
info.value = i;
|
|
721
|
+
};
|
|
722
|
+
const clearOperModal = () => {
|
|
723
|
+
mode.value = "";
|
|
724
|
+
visible.value = false;
|
|
725
|
+
info.value = initValue;
|
|
726
|
+
};
|
|
727
|
+
return {
|
|
728
|
+
mode,
|
|
729
|
+
visible,
|
|
730
|
+
info,
|
|
731
|
+
setOperModal,
|
|
732
|
+
clearOperModal
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
function useComplexTable(config2) {
|
|
736
|
+
const tableData = vue.ref([]);
|
|
737
|
+
const tablePagination = vue.reactive({
|
|
738
|
+
visible: false,
|
|
739
|
+
currentPage: 1,
|
|
740
|
+
pageSize: config2.SERVICE_PAGESIZE,
|
|
741
|
+
hideOnSinglePage: false
|
|
742
|
+
});
|
|
743
|
+
const setData = (data) => {
|
|
744
|
+
tableData.value = data ?? [];
|
|
745
|
+
};
|
|
746
|
+
const setPagination = (pageData) => {
|
|
747
|
+
if (pageData) {
|
|
748
|
+
tableData.value = pageData.list;
|
|
749
|
+
Object.assign(tablePagination, {
|
|
750
|
+
visible: true,
|
|
751
|
+
total: pageData.total,
|
|
752
|
+
currentPage: pageData.pageNum,
|
|
753
|
+
pageSize: pageData.pageSize,
|
|
754
|
+
hideOnSinglePage: false
|
|
755
|
+
});
|
|
756
|
+
} else {
|
|
757
|
+
tableData.value = [];
|
|
758
|
+
Object.assign(tablePagination, {
|
|
759
|
+
visible: true,
|
|
760
|
+
total: 0,
|
|
761
|
+
currentPage: 1,
|
|
762
|
+
hideOnSinglePage: true
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
};
|
|
766
|
+
const setPageIndex = (pageIndex) => {
|
|
767
|
+
Object.assign(tablePagination, {
|
|
768
|
+
currentPage: pageIndex
|
|
769
|
+
});
|
|
770
|
+
};
|
|
771
|
+
const setPageSizes = (pageSize) => {
|
|
772
|
+
Object.assign(tablePagination, {
|
|
773
|
+
currentPage: 1,
|
|
774
|
+
pageSize
|
|
775
|
+
});
|
|
776
|
+
};
|
|
777
|
+
return {
|
|
778
|
+
tableData,
|
|
779
|
+
tablePagination,
|
|
780
|
+
setData,
|
|
781
|
+
setPagination,
|
|
782
|
+
setPageIndex,
|
|
783
|
+
setPageSizes
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function setTheme(theme) {
|
|
787
|
+
if (theme) {
|
|
788
|
+
if (theme.elderMode) {
|
|
789
|
+
document.documentElement.classList.add(`${defaultNamespace}-caremode`);
|
|
790
|
+
} else {
|
|
791
|
+
document.documentElement.classList.remove(`${defaultNamespace}-caremode`);
|
|
792
|
+
}
|
|
793
|
+
if (theme.themeCode !== "default" && theme.themeCode !== "") {
|
|
794
|
+
const themePerfix = defaultNamespace + "-theme-";
|
|
795
|
+
const classList = Array.from(document.documentElement.classList);
|
|
796
|
+
classList.forEach((cls) => {
|
|
797
|
+
if (cls.startsWith(themePerfix)) {
|
|
798
|
+
document.documentElement.classList.remove(cls);
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
document.documentElement.classList.add(themePerfix + theme.themeCode);
|
|
802
|
+
loadCss(`/static-resource/theme/skin/${theme.themeCode}/theme-index.css`);
|
|
803
|
+
} else {
|
|
804
|
+
const themePerfix = defaultNamespace + "-theme-";
|
|
805
|
+
const classList = Array.from(document.documentElement.classList);
|
|
806
|
+
classList.forEach((cls) => {
|
|
807
|
+
if (cls.startsWith(themePerfix)) {
|
|
808
|
+
document.documentElement.classList.remove(cls);
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
function loadCss(url) {
|
|
815
|
+
const linkId = "themeCss";
|
|
816
|
+
if (!document.getElementById(linkId)) {
|
|
817
|
+
const linkEl = document.createElement("link");
|
|
818
|
+
linkEl.rel = "stylesheet";
|
|
819
|
+
linkEl.href = url;
|
|
820
|
+
linkEl.id = linkId;
|
|
821
|
+
document.head.appendChild(linkEl);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
825
|
+
...{
|
|
826
|
+
name: "ZjhcSearchPanel"
|
|
827
|
+
},
|
|
828
|
+
__name: "searchPanel",
|
|
829
|
+
setup(__props) {
|
|
830
|
+
const bem = useNamespace("search");
|
|
831
|
+
return (_ctx, _cache) => {
|
|
832
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
833
|
+
class: vue.normalizeClass(vue.unref(bem).e("panel"))
|
|
834
|
+
}, [
|
|
835
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
836
|
+
], 2);
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
});
|
|
840
|
+
const ZjhcSearchPanel = withInstall(_sfc_main$m);
|
|
841
|
+
const _sfc_main$l = vue.defineComponent({
|
|
842
|
+
name: "Loading"
|
|
843
|
+
});
|
|
844
|
+
const _export_sfc = (sfc, props) => {
|
|
845
|
+
const target = sfc.__vccOpts || sfc;
|
|
846
|
+
for (const [key, val] of props) {
|
|
847
|
+
target[key] = val;
|
|
848
|
+
}
|
|
849
|
+
return target;
|
|
850
|
+
};
|
|
851
|
+
const _hoisted_1$b = {
|
|
852
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
853
|
+
viewBox: "0 0 1024 1024"
|
|
854
|
+
};
|
|
855
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
856
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
|
|
857
|
+
vue.createElementVNode("path", {
|
|
858
|
+
fill: "currentColor",
|
|
859
|
+
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
|
|
860
|
+
}, null, -1)
|
|
861
|
+
])]);
|
|
862
|
+
}
|
|
863
|
+
const Loading$1 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$8]]);
|
|
864
|
+
const _sfc_main$k = vue.defineComponent({
|
|
865
|
+
name: "Check"
|
|
866
|
+
});
|
|
867
|
+
const _hoisted_1$a = {
|
|
868
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
869
|
+
viewBox: "0 0 1024 1024"
|
|
870
|
+
};
|
|
871
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
872
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$a, [..._cache[0] || (_cache[0] = [
|
|
873
|
+
vue.createElementVNode("path", {
|
|
874
|
+
fill: "currentColor",
|
|
875
|
+
d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
|
|
876
|
+
}, null, -1)
|
|
877
|
+
])]);
|
|
878
|
+
}
|
|
879
|
+
const Check = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$7]]);
|
|
880
|
+
const _sfc_main$j = vue.defineComponent({
|
|
881
|
+
name: "ArrowDown"
|
|
882
|
+
});
|
|
883
|
+
const _hoisted_1$9 = {
|
|
884
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
885
|
+
viewBox: "0 0 1024 1024"
|
|
886
|
+
};
|
|
887
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
888
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
|
|
889
|
+
vue.createElementVNode("path", {
|
|
890
|
+
fill: "currentColor",
|
|
891
|
+
d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
|
|
892
|
+
}, null, -1)
|
|
893
|
+
])]);
|
|
894
|
+
}
|
|
895
|
+
const ArrowDown = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$6]]);
|
|
896
|
+
const _sfc_main$i = vue.defineComponent({
|
|
897
|
+
name: "ArrowUp"
|
|
898
|
+
});
|
|
899
|
+
const _hoisted_1$8 = {
|
|
900
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
901
|
+
viewBox: "0 0 1024 1024"
|
|
902
|
+
};
|
|
903
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
904
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [
|
|
905
|
+
vue.createElementVNode("path", {
|
|
906
|
+
fill: "currentColor",
|
|
907
|
+
d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
|
|
908
|
+
}, null, -1)
|
|
909
|
+
])]);
|
|
910
|
+
}
|
|
911
|
+
const ArrowUp = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$5]]);
|
|
912
|
+
const _sfc_main$h = vue.defineComponent({
|
|
913
|
+
name: "Filter"
|
|
914
|
+
});
|
|
915
|
+
const _hoisted_1$7 = {
|
|
916
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
917
|
+
viewBox: "0 0 1024 1024"
|
|
918
|
+
};
|
|
919
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
920
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
|
|
921
|
+
vue.createElementVNode("path", {
|
|
922
|
+
fill: "currentColor",
|
|
923
|
+
d: "M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z"
|
|
924
|
+
}, null, -1)
|
|
925
|
+
])]);
|
|
926
|
+
}
|
|
927
|
+
const Filter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$4]]);
|
|
928
|
+
const _sfc_main$g = vue.defineComponent({
|
|
929
|
+
name: "Close"
|
|
930
|
+
});
|
|
931
|
+
const _hoisted_1$6 = {
|
|
932
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
933
|
+
viewBox: "0 0 1024 1024"
|
|
934
|
+
};
|
|
935
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
936
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [
|
|
937
|
+
vue.createElementVNode("path", {
|
|
938
|
+
fill: "currentColor",
|
|
939
|
+
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
940
|
+
}, null, -1)
|
|
941
|
+
])]);
|
|
942
|
+
}
|
|
943
|
+
const Close = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$3]]);
|
|
944
|
+
const _sfc_main$f = vue.defineComponent({
|
|
945
|
+
name: "Minus"
|
|
946
|
+
});
|
|
947
|
+
const _hoisted_1$5 = {
|
|
948
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
949
|
+
viewBox: "0 0 1024 1024"
|
|
950
|
+
};
|
|
951
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
952
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [
|
|
953
|
+
vue.createElementVNode("path", {
|
|
954
|
+
fill: "currentColor",
|
|
955
|
+
d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
|
|
956
|
+
}, null, -1)
|
|
957
|
+
])]);
|
|
958
|
+
}
|
|
959
|
+
const Minus = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$2]]);
|
|
960
|
+
const _sfc_main$e = vue.defineComponent({
|
|
961
|
+
name: "CopyDocument"
|
|
962
|
+
});
|
|
963
|
+
const _hoisted_1$4 = {
|
|
964
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
965
|
+
viewBox: "0 0 1024 1024"
|
|
966
|
+
};
|
|
967
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
968
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
969
|
+
vue.createElementVNode("path", {
|
|
970
|
+
fill: "currentColor",
|
|
971
|
+
d: "M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"
|
|
972
|
+
}, null, -1),
|
|
973
|
+
vue.createElementVNode("path", {
|
|
974
|
+
fill: "currentColor",
|
|
975
|
+
d: "M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"
|
|
976
|
+
}, null, -1)
|
|
977
|
+
])]);
|
|
978
|
+
}
|
|
979
|
+
const CopyDocument = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1]]);
|
|
980
|
+
const _sfc_main$d = vue.defineComponent({
|
|
981
|
+
name: "FullScreen"
|
|
982
|
+
});
|
|
983
|
+
const _hoisted_1$3 = {
|
|
984
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
985
|
+
viewBox: "0 0 1024 1024"
|
|
986
|
+
};
|
|
987
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
988
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
989
|
+
vue.createElementVNode("path", {
|
|
990
|
+
fill: "currentColor",
|
|
991
|
+
d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
|
|
992
|
+
}, null, -1)
|
|
993
|
+
])]);
|
|
994
|
+
}
|
|
995
|
+
const FullScreen = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render]]);
|
|
996
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
997
|
+
...{
|
|
998
|
+
name: "ZjhcCollapsePanel"
|
|
999
|
+
},
|
|
1000
|
+
__name: "collapsePanel",
|
|
1001
|
+
props: {
|
|
1002
|
+
collapse: { type: Boolean, required: false, default: true },
|
|
1003
|
+
selector: { type: String, required: false, default: ".el-col" },
|
|
1004
|
+
disableCollapse: { type: Boolean, required: false, default: false }
|
|
1005
|
+
},
|
|
1006
|
+
emits: ["toggleEnd"],
|
|
1007
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1008
|
+
const bem = useNamespace("collapse");
|
|
1009
|
+
const props = __props;
|
|
1010
|
+
const collapse = vue.ref(props.collapse);
|
|
1011
|
+
const minHeight = vue.ref(0);
|
|
1012
|
+
const maxHeight = vue.ref(0);
|
|
1013
|
+
const collapseSelector = vue.ref(props.selector);
|
|
1014
|
+
const collapseDom = vue.ref(null);
|
|
1015
|
+
const wrapperDom = vue.ref(null);
|
|
1016
|
+
const showToggle = vue.ref(false);
|
|
1017
|
+
let enableEmit = false;
|
|
1018
|
+
let needUpdate = true;
|
|
1019
|
+
let resizeObsever;
|
|
1020
|
+
const init = async () => {
|
|
1021
|
+
var _a;
|
|
1022
|
+
collapseDom.value = (_a = wrapperDom.value) == null ? void 0 : _a.querySelector(collapseSelector.value);
|
|
1023
|
+
if (collapseDom.value) {
|
|
1024
|
+
if (getComputedStyle(collapseDom.value).display === "none") {
|
|
1025
|
+
collapseDom.value.style.display = "";
|
|
1026
|
+
}
|
|
1027
|
+
if (props.disableCollapse) {
|
|
1028
|
+
collapse.value = false;
|
|
1029
|
+
showToggle.value = false;
|
|
1030
|
+
wrapperDom.value.style.maxHeight = "none";
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
minHeight.value = collapseDom.value.offsetHeight;
|
|
1034
|
+
maxHeight.value = wrapperDom.value.scrollHeight;
|
|
1035
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1036
|
+
await vue.nextTick();
|
|
1037
|
+
if (minHeight.value == maxHeight.value) {
|
|
1038
|
+
showToggle.value = false;
|
|
1039
|
+
} else {
|
|
1040
|
+
showToggle.value = true;
|
|
1041
|
+
}
|
|
1042
|
+
wrapperDom.value.style.transition = "max-height linear 0.3s";
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
const resize = () => {
|
|
1046
|
+
enableEmit = false;
|
|
1047
|
+
if (props.disableCollapse) {
|
|
1048
|
+
collapse.value = false;
|
|
1049
|
+
showToggle.value = false;
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
if (collapseDom.value && collapseDom.value.offsetHeight > 0) {
|
|
1053
|
+
minHeight.value = collapseDom.value.offsetHeight;
|
|
1054
|
+
maxHeight.value = wrapperDom.value.scrollHeight;
|
|
1055
|
+
if (minHeight.value == maxHeight.value) {
|
|
1056
|
+
showToggle.value = false;
|
|
1057
|
+
} else {
|
|
1058
|
+
showToggle.value = true;
|
|
1059
|
+
}
|
|
1060
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
const modeChangeResize = () => {
|
|
1064
|
+
var _a;
|
|
1065
|
+
(_a = wrapperDom.value) == null ? void 0 : _a.addEventListener("transitionend", resize, { once: true });
|
|
1066
|
+
};
|
|
1067
|
+
const onToggle = () => {
|
|
1068
|
+
enableEmit = true;
|
|
1069
|
+
needUpdate = false;
|
|
1070
|
+
collapse.value = !collapse.value;
|
|
1071
|
+
if (wrapperDom.value) {
|
|
1072
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
const emit = __emit;
|
|
1076
|
+
const onToggleEnd = () => {
|
|
1077
|
+
if (enableEmit) {
|
|
1078
|
+
emit("toggleEnd", collapse.value);
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
__expose({ onToggle });
|
|
1082
|
+
let debounceResize = lodashEs.debounce(resize, 100);
|
|
1083
|
+
vue.onMounted(() => {
|
|
1084
|
+
init();
|
|
1085
|
+
window.addEventListener("resize", debounceResize);
|
|
1086
|
+
window.addEventListener("modeChange", modeChangeResize);
|
|
1087
|
+
if ((wrapperDom == null ? void 0 : wrapperDom.value) && ResizeObserver) {
|
|
1088
|
+
resizeObsever = new ResizeObserver(debounceResize);
|
|
1089
|
+
resizeObsever.observe(wrapperDom == null ? void 0 : wrapperDom.value);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
vue.onUnmounted(() => {
|
|
1093
|
+
window.removeEventListener("resize", debounceResize);
|
|
1094
|
+
window.removeEventListener("modeChange", modeChangeResize);
|
|
1095
|
+
resizeObsever == null ? void 0 : resizeObsever.disconnect();
|
|
1096
|
+
});
|
|
1097
|
+
vue.onUpdated(() => {
|
|
1098
|
+
if (needUpdate) {
|
|
1099
|
+
resize();
|
|
1100
|
+
needUpdate = false;
|
|
1101
|
+
}
|
|
1102
|
+
vue.nextTick(() => {
|
|
1103
|
+
needUpdate = true;
|
|
1104
|
+
});
|
|
1105
|
+
});
|
|
1106
|
+
return (_ctx, _cache) => {
|
|
1107
|
+
const _component_el_link = vue.resolveComponent("el-link");
|
|
1108
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1109
|
+
vue.createElementVNode("div", {
|
|
1110
|
+
class: vue.normalizeClass(vue.unref(bem).m("panel")),
|
|
1111
|
+
ref_key: "wrapperDom",
|
|
1112
|
+
ref: wrapperDom,
|
|
1113
|
+
onTransitionend: vue.withModifiers(onToggleEnd, ["self"])
|
|
1114
|
+
}, [
|
|
1115
|
+
vue.renderSlot(_ctx.$slots, "content")
|
|
1116
|
+
], 34),
|
|
1117
|
+
vue.createElementVNode("div", {
|
|
1118
|
+
class: vue.normalizeClass(vue.unref(bem).m("footer"))
|
|
1119
|
+
}, [
|
|
1120
|
+
vue.renderSlot(_ctx.$slots, "footer"),
|
|
1121
|
+
showToggle.value ? vue.renderSlot(_ctx.$slots, "toggle", {
|
|
1122
|
+
collapsed: collapse.value,
|
|
1123
|
+
onToggle
|
|
1124
|
+
}, () => [
|
|
1125
|
+
vue.createVNode(_component_el_link, {
|
|
1126
|
+
onClick: onToggle,
|
|
1127
|
+
type: "primary",
|
|
1128
|
+
underline: false,
|
|
1129
|
+
icon: vue.unref(Filter),
|
|
1130
|
+
class: vue.normalizeClass(vue.unref(bem).e("toggle"))
|
|
1131
|
+
}, {
|
|
1132
|
+
default: vue.withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
1133
|
+
vue.createTextVNode("高级查询", -1)
|
|
1134
|
+
])]),
|
|
1135
|
+
_: 1
|
|
1136
|
+
}, 8, ["icon", "class"])
|
|
1137
|
+
], void 0, 0) : vue.createCommentVNode("", true)
|
|
1138
|
+
], 2)
|
|
1139
|
+
], 64);
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
const ZjhcCollapsePanel = withInstall(_sfc_main$c);
|
|
1144
|
+
const SearchPanelLayout = vue.defineComponent({
|
|
1145
|
+
name: "ZjhcSearchPanelLayout",
|
|
1146
|
+
props: {
|
|
1147
|
+
// ElCol组件的间距
|
|
1148
|
+
gutter: {
|
|
1149
|
+
type: Number,
|
|
1150
|
+
default: 30
|
|
1151
|
+
},
|
|
1152
|
+
// 当查询条件行数超过一行之后是否启用自动折叠。不包括初始一行,屏幕改变变为多行的情况,这种情况不会折叠查询面板
|
|
1153
|
+
enableExpand: {
|
|
1154
|
+
type: Boolean,
|
|
1155
|
+
default: true
|
|
1156
|
+
},
|
|
1157
|
+
// 每个组件占据的列数,一行默认分为24列,当值为数字的时候,默认为所有组件占据相同的列数
|
|
1158
|
+
// 如果传入值是数组时,只有数组下标对应的组件会被指定为传入的值,其他的组件默认占据6列
|
|
1159
|
+
colSpan: {
|
|
1160
|
+
type: [Array, Number],
|
|
1161
|
+
default: 6
|
|
1162
|
+
},
|
|
1163
|
+
// 当enableExpand为true的时候,初始折叠状态
|
|
1164
|
+
collapse: {
|
|
1165
|
+
type: Boolean,
|
|
1166
|
+
default: true
|
|
1167
|
+
},
|
|
1168
|
+
// 用于选择一个元素,组件基于这个元素的高度来设置折叠时候的高度
|
|
1169
|
+
collapseSelector: {
|
|
1170
|
+
type: String,
|
|
1171
|
+
default: ".el-col"
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
inheritAttrs: false,
|
|
1175
|
+
setup(props, { slots, attrs, emit, expose }) {
|
|
1176
|
+
const ns = useNamespace("search");
|
|
1177
|
+
vue.provide("ns", ns);
|
|
1178
|
+
const formRef = vue.ref();
|
|
1179
|
+
const resetFields = () => {
|
|
1180
|
+
var _a;
|
|
1181
|
+
(_a = formRef.value) == null ? void 0 : _a.resetFields();
|
|
1182
|
+
};
|
|
1183
|
+
const validate = (callback) => {
|
|
1184
|
+
var _a;
|
|
1185
|
+
return (_a = formRef.value) == null ? void 0 : _a.validate(callback);
|
|
1186
|
+
};
|
|
1187
|
+
const validateField = (props2, callback) => {
|
|
1188
|
+
var _a;
|
|
1189
|
+
return (_a = formRef.value) == null ? void 0 : _a.validateField(props2, callback);
|
|
1190
|
+
};
|
|
1191
|
+
const scrollToField = (prop) => {
|
|
1192
|
+
var _a;
|
|
1193
|
+
(_a = formRef.value) == null ? void 0 : _a.scrollToField(prop);
|
|
1194
|
+
};
|
|
1195
|
+
const clearValidate = (props2) => {
|
|
1196
|
+
var _a;
|
|
1197
|
+
(_a = formRef.value) == null ? void 0 : _a.clearValidate(props2);
|
|
1198
|
+
};
|
|
1199
|
+
const onToggleEnd = (status) => {
|
|
1200
|
+
emit("toggleEnd", status);
|
|
1201
|
+
};
|
|
1202
|
+
expose({
|
|
1203
|
+
formRef,
|
|
1204
|
+
resetFields,
|
|
1205
|
+
validate,
|
|
1206
|
+
validateField,
|
|
1207
|
+
scrollToField,
|
|
1208
|
+
clearValidate
|
|
1209
|
+
});
|
|
1210
|
+
const renderItem = (item, index2) => {
|
|
1211
|
+
const span = typeof props.colSpan == "number" ? props.colSpan : props.colSpan[index2] || 6;
|
|
1212
|
+
if (item.type.toString() === "Symbol(v-fgt)") {
|
|
1213
|
+
if (Array.isArray(item.children)) {
|
|
1214
|
+
if (vue.isVNode(item.children[0])) {
|
|
1215
|
+
if (item.children[0].children === "v-if" || item.children[0].children === "") {
|
|
1216
|
+
return false;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
if (item.children === "v-if" || item.children === "") {
|
|
1222
|
+
return false;
|
|
1223
|
+
}
|
|
1224
|
+
let visible = true;
|
|
1225
|
+
if (item.dirs) {
|
|
1226
|
+
const show = item.dirs.find((item2) => {
|
|
1227
|
+
return item2.dir.name === "show";
|
|
1228
|
+
});
|
|
1229
|
+
if (show && !show.value) {
|
|
1230
|
+
visible = false;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
return {
|
|
1234
|
+
node: vue.h(
|
|
1235
|
+
elementPlus.ElCol,
|
|
1236
|
+
{
|
|
1237
|
+
xl: span,
|
|
1238
|
+
lg: span,
|
|
1239
|
+
md: 8,
|
|
1240
|
+
sm: 12,
|
|
1241
|
+
style: { display: visible ? null : "none" }
|
|
1242
|
+
},
|
|
1243
|
+
{ default: () => item }
|
|
1244
|
+
),
|
|
1245
|
+
span
|
|
1246
|
+
};
|
|
1247
|
+
};
|
|
1248
|
+
return () => {
|
|
1249
|
+
var _a;
|
|
1250
|
+
const defaultsList = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
1251
|
+
const defaultSlots = [];
|
|
1252
|
+
const buttonGroupSlots = [];
|
|
1253
|
+
let wrapper;
|
|
1254
|
+
let colCount = 0;
|
|
1255
|
+
let indexNumber = 0;
|
|
1256
|
+
if (defaultsList !== void 0) {
|
|
1257
|
+
defaultsList.forEach((item) => {
|
|
1258
|
+
var _a2;
|
|
1259
|
+
if (item.type.toString() === "Symbol(v-fgt)" || item.type.toString() === "template") {
|
|
1260
|
+
if (Array.isArray(item.children)) {
|
|
1261
|
+
(_a2 = item.children) == null ? void 0 : _a2.forEach((subItem) => {
|
|
1262
|
+
if (vue.isVNode(subItem)) {
|
|
1263
|
+
const res = renderItem(subItem, indexNumber);
|
|
1264
|
+
if (res !== false) {
|
|
1265
|
+
defaultSlots.push(res.node);
|
|
1266
|
+
colCount += res.span;
|
|
1267
|
+
}
|
|
1268
|
+
indexNumber++;
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
} else {
|
|
1273
|
+
const res = renderItem(item, indexNumber);
|
|
1274
|
+
if (res !== false) {
|
|
1275
|
+
defaultSlots.push(res.node);
|
|
1276
|
+
colCount += res.span;
|
|
1277
|
+
}
|
|
1278
|
+
indexNumber++;
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
if (slots.buttonGroup != void 0) {
|
|
1283
|
+
const buttonGroup = slots.buttonGroup();
|
|
1284
|
+
if (colCount > 20 || buttonGroup.length > 2) {
|
|
1285
|
+
buttonGroupSlots.push(
|
|
1286
|
+
vue.h(
|
|
1287
|
+
elementPlus.ElCol,
|
|
1288
|
+
{ span: 24, style: { textAlign: "center" } },
|
|
1289
|
+
{ default: () => buttonGroup }
|
|
1290
|
+
)
|
|
1291
|
+
);
|
|
1292
|
+
} else {
|
|
1293
|
+
const span = 24 - colCount;
|
|
1294
|
+
defaultSlots.push(
|
|
1295
|
+
vue.h(
|
|
1296
|
+
elementPlus.ElCol,
|
|
1297
|
+
{ xl: span, lg: span, md: 8, sm: 12 },
|
|
1298
|
+
{ default: () => buttonGroup }
|
|
1299
|
+
)
|
|
1300
|
+
);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
if (props.enableExpand && buttonGroupSlots.length > 0) {
|
|
1304
|
+
const form = vue.h(
|
|
1305
|
+
elementPlus.ElForm,
|
|
1306
|
+
{ ...attrs, ref: formRef },
|
|
1307
|
+
{
|
|
1308
|
+
default: () => vue.h(
|
|
1309
|
+
elementPlus.ElRow,
|
|
1310
|
+
{ gutter: props.gutter },
|
|
1311
|
+
{ default: () => defaultSlots }
|
|
1312
|
+
)
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
wrapper = vue.h(
|
|
1316
|
+
ZjhcCollapsePanel,
|
|
1317
|
+
{
|
|
1318
|
+
selector: props.collapseSelector,
|
|
1319
|
+
collapse: props.collapse,
|
|
1320
|
+
onToggleEnd
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
content: () => form,
|
|
1324
|
+
footer: () => buttonGroupSlots,
|
|
1325
|
+
toggle: (props2) => {
|
|
1326
|
+
var _a2;
|
|
1327
|
+
return (_a2 = slots.toggle) == null ? void 0 : _a2.call(slots, props2);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1331
|
+
} else {
|
|
1332
|
+
wrapper = vue.h(
|
|
1333
|
+
elementPlus.ElForm,
|
|
1334
|
+
{ ...attrs, ref: formRef },
|
|
1335
|
+
{
|
|
1336
|
+
default: () => vue.h(
|
|
1337
|
+
elementPlus.ElRow,
|
|
1338
|
+
{ gutter: props.gutter },
|
|
1339
|
+
{ default: () => [...defaultSlots, ...buttonGroupSlots] }
|
|
1340
|
+
)
|
|
1341
|
+
}
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
return vue.h(
|
|
1345
|
+
"div",
|
|
1346
|
+
{
|
|
1347
|
+
class: ns.e("panel")
|
|
1348
|
+
},
|
|
1349
|
+
[wrapper]
|
|
1350
|
+
);
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
const ZjhcSearchPanelLayout = withInstall(SearchPanelLayout);
|
|
1355
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
1356
|
+
...{
|
|
1357
|
+
name: "ZjhcSearchLayout"
|
|
1358
|
+
},
|
|
1359
|
+
__name: "searchLayout",
|
|
1360
|
+
setup(__props) {
|
|
1361
|
+
const bem = useNamespace("search");
|
|
1362
|
+
return (_ctx, _cache) => {
|
|
1363
|
+
const _component_el_scrollbar = vue.resolveComponent("el-scrollbar");
|
|
1364
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1365
|
+
class: vue.normalizeClass(vue.unref(bem).e("layout"))
|
|
1366
|
+
}, [
|
|
1367
|
+
vue.renderSlot(_ctx.$slots, "search"),
|
|
1368
|
+
vue.createElementVNode("div", {
|
|
1369
|
+
class: vue.normalizeClass(vue.unref(bem).e("content"))
|
|
1370
|
+
}, [
|
|
1371
|
+
_ctx.$slots.sidebar ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1372
|
+
key: 0,
|
|
1373
|
+
class: vue.normalizeClass(vue.unref(bem).e("sidebar"))
|
|
1374
|
+
}, [
|
|
1375
|
+
vue.createVNode(_component_el_scrollbar, null, {
|
|
1376
|
+
default: vue.withCtx(() => [
|
|
1377
|
+
vue.renderSlot(_ctx.$slots, "sidebar")
|
|
1378
|
+
]),
|
|
1379
|
+
_: 3
|
|
1380
|
+
})
|
|
1381
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
1382
|
+
vue.createElementVNode("div", {
|
|
1383
|
+
class: vue.normalizeClass(vue.unref(bem).e("main"))
|
|
1384
|
+
}, [
|
|
1385
|
+
_ctx.$slots.toolbar ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1386
|
+
key: 0,
|
|
1387
|
+
class: vue.normalizeClass(vue.unref(bem).e("toolbar"))
|
|
1388
|
+
}, [
|
|
1389
|
+
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
1390
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
1391
|
+
_ctx.$slots.list ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1392
|
+
key: 1,
|
|
1393
|
+
class: vue.normalizeClass(vue.unref(bem).e("grid"))
|
|
1394
|
+
}, [
|
|
1395
|
+
vue.renderSlot(_ctx.$slots, "list")
|
|
1396
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
1397
|
+
_ctx.$slots.pagination ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1398
|
+
key: 2,
|
|
1399
|
+
class: vue.normalizeClass(vue.unref(bem).e("pagination"))
|
|
1400
|
+
}, [
|
|
1401
|
+
vue.renderSlot(_ctx.$slots, "pagination")
|
|
1402
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
1403
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
1404
|
+
], 2)
|
|
1405
|
+
], 2)
|
|
1406
|
+
], 2);
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
const ZjhcSearchLayout = withInstall(_sfc_main$b);
|
|
1411
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
1412
|
+
...{
|
|
1413
|
+
name: "ZjhcCollapseContainer"
|
|
1414
|
+
},
|
|
1415
|
+
__name: "collapseContainer",
|
|
1416
|
+
props: {
|
|
1417
|
+
collapse: { type: Boolean, required: false, default: false },
|
|
1418
|
+
title: { type: String, required: false, default: "" }
|
|
1419
|
+
},
|
|
1420
|
+
emits: ["toggleEnd"],
|
|
1421
|
+
setup(__props, { emit: __emit }) {
|
|
1422
|
+
const bem = useNamespace("collapse");
|
|
1423
|
+
const emit = __emit;
|
|
1424
|
+
const props = __props;
|
|
1425
|
+
const state = vue.reactive({
|
|
1426
|
+
isCollapse: props.collapse
|
|
1427
|
+
});
|
|
1428
|
+
function toggle() {
|
|
1429
|
+
state.isCollapse = !state.isCollapse;
|
|
1430
|
+
}
|
|
1431
|
+
const onToggleEnd = () => {
|
|
1432
|
+
emit("toggleEnd", state.isCollapse);
|
|
1433
|
+
};
|
|
1434
|
+
return (_ctx, _cache) => {
|
|
1435
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
1436
|
+
const _component_el_collapse_transition = vue.resolveComponent("el-collapse-transition");
|
|
1437
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1438
|
+
class: vue.normalizeClass(vue.unref(bem).e("container"))
|
|
1439
|
+
}, [
|
|
1440
|
+
vue.createElementVNode("div", {
|
|
1441
|
+
class: vue.normalizeClass(vue.unref(bem).e("header"))
|
|
1442
|
+
}, [
|
|
1443
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1444
|
+
vue.createElementVNode("div", {
|
|
1445
|
+
class: vue.normalizeClass(vue.unref(bem).e("title"))
|
|
1446
|
+
}, vue.toDisplayString(__props.title), 3)
|
|
1447
|
+
]),
|
|
1448
|
+
vue.createVNode(_component_el_icon, {
|
|
1449
|
+
class: vue.normalizeClass(vue.unref(bem).em("header", "arrow")),
|
|
1450
|
+
onClick: toggle
|
|
1451
|
+
}, {
|
|
1452
|
+
default: vue.withCtx(() => [
|
|
1453
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(state.isCollapse ? vue.unref(ArrowDown) : vue.unref(ArrowUp))))
|
|
1454
|
+
]),
|
|
1455
|
+
_: 1
|
|
1456
|
+
}, 8, ["class"])
|
|
1457
|
+
], 2),
|
|
1458
|
+
vue.createVNode(_component_el_collapse_transition, null, {
|
|
1459
|
+
default: vue.withCtx(() => [
|
|
1460
|
+
vue.withDirectives(vue.createElementVNode("div", {
|
|
1461
|
+
class: vue.normalizeClass(vue.unref(bem).e("content")),
|
|
1462
|
+
onTransitionend: vue.withModifiers(onToggleEnd, ["self"])
|
|
1463
|
+
}, [
|
|
1464
|
+
vue.renderSlot(_ctx.$slots, "content")
|
|
1465
|
+
], 34), [
|
|
1466
|
+
[vue.vShow, !state.isCollapse]
|
|
1467
|
+
])
|
|
1468
|
+
]),
|
|
1469
|
+
_: 3
|
|
1470
|
+
})
|
|
1471
|
+
], 2);
|
|
1472
|
+
};
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
const ZjhcCollapseContainer = withInstall(_sfc_main$a);
|
|
1476
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
1477
|
+
...{
|
|
1478
|
+
name: "ZjhcStickyToolbar"
|
|
1479
|
+
},
|
|
1480
|
+
__name: "stickyToolbar",
|
|
1481
|
+
props: {
|
|
1482
|
+
selector: { type: String, required: false, default: ".el-button" }
|
|
1483
|
+
},
|
|
1484
|
+
emits: ["toggleEnd"],
|
|
1485
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1486
|
+
const bem = useNamespace("sticky");
|
|
1487
|
+
const props = __props;
|
|
1488
|
+
const wrapperDom = vue.ref(null);
|
|
1489
|
+
const elDom = vue.ref(null);
|
|
1490
|
+
const minHeight = vue.ref(0);
|
|
1491
|
+
const maxHeight = vue.ref(0);
|
|
1492
|
+
const showToggle = vue.ref(false);
|
|
1493
|
+
const collapse = vue.ref(true);
|
|
1494
|
+
let marginBottom = 10;
|
|
1495
|
+
let enableEmit = false;
|
|
1496
|
+
const init = async () => {
|
|
1497
|
+
enableEmit = false;
|
|
1498
|
+
if (wrapperDom.value) {
|
|
1499
|
+
elDom.value = wrapperDom.value.querySelector(props.selector);
|
|
1500
|
+
if (elDom.value != null) {
|
|
1501
|
+
if (getComputedStyle(elDom.value).display === "none") {
|
|
1502
|
+
elDom.value.style.display = "";
|
|
1503
|
+
}
|
|
1504
|
+
minHeight.value = elDom.value.offsetHeight;
|
|
1505
|
+
marginBottom = parseInt(getComputedStyle(elDom.value).marginBottom);
|
|
1506
|
+
}
|
|
1507
|
+
maxHeight.value = wrapperDom.value.scrollHeight - marginBottom;
|
|
1508
|
+
if (minHeight.value == maxHeight.value) {
|
|
1509
|
+
showToggle.value = false;
|
|
1510
|
+
} else {
|
|
1511
|
+
showToggle.value = true;
|
|
1512
|
+
}
|
|
1513
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1514
|
+
setTimeout(() => {
|
|
1515
|
+
wrapperDom.value.style.transition = "max-height linear 0.3s";
|
|
1516
|
+
}, 0);
|
|
1517
|
+
}
|
|
1518
|
+
};
|
|
1519
|
+
const resize = () => {
|
|
1520
|
+
enableEmit = false;
|
|
1521
|
+
if (elDom.value && elDom.value.offsetHeight > 0) {
|
|
1522
|
+
minHeight.value = elDom.value.offsetHeight;
|
|
1523
|
+
marginBottom = parseInt(getComputedStyle(elDom.value).marginBottom);
|
|
1524
|
+
maxHeight.value = wrapperDom.value.scrollHeight - marginBottom;
|
|
1525
|
+
if (minHeight.value == maxHeight.value) {
|
|
1526
|
+
showToggle.value = false;
|
|
1527
|
+
} else {
|
|
1528
|
+
showToggle.value = true;
|
|
1529
|
+
}
|
|
1530
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1533
|
+
const modeChangeResize = () => {
|
|
1534
|
+
var _a;
|
|
1535
|
+
(_a = wrapperDom.value) == null ? void 0 : _a.addEventListener("transitionend", resize, { once: true });
|
|
1536
|
+
};
|
|
1537
|
+
const onToggle = () => {
|
|
1538
|
+
enableEmit = true;
|
|
1539
|
+
collapse.value = !collapse.value;
|
|
1540
|
+
if (wrapperDom.value) {
|
|
1541
|
+
wrapperDom.value.style.maxHeight = collapse.value ? `${minHeight.value}px` : `${maxHeight.value}px`;
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1544
|
+
const emit = __emit;
|
|
1545
|
+
const onToggleEnd = () => {
|
|
1546
|
+
if (enableEmit) {
|
|
1547
|
+
emit("toggleEnd", collapse.value);
|
|
1548
|
+
}
|
|
1549
|
+
};
|
|
1550
|
+
__expose({ onToggle });
|
|
1551
|
+
let debounceResize = lodashEs.debounce(resize, 100);
|
|
1552
|
+
vue.onMounted(() => {
|
|
1553
|
+
init();
|
|
1554
|
+
window.addEventListener("resize", debounceResize);
|
|
1555
|
+
window.addEventListener("modeChange", modeChangeResize);
|
|
1556
|
+
});
|
|
1557
|
+
vue.onUnmounted(() => {
|
|
1558
|
+
window.removeEventListener("resize", debounceResize);
|
|
1559
|
+
window.removeEventListener("modeChange", modeChangeResize);
|
|
1560
|
+
});
|
|
1561
|
+
return (_ctx, _cache) => {
|
|
1562
|
+
const _component_el_button = vue.resolveComponent("el-button");
|
|
1563
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1564
|
+
class: vue.normalizeClass(vue.unref(bem).e("toolbar"))
|
|
1565
|
+
}, [
|
|
1566
|
+
vue.createElementVNode("div", {
|
|
1567
|
+
class: vue.normalizeClass(vue.unref(bem).e("main"))
|
|
1568
|
+
}, [
|
|
1569
|
+
vue.createElementVNode("div", {
|
|
1570
|
+
class: vue.normalizeClass(vue.unref(bem).e("wrap")),
|
|
1571
|
+
ref_key: "wrapperDom",
|
|
1572
|
+
ref: wrapperDom,
|
|
1573
|
+
onTransitionend: vue.withModifiers(onToggleEnd, ["self"])
|
|
1574
|
+
}, [
|
|
1575
|
+
vue.renderSlot(_ctx.$slots, "content")
|
|
1576
|
+
], 34),
|
|
1577
|
+
showToggle.value ? vue.renderSlot(_ctx.$slots, "toggle", {}, () => [
|
|
1578
|
+
vue.createVNode(_component_el_button, {
|
|
1579
|
+
type: "primary",
|
|
1580
|
+
icon: collapse.value ? vue.unref(ArrowDown) : vue.unref(ArrowUp),
|
|
1581
|
+
onClick: onToggle,
|
|
1582
|
+
class: vue.normalizeClass(vue.unref(bem).e("toggle"))
|
|
1583
|
+
}, null, 8, ["icon", "class"])
|
|
1584
|
+
], void 0, 0) : vue.createCommentVNode("", true)
|
|
1585
|
+
], 2),
|
|
1586
|
+
vue.renderSlot(_ctx.$slots, "side")
|
|
1587
|
+
], 2);
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
const ZjhcStickyToolbar = withInstall(_sfc_main$9);
|
|
1592
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
1593
|
+
...{
|
|
1594
|
+
name: "ZjhcGroupContainer"
|
|
1595
|
+
},
|
|
1596
|
+
__name: "groupContainer",
|
|
1597
|
+
props: {
|
|
1598
|
+
title: { type: String, required: false, default: "" },
|
|
1599
|
+
isBorder: { type: Boolean, required: false, default: false }
|
|
1600
|
+
},
|
|
1601
|
+
setup(__props) {
|
|
1602
|
+
const bem = useNamespace("group");
|
|
1603
|
+
return (_ctx, _cache) => {
|
|
1604
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1605
|
+
class: vue.normalizeClass([vue.unref(bem).e("container"), { "is-border": __props.isBorder }])
|
|
1606
|
+
}, [
|
|
1607
|
+
__props.title || _ctx.$slots.toolbar ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1608
|
+
key: 0,
|
|
1609
|
+
class: vue.normalizeClass(vue.unref(bem).e("header"))
|
|
1610
|
+
}, [
|
|
1611
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1612
|
+
key: 0,
|
|
1613
|
+
class: vue.normalizeClass(vue.unref(bem).e("title"))
|
|
1614
|
+
}, vue.toDisplayString(__props.title), 3)) : vue.createCommentVNode("", true),
|
|
1615
|
+
_ctx.$slots.toolbar ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1616
|
+
key: 1,
|
|
1617
|
+
class: vue.normalizeClass(vue.unref(bem).e("toolbar"))
|
|
1618
|
+
}, [
|
|
1619
|
+
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
1620
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
1621
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
1622
|
+
vue.createElementVNode("div", {
|
|
1623
|
+
class: vue.normalizeClass(vue.unref(bem).e("content"))
|
|
1624
|
+
}, [
|
|
1625
|
+
vue.renderSlot(_ctx.$slots, "content")
|
|
1626
|
+
], 2)
|
|
1627
|
+
], 2);
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
const ZjhcGroupContainer = withInstall(_sfc_main$8);
|
|
1632
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
1633
|
+
...{
|
|
1634
|
+
name: "ZjhcButtonGroup"
|
|
1635
|
+
},
|
|
1636
|
+
__name: "buttonGroup",
|
|
1637
|
+
props: {
|
|
1638
|
+
actions: { type: Array, required: true, default: () => [] },
|
|
1639
|
+
moreButtonText: { type: String, required: false, default: "更多" },
|
|
1640
|
+
buttonType: { type: String, required: false, default: "primary" },
|
|
1641
|
+
plain: { type: Boolean, required: false, default: false },
|
|
1642
|
+
space: { type: Number, required: false, default: 12 },
|
|
1643
|
+
rows: { type: Array, required: false, default: () => [] }
|
|
1644
|
+
},
|
|
1645
|
+
emits: ["command"],
|
|
1646
|
+
setup(__props, { emit: __emit }) {
|
|
1647
|
+
const bem = useNamespace("button");
|
|
1648
|
+
const props = __props;
|
|
1649
|
+
const emit = __emit;
|
|
1650
|
+
const pCur = vue.ref(-1);
|
|
1651
|
+
const visibleButtons = vue.computed(() => {
|
|
1652
|
+
if (pCur.value > 0) {
|
|
1653
|
+
return props.actions.slice(0, pCur.value);
|
|
1654
|
+
} else {
|
|
1655
|
+
return props.actions;
|
|
1656
|
+
}
|
|
1657
|
+
});
|
|
1658
|
+
const moreButtons = vue.computed(() => {
|
|
1659
|
+
if (pCur.value > 0) {
|
|
1660
|
+
let temp = [];
|
|
1661
|
+
let res = props.actions.slice(pCur.value);
|
|
1662
|
+
for (let i = 0; i < res.length; i++) {
|
|
1663
|
+
if (res[i].children != void 0 && res[i].children.length > 0) {
|
|
1664
|
+
temp.push(...res[i].children);
|
|
1665
|
+
} else {
|
|
1666
|
+
temp.push(res[i]);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
return temp;
|
|
1670
|
+
} else {
|
|
1671
|
+
return [];
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
const popperOptions = {
|
|
1675
|
+
modifiers: [
|
|
1676
|
+
{
|
|
1677
|
+
name: "offset",
|
|
1678
|
+
options: {
|
|
1679
|
+
offset: [0, 7]
|
|
1680
|
+
// 水平偏移0,垂直偏移10像素
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
]
|
|
1684
|
+
};
|
|
1685
|
+
let resizeObsever;
|
|
1686
|
+
const groupHeight = vue.ref(28);
|
|
1687
|
+
const groupRef = vue.ref(null);
|
|
1688
|
+
let btnSizes = [];
|
|
1689
|
+
function getButtonSize() {
|
|
1690
|
+
let group = groupRef == null ? void 0 : groupRef.value;
|
|
1691
|
+
let space = props.space;
|
|
1692
|
+
if (!group) return;
|
|
1693
|
+
if (btnSizes.length > 0) {
|
|
1694
|
+
btnSizes = [];
|
|
1695
|
+
}
|
|
1696
|
+
let buttons = group.querySelectorAll(".el-button");
|
|
1697
|
+
if (buttons && buttons.length > 0) {
|
|
1698
|
+
groupHeight.value = buttons[0].offsetHeight;
|
|
1699
|
+
let left = 0;
|
|
1700
|
+
for (let i = 0; i < buttons.length; i++) {
|
|
1701
|
+
left += buttons[i].offsetWidth + space;
|
|
1702
|
+
btnSizes.push(left);
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
function getContainerWidth() {
|
|
1707
|
+
let group = groupRef == null ? void 0 : groupRef.value;
|
|
1708
|
+
if (!group) return null;
|
|
1709
|
+
return group.offsetWidth;
|
|
1710
|
+
}
|
|
1711
|
+
function reBuild() {
|
|
1712
|
+
let width = getContainerWidth();
|
|
1713
|
+
if (width) {
|
|
1714
|
+
let cur = -1;
|
|
1715
|
+
for (let i = 0; i < btnSizes.length; i++) {
|
|
1716
|
+
if (btnSizes[i] - width > props.space) {
|
|
1717
|
+
cur = i - 1;
|
|
1718
|
+
break;
|
|
1719
|
+
}
|
|
1720
|
+
cur = -1;
|
|
1721
|
+
}
|
|
1722
|
+
pCur.value = cur;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
function modeChangeResize() {
|
|
1726
|
+
var _a;
|
|
1727
|
+
(_a = groupRef.value) == null ? void 0 : _a.addEventListener(
|
|
1728
|
+
"transitionend",
|
|
1729
|
+
() => {
|
|
1730
|
+
pCur.value = -1;
|
|
1731
|
+
vue.nextTick(() => {
|
|
1732
|
+
getButtonSize();
|
|
1733
|
+
reBuild();
|
|
1734
|
+
});
|
|
1735
|
+
},
|
|
1736
|
+
{ once: true }
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
function getConfirmText(confirm) {
|
|
1740
|
+
if (isString(confirm)) {
|
|
1741
|
+
return confirm;
|
|
1742
|
+
}
|
|
1743
|
+
return "您确定该操作?";
|
|
1744
|
+
}
|
|
1745
|
+
function getActionEnabled(action) {
|
|
1746
|
+
if (typeof action.disabled === "boolean" && action.disabled) {
|
|
1747
|
+
return false;
|
|
1748
|
+
}
|
|
1749
|
+
if (typeof action.disabled === "function") {
|
|
1750
|
+
return !action.disabled(props.rows);
|
|
1751
|
+
}
|
|
1752
|
+
if (!action.limit || action.limit === "none") {
|
|
1753
|
+
return true;
|
|
1754
|
+
}
|
|
1755
|
+
if (action.limit === "one" && props.rows.length === 1) {
|
|
1756
|
+
return true;
|
|
1757
|
+
}
|
|
1758
|
+
if (action.limit === "more" && props.rows.length > 0) {
|
|
1759
|
+
return true;
|
|
1760
|
+
}
|
|
1761
|
+
return false;
|
|
1762
|
+
}
|
|
1763
|
+
function onConfirmAction(action, e) {
|
|
1764
|
+
if (action.confirm) {
|
|
1765
|
+
elementPlus.ElMessageBox.confirm(getConfirmText(action.confirm), "提示", {
|
|
1766
|
+
type: "warning",
|
|
1767
|
+
cancelButtonText: "取消",
|
|
1768
|
+
cancelButtonClass: "el-button--info",
|
|
1769
|
+
confirmButtonText: "确定"
|
|
1770
|
+
}).then(() => {
|
|
1771
|
+
onAction(action, e);
|
|
1772
|
+
}).catch(() => {
|
|
1773
|
+
});
|
|
1774
|
+
} else {
|
|
1775
|
+
onAction(action, e);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
function onAction(action, e) {
|
|
1779
|
+
const rows = action.limit === "one" ? props.rows[0] : props.rows;
|
|
1780
|
+
if (action.onclick) {
|
|
1781
|
+
if (isFunction(action.onclick)) {
|
|
1782
|
+
action.onclick(rows, void 0, e);
|
|
1783
|
+
} else {
|
|
1784
|
+
emit("command", action.onclick, rows);
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
const reCalcBtnSize = lodashEs.debounce(function() {
|
|
1789
|
+
if (groupHeight.value > 0) {
|
|
1790
|
+
return;
|
|
1791
|
+
}
|
|
1792
|
+
getButtonSize();
|
|
1793
|
+
}, 100);
|
|
1794
|
+
vue.onMounted(() => {
|
|
1795
|
+
vue.nextTick(() => {
|
|
1796
|
+
requestAnimationFrame(() => {
|
|
1797
|
+
getButtonSize();
|
|
1798
|
+
reBuild();
|
|
1799
|
+
});
|
|
1800
|
+
});
|
|
1801
|
+
if ((groupRef == null ? void 0 : groupRef.value) && ResizeObserver) {
|
|
1802
|
+
resizeObsever = new ResizeObserver(reCalcBtnSize);
|
|
1803
|
+
resizeObsever.observe(groupRef == null ? void 0 : groupRef.value);
|
|
1804
|
+
}
|
|
1805
|
+
window.addEventListener("resize", reBuild);
|
|
1806
|
+
window.addEventListener("modeChange", modeChangeResize);
|
|
1807
|
+
});
|
|
1808
|
+
vue.onBeforeUnmount(() => {
|
|
1809
|
+
window.removeEventListener("resize", reBuild);
|
|
1810
|
+
window.removeEventListener("modeChange", modeChangeResize);
|
|
1811
|
+
resizeObsever == null ? void 0 : resizeObsever.disconnect();
|
|
1812
|
+
});
|
|
1813
|
+
return (_ctx, _cache) => {
|
|
1814
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1815
|
+
class: vue.normalizeClass(vue.unref(bem).e("group")),
|
|
1816
|
+
ref_key: "groupRef",
|
|
1817
|
+
ref: groupRef,
|
|
1818
|
+
style: vue.normalizeStyle({ height: groupHeight.value + "px" })
|
|
1819
|
+
}, [
|
|
1820
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleButtons.value, (item) => {
|
|
1821
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1822
|
+
key: item.key
|
|
1823
|
+
}, [
|
|
1824
|
+
item.children != null && item.children.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
|
|
1825
|
+
key: 0,
|
|
1826
|
+
"popper-options": popperOptions,
|
|
1827
|
+
"popper-class": vue.unref(bem).em("group", "popper"),
|
|
1828
|
+
"max-heighgt": "280px",
|
|
1829
|
+
placement: "bottom-start"
|
|
1830
|
+
}, {
|
|
1831
|
+
dropdown: vue.withCtx(() => [
|
|
1832
|
+
vue.createVNode(vue.unref(elementPlus.ElDropdownMenu), null, {
|
|
1833
|
+
default: vue.withCtx(() => [
|
|
1834
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.children, (child, index2) => {
|
|
1835
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
1836
|
+
key: index2,
|
|
1837
|
+
disabled: !getActionEnabled(child),
|
|
1838
|
+
icon: child.icon,
|
|
1839
|
+
onClick: ($event) => onConfirmAction(child, $event)
|
|
1840
|
+
}, {
|
|
1841
|
+
default: vue.withCtx(() => [
|
|
1842
|
+
vue.createTextVNode(vue.toDisplayString(child.text), 1)
|
|
1843
|
+
]),
|
|
1844
|
+
_: 2
|
|
1845
|
+
}, 1032, ["disabled", "icon", "onClick"]);
|
|
1846
|
+
}), 128))
|
|
1847
|
+
]),
|
|
1848
|
+
_: 2
|
|
1849
|
+
}, 1024)
|
|
1850
|
+
]),
|
|
1851
|
+
default: vue.withCtx(() => [
|
|
1852
|
+
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
1853
|
+
icon: item.icon,
|
|
1854
|
+
disabled: !getActionEnabled(item),
|
|
1855
|
+
type: item.type,
|
|
1856
|
+
plain: item.plain,
|
|
1857
|
+
title: item.tooltip
|
|
1858
|
+
}, {
|
|
1859
|
+
default: vue.withCtx(() => [
|
|
1860
|
+
item.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1861
|
+
vue.createTextVNode(vue.toDisplayString(item.text), 1)
|
|
1862
|
+
], 64)) : vue.createCommentVNode("", true),
|
|
1863
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "el-icon--right" }, {
|
|
1864
|
+
default: vue.withCtx(() => [
|
|
1865
|
+
vue.createVNode(vue.unref(ArrowDown))
|
|
1866
|
+
]),
|
|
1867
|
+
_: 1
|
|
1868
|
+
})
|
|
1869
|
+
]),
|
|
1870
|
+
_: 2
|
|
1871
|
+
}, 1032, ["icon", "disabled", "type", "plain", "title"])
|
|
1872
|
+
]),
|
|
1873
|
+
_: 2
|
|
1874
|
+
}, 1032, ["popper-class"])) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), {
|
|
1875
|
+
key: 1,
|
|
1876
|
+
icon: item.icon,
|
|
1877
|
+
disabled: !getActionEnabled(item),
|
|
1878
|
+
type: item.type,
|
|
1879
|
+
plain: item.plain,
|
|
1880
|
+
title: item.tooltip,
|
|
1881
|
+
onClick: ($event) => onConfirmAction(item, $event)
|
|
1882
|
+
}, {
|
|
1883
|
+
default: vue.withCtx(() => [
|
|
1884
|
+
item.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1885
|
+
vue.createTextVNode(vue.toDisplayString(item.text), 1)
|
|
1886
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
1887
|
+
]),
|
|
1888
|
+
_: 2
|
|
1889
|
+
}, 1032, ["icon", "disabled", "type", "plain", "title", "onClick"]))
|
|
1890
|
+
], 64);
|
|
1891
|
+
}), 128)),
|
|
1892
|
+
moreButtons.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
|
|
1893
|
+
key: 0,
|
|
1894
|
+
"popper-options": popperOptions,
|
|
1895
|
+
"popper-class": vue.unref(bem).em("group", "popper"),
|
|
1896
|
+
"max-heighgt": "280px",
|
|
1897
|
+
placement: "bottom-start"
|
|
1898
|
+
}, {
|
|
1899
|
+
dropdown: vue.withCtx(() => [
|
|
1900
|
+
vue.createVNode(vue.unref(elementPlus.ElDropdownMenu), null, {
|
|
1901
|
+
default: vue.withCtx(() => [
|
|
1902
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(moreButtons.value, (child, index2) => {
|
|
1903
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
1904
|
+
key: index2,
|
|
1905
|
+
disabled: !getActionEnabled(child),
|
|
1906
|
+
icon: child.icon,
|
|
1907
|
+
onClick: ($event) => onConfirmAction(child, $event)
|
|
1908
|
+
}, {
|
|
1909
|
+
default: vue.withCtx(() => [
|
|
1910
|
+
vue.createTextVNode(vue.toDisplayString(child.text), 1)
|
|
1911
|
+
]),
|
|
1912
|
+
_: 2
|
|
1913
|
+
}, 1032, ["disabled", "icon", "onClick"]);
|
|
1914
|
+
}), 128))
|
|
1915
|
+
]),
|
|
1916
|
+
_: 1
|
|
1917
|
+
})
|
|
1918
|
+
]),
|
|
1919
|
+
default: vue.withCtx(() => [
|
|
1920
|
+
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
1921
|
+
type: __props.buttonType,
|
|
1922
|
+
plain: __props.plain
|
|
1923
|
+
}, {
|
|
1924
|
+
default: vue.withCtx(() => [
|
|
1925
|
+
vue.createTextVNode(vue.toDisplayString(__props.moreButtonText), 1),
|
|
1926
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "el-icon--right" }, {
|
|
1927
|
+
default: vue.withCtx(() => [
|
|
1928
|
+
vue.createVNode(vue.unref(ArrowDown))
|
|
1929
|
+
]),
|
|
1930
|
+
_: 1
|
|
1931
|
+
})
|
|
1932
|
+
]),
|
|
1933
|
+
_: 1
|
|
1934
|
+
}, 8, ["type", "plain"])
|
|
1935
|
+
]),
|
|
1936
|
+
_: 1
|
|
1937
|
+
}, 8, ["popper-class"])) : vue.createCommentVNode("", true)
|
|
1938
|
+
], 6);
|
|
1939
|
+
};
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1942
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
1943
|
+
...{
|
|
1944
|
+
name: "ZjhcTableToolbar"
|
|
1945
|
+
},
|
|
1946
|
+
__name: "tableToolbar",
|
|
1947
|
+
props: {
|
|
1948
|
+
actions: { type: Array, required: false, default: () => [] },
|
|
1949
|
+
moreButtonText: { type: String, required: false, default: "更多" },
|
|
1950
|
+
primaryColSpan: { type: Number, required: false },
|
|
1951
|
+
secondaryColSpan: { type: Number, required: false },
|
|
1952
|
+
rows: { type: Array, required: false, default: () => [] },
|
|
1953
|
+
space: { type: Number, required: false, default: 12 }
|
|
1954
|
+
},
|
|
1955
|
+
emits: ["on-command"],
|
|
1956
|
+
setup(__props, { emit: __emit }) {
|
|
1957
|
+
const bem = useNamespace("table");
|
|
1958
|
+
const props = __props;
|
|
1959
|
+
const emit = __emit;
|
|
1960
|
+
const onCommand = (command, rows) => {
|
|
1961
|
+
emit("on-command", command, rows);
|
|
1962
|
+
};
|
|
1963
|
+
const primaryActions = vue.computed(() => {
|
|
1964
|
+
return props.actions.filter(
|
|
1965
|
+
(item) => item.position == "left" || !item.position
|
|
1966
|
+
);
|
|
1967
|
+
});
|
|
1968
|
+
const secondaryActions = vue.computed(() => {
|
|
1969
|
+
return props.actions.filter((item) => item.position == "right");
|
|
1970
|
+
});
|
|
1971
|
+
const primaryColSpan = vue.computed(() => {
|
|
1972
|
+
if (props.primaryColSpan != void 0) {
|
|
1973
|
+
return props.primaryColSpan;
|
|
1974
|
+
} else {
|
|
1975
|
+
if (primaryActions.value.length > 0) {
|
|
1976
|
+
return 16;
|
|
1977
|
+
} else {
|
|
1978
|
+
return 0;
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
});
|
|
1982
|
+
const secondaryColSpan = vue.computed(() => {
|
|
1983
|
+
if (props.secondaryColSpan != void 0) {
|
|
1984
|
+
return props.secondaryColSpan;
|
|
1985
|
+
} else {
|
|
1986
|
+
if (secondaryActions.value.length > 0) {
|
|
1987
|
+
return 8;
|
|
1988
|
+
} else {
|
|
1989
|
+
return 0;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
});
|
|
1993
|
+
return (_ctx, _cache) => {
|
|
1994
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1995
|
+
class: vue.normalizeClass(vue.unref(bem).e("toolbar"))
|
|
1996
|
+
}, [
|
|
1997
|
+
vue.createVNode(vue.unref(elementPlus.ElRow), null, {
|
|
1998
|
+
default: vue.withCtx(() => [
|
|
1999
|
+
primaryActions.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCol), {
|
|
2000
|
+
key: 0,
|
|
2001
|
+
span: primaryColSpan.value
|
|
2002
|
+
}, {
|
|
2003
|
+
default: vue.withCtx(() => [
|
|
2004
|
+
vue.createVNode(_sfc_main$7, {
|
|
2005
|
+
actions: primaryActions.value,
|
|
2006
|
+
moreButtonText: __props.moreButtonText,
|
|
2007
|
+
rows: __props.rows,
|
|
2008
|
+
buttonType: "primary",
|
|
2009
|
+
space: __props.space,
|
|
2010
|
+
plain: false,
|
|
2011
|
+
onCommand
|
|
2012
|
+
}, null, 8, ["actions", "moreButtonText", "rows", "space"])
|
|
2013
|
+
]),
|
|
2014
|
+
_: 1
|
|
2015
|
+
}, 8, ["span"])) : vue.createCommentVNode("", true),
|
|
2016
|
+
secondaryActions.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElCol), {
|
|
2017
|
+
key: 1,
|
|
2018
|
+
span: secondaryColSpan.value
|
|
2019
|
+
}, {
|
|
2020
|
+
default: vue.withCtx(() => [
|
|
2021
|
+
vue.createVNode(_sfc_main$7, {
|
|
2022
|
+
style: { "text-align": "right" },
|
|
2023
|
+
actions: secondaryActions.value,
|
|
2024
|
+
moreButtonText: __props.moreButtonText,
|
|
2025
|
+
buttonType: "primary",
|
|
2026
|
+
space: __props.space,
|
|
2027
|
+
plain: true,
|
|
2028
|
+
onCommand,
|
|
2029
|
+
rows: __props.rows
|
|
2030
|
+
}, null, 8, ["actions", "moreButtonText", "space", "rows"])
|
|
2031
|
+
]),
|
|
2032
|
+
_: 1
|
|
2033
|
+
}, 8, ["span"])) : vue.createCommentVNode("", true)
|
|
2034
|
+
]),
|
|
2035
|
+
_: 1
|
|
2036
|
+
})
|
|
2037
|
+
], 2);
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
});
|
|
2041
|
+
const ZjhcTableToolbar = withInstall(_sfc_main$6);
|
|
2042
|
+
const dialogContentProps = index.buildProps({
|
|
2043
|
+
center: Boolean,
|
|
2044
|
+
alignCenter: Boolean,
|
|
2045
|
+
closeIcon: {
|
|
2046
|
+
type: index.iconPropType
|
|
2047
|
+
},
|
|
2048
|
+
// 是否可拖动
|
|
2049
|
+
draggable: {
|
|
2050
|
+
type: Boolean,
|
|
2051
|
+
default: true
|
|
2052
|
+
},
|
|
2053
|
+
// 是否可以改变大小
|
|
2054
|
+
resizable: {
|
|
2055
|
+
type: Boolean,
|
|
2056
|
+
default: true
|
|
2057
|
+
},
|
|
2058
|
+
overflow: {
|
|
2059
|
+
type: Boolean,
|
|
2060
|
+
default: false
|
|
2061
|
+
},
|
|
2062
|
+
fullscreen: Boolean,
|
|
2063
|
+
showClose: {
|
|
2064
|
+
type: Boolean,
|
|
2065
|
+
default: true
|
|
2066
|
+
},
|
|
2067
|
+
title: {
|
|
2068
|
+
type: String,
|
|
2069
|
+
default: ""
|
|
2070
|
+
},
|
|
2071
|
+
ariaLevel: {
|
|
2072
|
+
type: String,
|
|
2073
|
+
default: "2"
|
|
2074
|
+
}
|
|
2075
|
+
});
|
|
2076
|
+
const dialogProps = index.buildProps({
|
|
2077
|
+
...dialogContentProps,
|
|
2078
|
+
appendToBody: {
|
|
2079
|
+
type: Boolean,
|
|
2080
|
+
default: true
|
|
2081
|
+
},
|
|
2082
|
+
appendTo: {
|
|
2083
|
+
type: index.definePropType([String, Object]),
|
|
2084
|
+
default: "body"
|
|
2085
|
+
},
|
|
2086
|
+
beforeClose: {
|
|
2087
|
+
type: index.definePropType(Function)
|
|
2088
|
+
},
|
|
2089
|
+
destroyOnClose: {
|
|
2090
|
+
type: Boolean,
|
|
2091
|
+
default: true
|
|
2092
|
+
},
|
|
2093
|
+
closeOnClickModal: {
|
|
2094
|
+
type: Boolean,
|
|
2095
|
+
default: false
|
|
2096
|
+
},
|
|
2097
|
+
closeOnPressEscape: {
|
|
2098
|
+
type: Boolean,
|
|
2099
|
+
default: true
|
|
2100
|
+
},
|
|
2101
|
+
lockScroll: {
|
|
2102
|
+
type: Boolean,
|
|
2103
|
+
default: true
|
|
2104
|
+
},
|
|
2105
|
+
modal: {
|
|
2106
|
+
type: Boolean,
|
|
2107
|
+
default: true
|
|
2108
|
+
},
|
|
2109
|
+
openDelay: {
|
|
2110
|
+
type: Number,
|
|
2111
|
+
default: 0
|
|
2112
|
+
},
|
|
2113
|
+
closeDelay: {
|
|
2114
|
+
type: Number,
|
|
2115
|
+
default: 0
|
|
2116
|
+
},
|
|
2117
|
+
top: {
|
|
2118
|
+
type: String
|
|
2119
|
+
},
|
|
2120
|
+
modelValue: Boolean,
|
|
2121
|
+
modalClass: String,
|
|
2122
|
+
width: {
|
|
2123
|
+
type: [String, Number]
|
|
2124
|
+
},
|
|
2125
|
+
height: {
|
|
2126
|
+
type: [String, Number]
|
|
2127
|
+
},
|
|
2128
|
+
zIndex: {
|
|
2129
|
+
type: Number
|
|
2130
|
+
},
|
|
2131
|
+
trapFocus: Boolean,
|
|
2132
|
+
headerAriaLevel: {
|
|
2133
|
+
type: String,
|
|
2134
|
+
default: "2"
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
const dialogEmits = {
|
|
2138
|
+
open: () => true,
|
|
2139
|
+
opened: () => true,
|
|
2140
|
+
close: () => true,
|
|
2141
|
+
closed: () => true,
|
|
2142
|
+
[UPDATE_MODEL_EVENT]: (value) => index.isBoolean(value),
|
|
2143
|
+
openAutoFocus: () => true,
|
|
2144
|
+
closeAutoFocus: () => true
|
|
2145
|
+
};
|
|
2146
|
+
const useDialog = (props, targetRef) => {
|
|
2147
|
+
const instance = vue.getCurrentInstance();
|
|
2148
|
+
const emit = instance.emit;
|
|
2149
|
+
const { nextZIndex } = index$1.useZIndex();
|
|
2150
|
+
let lastPosition = "", lastLeft = "", lastTop = "";
|
|
2151
|
+
const titleId = index$1.useId();
|
|
2152
|
+
const bodyId = index$1.useId();
|
|
2153
|
+
const visible = vue.ref(false);
|
|
2154
|
+
const closed = vue.ref(false);
|
|
2155
|
+
const rendered = vue.ref(false);
|
|
2156
|
+
const zIndex = vue.ref(props.zIndex ?? nextZIndex());
|
|
2157
|
+
let openTimer = void 0;
|
|
2158
|
+
let closeTimer = void 0;
|
|
2159
|
+
const namespace = index$2.useGlobalConfig("namespace", index$1.defaultNamespace);
|
|
2160
|
+
const style = vue.computed(() => {
|
|
2161
|
+
const style2 = {};
|
|
2162
|
+
const varPrefix = `--${namespace.value}-dialog`;
|
|
2163
|
+
if (!props.fullscreen) {
|
|
2164
|
+
if (props.top) {
|
|
2165
|
+
style2[`${varPrefix}-margin-top`] = props.top;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
if (props.width) {
|
|
2169
|
+
style2[`${varPrefix}-width`] = index.addUnit(props.width);
|
|
2170
|
+
}
|
|
2171
|
+
if (props.height) {
|
|
2172
|
+
style2[`${varPrefix}-height`] = index.addUnit(props.height);
|
|
2173
|
+
}
|
|
2174
|
+
return style2;
|
|
2175
|
+
});
|
|
2176
|
+
const overlayDialogStyle = vue.computed(() => {
|
|
2177
|
+
if (props.alignCenter) {
|
|
2178
|
+
return { display: "flex" };
|
|
2179
|
+
}
|
|
2180
|
+
return {};
|
|
2181
|
+
});
|
|
2182
|
+
function afterEnter() {
|
|
2183
|
+
emit("opened");
|
|
2184
|
+
}
|
|
2185
|
+
function afterLeave() {
|
|
2186
|
+
emit("closed");
|
|
2187
|
+
emit(UPDATE_MODEL_EVENT, false);
|
|
2188
|
+
if (props.destroyOnClose) {
|
|
2189
|
+
rendered.value = false;
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
function beforeLeave() {
|
|
2193
|
+
emit("close");
|
|
2194
|
+
}
|
|
2195
|
+
function open() {
|
|
2196
|
+
closeTimer == null ? void 0 : closeTimer();
|
|
2197
|
+
openTimer == null ? void 0 : openTimer();
|
|
2198
|
+
if (props.openDelay && props.openDelay > 0) {
|
|
2199
|
+
({ stop: openTimer } = core.useTimeoutFn(() => doOpen(), props.openDelay));
|
|
2200
|
+
} else {
|
|
2201
|
+
doOpen();
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
function close() {
|
|
2205
|
+
closeTimer == null ? void 0 : closeTimer();
|
|
2206
|
+
openTimer == null ? void 0 : openTimer();
|
|
2207
|
+
if (props.closeDelay && props.closeDelay > 0) {
|
|
2208
|
+
({ stop: closeTimer } = core.useTimeoutFn(() => doClose(), props.closeDelay));
|
|
2209
|
+
} else {
|
|
2210
|
+
doClose();
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
function handleClose() {
|
|
2214
|
+
function hide(shouldCancel) {
|
|
2215
|
+
if (shouldCancel) return;
|
|
2216
|
+
closed.value = true;
|
|
2217
|
+
visible.value = false;
|
|
2218
|
+
}
|
|
2219
|
+
if (props.beforeClose) {
|
|
2220
|
+
props.beforeClose(hide);
|
|
2221
|
+
} else {
|
|
2222
|
+
close();
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
function onModalClick() {
|
|
2226
|
+
if (props.closeOnClickModal) {
|
|
2227
|
+
handleClose();
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
function doOpen() {
|
|
2231
|
+
if (!index.isClient) return;
|
|
2232
|
+
visible.value = true;
|
|
2233
|
+
if (props.draggable) {
|
|
2234
|
+
vue.nextTick(() => {
|
|
2235
|
+
if (targetRef.value) {
|
|
2236
|
+
const width = targetRef.value.offsetWidth;
|
|
2237
|
+
const height = targetRef.value.offsetHeight;
|
|
2238
|
+
const winWidth = document.documentElement.clientWidth;
|
|
2239
|
+
const winHeight = document.documentElement.clientHeight;
|
|
2240
|
+
targetRef.value.style.left = (winWidth - width) / 2 + "px";
|
|
2241
|
+
if (props.alignCenter) {
|
|
2242
|
+
targetRef.value.style.top = Math.max(0, (winHeight - height) / 2) + "px";
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
function doClose() {
|
|
2249
|
+
visible.value = false;
|
|
2250
|
+
}
|
|
2251
|
+
function onOpenAutoFocus() {
|
|
2252
|
+
emit("openAutoFocus");
|
|
2253
|
+
}
|
|
2254
|
+
function onCloseAutoFocus() {
|
|
2255
|
+
emit("closeAutoFocus");
|
|
2256
|
+
}
|
|
2257
|
+
function onFocusoutPrevented(event) {
|
|
2258
|
+
var _a;
|
|
2259
|
+
if (((_a = event.detail) == null ? void 0 : _a.focusReason) === "pointer") {
|
|
2260
|
+
event.preventDefault();
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
if (props.lockScroll) {
|
|
2264
|
+
index$1.useLockscreen(visible);
|
|
2265
|
+
}
|
|
2266
|
+
function onCloseRequested() {
|
|
2267
|
+
if (props.closeOnPressEscape) {
|
|
2268
|
+
handleClose();
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
vue.watch(
|
|
2272
|
+
() => props.modelValue,
|
|
2273
|
+
(val) => {
|
|
2274
|
+
if (val) {
|
|
2275
|
+
closed.value = false;
|
|
2276
|
+
open();
|
|
2277
|
+
rendered.value = true;
|
|
2278
|
+
zIndex.value = lodashEs.isUndefined(props.zIndex) ? nextZIndex() : zIndex.value++;
|
|
2279
|
+
vue.nextTick(() => {
|
|
2280
|
+
emit("open");
|
|
2281
|
+
if (targetRef.value) {
|
|
2282
|
+
targetRef.value.scrollTop = 0;
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
} else {
|
|
2286
|
+
if (visible.value) {
|
|
2287
|
+
close();
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
);
|
|
2292
|
+
vue.watch(
|
|
2293
|
+
() => props.fullscreen,
|
|
2294
|
+
(val) => {
|
|
2295
|
+
if (!targetRef.value) return;
|
|
2296
|
+
if (val) {
|
|
2297
|
+
if (props.draggable) {
|
|
2298
|
+
lastPosition = targetRef.value.style.transform;
|
|
2299
|
+
targetRef.value.style.transform = "";
|
|
2300
|
+
lastLeft = targetRef.value.style.left;
|
|
2301
|
+
lastTop = targetRef.value.style.top;
|
|
2302
|
+
targetRef.value.style.left = "";
|
|
2303
|
+
targetRef.value.style.top = "";
|
|
2304
|
+
}
|
|
2305
|
+
} else {
|
|
2306
|
+
if (props.draggable) {
|
|
2307
|
+
targetRef.value.style.transform = lastPosition;
|
|
2308
|
+
targetRef.value.style.left = lastLeft;
|
|
2309
|
+
targetRef.value.style.top = lastTop;
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
);
|
|
2314
|
+
vue.onMounted(() => {
|
|
2315
|
+
if (props.modelValue) {
|
|
2316
|
+
visible.value = true;
|
|
2317
|
+
rendered.value = true;
|
|
2318
|
+
open();
|
|
2319
|
+
}
|
|
2320
|
+
});
|
|
2321
|
+
return {
|
|
2322
|
+
afterEnter,
|
|
2323
|
+
afterLeave,
|
|
2324
|
+
beforeLeave,
|
|
2325
|
+
handleClose,
|
|
2326
|
+
onModalClick,
|
|
2327
|
+
close,
|
|
2328
|
+
doClose,
|
|
2329
|
+
onOpenAutoFocus,
|
|
2330
|
+
onCloseAutoFocus,
|
|
2331
|
+
onCloseRequested,
|
|
2332
|
+
onFocusoutPrevented,
|
|
2333
|
+
titleId,
|
|
2334
|
+
bodyId,
|
|
2335
|
+
closed,
|
|
2336
|
+
style,
|
|
2337
|
+
overlayDialogStyle,
|
|
2338
|
+
rendered,
|
|
2339
|
+
visible,
|
|
2340
|
+
zIndex
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
const _hoisted_1$2 = ["aria-level"];
|
|
2344
|
+
const _hoisted_2$1 = ["id"];
|
|
2345
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
2346
|
+
...{
|
|
2347
|
+
name: "ZjhcDialogContent"
|
|
2348
|
+
},
|
|
2349
|
+
__name: "dialogContent",
|
|
2350
|
+
props: dialogContentProps,
|
|
2351
|
+
emits: ["close", "minusChange"],
|
|
2352
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2353
|
+
const props = __props;
|
|
2354
|
+
const emit = __emit;
|
|
2355
|
+
const { dialogRef, headerRef, bodyId, ns, style } = vue.inject(elementPlus.dialogInjectionKey);
|
|
2356
|
+
const { focusTrapRef } = vue.inject(ElFocusTrap.FOCUS_TRAP_INJECTION_KEY);
|
|
2357
|
+
const composeDialogRef = index.composeRefs(focusTrapRef, dialogRef);
|
|
2358
|
+
const draggable = vue.computed(() => props.draggable);
|
|
2359
|
+
const overflow = vue.computed(() => props.overflow);
|
|
2360
|
+
const isFullscreen = vue.computed(() => props.fullscreen);
|
|
2361
|
+
const resizable = vue.computed(() => props.resizable);
|
|
2362
|
+
const alignCenter = vue.computed(() => props.alignCenter);
|
|
2363
|
+
const { resetPosition, resetSize, onExpand, onCompress, onMinus, fullscreen, minus } = useDraggableAndResizable(
|
|
2364
|
+
dialogRef,
|
|
2365
|
+
headerRef,
|
|
2366
|
+
draggable,
|
|
2367
|
+
resizable,
|
|
2368
|
+
isFullscreen,
|
|
2369
|
+
alignCenter,
|
|
2370
|
+
overflow
|
|
2371
|
+
);
|
|
2372
|
+
const dialogKls = vue.computed(() => [
|
|
2373
|
+
ns.b(),
|
|
2374
|
+
ns.is("fullscreen", fullscreen.value),
|
|
2375
|
+
ns.is("minus", minus.value),
|
|
2376
|
+
ns.is("draggable", props.draggable),
|
|
2377
|
+
ns.is("resizable", props.resizable),
|
|
2378
|
+
ns.is("align-center", props.alignCenter),
|
|
2379
|
+
{ [ns.m("center")]: props.center }
|
|
2380
|
+
]);
|
|
2381
|
+
const onClose = () => {
|
|
2382
|
+
emit("close");
|
|
2383
|
+
};
|
|
2384
|
+
const _onMinus = () => {
|
|
2385
|
+
onMinus();
|
|
2386
|
+
emit("minusChange", minus.value);
|
|
2387
|
+
};
|
|
2388
|
+
const _onCompress = () => {
|
|
2389
|
+
onCompress();
|
|
2390
|
+
emit("minusChange", minus.value);
|
|
2391
|
+
};
|
|
2392
|
+
__expose({
|
|
2393
|
+
resetPosition,
|
|
2394
|
+
resetSize
|
|
2395
|
+
});
|
|
2396
|
+
return (_ctx, _cache) => {
|
|
2397
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2398
|
+
ref: vue.unref(composeDialogRef),
|
|
2399
|
+
class: vue.normalizeClass(dialogKls.value),
|
|
2400
|
+
style: vue.normalizeStyle(vue.unref(style)),
|
|
2401
|
+
tabindex: "-1"
|
|
2402
|
+
}, [
|
|
2403
|
+
vue.createElementVNode("header", {
|
|
2404
|
+
ref_key: "headerRef",
|
|
2405
|
+
ref: headerRef,
|
|
2406
|
+
class: vue.normalizeClass([vue.unref(ns).e("header"), { "show-close": _ctx.showClose }])
|
|
2407
|
+
}, [
|
|
2408
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
2409
|
+
vue.createElementVNode("span", {
|
|
2410
|
+
role: "heading",
|
|
2411
|
+
"aria-level": _ctx.ariaLevel,
|
|
2412
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
2413
|
+
}, vue.toDisplayString(_ctx.title), 11, _hoisted_1$2)
|
|
2414
|
+
]),
|
|
2415
|
+
vue.createElementVNode("div", {
|
|
2416
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtns"))
|
|
2417
|
+
}, [
|
|
2418
|
+
resizable.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
2419
|
+
!vue.unref(minus) ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2420
|
+
key: 0,
|
|
2421
|
+
"aria-label": "最小化",
|
|
2422
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
2423
|
+
type: "button",
|
|
2424
|
+
onClick: _onMinus
|
|
2425
|
+
}, [
|
|
2426
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
2427
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
2428
|
+
size: 18
|
|
2429
|
+
}, {
|
|
2430
|
+
default: vue.withCtx(() => [
|
|
2431
|
+
vue.createVNode(vue.unref(Minus))
|
|
2432
|
+
]),
|
|
2433
|
+
_: 1
|
|
2434
|
+
}, 8, ["class"])
|
|
2435
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
2436
|
+
!vue.unref(fullscreen) && !vue.unref(minus) ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2437
|
+
key: 1,
|
|
2438
|
+
"aria-label": "最大化",
|
|
2439
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
2440
|
+
type: "button",
|
|
2441
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2442
|
+
(...args) => vue.unref(onExpand) && vue.unref(onExpand)(...args))
|
|
2443
|
+
}, [
|
|
2444
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
2445
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
2446
|
+
size: 18
|
|
2447
|
+
}, {
|
|
2448
|
+
default: vue.withCtx(() => [
|
|
2449
|
+
vue.createVNode(vue.unref(FullScreen))
|
|
2450
|
+
]),
|
|
2451
|
+
_: 1
|
|
2452
|
+
}, 8, ["class"])
|
|
2453
|
+
], 2)) : (vue.openBlock(), vue.createElementBlock("button", {
|
|
2454
|
+
key: 2,
|
|
2455
|
+
"aria-label": "还原",
|
|
2456
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
2457
|
+
type: "button",
|
|
2458
|
+
onClick: _onCompress
|
|
2459
|
+
}, [
|
|
2460
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
2461
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
2462
|
+
size: 18
|
|
2463
|
+
}, {
|
|
2464
|
+
default: vue.withCtx(() => [
|
|
2465
|
+
vue.createVNode(vue.unref(CopyDocument))
|
|
2466
|
+
]),
|
|
2467
|
+
_: 1
|
|
2468
|
+
}, 8, ["class"])
|
|
2469
|
+
], 2))
|
|
2470
|
+
], 64)) : vue.createCommentVNode("", true),
|
|
2471
|
+
_ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
2472
|
+
key: 1,
|
|
2473
|
+
"aria-label": "关闭",
|
|
2474
|
+
class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
|
|
2475
|
+
type: "button",
|
|
2476
|
+
onClick: onClose
|
|
2477
|
+
}, [
|
|
2478
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
2479
|
+
class: vue.normalizeClass(vue.unref(ns).e("close"))
|
|
2480
|
+
}, {
|
|
2481
|
+
default: vue.withCtx(() => [
|
|
2482
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
|
|
2483
|
+
]),
|
|
2484
|
+
_: 1
|
|
2485
|
+
}, 8, ["class"])
|
|
2486
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
2487
|
+
], 2)
|
|
2488
|
+
], 2),
|
|
2489
|
+
vue.createElementVNode("div", {
|
|
2490
|
+
id: vue.unref(bodyId),
|
|
2491
|
+
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
|
2492
|
+
}, [
|
|
2493
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
2494
|
+
], 10, _hoisted_2$1),
|
|
2495
|
+
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("footer", {
|
|
2496
|
+
key: 0,
|
|
2497
|
+
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
|
2498
|
+
}, [
|
|
2499
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
2500
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
2501
|
+
], 6);
|
|
2502
|
+
};
|
|
2503
|
+
}
|
|
2504
|
+
});
|
|
2505
|
+
const _hoisted_1$1 = ["aria-label", "aria-labelledby", "aria-describedby"];
|
|
2506
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
2507
|
+
...{
|
|
2508
|
+
name: "ZjhcDialog",
|
|
2509
|
+
inheritAttrs: false
|
|
2510
|
+
},
|
|
2511
|
+
__name: "dialog",
|
|
2512
|
+
props: dialogProps,
|
|
2513
|
+
emits: dialogEmits,
|
|
2514
|
+
setup(__props, { expose: __expose }) {
|
|
2515
|
+
const props = __props;
|
|
2516
|
+
const ns = elementPlus.useNamespace("dialog");
|
|
2517
|
+
const dialogRef = vue.ref();
|
|
2518
|
+
const headerRef = vue.ref();
|
|
2519
|
+
const dialogContentRef = vue.ref();
|
|
2520
|
+
const isMinus = vue.ref(false);
|
|
2521
|
+
const {
|
|
2522
|
+
visible,
|
|
2523
|
+
titleId,
|
|
2524
|
+
bodyId,
|
|
2525
|
+
style,
|
|
2526
|
+
overlayDialogStyle,
|
|
2527
|
+
rendered,
|
|
2528
|
+
zIndex,
|
|
2529
|
+
afterEnter,
|
|
2530
|
+
afterLeave,
|
|
2531
|
+
beforeLeave,
|
|
2532
|
+
handleClose,
|
|
2533
|
+
onModalClick,
|
|
2534
|
+
onOpenAutoFocus,
|
|
2535
|
+
onCloseAutoFocus,
|
|
2536
|
+
onCloseRequested,
|
|
2537
|
+
onFocusoutPrevented
|
|
2538
|
+
} = useDialog(props, dialogRef);
|
|
2539
|
+
vue.provide(elementPlus.dialogInjectionKey, {
|
|
2540
|
+
dialogRef,
|
|
2541
|
+
headerRef,
|
|
2542
|
+
bodyId,
|
|
2543
|
+
ns,
|
|
2544
|
+
rendered,
|
|
2545
|
+
style
|
|
2546
|
+
});
|
|
2547
|
+
const overlayEvent = elementPlus.useSameTarget(onModalClick);
|
|
2548
|
+
const resetPosition = () => {
|
|
2549
|
+
var _a;
|
|
2550
|
+
(_a = dialogContentRef.value) == null ? void 0 : _a.resetPosition();
|
|
2551
|
+
};
|
|
2552
|
+
const handleMinusChange = (value) => {
|
|
2553
|
+
isMinus.value = value;
|
|
2554
|
+
};
|
|
2555
|
+
__expose({
|
|
2556
|
+
visible,
|
|
2557
|
+
dialogContentRef,
|
|
2558
|
+
resetPosition
|
|
2559
|
+
});
|
|
2560
|
+
return (_ctx, _cache) => {
|
|
2561
|
+
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
2562
|
+
to: _ctx.appendTo,
|
|
2563
|
+
disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
|
|
2564
|
+
}, [
|
|
2565
|
+
vue.createVNode(vue.Transition, {
|
|
2566
|
+
name: "dialog-fade",
|
|
2567
|
+
onAfterEnter: vue.unref(afterEnter),
|
|
2568
|
+
onAfterLeave: vue.unref(afterLeave),
|
|
2569
|
+
onBeforeLeave: vue.unref(beforeLeave),
|
|
2570
|
+
persisted: ""
|
|
2571
|
+
}, {
|
|
2572
|
+
default: vue.withCtx(() => [
|
|
2573
|
+
vue.withDirectives(vue.createVNode(vue.unref(elementPlus.ElOverlay), {
|
|
2574
|
+
"custom-mask-event": "",
|
|
2575
|
+
mask: _ctx.modal && !isMinus.value,
|
|
2576
|
+
"overlay-class": _ctx.modalClass,
|
|
2577
|
+
"z-index": vue.unref(zIndex),
|
|
2578
|
+
style: vue.normalizeStyle({ "pointer-events": !_ctx.modal || isMinus.value ? "none" : "auto" })
|
|
2579
|
+
}, {
|
|
2580
|
+
default: vue.withCtx(() => [
|
|
2581
|
+
vue.createElementVNode("div", {
|
|
2582
|
+
role: "dialog",
|
|
2583
|
+
"aria-modal": "true",
|
|
2584
|
+
"aria-label": _ctx.title || void 0,
|
|
2585
|
+
"aria-labelledby": !_ctx.title ? vue.unref(titleId) : void 0,
|
|
2586
|
+
"aria-describedby": vue.unref(bodyId),
|
|
2587
|
+
class: vue.normalizeClass(`${vue.unref(ns).namespace.value}-overlay-dialog`),
|
|
2588
|
+
style: vue.normalizeStyle([
|
|
2589
|
+
vue.unref(overlayDialogStyle),
|
|
2590
|
+
{ "pointer-events": !_ctx.modal || isMinus.value ? "none" : "auto" }
|
|
2591
|
+
]),
|
|
2592
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
2593
|
+
(...args) => vue.unref(overlayEvent).onClick && vue.unref(overlayEvent).onClick(...args)),
|
|
2594
|
+
onMousedown: _cache[1] || (_cache[1] = //@ts-ignore
|
|
2595
|
+
(...args) => vue.unref(overlayEvent).onMousedown && vue.unref(overlayEvent).onMousedown(...args)),
|
|
2596
|
+
onMouseup: _cache[2] || (_cache[2] = //@ts-ignore
|
|
2597
|
+
(...args) => vue.unref(overlayEvent).onMouseup && vue.unref(overlayEvent).onMouseup(...args))
|
|
2598
|
+
}, [
|
|
2599
|
+
vue.createVNode(vue.unref(ElFocusTrap), {
|
|
2600
|
+
loop: "",
|
|
2601
|
+
trapped: vue.unref(visible),
|
|
2602
|
+
"focus-start-el": "container",
|
|
2603
|
+
onFocusAfterTrapped: vue.unref(onOpenAutoFocus),
|
|
2604
|
+
onFocusAfterReleased: vue.unref(onCloseAutoFocus),
|
|
2605
|
+
onFocusoutPrevented: vue.unref(onFocusoutPrevented),
|
|
2606
|
+
onReleaseRequested: vue.unref(onCloseRequested)
|
|
2607
|
+
}, {
|
|
2608
|
+
default: vue.withCtx(() => [
|
|
2609
|
+
vue.unref(rendered) ? (vue.openBlock(), vue.createBlock(_sfc_main$5, vue.mergeProps({
|
|
2610
|
+
key: 0,
|
|
2611
|
+
ref_key: "dialogContentRef",
|
|
2612
|
+
ref: dialogContentRef
|
|
2613
|
+
}, _ctx.$attrs, {
|
|
2614
|
+
"align-center": _ctx.alignCenter,
|
|
2615
|
+
"close-icon": _ctx.closeIcon,
|
|
2616
|
+
draggable: _ctx.draggable,
|
|
2617
|
+
resizable: _ctx.resizable,
|
|
2618
|
+
overflow: _ctx.overflow,
|
|
2619
|
+
fullscreen: _ctx.fullscreen,
|
|
2620
|
+
center: _ctx.center,
|
|
2621
|
+
"show-close": _ctx.showClose,
|
|
2622
|
+
title: _ctx.title,
|
|
2623
|
+
"aria-level": _ctx.headerAriaLevel,
|
|
2624
|
+
onClose: vue.unref(handleClose),
|
|
2625
|
+
onMinusChange: handleMinusChange
|
|
2626
|
+
}), vue.createSlots({
|
|
2627
|
+
header: vue.withCtx(() => [
|
|
2628
|
+
!_ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "header", {
|
|
2629
|
+
close: vue.unref(handleClose),
|
|
2630
|
+
titleId: vue.unref(titleId),
|
|
2631
|
+
titleClass: vue.unref(ns).e("title")
|
|
2632
|
+
}, void 0, void 0, 0) : vue.renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 1)
|
|
2633
|
+
]),
|
|
2634
|
+
default: vue.withCtx(() => [
|
|
2635
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
2636
|
+
]),
|
|
2637
|
+
_: 2
|
|
2638
|
+
}, [
|
|
2639
|
+
_ctx.$slots.footer ? {
|
|
2640
|
+
name: "footer",
|
|
2641
|
+
fn: vue.withCtx(() => [
|
|
2642
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
2643
|
+
]),
|
|
2644
|
+
key: "0"
|
|
2645
|
+
} : void 0
|
|
2646
|
+
]), 1040, ["align-center", "close-icon", "draggable", "resizable", "overflow", "fullscreen", "center", "show-close", "title", "aria-level", "onClose"])) : vue.createCommentVNode("", true)
|
|
2647
|
+
]),
|
|
2648
|
+
_: 3
|
|
2649
|
+
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
2650
|
+
], 46, _hoisted_1$1)
|
|
2651
|
+
]),
|
|
2652
|
+
_: 3
|
|
2653
|
+
}, 8, ["mask", "overlay-class", "z-index", "style"]), [
|
|
2654
|
+
[vue.vShow, vue.unref(visible)]
|
|
2655
|
+
])
|
|
2656
|
+
]),
|
|
2657
|
+
_: 3
|
|
2658
|
+
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
2659
|
+
], 8, ["to", "disabled"]);
|
|
2660
|
+
};
|
|
2661
|
+
}
|
|
2662
|
+
});
|
|
2663
|
+
const ZjhcDialog = withInstall(_sfc_main$4);
|
|
2664
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
2665
|
+
...{
|
|
2666
|
+
name: "ZjhcTableOperator"
|
|
2667
|
+
},
|
|
2668
|
+
__name: "TableOperator",
|
|
2669
|
+
props: {
|
|
2670
|
+
actions: { type: Array, required: false, default: () => [] },
|
|
2671
|
+
width: { type: Number, required: false },
|
|
2672
|
+
title: { type: String, required: false, default: "操作" }
|
|
2673
|
+
},
|
|
2674
|
+
emits: ["inline-action"],
|
|
2675
|
+
setup(__props, { emit: __emit }) {
|
|
2676
|
+
const props = __props;
|
|
2677
|
+
const emit = __emit;
|
|
2678
|
+
const actionsWidth = vue.computed(() => {
|
|
2679
|
+
if (props.width) {
|
|
2680
|
+
return props.width;
|
|
2681
|
+
}
|
|
2682
|
+
if (props.actions.length >= 4) {
|
|
2683
|
+
return 312;
|
|
2684
|
+
}
|
|
2685
|
+
if (props.actions.length === 3) {
|
|
2686
|
+
return 238;
|
|
2687
|
+
}
|
|
2688
|
+
if (props.actions.length === 2) {
|
|
2689
|
+
return 168;
|
|
2690
|
+
}
|
|
2691
|
+
return 98;
|
|
2692
|
+
});
|
|
2693
|
+
function getAvailbleActions(row) {
|
|
2694
|
+
return props.actions.filter((action) => {
|
|
2695
|
+
return isEnabled(action, row);
|
|
2696
|
+
});
|
|
2697
|
+
}
|
|
2698
|
+
function isEnabled(action, row) {
|
|
2699
|
+
if (isFunction(action.disabled)) {
|
|
2700
|
+
return !action.disabled(row);
|
|
2701
|
+
} else if (action.disabled) {
|
|
2702
|
+
return false;
|
|
2703
|
+
}
|
|
2704
|
+
return true;
|
|
2705
|
+
}
|
|
2706
|
+
function getConfirmText(confirm) {
|
|
2707
|
+
if (isString(confirm)) {
|
|
2708
|
+
return confirm;
|
|
2709
|
+
}
|
|
2710
|
+
return "您确定该操作?";
|
|
2711
|
+
}
|
|
2712
|
+
function onConfirmAction(action, row, rowIndex) {
|
|
2713
|
+
if (!isEnabled(action, row)) {
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
if (action.confirm) {
|
|
2717
|
+
elementPlus.ElMessageBox.confirm(getConfirmText(action.confirm), "提示", {
|
|
2718
|
+
type: "warning",
|
|
2719
|
+
cancelButtonText: "取消",
|
|
2720
|
+
confirmButtonText: "确定"
|
|
2721
|
+
}).then(() => {
|
|
2722
|
+
onAction(action, row, rowIndex);
|
|
2723
|
+
}).catch(() => {
|
|
2724
|
+
});
|
|
2725
|
+
} else {
|
|
2726
|
+
onAction(action, row, rowIndex);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
function onAction(action, row, rowIndex) {
|
|
2730
|
+
if (action.onclick) {
|
|
2731
|
+
if (isFunction(action.onclick)) {
|
|
2732
|
+
action.onclick(row, rowIndex);
|
|
2733
|
+
} else {
|
|
2734
|
+
emit("inline-action", action.onclick, row, rowIndex);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
return (_ctx, _cache) => {
|
|
2739
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), {
|
|
2740
|
+
fixed: "right",
|
|
2741
|
+
label: __props.title,
|
|
2742
|
+
width: actionsWidth.value
|
|
2743
|
+
}, {
|
|
2744
|
+
default: vue.withCtx((scope) => [
|
|
2745
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getAvailbleActions(scope.row), (action) => {
|
|
2746
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElLink), {
|
|
2747
|
+
key: action.key,
|
|
2748
|
+
type: "primary",
|
|
2749
|
+
title: action.tooltip,
|
|
2750
|
+
icon: action.icon,
|
|
2751
|
+
onClick: ($event) => onConfirmAction(action, scope.row, scope.$index)
|
|
2752
|
+
}, {
|
|
2753
|
+
default: vue.withCtx(() => [
|
|
2754
|
+
vue.createTextVNode(vue.toDisplayString(action.text), 1)
|
|
2755
|
+
]),
|
|
2756
|
+
_: 2
|
|
2757
|
+
}, 1032, ["title", "icon", "onClick"]);
|
|
2758
|
+
}), 128))
|
|
2759
|
+
]),
|
|
2760
|
+
_: 1
|
|
2761
|
+
}, 8, ["label", "width"]);
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2764
|
+
});
|
|
2765
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
2766
|
+
...{
|
|
2767
|
+
name: "ZjhcComplexTable",
|
|
2768
|
+
inheritAttrs: false
|
|
2769
|
+
},
|
|
2770
|
+
__name: "ComplexTable",
|
|
2771
|
+
props: {
|
|
2772
|
+
class: { required: false },
|
|
2773
|
+
style: { required: false },
|
|
2774
|
+
actions: { type: Array, required: true, default: () => [] },
|
|
2775
|
+
actionSpace: { type: Number, required: false, default: 12 },
|
|
2776
|
+
moreButtonText: { type: String, required: false },
|
|
2777
|
+
primaryColSpan: { type: Number, required: false },
|
|
2778
|
+
secondaryColSpan: { type: Number, required: false },
|
|
2779
|
+
actionsWidth: { type: Number, required: false },
|
|
2780
|
+
actionsTitle: { type: String, required: false, default: "操作" },
|
|
2781
|
+
data: { type: Array, required: true },
|
|
2782
|
+
pagination: { type: Object, required: false },
|
|
2783
|
+
titleIsinline: { type: Boolean, required: false },
|
|
2784
|
+
loading: { type: Boolean, required: false, default: false },
|
|
2785
|
+
layout: { type: String, required: false },
|
|
2786
|
+
pageSizes: { type: Array, required: false }
|
|
2787
|
+
},
|
|
2788
|
+
emits: ["on-page-change", "on-size-change", "on-command"],
|
|
2789
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2790
|
+
const bem = useNamespace("advance");
|
|
2791
|
+
const innerTableRef = vue.ref();
|
|
2792
|
+
const emits = __emit;
|
|
2793
|
+
const props = __props;
|
|
2794
|
+
__expose({
|
|
2795
|
+
innerTableRef
|
|
2796
|
+
});
|
|
2797
|
+
const enableSelection = vue.computed(() => {
|
|
2798
|
+
return props.actions.some((item) => item.limit === "more");
|
|
2799
|
+
});
|
|
2800
|
+
const theadActions = vue.computed(() => {
|
|
2801
|
+
return props.actions.filter((item) => item.position !== void 0 || item.limit === "more" || item.limit === "none");
|
|
2802
|
+
});
|
|
2803
|
+
const inlineActions = vue.computed(() => {
|
|
2804
|
+
return props.actions.filter((item) => item.position === void 0 && item.limit === "one");
|
|
2805
|
+
});
|
|
2806
|
+
const hasToolBar = vue.computed(() => {
|
|
2807
|
+
return theadActions.value.length > 0;
|
|
2808
|
+
});
|
|
2809
|
+
const hasOne = vue.computed(() => {
|
|
2810
|
+
return inlineActions.value.length > 0;
|
|
2811
|
+
});
|
|
2812
|
+
const selectedRows = vue.ref([]);
|
|
2813
|
+
function isSelectedRow({ row }) {
|
|
2814
|
+
const isSelected = selectedRows.value.includes(row);
|
|
2815
|
+
if (isSelected) {
|
|
2816
|
+
return "is-selected";
|
|
2817
|
+
}
|
|
2818
|
+
return void 0;
|
|
2819
|
+
}
|
|
2820
|
+
function onSelectionChange(rows) {
|
|
2821
|
+
selectedRows.value = rows;
|
|
2822
|
+
}
|
|
2823
|
+
function onPageChange(currentPage) {
|
|
2824
|
+
if (props.pagination && props.pagination.visible) {
|
|
2825
|
+
emits("on-page-change", currentPage);
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
function onSizeChange(pageSize) {
|
|
2829
|
+
if (props.pagination && props.pagination.visible) {
|
|
2830
|
+
emits("on-size-change", pageSize);
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
function onInlineAction(command, rows, rowIndex) {
|
|
2834
|
+
emits("on-command", command, rows, rowIndex);
|
|
2835
|
+
}
|
|
2836
|
+
function onCommand(command, rows) {
|
|
2837
|
+
emits("on-command", command, rows);
|
|
2838
|
+
}
|
|
2839
|
+
return (_ctx, _cache) => {
|
|
2840
|
+
const _directive_zjhcloading = vue.resolveDirective("zjhcloading");
|
|
2841
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2842
|
+
class: vue.normalizeClass([vue.unref(bem).e("layout"), _ctx.$props.class])
|
|
2843
|
+
}, [
|
|
2844
|
+
hasToolBar.value || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2845
|
+
key: 0,
|
|
2846
|
+
class: vue.normalizeClass([vue.unref(bem).e("toolbar"), __props.titleIsinline ? "is-line" : ""])
|
|
2847
|
+
}, [
|
|
2848
|
+
_ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "title", {}, void 0, void 0, 0) : vue.createCommentVNode("", true),
|
|
2849
|
+
vue.createVNode(vue.unref(ZjhcTableToolbar), {
|
|
2850
|
+
rows: selectedRows.value,
|
|
2851
|
+
actions: theadActions.value,
|
|
2852
|
+
onOnCommand: onCommand,
|
|
2853
|
+
primaryColSpan: __props.primaryColSpan,
|
|
2854
|
+
secondaryColSpan: __props.secondaryColSpan,
|
|
2855
|
+
moreButtonText: __props.moreButtonText,
|
|
2856
|
+
space: __props.actionSpace
|
|
2857
|
+
}, null, 8, ["rows", "actions", "primaryColSpan", "secondaryColSpan", "moreButtonText", "space"])
|
|
2858
|
+
], 2)) : vue.createCommentVNode("", true),
|
|
2859
|
+
vue.createElementVNode("div", {
|
|
2860
|
+
class: vue.normalizeClass(vue.unref(bem).e("grid"))
|
|
2861
|
+
}, [
|
|
2862
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), vue.mergeProps({
|
|
2863
|
+
ref_key: "innerTableRef",
|
|
2864
|
+
ref: innerTableRef,
|
|
2865
|
+
data: __props.data,
|
|
2866
|
+
onSelectionChange
|
|
2867
|
+
}, _ctx.$attrs, {
|
|
2868
|
+
class: "table-inner",
|
|
2869
|
+
"row-class-name": isSelectedRow
|
|
2870
|
+
}), vue.createSlots({
|
|
2871
|
+
default: vue.withCtx(() => [
|
|
2872
|
+
enableSelection.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), {
|
|
2873
|
+
key: 0,
|
|
2874
|
+
fixed: "",
|
|
2875
|
+
type: "selection",
|
|
2876
|
+
width: "50"
|
|
2877
|
+
})) : vue.createCommentVNode("", true),
|
|
2878
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
2879
|
+
hasOne.value ? (vue.openBlock(), vue.createBlock(_sfc_main$3, {
|
|
2880
|
+
key: 1,
|
|
2881
|
+
actions: inlineActions.value,
|
|
2882
|
+
title: __props.actionsTitle,
|
|
2883
|
+
onInlineAction,
|
|
2884
|
+
width: __props.actionsWidth
|
|
2885
|
+
}, null, 8, ["actions", "title", "width"])) : vue.createCommentVNode("", true)
|
|
2886
|
+
]),
|
|
2887
|
+
_: 2
|
|
2888
|
+
}, [
|
|
2889
|
+
_ctx.$slots.append ? {
|
|
2890
|
+
name: "append",
|
|
2891
|
+
fn: vue.withCtx(() => [
|
|
2892
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
2893
|
+
]),
|
|
2894
|
+
key: "0"
|
|
2895
|
+
} : void 0
|
|
2896
|
+
]), 1040, ["data"])), [
|
|
2897
|
+
[_directive_zjhcloading, __props.loading]
|
|
2898
|
+
])
|
|
2899
|
+
], 2),
|
|
2900
|
+
__props.pagination && __props.pagination.visible ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2901
|
+
key: 1,
|
|
2902
|
+
class: vue.normalizeClass(vue.unref(bem).e("pagination"))
|
|
2903
|
+
}, [
|
|
2904
|
+
vue.createVNode(vue.unref(elementPlus.ElPagination), vue.mergeProps({
|
|
2905
|
+
background: "",
|
|
2906
|
+
"current-page": __props.pagination.currentPage,
|
|
2907
|
+
"page-size": __props.pagination.pageSize,
|
|
2908
|
+
"onUpdate:currentPage": onPageChange,
|
|
2909
|
+
"onUpdate:pageSize": onSizeChange
|
|
2910
|
+
}, __props.pagination, {
|
|
2911
|
+
total: __props.pagination.total,
|
|
2912
|
+
layout: __props.layout || "total,sizes,->, prev, pager, next, jumper",
|
|
2913
|
+
pageSizes: __props.pageSizes
|
|
2914
|
+
}), null, 16, ["current-page", "page-size", "total", "layout", "pageSizes"])
|
|
2915
|
+
], 2)) : vue.createCommentVNode("", true)
|
|
2916
|
+
], 2);
|
|
2917
|
+
};
|
|
2918
|
+
}
|
|
2919
|
+
});
|
|
2920
|
+
const ZjhcComplexTable = withInstall(_sfc_main$2);
|
|
2921
|
+
const autocompleteProps = index.buildProps({
|
|
2922
|
+
// 用来展示的字段名
|
|
2923
|
+
valueKey: {
|
|
2924
|
+
type: String,
|
|
2925
|
+
default: "value"
|
|
2926
|
+
},
|
|
2927
|
+
// 选中项绑定值
|
|
2928
|
+
modelValue: {
|
|
2929
|
+
type: Array,
|
|
2930
|
+
default: []
|
|
2931
|
+
},
|
|
2932
|
+
// 获取输入建议的防抖延时,单位为毫秒
|
|
2933
|
+
debounce: {
|
|
2934
|
+
type: Number,
|
|
2935
|
+
default: 300
|
|
2936
|
+
},
|
|
2937
|
+
// 下拉框出现的位置
|
|
2938
|
+
placement: {
|
|
2939
|
+
type: index.definePropType(String),
|
|
2940
|
+
values: [
|
|
2941
|
+
"top",
|
|
2942
|
+
"top-start",
|
|
2943
|
+
"top-end",
|
|
2944
|
+
"bottom",
|
|
2945
|
+
"bottom-start",
|
|
2946
|
+
"bottom-end"
|
|
2947
|
+
],
|
|
2948
|
+
default: "bottom-start"
|
|
2949
|
+
},
|
|
2950
|
+
// 获取输入建议的方法,仅当输入的建议数据resolve的时候,通过调用callback(data:[])来返回它
|
|
2951
|
+
fetchSuggestions: {
|
|
2952
|
+
type: index.definePropType([Function, Array]),
|
|
2953
|
+
default: NOOP
|
|
2954
|
+
},
|
|
2955
|
+
// 远程搜索中的返回值允许点击几个
|
|
2956
|
+
multiple: {
|
|
2957
|
+
type: Boolean,
|
|
2958
|
+
default: false
|
|
2959
|
+
},
|
|
2960
|
+
popperClass: {
|
|
2961
|
+
type: String,
|
|
2962
|
+
default: ""
|
|
2963
|
+
},
|
|
2964
|
+
triggerOnFocus: {
|
|
2965
|
+
type: Boolean,
|
|
2966
|
+
default: true
|
|
2967
|
+
},
|
|
2968
|
+
selectWhenUnmatched: {
|
|
2969
|
+
type: Boolean,
|
|
2970
|
+
default: false
|
|
2971
|
+
},
|
|
2972
|
+
hideLoading: {
|
|
2973
|
+
type: Boolean,
|
|
2974
|
+
default: false
|
|
2975
|
+
},
|
|
2976
|
+
teleported: index$3.useTooltipContentProps.teleported,
|
|
2977
|
+
highlightFirstItem: {
|
|
2978
|
+
type: Boolean,
|
|
2979
|
+
default: false
|
|
2980
|
+
},
|
|
2981
|
+
fitInputWidth: {
|
|
2982
|
+
type: Boolean,
|
|
2983
|
+
default: false
|
|
2984
|
+
},
|
|
2985
|
+
clearable: {
|
|
2986
|
+
type: Boolean,
|
|
2987
|
+
default: false
|
|
2988
|
+
},
|
|
2989
|
+
name: String,
|
|
2990
|
+
...index$1.useAriaProps(["ariaLabel"])
|
|
2991
|
+
});
|
|
2992
|
+
const autocompleteEmits = {
|
|
2993
|
+
[UPDATE_MODEL_EVENT]: (value) => index.isArray(value),
|
|
2994
|
+
[INPUT_EVENT]: (value) => index.isString(value),
|
|
2995
|
+
[CHANGE_EVENT]: (value) => index.isString(value),
|
|
2996
|
+
focus: (evt) => evt instanceof FocusEvent,
|
|
2997
|
+
blur: (evt) => evt instanceof FocusEvent,
|
|
2998
|
+
clear: () => true,
|
|
2999
|
+
select: (item, selected) => index.isObject(item) && index.isBoolean(selected)
|
|
3000
|
+
};
|
|
3001
|
+
const _hoisted_1 = ["aria-expanded", "aria-owns"];
|
|
3002
|
+
const _hoisted_2 = { key: 0 };
|
|
3003
|
+
const _hoisted_3 = ["id", "aria-selected", "onClick"];
|
|
3004
|
+
const COMPONENT_NAME = "ZjhcAutocomplete";
|
|
3005
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3006
|
+
...{
|
|
3007
|
+
name: COMPONENT_NAME,
|
|
3008
|
+
inheritAttrs: false
|
|
3009
|
+
},
|
|
3010
|
+
__name: "autoComplete",
|
|
3011
|
+
props: autocompleteProps,
|
|
3012
|
+
emits: autocompleteEmits,
|
|
3013
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3014
|
+
const props = __props;
|
|
3015
|
+
const emit = __emit;
|
|
3016
|
+
const attrs = elementPlus.useAttrs();
|
|
3017
|
+
const rawAttrs = vue.useAttrs();
|
|
3018
|
+
const disabled = index$4.useFormDisabled();
|
|
3019
|
+
const ns = useNamespace("autocomplete");
|
|
3020
|
+
const inputRef = vue.ref();
|
|
3021
|
+
const regionRef = vue.ref();
|
|
3022
|
+
const popperRef = vue.ref();
|
|
3023
|
+
const listboxRef = vue.ref();
|
|
3024
|
+
let readonly = false;
|
|
3025
|
+
let ignoreFocusEvent = false;
|
|
3026
|
+
const queryValue = vue.ref("");
|
|
3027
|
+
const selectedItems = vue.ref(/* @__PURE__ */ new Set());
|
|
3028
|
+
const suggestions = vue.ref([]);
|
|
3029
|
+
const highlightedIndex = vue.ref(-1);
|
|
3030
|
+
const dropdownWidth = vue.ref("");
|
|
3031
|
+
const activated = vue.ref(false);
|
|
3032
|
+
const suggestionDisabled = vue.ref(false);
|
|
3033
|
+
const loading = vue.ref(false);
|
|
3034
|
+
const listboxId = elementPlus.useId();
|
|
3035
|
+
const styles = vue.computed(() => rawAttrs.style);
|
|
3036
|
+
const suggestionVisible = vue.computed(() => {
|
|
3037
|
+
const isValidData = suggestions.value.length > 0;
|
|
3038
|
+
return (isValidData || loading.value) && activated.value;
|
|
3039
|
+
});
|
|
3040
|
+
const suggestionLoading = vue.computed(() => {
|
|
3041
|
+
return !props.hideLoading && loading.value;
|
|
3042
|
+
});
|
|
3043
|
+
const refInput = vue.computed(() => {
|
|
3044
|
+
if (inputRef.value) {
|
|
3045
|
+
return Array.from(
|
|
3046
|
+
inputRef.value.$el.querySelectorAll("input")
|
|
3047
|
+
);
|
|
3048
|
+
}
|
|
3049
|
+
return [];
|
|
3050
|
+
});
|
|
3051
|
+
const onSuggestionShow = () => {
|
|
3052
|
+
if (suggestionVisible.value) {
|
|
3053
|
+
if (Array.isArray(props.modelValue)) {
|
|
3054
|
+
selectedItems.value = new Set(props.modelValue);
|
|
3055
|
+
} else {
|
|
3056
|
+
selectedItems.value = /* @__PURE__ */ new Set([props.modelValue]);
|
|
3057
|
+
}
|
|
3058
|
+
dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
|
|
3059
|
+
}
|
|
3060
|
+
};
|
|
3061
|
+
const onHide = () => {
|
|
3062
|
+
highlightedIndex.value = -1;
|
|
3063
|
+
selectedItems.value.clear();
|
|
3064
|
+
};
|
|
3065
|
+
const getData = async (queryString) => {
|
|
3066
|
+
if (suggestionDisabled.value) return;
|
|
3067
|
+
const cb = (suggestionList) => {
|
|
3068
|
+
loading.value = false;
|
|
3069
|
+
if (suggestionDisabled.value) return;
|
|
3070
|
+
if (Array.isArray(suggestionList)) {
|
|
3071
|
+
suggestions.value = suggestionList;
|
|
3072
|
+
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
|
|
3073
|
+
} else {
|
|
3074
|
+
throwError(COMPONENT_NAME, "autocomplete的suggestions必须是一个数组");
|
|
3075
|
+
}
|
|
3076
|
+
};
|
|
3077
|
+
loading.value = true;
|
|
3078
|
+
if (Array.isArray(props.fetchSuggestions)) {
|
|
3079
|
+
cb(props.fetchSuggestions);
|
|
3080
|
+
} else {
|
|
3081
|
+
const result = await props.fetchSuggestions(queryString, cb);
|
|
3082
|
+
if (Array.isArray(result)) cb(result);
|
|
3083
|
+
}
|
|
3084
|
+
};
|
|
3085
|
+
const debounceGetData = lodashEs.debounce(getData, props.debounce);
|
|
3086
|
+
const handleInput = (value) => {
|
|
3087
|
+
const valuePresented = !!value;
|
|
3088
|
+
emit(INPUT_EVENT, value);
|
|
3089
|
+
suggestionDisabled.value = false;
|
|
3090
|
+
if (!activated.value) {
|
|
3091
|
+
activated.value = valuePresented;
|
|
3092
|
+
}
|
|
3093
|
+
if (!props.triggerOnFocus && !value) {
|
|
3094
|
+
suggestionDisabled.value = true;
|
|
3095
|
+
suggestions.value = [];
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
debounceGetData(value);
|
|
3099
|
+
};
|
|
3100
|
+
const handleMouseDown = (event) => {
|
|
3101
|
+
var _a;
|
|
3102
|
+
if (disabled.value) return;
|
|
3103
|
+
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
|
|
3104
|
+
activated.value = true;
|
|
3105
|
+
}
|
|
3106
|
+
};
|
|
3107
|
+
const handleChange = (value) => {
|
|
3108
|
+
emit(CHANGE_EVENT, value);
|
|
3109
|
+
};
|
|
3110
|
+
const handleFocus = (event) => {
|
|
3111
|
+
if (!ignoreFocusEvent) {
|
|
3112
|
+
activated.value = true;
|
|
3113
|
+
emit("focus", event);
|
|
3114
|
+
if (props.triggerOnFocus && !readonly) {
|
|
3115
|
+
if (queryValue.value.trim() !== "") {
|
|
3116
|
+
debounceGetData(String(queryValue.value));
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
} else {
|
|
3120
|
+
ignoreFocusEvent = false;
|
|
3121
|
+
}
|
|
3122
|
+
};
|
|
3123
|
+
const handleBlur = (event) => {
|
|
3124
|
+
setTimeout(() => {
|
|
3125
|
+
var _a;
|
|
3126
|
+
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) {
|
|
3127
|
+
ignoreFocusEvent = true;
|
|
3128
|
+
return;
|
|
3129
|
+
}
|
|
3130
|
+
if (activated.value) {
|
|
3131
|
+
close();
|
|
3132
|
+
}
|
|
3133
|
+
emit("blur", event);
|
|
3134
|
+
});
|
|
3135
|
+
};
|
|
3136
|
+
const handleClear = () => {
|
|
3137
|
+
activated.value = false;
|
|
3138
|
+
emit("clear");
|
|
3139
|
+
};
|
|
3140
|
+
const handleKeyEnter = async () => {
|
|
3141
|
+
if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {
|
|
3142
|
+
handleSelect(suggestions.value[highlightedIndex.value]);
|
|
3143
|
+
} else if (props.selectWhenUnmatched) {
|
|
3144
|
+
suggestions.value = [];
|
|
3145
|
+
highlightedIndex.value = -1;
|
|
3146
|
+
}
|
|
3147
|
+
};
|
|
3148
|
+
const handleKeyEscape = (event) => {
|
|
3149
|
+
if (suggestionVisible.value) {
|
|
3150
|
+
event.preventDefault();
|
|
3151
|
+
event.stopPropagation();
|
|
3152
|
+
close();
|
|
3153
|
+
}
|
|
3154
|
+
};
|
|
3155
|
+
const close = () => {
|
|
3156
|
+
suggestions.value = [];
|
|
3157
|
+
activated.value = false;
|
|
3158
|
+
};
|
|
3159
|
+
const focus = () => {
|
|
3160
|
+
var _a;
|
|
3161
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
3162
|
+
};
|
|
3163
|
+
const blur = () => {
|
|
3164
|
+
var _a;
|
|
3165
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
3166
|
+
};
|
|
3167
|
+
const handleSelect = async (item) => {
|
|
3168
|
+
var _a;
|
|
3169
|
+
let isSelected = false;
|
|
3170
|
+
if (props.multiple) {
|
|
3171
|
+
if (selectedItems.value.has(item[props.valueKey])) {
|
|
3172
|
+
selectedItems.value.delete(item[props.valueKey]);
|
|
3173
|
+
} else {
|
|
3174
|
+
selectedItems.value.add(item[props.valueKey]);
|
|
3175
|
+
isSelected = true;
|
|
3176
|
+
}
|
|
3177
|
+
const selectedList = Array.from(selectedItems.value);
|
|
3178
|
+
emit(UPDATE_MODEL_EVENT, selectedList);
|
|
3179
|
+
} else {
|
|
3180
|
+
selectedItems.value.clear();
|
|
3181
|
+
selectedItems.value.add(item[props.valueKey]);
|
|
3182
|
+
emit(UPDATE_MODEL_EVENT, [item[props.valueKey]]);
|
|
3183
|
+
highlightedIndex.value = -1;
|
|
3184
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
3185
|
+
isSelected = true;
|
|
3186
|
+
activated.value = false;
|
|
3187
|
+
}
|
|
3188
|
+
emit("select", item, isSelected);
|
|
3189
|
+
};
|
|
3190
|
+
const highlight = (index2) => {
|
|
3191
|
+
var _a;
|
|
3192
|
+
if (!suggestionVisible.value || loading.value) return;
|
|
3193
|
+
if (index2 < 0) {
|
|
3194
|
+
highlightedIndex.value = -1;
|
|
3195
|
+
return;
|
|
3196
|
+
}
|
|
3197
|
+
if (index2 >= suggestions.value.length) {
|
|
3198
|
+
index2 = suggestions.value.length - 1;
|
|
3199
|
+
}
|
|
3200
|
+
const suggestion = regionRef.value.querySelector(
|
|
3201
|
+
`.${ns.be("suggestion", "wrap")}`
|
|
3202
|
+
);
|
|
3203
|
+
const suggestionList = suggestion.querySelectorAll(
|
|
3204
|
+
`.${ns.be("suggestion", "list")} li`
|
|
3205
|
+
);
|
|
3206
|
+
const highlightItem = suggestionList[index2];
|
|
3207
|
+
const scrollTop = suggestion.scrollTop;
|
|
3208
|
+
const { offsetTop, scrollHeight } = highlightItem;
|
|
3209
|
+
if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {
|
|
3210
|
+
suggestion.scrollTop += scrollHeight;
|
|
3211
|
+
}
|
|
3212
|
+
if (offsetTop < scrollTop) {
|
|
3213
|
+
suggestion.scrollTop -= scrollHeight;
|
|
3214
|
+
}
|
|
3215
|
+
highlightedIndex.value = index2;
|
|
3216
|
+
(_a = inputRef.value) == null ? void 0 : _a.ref.setAttribute(
|
|
3217
|
+
"aria-activedescendant",
|
|
3218
|
+
`${listboxId.value}-item-${highlightedIndex.value}`
|
|
3219
|
+
);
|
|
3220
|
+
};
|
|
3221
|
+
const stopHandle = core.onClickOutside(
|
|
3222
|
+
listboxRef,
|
|
3223
|
+
() => {
|
|
3224
|
+
if (suggestionVisible.value) {
|
|
3225
|
+
close();
|
|
3226
|
+
ignoreFocusEvent = false;
|
|
3227
|
+
}
|
|
3228
|
+
},
|
|
3229
|
+
// @vueuse/core v12 的 onClickOutside 有重载歧义:
|
|
3230
|
+
// 传 controls: true 返回 { stop, cancel, trigger },否则返回停止函数。
|
|
3231
|
+
// 这里显式写 false,让类型和运行时行为对齐(不传时默认就是 false)。
|
|
3232
|
+
{ ignore: [regionRef], controls: false }
|
|
3233
|
+
//如果点击事件发生在下拉内部,不触发close
|
|
3234
|
+
);
|
|
3235
|
+
const isSelect = (item) => {
|
|
3236
|
+
return selectedItems.value.has(item[props.valueKey]);
|
|
3237
|
+
};
|
|
3238
|
+
vue.onBeforeUnmount(() => {
|
|
3239
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
3240
|
+
});
|
|
3241
|
+
vue.onMounted(() => {
|
|
3242
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3243
|
+
(_b = (_a = inputRef.value) == null ? void 0 : _a.ref) == null ? void 0 : _b.setAttribute("role", "textbox");
|
|
3244
|
+
(_d = (_c = inputRef.value) == null ? void 0 : _c.ref) == null ? void 0 : _d.setAttribute("aria-autocomplete", "list");
|
|
3245
|
+
(_f = (_e = inputRef.value) == null ? void 0 : _e.ref) == null ? void 0 : _f.setAttribute("aria-contrils", "id");
|
|
3246
|
+
(_h = (_g = inputRef.value) == null ? void 0 : _g.ref) == null ? void 0 : _h.setAttribute(
|
|
3247
|
+
"aria-activedescendant",
|
|
3248
|
+
`${listboxId.value}-item-${highlightedIndex.value}`
|
|
3249
|
+
);
|
|
3250
|
+
readonly = ((_j = (_i = inputRef.value) == null ? void 0 : _i.ref) == null ? void 0 : _j.hasAttribute("readonly")) || false;
|
|
3251
|
+
});
|
|
3252
|
+
__expose({
|
|
3253
|
+
highlightedIndex,
|
|
3254
|
+
activated,
|
|
3255
|
+
loading,
|
|
3256
|
+
inputRef,
|
|
3257
|
+
popperRef,
|
|
3258
|
+
suggestions,
|
|
3259
|
+
handleSelect,
|
|
3260
|
+
focus,
|
|
3261
|
+
blur,
|
|
3262
|
+
close,
|
|
3263
|
+
highlight,
|
|
3264
|
+
getData
|
|
3265
|
+
});
|
|
3266
|
+
return (_ctx, _cache) => {
|
|
3267
|
+
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
3268
|
+
ref_key: "popperRef",
|
|
3269
|
+
ref: popperRef,
|
|
3270
|
+
visible: suggestionVisible.value,
|
|
3271
|
+
placement: _ctx.placement,
|
|
3272
|
+
"fallback-placements": ["bottom-start", "top-start"],
|
|
3273
|
+
"popper-class": [vue.unref(ns).e("popper"), _ctx.popperClass],
|
|
3274
|
+
teleported: _ctx.teleported,
|
|
3275
|
+
"gpu-acceleration": false,
|
|
3276
|
+
offset: 8,
|
|
3277
|
+
pure: "",
|
|
3278
|
+
"manual-mode": "",
|
|
3279
|
+
effect: "light",
|
|
3280
|
+
trigger: "click",
|
|
3281
|
+
transition: `${vue.unref(ns).namespace.value}-zoom-in-top`,
|
|
3282
|
+
persostent: "",
|
|
3283
|
+
role: "listbox",
|
|
3284
|
+
onBeforeShow: onSuggestionShow,
|
|
3285
|
+
onHide
|
|
3286
|
+
}, {
|
|
3287
|
+
content: vue.withCtx(() => [
|
|
3288
|
+
vue.createElementVNode("div", {
|
|
3289
|
+
ref_key: "regionRef",
|
|
3290
|
+
ref: regionRef,
|
|
3291
|
+
class: vue.normalizeClass([vue.unref(ns).b("suggestion"), vue.unref(ns).is("loading", suggestionLoading.value)]),
|
|
3292
|
+
style: vue.normalizeStyle({
|
|
3293
|
+
[_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
|
|
3294
|
+
outline: "none"
|
|
3295
|
+
}),
|
|
3296
|
+
role: "region"
|
|
3297
|
+
}, [
|
|
3298
|
+
vue.createVNode(vue.unref(elementPlus.ElScrollbar), {
|
|
3299
|
+
id: vue.unref(listboxId),
|
|
3300
|
+
tag: "ul",
|
|
3301
|
+
"wrap-class": vue.unref(ns).be("suggestion", "wrap"),
|
|
3302
|
+
"view-class": vue.unref(ns).be("suggestion", "list"),
|
|
3303
|
+
role: "listbox"
|
|
3304
|
+
}, {
|
|
3305
|
+
default: vue.withCtx(() => [
|
|
3306
|
+
suggestionLoading.value ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2, [
|
|
3307
|
+
vue.renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
3308
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), {
|
|
3309
|
+
class: vue.normalizeClass(vue.unref(ns).is("loading"))
|
|
3310
|
+
}, {
|
|
3311
|
+
default: vue.withCtx(() => [
|
|
3312
|
+
vue.createVNode(vue.unref(Loading$1))
|
|
3313
|
+
]),
|
|
3314
|
+
_: 1
|
|
3315
|
+
}, 8, ["class"])
|
|
3316
|
+
])
|
|
3317
|
+
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(suggestions.value, (item, index2) => {
|
|
3318
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
3319
|
+
id: `${vue.unref(listboxId)}-item-${index2}`,
|
|
3320
|
+
key: index2,
|
|
3321
|
+
class: vue.normalizeClass({
|
|
3322
|
+
highlighted: highlightedIndex.value == index2,
|
|
3323
|
+
"is-selected": isSelect(item)
|
|
3324
|
+
}),
|
|
3325
|
+
role: "option",
|
|
3326
|
+
"aria-selected": highlightedIndex.value == index2,
|
|
3327
|
+
onClick: ($event) => handleSelect(item)
|
|
3328
|
+
}, [
|
|
3329
|
+
vue.renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
3330
|
+
vue.createTextVNode(vue.toDisplayString(item[_ctx.valueKey]), 1)
|
|
3331
|
+
]),
|
|
3332
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "selected-icon" }, {
|
|
3333
|
+
default: vue.withCtx(() => [
|
|
3334
|
+
vue.createVNode(vue.unref(Check))
|
|
3335
|
+
]),
|
|
3336
|
+
_: 1
|
|
3337
|
+
})
|
|
3338
|
+
], 10, _hoisted_3);
|
|
3339
|
+
}), 128))
|
|
3340
|
+
]),
|
|
3341
|
+
_: 3
|
|
3342
|
+
}, 8, ["id", "wrap-class", "view-class"])
|
|
3343
|
+
], 6)
|
|
3344
|
+
]),
|
|
3345
|
+
default: vue.withCtx(() => [
|
|
3346
|
+
vue.createElementVNode("div", {
|
|
3347
|
+
ref_key: "listboxRef",
|
|
3348
|
+
ref: listboxRef,
|
|
3349
|
+
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.$attrs.class]),
|
|
3350
|
+
style: vue.normalizeStyle(styles.value),
|
|
3351
|
+
role: "combobox",
|
|
3352
|
+
"aria-haspopup": "listbox",
|
|
3353
|
+
"aria-expanded": suggestionVisible.value,
|
|
3354
|
+
"aria-owns": vue.unref(listboxId)
|
|
3355
|
+
}, [
|
|
3356
|
+
vue.createVNode(vue.unref(elementPlus.ElInput), vue.mergeProps({
|
|
3357
|
+
ref_key: "inputRef",
|
|
3358
|
+
ref: inputRef
|
|
3359
|
+
}, vue.unref(attrs), {
|
|
3360
|
+
clearable: _ctx.clearable,
|
|
3361
|
+
disabled: vue.unref(disabled),
|
|
3362
|
+
name: _ctx.name,
|
|
3363
|
+
modelValue: queryValue.value,
|
|
3364
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => queryValue.value = $event),
|
|
3365
|
+
"aria-label": _ctx.ariaLabel,
|
|
3366
|
+
onInput: handleInput,
|
|
3367
|
+
onChange: handleChange,
|
|
3368
|
+
onFocus: handleFocus,
|
|
3369
|
+
onBlur: handleBlur,
|
|
3370
|
+
onClear: handleClear,
|
|
3371
|
+
onKeydown: [
|
|
3372
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => highlight(highlightedIndex.value - 1), ["prevent"]), ["up"])),
|
|
3373
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => highlight(highlightedIndex.value + 1), ["prevent"]), ["down"])),
|
|
3374
|
+
vue.withKeys(handleKeyEnter, ["enter"]),
|
|
3375
|
+
vue.withKeys(close, ["tab"]),
|
|
3376
|
+
vue.withKeys(handleKeyEscape, ["esc"])
|
|
3377
|
+
],
|
|
3378
|
+
onMousedown: handleMouseDown
|
|
3379
|
+
}), vue.createSlots({ _: 2 }, [
|
|
3380
|
+
_ctx.$slots.prepend ? {
|
|
3381
|
+
name: "prepend",
|
|
3382
|
+
fn: vue.withCtx(() => [
|
|
3383
|
+
vue.renderSlot(_ctx.$slots, "prepend")
|
|
3384
|
+
]),
|
|
3385
|
+
key: "0"
|
|
3386
|
+
} : void 0,
|
|
3387
|
+
_ctx.$slots.append ? {
|
|
3388
|
+
name: "append",
|
|
3389
|
+
fn: vue.withCtx(() => [
|
|
3390
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
3391
|
+
]),
|
|
3392
|
+
key: "1"
|
|
3393
|
+
} : void 0,
|
|
3394
|
+
_ctx.$slots.prefix ? {
|
|
3395
|
+
name: "prefix",
|
|
3396
|
+
fn: vue.withCtx(() => [
|
|
3397
|
+
vue.renderSlot(_ctx.$slots, "prefix")
|
|
3398
|
+
]),
|
|
3399
|
+
key: "2"
|
|
3400
|
+
} : void 0,
|
|
3401
|
+
_ctx.$slots.suffix ? {
|
|
3402
|
+
name: "suffix",
|
|
3403
|
+
fn: vue.withCtx(() => [
|
|
3404
|
+
vue.renderSlot(_ctx.$slots, "suffix")
|
|
3405
|
+
]),
|
|
3406
|
+
key: "3"
|
|
3407
|
+
} : void 0
|
|
3408
|
+
]), 1040, ["clearable", "disabled", "name", "modelValue", "aria-label"])
|
|
3409
|
+
], 14, _hoisted_1)
|
|
3410
|
+
]),
|
|
3411
|
+
_: 3
|
|
3412
|
+
}, 8, ["visible", "placement", "popper-class", "teleported", "transition"]);
|
|
3413
|
+
};
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
3416
|
+
const ZjhcAutocomplete = withInstall(_sfc_main$1);
|
|
3417
|
+
let globalTotal = 1;
|
|
3418
|
+
function createLoadingComponent(options) {
|
|
3419
|
+
let afterLeaveTimer;
|
|
3420
|
+
const afterLeaveFlag = vue.ref(false);
|
|
3421
|
+
const data = vue.reactive({
|
|
3422
|
+
...options,
|
|
3423
|
+
originalPosition: "",
|
|
3424
|
+
originalOverflow: "",
|
|
3425
|
+
visible: false
|
|
3426
|
+
});
|
|
3427
|
+
function setText(text) {
|
|
3428
|
+
data.text = text;
|
|
3429
|
+
}
|
|
3430
|
+
function destroySelf() {
|
|
3431
|
+
const target = data.parent;
|
|
3432
|
+
const ns = vm.ns;
|
|
3433
|
+
if (!target.vLoadingAddClassList) {
|
|
3434
|
+
let loadingNumber = target.getAttribute("loading-number");
|
|
3435
|
+
loadingNumber = Number.parseInt(loadingNumber) - 1;
|
|
3436
|
+
if (!loadingNumber) {
|
|
3437
|
+
removeClass(target, ns.bm("parent", "relative"));
|
|
3438
|
+
target.removeAttribute("loading-number");
|
|
3439
|
+
} else {
|
|
3440
|
+
target.setAttribute("loading-number", loadingNumber.toString());
|
|
3441
|
+
}
|
|
3442
|
+
removeClass(target, ns.bm("parent", "hidden"));
|
|
3443
|
+
}
|
|
3444
|
+
removeElLoadingChild();
|
|
3445
|
+
loadingInstance.unmount();
|
|
3446
|
+
}
|
|
3447
|
+
function removeElLoadingChild() {
|
|
3448
|
+
var _a, _b;
|
|
3449
|
+
(_b = (_a = vm.$el) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.removeChild(vm.$el);
|
|
3450
|
+
}
|
|
3451
|
+
function close() {
|
|
3452
|
+
var _a;
|
|
3453
|
+
if (options.beforeClose && !options.beforeClose()) return;
|
|
3454
|
+
afterLeaveFlag.value = true;
|
|
3455
|
+
clearTimeout(afterLeaveTimer);
|
|
3456
|
+
afterLeaveTimer = setTimeout(handleAfterLeave, 400);
|
|
3457
|
+
data.visible = false;
|
|
3458
|
+
(_a = options.closed) == null ? void 0 : _a.call(options);
|
|
3459
|
+
}
|
|
3460
|
+
function handleAfterLeave() {
|
|
3461
|
+
if (!afterLeaveFlag.value) return;
|
|
3462
|
+
const target = data.parent;
|
|
3463
|
+
afterLeaveFlag.value = false;
|
|
3464
|
+
target.vLoadingAddClassList = void 0;
|
|
3465
|
+
destroySelf();
|
|
3466
|
+
}
|
|
3467
|
+
function getAnimateColor(color) {
|
|
3468
|
+
if (!color)
|
|
3469
|
+
return ["var(--el-color-primary)", "var(--el-color-primary-light-5)"];
|
|
3470
|
+
return color.split(";");
|
|
3471
|
+
}
|
|
3472
|
+
function createStop(offset, color, values) {
|
|
3473
|
+
return vue.h(
|
|
3474
|
+
"stop",
|
|
3475
|
+
{
|
|
3476
|
+
offset,
|
|
3477
|
+
"stop-color": color
|
|
3478
|
+
},
|
|
3479
|
+
[
|
|
3480
|
+
values ? vue.h("animate", {
|
|
3481
|
+
attributeName: "offset",
|
|
3482
|
+
values,
|
|
3483
|
+
dur: "3s",
|
|
3484
|
+
repeatCount: "indefinite"
|
|
3485
|
+
}) : null
|
|
3486
|
+
]
|
|
3487
|
+
);
|
|
3488
|
+
}
|
|
3489
|
+
const elLoadingComponent = vue.defineComponent({
|
|
3490
|
+
name: "ZjhcLoading",
|
|
3491
|
+
setup(_, { expose }) {
|
|
3492
|
+
const ns = useNamespace("loading");
|
|
3493
|
+
const config2 = elementPlus.useGlobalConfig();
|
|
3494
|
+
globalTotal += 1;
|
|
3495
|
+
const zIndex = elementPlus.useZIndex(
|
|
3496
|
+
vue.computed(() => {
|
|
3497
|
+
var _a;
|
|
3498
|
+
return ((_a = config2.value) == null ? void 0 : _a.zIndex) || elementPlus.defaultInitialZIndex;
|
|
3499
|
+
})
|
|
3500
|
+
);
|
|
3501
|
+
expose({
|
|
3502
|
+
ns,
|
|
3503
|
+
zIndex
|
|
3504
|
+
});
|
|
3505
|
+
return () => {
|
|
3506
|
+
const svg = data.spinner || data.svg;
|
|
3507
|
+
const animateColor = getAnimateColor(data.animateColor);
|
|
3508
|
+
const fillColor = data.fillColor || "var(--el-fill-color)";
|
|
3509
|
+
const offset = 0.2 / animateColor.length;
|
|
3510
|
+
const step = 1 / (animateColor.length - 1);
|
|
3511
|
+
const animate = [];
|
|
3512
|
+
animateColor.forEach((color, index2) => {
|
|
3513
|
+
animate.push(
|
|
3514
|
+
createStop(
|
|
3515
|
+
`${index2 * offset}%`,
|
|
3516
|
+
color,
|
|
3517
|
+
`${-1 + step * index2};${1 + step * index2}`
|
|
3518
|
+
)
|
|
3519
|
+
);
|
|
3520
|
+
});
|
|
3521
|
+
animate.push(createStop("0.2%", animateColor[animateColor.length - 1]));
|
|
3522
|
+
const spinner = vue.h(
|
|
3523
|
+
"svg",
|
|
3524
|
+
{
|
|
3525
|
+
class: "circular",
|
|
3526
|
+
viewBox: data.svgViewBox ? data.svgViewBox : "0 0 1024 1024",
|
|
3527
|
+
...svg ? { innerHTML: svg } : {}
|
|
3528
|
+
},
|
|
3529
|
+
[
|
|
3530
|
+
vue.h("path", {
|
|
3531
|
+
class: "path",
|
|
3532
|
+
d: "M481.4 577.7l-11.8 10.1-4.1 3.7c14 33.5-34 62.3-53.9 43.5 0 0-5.3 4-10.6 8.2l-7.5 6.1c0.6 5.7 1.5 14.1 5.5 17.1 38.5 28.4 116.3-10.8 102.5-68.4l-20.1-20.3zM1005 323c-42.9-59.8-87.7-12.8-117.2-35.6-10.1-7.8-11.3-27.9-11.3-34.7v-2.3l19.2-22.8s45 11.4 63.6-22.8c21.9-40.4-22.2-91.2-66.5-83.4-36.7 6.5-41.4 47.9-42 58.9l-0.1 2.6-22.9 18c-21.9 7.4-41.4-10.2-44.3-26.6-3.6-20.1 39.2-100.2-55.4-120.6-81.1-17.5-193.8-12.9-241.7-9.8l-23.1 1.7s14 16.9 31 23.3c15.6 5.9 89.1 10.2 113.4 10.8l5.3 0.1c12.4 0 16.9 5.6 18.2 8l0.5 1.1-83.3-1.7s15.3 19.7 41.9 25.4c26.6 5.7 50.7 1.4 64.5 2.4 10.6 0.7 14.5 5.8 15.8 8.1l0.5 1.1-72.4-0.7 2.7 2.2c6.6 5.2 24.2 17.8 42.3 20.6 22.9 3.6 44.3 0.7 51.7 1.4 13.1 1.3 12.9 6.8 12.6 8.2l-0.1 0.4h-67s14.5 17.1 36 22.1c21.4 5 44.4 0.2 54.7 1.4 9.1 1.1 12.5 7.2 13.6 10l0.4 1.4h-66.5s14 18.3 36.2 20.7c14.9 1.6 33.7 0 43.6 1.4 11.8 1.7 14.2 7.5 14.7 9.8l0.1 0.9-48.5-0.3c-9.5 0-16.4 0.2-15.8 0.5l3.5 1.6 7.3 3c13 5.6 26.5 14.1 27.6 47.9l-105.5 96.5c-15.3-46.2-29.5-84.1-7.5-91.5 2.9-1 6.8-1.1 11-0.9l9.1 0.4c13.2 0.3 24.4-2.4 12.4-30.1-17.7-33.5-54.7-35.6-69.5-30.6-49.4 16.7-38 70.7-19.9 128.8l13.7 43c2.3 7.2 4.4 14.4 6.4 21.4l-87.2 79.5-89.5-88.4-98.2-97.3c-32.3-32.1-63-62.6-90.2-89.8L176 160.6c-16.1-16.3-29.1-29.5-37.8-38.6l-6.2-6.5c-38.4-39.9-91.6 15.2-59.1 48.4l6.1 6.4-79 72.4 53.2 53.2 50.2-44.6 43.4 43.7-49.3 46.5 47.3 48.4 46.3-43.7 45.3 45.6-47.3 45.6 46.3 46.5L315 408l137.7 138-71.7 65.2c-4.1-52.4 31.9-63.8 59.5-65.4l5.2-0.2h4l-27.3-27.1c-43.2-1.1-99.2 43.5-74 115.5l1.7 5.2C224.5 753 111.6 854.5 86.1 874.7l-5.7 4.3c-21.9 16.7-5.8 24.9 12.3 11.5l263.8-214.1c-0.4 42.9-34.5 55-59.7 51.6l-22.5 17.8c64.1 37.4 137-22.4 115.1-96.1l80.2-65.2 12-9.5 66.7 66.9 30.6 30.8c21 21.2 35 35.4 39.1 39.8l9.6 10.8c10.7 12.5 21.8 30.6 10.9 65-9.7 30.5-29.7 60.9-10.3 110.4 28.1 72 123.4 91 167.7 82.6 151.5-28.5 176.4-183.6 140.9-249.1s-117.2-102.1-170-61.3l-3.8 2.8c-42.6 29.2-79.1-9.4-83.1-13.8l-137-135.2 64.4-52.3c-1.3 29.5-16.5 50.2-60.4 53.3 4.7 4.2 12.3 11.5 19.5 18.6l20 20.1c76-18.6 84.2-71.1 74-126l-1.6-7.9c75.2-60.9 128.9-104.1 135-108.1l0.6-0.3c42.6-0.4 51.7 29.1 53.5 38.6l0.4 2.8 2-52.1s6.9 2.8 9.9 10c3 7.1-4.9 27.1-2 44.6 2.4 14.1 12.6 22.9 16.6 25.9l1.6 1.1 2-61.3s5.4 0.5 8.4 7.1-4.9 47-2.5 58.9c1.8 8.7 10.8 20.5 15.4 26.1l2.8 3.3 2.5-69.3s7.4 1.4 8.9 11.4c1.9 12.5-6.4 52.7-4.9 68.9 1.1 11.7 13.7 27.8 20.6 35.8l4.5 5L938 399s3.9-1 8.4 7.1c4.8 8.8-5.4 67.5-2 84.5 2.5 12.3 14.5 27.4 21 34.8l4.2 4.6 1-98.3s4.9 0.9 8.9 9.5c3.9 8.5-4.9 114.9-1 133 3.1 14 18.3 31.3 24.9 38.3l3.1 3.2c0 0.1 40.4-234.2-1.5-292.7zM721.2 822.4l5-1.4c50.1-14.2 45.2-34.2 56.3-72 15.5-52.7 107.2-37.5 111.6 39.9 3.7 65.5-39.2 139.6-137.4 134.6l-4-0.2c-69.5-4.2-96.2-84.3-31.5-100.9zM273 705.9c-1.1-43.1 36.2-57.7 51.7-46.3l21.4-19.2c-2.9-5.3-1.6-16.1-8.3-18.6-33.7-12.9-110 18.8-87.4 104.1 7.3-6 13.3-11.4 17.3-15l5.3-5z m300.7-275.1l2.2 1s10.4-10 16.1-15l2.6-2.1C584.3 350.6 478.5 378.6 477 457l31 31c18.5-70.3 56.1-60.9 65.7-57.2z m267.2 14c-0.6-15.4-10.5-25.3-26-37l-7.5-5.5c-24.6-18-35.2 1.2-32.5 13.3l0.6 3.4c6.3 44.2-73 24.1-102.3 15.2l-10.7-3.4s6.9 38.7 3.9 49.6c45 11.4 177.9 44.9 174.5-35.6z",
|
|
3533
|
+
fill: `url(#gradient-${globalTotal})`
|
|
3534
|
+
}),
|
|
3535
|
+
vue.h(
|
|
3536
|
+
"defs",
|
|
3537
|
+
vue.h("linearGradient", { id: `gradient-${globalTotal}` }, [
|
|
3538
|
+
vue.h("animateTransform", {
|
|
3539
|
+
attributeName: "gradientTransform",
|
|
3540
|
+
type: "rotate",
|
|
3541
|
+
from: "135 1 0",
|
|
3542
|
+
to: "135 0 1",
|
|
3543
|
+
dur: "3s",
|
|
3544
|
+
repeatCount: "indefinite"
|
|
3545
|
+
}),
|
|
3546
|
+
...animate,
|
|
3547
|
+
createStop("0.2%", fillColor),
|
|
3548
|
+
createStop("100%", fillColor)
|
|
3549
|
+
])
|
|
3550
|
+
)
|
|
3551
|
+
]
|
|
3552
|
+
);
|
|
3553
|
+
const spinnerText = data.text ? vue.h("p", { class: ns.b("text") }, [data.text]) : void 0;
|
|
3554
|
+
return vue.h(
|
|
3555
|
+
vue.Transition,
|
|
3556
|
+
{
|
|
3557
|
+
name: ns.b("fade"),
|
|
3558
|
+
onAfterLeave: handleAfterLeave
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
default: vue.withCtx(() => [
|
|
3562
|
+
vue.withDirectives(
|
|
3563
|
+
vue.createVNode(
|
|
3564
|
+
"div",
|
|
3565
|
+
{
|
|
3566
|
+
style: {
|
|
3567
|
+
backgroundColor: data.background || ""
|
|
3568
|
+
},
|
|
3569
|
+
class: [
|
|
3570
|
+
ns.b("mask"),
|
|
3571
|
+
data.customClass,
|
|
3572
|
+
data.fullscreen ? "is-fullscreen" : ""
|
|
3573
|
+
]
|
|
3574
|
+
},
|
|
3575
|
+
[
|
|
3576
|
+
vue.h(
|
|
3577
|
+
"div",
|
|
3578
|
+
{
|
|
3579
|
+
class: ns.b("spinner")
|
|
3580
|
+
},
|
|
3581
|
+
[spinner, spinnerText]
|
|
3582
|
+
)
|
|
3583
|
+
]
|
|
3584
|
+
),
|
|
3585
|
+
[[vue.vShow, data.visible]]
|
|
3586
|
+
)
|
|
3587
|
+
])
|
|
3588
|
+
}
|
|
3589
|
+
);
|
|
3590
|
+
};
|
|
3591
|
+
}
|
|
3592
|
+
});
|
|
3593
|
+
const loadingInstance = vue.createApp(elLoadingComponent);
|
|
3594
|
+
const vm = loadingInstance.mount(document.createElement("div"));
|
|
3595
|
+
return {
|
|
3596
|
+
...vue.toRefs(data),
|
|
3597
|
+
setText,
|
|
3598
|
+
removeElLoadingChild,
|
|
3599
|
+
close,
|
|
3600
|
+
handleAfterLeave,
|
|
3601
|
+
vm,
|
|
3602
|
+
get $el() {
|
|
3603
|
+
return vm.$el;
|
|
3604
|
+
}
|
|
3605
|
+
};
|
|
3606
|
+
}
|
|
3607
|
+
let fullscreenInstance = void 0;
|
|
3608
|
+
const Loading = function(options = {}) {
|
|
3609
|
+
if (!core.isClient) return void 0;
|
|
3610
|
+
const resolved = resolveOptions(options);
|
|
3611
|
+
if (resolved.fullscreen && fullscreenInstance) {
|
|
3612
|
+
return fullscreenInstance;
|
|
3613
|
+
}
|
|
3614
|
+
const instance = createLoadingComponent({
|
|
3615
|
+
...resolved,
|
|
3616
|
+
closed: () => {
|
|
3617
|
+
var _a;
|
|
3618
|
+
(_a = resolved.closed) == null ? void 0 : _a.call(resolved);
|
|
3619
|
+
if (resolved.fullscreen) fullscreenInstance = void 0;
|
|
3620
|
+
}
|
|
3621
|
+
});
|
|
3622
|
+
addStyle(resolved, resolved.parent, instance);
|
|
3623
|
+
addClassList(resolved, resolved.parent, instance);
|
|
3624
|
+
resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
|
|
3625
|
+
let loadingNumber = resolved.parent.getAttribute("loading-number");
|
|
3626
|
+
if (!loadingNumber) {
|
|
3627
|
+
loadingNumber = "1";
|
|
3628
|
+
} else {
|
|
3629
|
+
loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
|
|
3630
|
+
}
|
|
3631
|
+
resolved.parent.setAttribute("loading-number", loadingNumber);
|
|
3632
|
+
resolved.parent.appendChild(instance.$el);
|
|
3633
|
+
vue.nextTick(() => instance.visible.value = resolved.visible);
|
|
3634
|
+
if (resolved.fullscreen) {
|
|
3635
|
+
fullscreenInstance = instance;
|
|
3636
|
+
}
|
|
3637
|
+
return instance;
|
|
3638
|
+
};
|
|
3639
|
+
const resolveOptions = (options) => {
|
|
3640
|
+
let target;
|
|
3641
|
+
if (isString$1(options.target)) {
|
|
3642
|
+
target = document.querySelector(options.target) ?? document.body;
|
|
3643
|
+
} else {
|
|
3644
|
+
target = options.target || document.body;
|
|
3645
|
+
}
|
|
3646
|
+
return {
|
|
3647
|
+
parent: target === document.body || options.body ? document.body : target,
|
|
3648
|
+
background: options.background || "",
|
|
3649
|
+
fillColor: options.fillColor || "",
|
|
3650
|
+
animateColor: options.animateColor || "",
|
|
3651
|
+
svg: options.svg || "",
|
|
3652
|
+
svgViewBox: options.svgViewBox || "",
|
|
3653
|
+
spinner: options.spinner || false,
|
|
3654
|
+
text: options.text || "",
|
|
3655
|
+
fullscreen: target === document.body && (options.fullscreen ?? true),
|
|
3656
|
+
lock: options.lock ?? false,
|
|
3657
|
+
customClass: options.customClass || "",
|
|
3658
|
+
visible: options.visible ?? true,
|
|
3659
|
+
beforeClose: options.beforeClose,
|
|
3660
|
+
closed: options.closed,
|
|
3661
|
+
target
|
|
3662
|
+
};
|
|
3663
|
+
};
|
|
3664
|
+
const addStyle = async (options, parent, instance) => {
|
|
3665
|
+
const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
|
|
3666
|
+
const maskStyle = {};
|
|
3667
|
+
if (options.fullscreen) {
|
|
3668
|
+
instance.originalPosition.value = getStyle(document.body, "position");
|
|
3669
|
+
instance.originalOverflow.value = getStyle(document.body, "overflow");
|
|
3670
|
+
maskStyle.zIndex = nextZIndex();
|
|
3671
|
+
} else if (options.parent === document.body) {
|
|
3672
|
+
instance.originalPosition.value = getStyle(document.body, "position");
|
|
3673
|
+
await vue.nextTick();
|
|
3674
|
+
for (const property of ["top", "left"]) {
|
|
3675
|
+
const scroll = property === "top" ? "scrollTop" : "scrollLeft";
|
|
3676
|
+
maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
|
|
3677
|
+
}
|
|
3678
|
+
for (const property of ["height", "width"]) {
|
|
3679
|
+
maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
|
|
3680
|
+
}
|
|
3681
|
+
} else {
|
|
3682
|
+
instance.originalPosition.value = getStyle(parent, "position");
|
|
3683
|
+
}
|
|
3684
|
+
for (const [key, value] of Object.entries(maskStyle)) {
|
|
3685
|
+
instance.$el.style[key] = value;
|
|
3686
|
+
}
|
|
3687
|
+
};
|
|
3688
|
+
const addClassList = (options, parent, instance) => {
|
|
3689
|
+
const ns = instance.vm.ns || instance.vm._.exposed.ns;
|
|
3690
|
+
if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) {
|
|
3691
|
+
addClass(parent, ns.bm("parent", "relative"));
|
|
3692
|
+
} else {
|
|
3693
|
+
removeClass(parent, ns.bm("parent", "relative"));
|
|
3694
|
+
}
|
|
3695
|
+
if (options.fullscreen && options.lock) {
|
|
3696
|
+
addClass(parent, ns.bm("parent", "hidden"));
|
|
3697
|
+
} else {
|
|
3698
|
+
removeClass(parent, ns.bm("parent", "hidden"));
|
|
3699
|
+
}
|
|
3700
|
+
};
|
|
3701
|
+
const INSTANCE_KEY = Symbol("ZjhcLoading");
|
|
3702
|
+
const createInstance = (el, binding) => {
|
|
3703
|
+
const vm = binding.instance;
|
|
3704
|
+
const getBindingProp = (key) => isObject$1(binding.value) ? binding.value[key] : void 0;
|
|
3705
|
+
const resolveExpression = (key) => {
|
|
3706
|
+
const data = isString$1(key) && (vm == null ? void 0 : vm[key]) || key;
|
|
3707
|
+
if (data) return vue.ref(data);
|
|
3708
|
+
else return data;
|
|
3709
|
+
};
|
|
3710
|
+
const getProp = (name) => resolveExpression(
|
|
3711
|
+
getBindingProp(name) || el.getAttribute(`element-loading-${hyphenate(name)}`)
|
|
3712
|
+
);
|
|
3713
|
+
const fullscreen = getBindingProp("fullscreen") ?? binding.modifiers.fullscreen;
|
|
3714
|
+
const options = {
|
|
3715
|
+
text: getProp("text"),
|
|
3716
|
+
svg: getProp("svg"),
|
|
3717
|
+
fillColor: getProp("fillColor"),
|
|
3718
|
+
animateColor: getProp("animateColor"),
|
|
3719
|
+
svgViewBox: getProp("svgViewBox"),
|
|
3720
|
+
spinner: getProp("spinner"),
|
|
3721
|
+
background: getProp("background"),
|
|
3722
|
+
customClass: getProp("customClass"),
|
|
3723
|
+
fullscreen,
|
|
3724
|
+
target: getBindingProp("target") ?? (fullscreen ? void 0 : el),
|
|
3725
|
+
body: getBindingProp("body") ?? binding.modifiers.body,
|
|
3726
|
+
lock: getBindingProp("lock") ?? binding.modifiers.lock
|
|
3727
|
+
};
|
|
3728
|
+
el[INSTANCE_KEY] = {
|
|
3729
|
+
options,
|
|
3730
|
+
instance: Loading(options)
|
|
3731
|
+
};
|
|
3732
|
+
};
|
|
3733
|
+
const updateOptions = (newOptions, originalOptions) => {
|
|
3734
|
+
for (const key of Object.keys(originalOptions)) {
|
|
3735
|
+
if (vue.isRef(originalOptions[key]))
|
|
3736
|
+
originalOptions[key].value = newOptions[key];
|
|
3737
|
+
}
|
|
3738
|
+
};
|
|
3739
|
+
const vLoading = {
|
|
3740
|
+
mounted(el, binding) {
|
|
3741
|
+
if (binding.value) {
|
|
3742
|
+
createInstance(el, binding);
|
|
3743
|
+
}
|
|
3744
|
+
},
|
|
3745
|
+
updated(el, binding) {
|
|
3746
|
+
const instance = el[INSTANCE_KEY];
|
|
3747
|
+
if (binding.oldValue !== binding.value) {
|
|
3748
|
+
if (binding.value && !binding.oldValue) {
|
|
3749
|
+
createInstance(el, binding);
|
|
3750
|
+
} else if (binding.value && binding.oldValue) {
|
|
3751
|
+
if (isObject$1(binding.value))
|
|
3752
|
+
updateOptions(binding.value, instance.options);
|
|
3753
|
+
} else {
|
|
3754
|
+
instance == null ? void 0 : instance.instance.close();
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
},
|
|
3758
|
+
unmounted(el) {
|
|
3759
|
+
var _a;
|
|
3760
|
+
(_a = el[INSTANCE_KEY]) == null ? void 0 : _a.instance.close();
|
|
3761
|
+
el[INSTANCE_KEY] = null;
|
|
3762
|
+
}
|
|
3763
|
+
};
|
|
3764
|
+
const ZjhcLoading = {
|
|
3765
|
+
install(app) {
|
|
3766
|
+
app.directive("zjhc-loading", vLoading);
|
|
3767
|
+
app.config.globalProperties.$zjhcLoading = vLoading;
|
|
3768
|
+
},
|
|
3769
|
+
directive: vLoading,
|
|
3770
|
+
service: Loading
|
|
3771
|
+
};
|
|
3772
|
+
const compMap = /* @__PURE__ */ new Map();
|
|
3773
|
+
function getComp(name) {
|
|
3774
|
+
const comp = compMap.get(name);
|
|
3775
|
+
if (comp) {
|
|
3776
|
+
return comp;
|
|
3777
|
+
}
|
|
3778
|
+
throw Error(`editTableColumn:没有注册${name}组件`);
|
|
3779
|
+
}
|
|
3780
|
+
function registerComp(name, comp) {
|
|
3781
|
+
if (compMap.has(name)) {
|
|
3782
|
+
throw Error(`editTableColumn:${name}已注册`);
|
|
3783
|
+
}
|
|
3784
|
+
compMap.set(name, comp);
|
|
3785
|
+
}
|
|
3786
|
+
(() => {
|
|
3787
|
+
registerComp("input", elementPlus.ElInput);
|
|
3788
|
+
registerComp("select", elementPlus.ElSelect);
|
|
3789
|
+
})();
|
|
3790
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3791
|
+
...{
|
|
3792
|
+
name: "ZjhcEditTableColumn"
|
|
3793
|
+
},
|
|
3794
|
+
__name: "EditTableColumn",
|
|
3795
|
+
props: {
|
|
3796
|
+
inputName: { type: String, required: false, default: "input" },
|
|
3797
|
+
inputProps: { type: Object, required: false, default: () => ({}) },
|
|
3798
|
+
inputChild: { type: Array, required: false },
|
|
3799
|
+
isEdit: { type: Boolean, required: false, default: true },
|
|
3800
|
+
selectOptions: { type: Array, required: false }
|
|
3801
|
+
},
|
|
3802
|
+
emits: ["on-change"],
|
|
3803
|
+
setup(__props, { emit: __emit }) {
|
|
3804
|
+
const props = __props;
|
|
3805
|
+
const emits = __emit;
|
|
3806
|
+
const comp = vue.computed(() => getComp(props.inputName));
|
|
3807
|
+
function onChange(val, row) {
|
|
3808
|
+
emits("on-change", val, row);
|
|
3809
|
+
}
|
|
3810
|
+
return (_ctx, _cache) => {
|
|
3811
|
+
const _component_el_option = vue.resolveComponent("el-option");
|
|
3812
|
+
const _component_el_table_column = vue.resolveComponent("el-table-column");
|
|
3813
|
+
return vue.openBlock(), vue.createBlock(_component_el_table_column, vue.normalizeProps(vue.guardReactiveProps(props)), {
|
|
3814
|
+
append: vue.withCtx((scoped) => [
|
|
3815
|
+
vue.renderSlot(_ctx.$slots, "append", vue.normalizeProps(vue.guardReactiveProps(scoped)))
|
|
3816
|
+
]),
|
|
3817
|
+
default: vue.withCtx((scoped) => [
|
|
3818
|
+
vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(scoped)), () => {
|
|
3819
|
+
var _a;
|
|
3820
|
+
return [
|
|
3821
|
+
!__props.isEdit || !((_a = scoped.row) == null ? void 0 : _a.isEdit) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
3822
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(config.defaultRenderCell)(scoped)), 1)
|
|
3823
|
+
], 64)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comp.value), vue.mergeProps({ key: 1 }, __props.inputProps, {
|
|
3824
|
+
scoped,
|
|
3825
|
+
onChange: (val) => onChange(val, scoped.row),
|
|
3826
|
+
modelValue: scoped.row[scoped.column.property || scoped.column.prop],
|
|
3827
|
+
"onUpdate:modelValue": ($event) => scoped.row[scoped.column.property || scoped.column.prop] = $event
|
|
3828
|
+
}), vue.createSlots({
|
|
3829
|
+
default: vue.withCtx(() => {
|
|
3830
|
+
var _a2;
|
|
3831
|
+
return [
|
|
3832
|
+
__props.inputName == "select" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(__props.selectOptions, (child, index2) => {
|
|
3833
|
+
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
3834
|
+
key: index2,
|
|
3835
|
+
value: child.value,
|
|
3836
|
+
label: child.label,
|
|
3837
|
+
disabled: child.disabled
|
|
3838
|
+
}, null, 8, ["value", "label", "disabled"]);
|
|
3839
|
+
}), 128)) : vue.createCommentVNode("", true),
|
|
3840
|
+
((_a2 = __props.inputChild) == null ? void 0 : _a2.length) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(__props.inputChild, (child, index2) => {
|
|
3841
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child), { key: index2 });
|
|
3842
|
+
}), 128)) : vue.createCommentVNode("", true)
|
|
3843
|
+
];
|
|
3844
|
+
}),
|
|
3845
|
+
_: 2
|
|
3846
|
+
}, [
|
|
3847
|
+
_ctx.$slots.prepend ? {
|
|
3848
|
+
name: "prepend",
|
|
3849
|
+
fn: vue.withCtx(() => [
|
|
3850
|
+
vue.renderSlot(_ctx.$slots, "prepend")
|
|
3851
|
+
]),
|
|
3852
|
+
key: "0"
|
|
3853
|
+
} : void 0,
|
|
3854
|
+
_ctx.$slots.append ? {
|
|
3855
|
+
name: "append",
|
|
3856
|
+
fn: vue.withCtx(() => [
|
|
3857
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
3858
|
+
]),
|
|
3859
|
+
key: "1"
|
|
3860
|
+
} : void 0
|
|
3861
|
+
]), 1040, ["scoped", "onChange", "modelValue", "onUpdate:modelValue"]))
|
|
3862
|
+
];
|
|
3863
|
+
})
|
|
3864
|
+
]),
|
|
3865
|
+
filterIcon: vue.withCtx((scoped) => [
|
|
3866
|
+
vue.renderSlot(_ctx.$slots, "filterIcon", vue.normalizeProps(vue.guardReactiveProps(scoped)))
|
|
3867
|
+
]),
|
|
3868
|
+
_: 3
|
|
3869
|
+
}, 16);
|
|
3870
|
+
};
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3873
|
+
const ZjhcEditTableColumn = withInstall(_sfc_main);
|
|
3874
|
+
const Components = [
|
|
3875
|
+
ZjhcSearchPanel,
|
|
3876
|
+
ZjhcSearchPanelLayout,
|
|
3877
|
+
ZjhcSearchLayout,
|
|
3878
|
+
ZjhcCollapsePanel,
|
|
3879
|
+
ZjhcCollapseContainer,
|
|
3880
|
+
ZjhcStickyToolbar,
|
|
3881
|
+
ZjhcGroupContainer,
|
|
3882
|
+
ZjhcTableToolbar,
|
|
3883
|
+
ZjhcDialog,
|
|
3884
|
+
ZjhcComplexTable,
|
|
3885
|
+
ZjhcAutocomplete,
|
|
3886
|
+
ZjhcEditTableColumn,
|
|
3887
|
+
ZjhcLoading
|
|
3888
|
+
];
|
|
3889
|
+
const Plugins = [];
|
|
3890
|
+
const installer = makeInstaller([...Components, ...Plugins]);
|
|
3891
|
+
const SuccessResultCode = "0";
|
|
3892
|
+
const WarningResultCode = "9";
|
|
3893
|
+
const SystemFailResultCode = "-1";
|
|
3894
|
+
function getOperationType(type) {
|
|
3895
|
+
if (type === "save") {
|
|
3896
|
+
return "保存";
|
|
3897
|
+
} else if (type === "delete") {
|
|
3898
|
+
return "删除";
|
|
3899
|
+
} else if (type === "suspend") {
|
|
3900
|
+
return "挂起";
|
|
3901
|
+
} else if (type === "back") {
|
|
3902
|
+
return "退回";
|
|
3903
|
+
} else if (type === "reject") {
|
|
3904
|
+
return "驳回";
|
|
3905
|
+
} else if (type === "agree") {
|
|
3906
|
+
return "审批";
|
|
3907
|
+
} else if (type === "revoke") {
|
|
3908
|
+
return "撤回";
|
|
3909
|
+
} else {
|
|
3910
|
+
return "未知";
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
const install = installer.install;
|
|
3914
|
+
const version = installer.version;
|
|
3915
|
+
exports.CHANGE_EVENT = CHANGE_EVENT;
|
|
3916
|
+
exports.EVENT_CODE = EVENT_CODE;
|
|
3917
|
+
exports.INPUT_EVENT = INPUT_EVENT;
|
|
3918
|
+
exports.INSTALLED_KEY = INSTALLED_KEY;
|
|
3919
|
+
exports.SuccessResultCode = SuccessResultCode;
|
|
3920
|
+
exports.SystemFailResultCode = SystemFailResultCode;
|
|
3921
|
+
exports.UPDATE_MODEL_EVENT = UPDATE_MODEL_EVENT;
|
|
3922
|
+
exports.WEEK_DAYS = WEEK_DAYS;
|
|
3923
|
+
exports.WarningResultCode = WarningResultCode;
|
|
3924
|
+
exports.ZjhcAutocomplete = ZjhcAutocomplete;
|
|
3925
|
+
exports.ZjhcCollapseContainer = ZjhcCollapseContainer;
|
|
3926
|
+
exports.ZjhcCollapsePanel = ZjhcCollapsePanel;
|
|
3927
|
+
exports.ZjhcComplexTable = ZjhcComplexTable;
|
|
3928
|
+
exports.ZjhcDialog = ZjhcDialog;
|
|
3929
|
+
exports.ZjhcEditTableColumn = ZjhcEditTableColumn;
|
|
3930
|
+
exports.ZjhcGroupContainer = ZjhcGroupContainer;
|
|
3931
|
+
exports.ZjhcLoading = ZjhcLoading;
|
|
3932
|
+
exports.ZjhcLoadingDirective = vLoading;
|
|
3933
|
+
exports.ZjhcLoadingService = Loading;
|
|
3934
|
+
exports.ZjhcSearchLayout = ZjhcSearchLayout;
|
|
3935
|
+
exports.ZjhcSearchPanel = ZjhcSearchPanel;
|
|
3936
|
+
exports.ZjhcSearchPanelLayout = ZjhcSearchPanelLayout;
|
|
3937
|
+
exports.ZjhcStickyToolbar = ZjhcStickyToolbar;
|
|
3938
|
+
exports.ZjhcTableToolbar = ZjhcTableToolbar;
|
|
3939
|
+
exports.addClass = addClass;
|
|
3940
|
+
exports.addUnit = addUnit;
|
|
3941
|
+
exports.autocompleteEmits = autocompleteEmits;
|
|
3942
|
+
exports.autocompleteProps = autocompleteProps;
|
|
3943
|
+
exports.classNameToArray = classNameToArray;
|
|
3944
|
+
exports.componentSizeMap = componentSizeMap;
|
|
3945
|
+
exports.componentSizes = componentSizes;
|
|
3946
|
+
exports.datePickTypes = datePickTypes;
|
|
3947
|
+
exports.default = installer;
|
|
3948
|
+
exports.defaultNamespace = defaultNamespace;
|
|
3949
|
+
exports.deserialize = deserialize;
|
|
3950
|
+
exports.dialogEmits = dialogEmits;
|
|
3951
|
+
exports.dialogProps = dialogProps;
|
|
3952
|
+
exports.getOperationType = getOperationType;
|
|
3953
|
+
exports.getStyle = getStyle;
|
|
3954
|
+
exports.hasClass = hasClass;
|
|
3955
|
+
exports.install = install;
|
|
3956
|
+
exports.isArray = isArray;
|
|
3957
|
+
exports.isBlob = isBlob;
|
|
3958
|
+
exports.isFile = isFile;
|
|
3959
|
+
exports.isFunction = isFunction;
|
|
3960
|
+
exports.isNumber = isNumber$1;
|
|
3961
|
+
exports.isObject = isObject;
|
|
3962
|
+
exports.isRegExp = isRegExp;
|
|
3963
|
+
exports.isString = isString;
|
|
3964
|
+
exports.isStringNumber = isStringNumber;
|
|
3965
|
+
exports.isWindow = isWindow;
|
|
3966
|
+
exports.makeInstaller = makeInstaller;
|
|
3967
|
+
exports.registerComp = registerComp;
|
|
3968
|
+
exports.removeClass = removeClass;
|
|
3969
|
+
exports.removeStyle = removeStyle;
|
|
3970
|
+
exports.serialize = serialize;
|
|
3971
|
+
exports.setStyle = setStyle;
|
|
3972
|
+
exports.setTheme = setTheme;
|
|
3973
|
+
exports.throwError = throwError;
|
|
3974
|
+
exports.toTree = toTree;
|
|
3975
|
+
exports.useComplexTable = useComplexTable;
|
|
3976
|
+
exports.useDraggableAndResizable = useDraggableAndResizable;
|
|
3977
|
+
exports.useLoading = useLoading;
|
|
3978
|
+
exports.useNamespace = useNamespace;
|
|
3979
|
+
exports.useOperModal = useOperModal;
|
|
3980
|
+
exports.vZjhcLoading = vLoading;
|
|
3981
|
+
exports.version = version;
|
|
3982
|
+
exports.withInstall = withInstall;
|
|
3983
|
+
exports.withInstallDirective = withInstallDirective;
|
|
3984
|
+
exports.withInstallFunction = withInstallFunction;
|
|
3985
|
+
exports.withNoopInstall = withNoopInstall;
|