hy-dispatch-ui-v3 0.2.59 → 0.2.60
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/dist/tailwind.css +129 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/index.mjs +1 -0
- package/es/index.mjs +3 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/index.mjs +1 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/index.js +14 -12
- package/lib/index.js +56 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/index.js +3 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var radioGroup = require('./radioGroup.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const HyRadioGroup = handler.withInstall(radioGroup.default);
|
|
9
|
+
|
|
10
|
+
exports.HyRadioGroup = HyRadioGroup;
|
|
11
|
+
exports.default = HyRadioGroup;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
import "./style/radioGroup.scss";
|
|
8
|
+
|
|
9
|
+
const __default__ = vue.defineComponent({
|
|
10
|
+
name: "HyRadioGroup"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
13
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
14
|
+
options: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "default"
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
"modelValue": {
|
|
28
|
+
type: [String, Number, Boolean]
|
|
29
|
+
},
|
|
30
|
+
"modelModifiers": {}
|
|
31
|
+
}),
|
|
32
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
33
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
34
|
+
const props = __props;
|
|
35
|
+
const emits = __emit;
|
|
36
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
37
|
+
const sliderRef = vue.useTemplateRef("sliderRef");
|
|
38
|
+
const selectIndex = vue.ref(0);
|
|
39
|
+
const radioProps = vue.computed(() => {
|
|
40
|
+
return {
|
|
41
|
+
value: "value",
|
|
42
|
+
label: "label",
|
|
43
|
+
disabled: "disabled",
|
|
44
|
+
...props.props || {}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
function switchSelect(target) {
|
|
48
|
+
modelValue.value = target[radioProps.value.value];
|
|
49
|
+
emits("change", modelValue.value);
|
|
50
|
+
}
|
|
51
|
+
async function sliderHandler() {
|
|
52
|
+
selectIndex.value = props.options.findIndex((item) => {
|
|
53
|
+
return item[radioProps.value.value] === modelValue.value;
|
|
54
|
+
});
|
|
55
|
+
await vue.nextTick();
|
|
56
|
+
const slider = sliderRef.value;
|
|
57
|
+
if (slider) {
|
|
58
|
+
const proportion = 100 / props.options.length;
|
|
59
|
+
const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
|
|
60
|
+
console.log("proportion", proportion, left, selectIndex.value);
|
|
61
|
+
slider.style.left = `${left}%`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
vue.watch(
|
|
65
|
+
() => [modelValue.value, props.options],
|
|
66
|
+
() => {
|
|
67
|
+
sliderHandler();
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true }
|
|
70
|
+
);
|
|
71
|
+
__expose({});
|
|
72
|
+
return (_ctx, _cache) => {
|
|
73
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
74
|
+
"ul",
|
|
75
|
+
{
|
|
76
|
+
class: vue.normalizeClass(["w-full flex text-xs rounded border border-border box-border relative", [
|
|
77
|
+
__props.size === "large" ? "h-[40px]" : __props.size === "small" ? "h-[24px]" : "h-[32px]",
|
|
78
|
+
__props.size === "small" ? "text-xs" : "text-sm"
|
|
79
|
+
]])
|
|
80
|
+
},
|
|
81
|
+
[
|
|
82
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
83
|
+
vue.Fragment,
|
|
84
|
+
null,
|
|
85
|
+
vue.renderList(__props.options, (item, index) => {
|
|
86
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
87
|
+
key: index,
|
|
88
|
+
class: "w-0 flex-1 flex items-center justify-center text-main clickBox",
|
|
89
|
+
onClick: ($event) => switchSelect(item)
|
|
90
|
+
}, [
|
|
91
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
92
|
+
item,
|
|
93
|
+
index
|
|
94
|
+
}, () => [
|
|
95
|
+
vue.createTextVNode(
|
|
96
|
+
vue.toDisplayString(item[radioProps.value.label]),
|
|
97
|
+
1
|
|
98
|
+
/* TEXT */
|
|
99
|
+
)
|
|
100
|
+
])
|
|
101
|
+
], 8, ["onClick"]);
|
|
102
|
+
}),
|
|
103
|
+
128
|
|
104
|
+
/* KEYED_FRAGMENT */
|
|
105
|
+
)),
|
|
106
|
+
selectIndex.value >= 0 ? (vue.openBlock(), vue.createElementBlock(
|
|
107
|
+
"li",
|
|
108
|
+
{
|
|
109
|
+
key: 0,
|
|
110
|
+
ref_key: "sliderRef",
|
|
111
|
+
ref: sliderRef,
|
|
112
|
+
class: "slider rounded box-border absolute h-full top-0 left-0 z-0 duration-500 border border-theme shadow-[0_0_6px_0] shadow-theme",
|
|
113
|
+
style: vue.normalizeStyle([{ width: `calc(100% / ${__props.options.length})` }, { "background": "linear-gradient(180deg, #2a4968 0%, #0ea0bb 100%)" }])
|
|
114
|
+
},
|
|
115
|
+
null,
|
|
116
|
+
4
|
|
117
|
+
/* STYLE */
|
|
118
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
119
|
+
],
|
|
120
|
+
2
|
|
121
|
+
/* CLASS */
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
exports.default = _sfc_main;
|
|
File without changes
|
|
@@ -60,6 +60,13 @@ const _sfc_main = {
|
|
|
60
60
|
form.setValueByProp(props.model, prop, val);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
+
const columnAttrs = vue.computed(() => {
|
|
64
|
+
return {
|
|
65
|
+
...props.column.attrs,
|
|
66
|
+
label: form.columnLabelHandler(props.column, props.model),
|
|
67
|
+
placeholder: form.columnPlaceholderHandler(props.column, props.model)
|
|
68
|
+
};
|
|
69
|
+
});
|
|
63
70
|
function onChangeHandler(value, column) {
|
|
64
71
|
emits("search");
|
|
65
72
|
}
|
|
@@ -100,14 +107,14 @@ const _sfc_main = {
|
|
|
100
107
|
"div",
|
|
101
108
|
{
|
|
102
109
|
class: vue.normalizeClass(["flex items-center text-auxiliary text-xs whitespace-nowrap", {
|
|
103
|
-
"border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || __props.column.
|
|
110
|
+
"border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || vue.unref(form.columnLabelHandler)(__props.column, props.model)
|
|
104
111
|
}])
|
|
105
112
|
},
|
|
106
113
|
[
|
|
107
114
|
__props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? vue.renderSlot(_ctx.$slots, __props.column.labelSlot, { column: __props.column }, void 0, void 0, 0) : (vue.openBlock(), vue.createElementBlock(
|
|
108
115
|
"span",
|
|
109
116
|
{ key: 1 },
|
|
110
|
-
vue.toDisplayString(__props.column.
|
|
117
|
+
vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model)),
|
|
111
118
|
1
|
|
112
119
|
/* TEXT */
|
|
113
120
|
))
|
|
@@ -132,7 +139,7 @@ const _sfc_main = {
|
|
|
132
139
|
vue.createVNode(vue.unref(index$1.HyInput), vue.mergeProps({
|
|
133
140
|
modelValue: bindValue.value,
|
|
134
141
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
135
|
-
},
|
|
142
|
+
}, columnAttrs.value, {
|
|
136
143
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
137
144
|
onKeydown: vue.withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
|
|
138
145
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
@@ -148,7 +155,7 @@ const _sfc_main = {
|
|
|
148
155
|
vue.createVNode(vue.unref(elementPlus.ElSelect), vue.mergeProps({
|
|
149
156
|
modelValue: bindValue.value,
|
|
150
157
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
151
|
-
},
|
|
158
|
+
}, columnAttrs.value, {
|
|
152
159
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
153
160
|
options: vue.unref(index.optionsHandler)(props, __props.column),
|
|
154
161
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
@@ -166,7 +173,7 @@ const _sfc_main = {
|
|
|
166
173
|
"daterange",
|
|
167
174
|
"monthrange",
|
|
168
175
|
"yearrange"
|
|
169
|
-
].includes(
|
|
176
|
+
].includes(columnAttrs.value?.type) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyDatePicker), vue.mergeProps({
|
|
170
177
|
key: 0,
|
|
171
178
|
start: bindValue.value,
|
|
172
179
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -175,7 +182,7 @@ const _sfc_main = {
|
|
|
175
182
|
"is-range": true,
|
|
176
183
|
style: { "width": "100%" },
|
|
177
184
|
timeRangeFill: __props.column.timeRangeFill
|
|
178
|
-
},
|
|
185
|
+
}, columnAttrs.value, {
|
|
179
186
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
180
187
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
181
188
|
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyDatePicker), vue.mergeProps({
|
|
@@ -185,7 +192,7 @@ const _sfc_main = {
|
|
|
185
192
|
"is-range": false,
|
|
186
193
|
style: { "width": "100%" },
|
|
187
194
|
timeRangeFill: __props.column.timeRangeFill
|
|
188
|
-
},
|
|
195
|
+
}, columnAttrs.value, {
|
|
189
196
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
190
197
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
191
198
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
|
|
@@ -197,7 +204,7 @@ const _sfc_main = {
|
|
|
197
204
|
{ key: 4 },
|
|
198
205
|
[
|
|
199
206
|
vue.createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
|
|
200
|
-
|
|
207
|
+
columnAttrs.value.isRange ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyTimePicker), vue.mergeProps({
|
|
201
208
|
key: 0,
|
|
202
209
|
start: bindValue.value,
|
|
203
210
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -205,7 +212,7 @@ const _sfc_main = {
|
|
|
205
212
|
"onUpdate:end": ($event) => bindValue2.value = $event,
|
|
206
213
|
"is-range": true,
|
|
207
214
|
style: { "width": "100%" }
|
|
208
|
-
},
|
|
215
|
+
}, columnAttrs.value, {
|
|
209
216
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
210
217
|
onChange: onChangeHandler
|
|
211
218
|
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyTimePicker), vue.mergeProps({
|
|
@@ -214,7 +221,7 @@ const _sfc_main = {
|
|
|
214
221
|
"onUpdate:modelValue": ($event) => bindValue.value = $event,
|
|
215
222
|
"is-range": false,
|
|
216
223
|
style: { "width": "100%" }
|
|
217
|
-
},
|
|
224
|
+
}, columnAttrs.value, {
|
|
218
225
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
219
226
|
onChange: onChangeHandler
|
|
220
227
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
|
|
@@ -229,7 +236,7 @@ const _sfc_main = {
|
|
|
229
236
|
vue.createVNode(vue.unref(index$4.HyOrgCascader), vue.mergeProps({
|
|
230
237
|
modelValue: bindValue.value,
|
|
231
238
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
232
|
-
},
|
|
239
|
+
}, columnAttrs.value, {
|
|
233
240
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
234
241
|
onChange: onChangeHandler
|
|
235
242
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
@@ -245,7 +252,7 @@ const _sfc_main = {
|
|
|
245
252
|
4
|
|
246
253
|
/* STYLE */
|
|
247
254
|
),
|
|
248
|
-
__props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(
|
|
255
|
+
__props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
249
256
|
key: 0,
|
|
250
257
|
class: "flex text-main select-none"
|
|
251
258
|
}, [
|
|
@@ -6,34 +6,6 @@ var form = require('../../../utils/form.js');
|
|
|
6
6
|
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
7
|
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
|
-
const genDefaultLabel = (config) => {
|
|
10
|
-
if (config.label) return config.label;
|
|
11
|
-
const { t } = useLocale.useLocale();
|
|
12
|
-
switch (config.type) {
|
|
13
|
-
// 部门级联选择框
|
|
14
|
-
case "org-cascader":
|
|
15
|
-
return t("form.department");
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const genPlaceholderHandler = (config) => {
|
|
19
|
-
const { t } = useLocale.useLocale();
|
|
20
|
-
const { type, label, attrs = {} } = config || {};
|
|
21
|
-
let placeholder = attrs.placeholder, startPlaceholder = attrs.startPlaceholder, endPlaceholder = attrs.endPlaceholder;
|
|
22
|
-
switch (type) {
|
|
23
|
-
case "input":
|
|
24
|
-
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
25
|
-
break;
|
|
26
|
-
case "select":
|
|
27
|
-
case "date-picker":
|
|
28
|
-
case "time-picker":
|
|
29
|
-
case "org-cascader":
|
|
30
|
-
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
31
|
-
break;
|
|
32
|
-
default:
|
|
33
|
-
placeholder = placeholder || label;
|
|
34
|
-
}
|
|
35
|
-
return { placeholder, startPlaceholder, endPlaceholder };
|
|
36
|
-
};
|
|
37
9
|
const genColumnWidth = (config) => {
|
|
38
10
|
let { width, inputWidth, type, attrs } = config || {};
|
|
39
11
|
if (!width && !inputWidth) {
|
|
@@ -86,12 +58,10 @@ const timeRangeOptionsHandler = (config) => {
|
|
|
86
58
|
}, []);
|
|
87
59
|
};
|
|
88
60
|
function appSearchItemHandler(column = {}) {
|
|
89
|
-
const label =
|
|
90
|
-
const { placeholder} = genPlaceholderHandler({ ...column, label });
|
|
61
|
+
const label = form.genColumnDefaultLabel(column);
|
|
91
62
|
const attrs = {
|
|
92
63
|
clearable: true,
|
|
93
|
-
...column.attrs || {}
|
|
94
|
-
placeholder
|
|
64
|
+
...column.attrs || {}
|
|
95
65
|
};
|
|
96
66
|
const { width, inputWidth } = genColumnWidth(column);
|
|
97
67
|
column = handler.mergeDeep(
|
|
@@ -461,7 +461,15 @@ const _sfc_main = {
|
|
|
461
461
|
}, {
|
|
462
462
|
default: vue.withCtx(() => [
|
|
463
463
|
vue.createElementVNode("div", {
|
|
464
|
-
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent
|
|
464
|
+
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border", [
|
|
465
|
+
citem.className,
|
|
466
|
+
vue.unref(index.operatorDisabledHandler)(citem, {
|
|
467
|
+
column,
|
|
468
|
+
row,
|
|
469
|
+
$index,
|
|
470
|
+
cellIndex
|
|
471
|
+
}) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
|
|
472
|
+
]]),
|
|
465
473
|
onClick: ($event) => vue.unref(index.operatorClickHandler)(
|
|
466
474
|
cindex,
|
|
467
475
|
column,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var elementPlus = require('element-plus');
|
|
5
|
-
var is = require('../../../utils/is.js');
|
|
6
|
-
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
5
|
var usePermissionMap = require('../../../hooks/usePermissionMap.js');
|
|
6
|
+
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
|
+
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
9
|
function tableColumnShowHandler(column) {
|
|
10
10
|
if (column.permission && !is.isPermission(column.permission)) {
|
|
@@ -125,6 +125,7 @@ function operatorFilterHandler(column, scope, type = "all") {
|
|
|
125
125
|
function operatorClickHandler(command, column, scope, type = "all") {
|
|
126
126
|
const operator = operatorFilterHandler(column, scope, type);
|
|
127
127
|
const target = operator[command];
|
|
128
|
+
if (operatorDisabledHandler(target, scope)) return;
|
|
128
129
|
target?.handler && target.handler(scope);
|
|
129
130
|
}
|
|
130
131
|
function renderHeaderHandler(column, scope) {
|
|
@@ -396,7 +397,9 @@ const useAppTableWrapper = (hy) => {
|
|
|
396
397
|
// 搜索选中
|
|
397
398
|
isSearchFocus,
|
|
398
399
|
onSearchInputHandler,
|
|
399
|
-
onSearchBlurHandler
|
|
400
|
+
onSearchBlurHandler,
|
|
401
|
+
showAppTableLoading,
|
|
402
|
+
closeAppTableLoading
|
|
400
403
|
};
|
|
401
404
|
};
|
|
402
405
|
|
|
@@ -5,18 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
-
var index
|
|
8
|
+
var index = require('./js/index.js');
|
|
9
9
|
var search = require('./js/search.js');
|
|
10
10
|
var headerItem = require('./cpns/headerItem.vue.js');
|
|
11
11
|
var columnSelect = require('./cpns/columnSelect.vue.js');
|
|
12
12
|
var virtualTable = require('./cpns/virtualTable.vue.js');
|
|
13
13
|
var useLocale = require('../../hooks/useLocale.js');
|
|
14
14
|
var useMixins = require('../../hooks/useMixins.js');
|
|
15
|
-
var index = require('../hyIcon/index.js');
|
|
16
|
-
var index$
|
|
17
|
-
var index$
|
|
18
|
-
var index$
|
|
19
|
-
var index$
|
|
15
|
+
var index$1 = require('../hyIcon/index.js');
|
|
16
|
+
var index$2 = require('../hyTooltip/index.js');
|
|
17
|
+
var index$3 = require('../hyInput/index.js');
|
|
18
|
+
var index$4 = require('../hyButton/index.js');
|
|
19
|
+
var index$5 = require('../hySearch/index.js');
|
|
20
20
|
var adaptive = require('../../utils/adaptive.js');
|
|
21
21
|
var is = require('../../utils/is.js');
|
|
22
22
|
|
|
@@ -252,7 +252,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
252
252
|
getTableDataSource,
|
|
253
253
|
onSizeChangeHandler,
|
|
254
254
|
onCurrentChangeHandler,
|
|
255
|
-
onSearchQueryHandler
|
|
255
|
+
onSearchQueryHandler,
|
|
256
|
+
showAppTableLoading,
|
|
257
|
+
closeAppTableLoading
|
|
256
258
|
} = useMixins.useMixins(
|
|
257
259
|
{
|
|
258
260
|
props,
|
|
@@ -264,7 +266,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
264
266
|
operatorDropdownRef,
|
|
265
267
|
appSearchRef
|
|
266
268
|
},
|
|
267
|
-
[index
|
|
269
|
+
[index.useAppTableWrapper, search.useAppTableSearch]
|
|
268
270
|
);
|
|
269
271
|
if (props.defaultGetData) {
|
|
270
272
|
getData(1);
|
|
@@ -279,7 +281,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
279
281
|
getTableDataSource,
|
|
280
282
|
clearSelection,
|
|
281
283
|
clearSelectedList,
|
|
282
|
-
toggleRowExpansion
|
|
284
|
+
toggleRowExpansion,
|
|
285
|
+
showAppTableLoading,
|
|
286
|
+
closeAppTableLoading
|
|
283
287
|
});
|
|
284
288
|
return (_ctx, _cache) => {
|
|
285
289
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -308,7 +312,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
308
312
|
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2",
|
|
309
313
|
onClick: vue.unref(switchShowFilter)
|
|
310
314
|
}, [
|
|
311
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
315
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
312
316
|
"svg-name": "ops-button-screen",
|
|
313
317
|
"class-name": "!w-3 !h-3"
|
|
314
318
|
}),
|
|
@@ -320,7 +324,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
320
324
|
/* TEXT */
|
|
321
325
|
)
|
|
322
326
|
], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
|
|
323
|
-
vue.unref(searchPlaceholder) ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
327
|
+
vue.unref(searchPlaceholder) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
324
328
|
key: 2,
|
|
325
329
|
"is-always": "",
|
|
326
330
|
overLine: 1,
|
|
@@ -332,7 +336,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
332
336
|
}, null, 8, ["innerHTML"])
|
|
333
337
|
]),
|
|
334
338
|
default: vue.withCtx(() => [
|
|
335
|
-
vue.createVNode(vue.unref(index$
|
|
339
|
+
vue.createVNode(vue.unref(index$3.HyInputSearch), {
|
|
336
340
|
modelValue: __props.filterModel.query,
|
|
337
341
|
"onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
|
|
338
342
|
placeholder: vue.unref(t)("table.searchFor", [__props.controllerText || ""]),
|
|
@@ -341,13 +345,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
341
345
|
]),
|
|
342
346
|
_: 1
|
|
343
347
|
/* STABLE */
|
|
344
|
-
})) : (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
348
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyButton), {
|
|
345
349
|
key: 3,
|
|
346
350
|
type: "primary",
|
|
347
351
|
onClick: ($event) => vue.unref(getData)()
|
|
348
352
|
}, {
|
|
349
353
|
default: vue.withCtx(() => [
|
|
350
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
354
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
351
355
|
class: "w-[12px] h-[12px]",
|
|
352
356
|
"svg-name": "ops-button-icon-refres-v2"
|
|
353
357
|
})
|
|
@@ -365,7 +369,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
365
369
|
])) : vue.createCommentVNode("v-if", true)
|
|
366
370
|
])) : vue.createCommentVNode("v-if", true),
|
|
367
371
|
vue.createCommentVNode(" \u67E5\u8BE2\u8FC7\u6EE4 "),
|
|
368
|
-
__props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
372
|
+
__props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.HySearch), {
|
|
369
373
|
key: 1,
|
|
370
374
|
ref_key: "appSearchRef",
|
|
371
375
|
ref: appSearchRef,
|
|
@@ -449,11 +453,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
449
453
|
}, {
|
|
450
454
|
default: vue.withCtx(() => [
|
|
451
455
|
vue.renderSlot(_ctx.$slots, column.headerSlot, vue.mergeProps({ ref_for: true }, { column, $index: scope.$index }), () => [
|
|
452
|
-
!vue.unref(is.isEmpty)(vue.unref(index
|
|
456
|
+
!vue.unref(is.isEmpty)(vue.unref(index.renderHeaderHandler)(column, scope)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
453
457
|
key: 0,
|
|
454
458
|
"is-always": false,
|
|
455
459
|
"over-line": 1,
|
|
456
|
-
content: vue.unref(index
|
|
460
|
+
content: vue.unref(index.renderHeaderHandler)(column, scope)
|
|
457
461
|
}, null, 8, ["content"])) : vue.createCommentVNode("v-if", true)
|
|
458
462
|
])
|
|
459
463
|
]),
|
|
@@ -469,12 +473,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
469
473
|
(vue.openBlock(true), vue.createElementBlock(
|
|
470
474
|
vue.Fragment,
|
|
471
475
|
null,
|
|
472
|
-
vue.renderList(vue.unref(index
|
|
476
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
473
477
|
column,
|
|
474
478
|
scope,
|
|
475
479
|
"default"
|
|
476
480
|
), (citem, cindex) => {
|
|
477
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
481
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
478
482
|
key: cindex,
|
|
479
483
|
"is-always": "",
|
|
480
484
|
overLine: 1,
|
|
@@ -482,12 +486,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
482
486
|
}, {
|
|
483
487
|
default: vue.withCtx(() => [
|
|
484
488
|
vue.createElementVNode("div", {
|
|
485
|
-
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border
|
|
486
|
-
|
|
489
|
+
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border", [
|
|
490
|
+
citem.className,
|
|
491
|
+
vue.unref(index.operatorDisabledHandler)(citem, scope) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
|
|
492
|
+
]]),
|
|
493
|
+
onClick: vue.withModifiers(($event) => vue.unref(index.operatorClickHandler)(cindex, column, scope, "default"), ["stop"]),
|
|
487
494
|
onContextmenu: vue.withModifiers(() => {
|
|
488
495
|
}, ["stop"])
|
|
489
496
|
}, [
|
|
490
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
497
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
491
498
|
"svg-name": citem.svgName,
|
|
492
499
|
"class-name": "!w-4 !h-4"
|
|
493
500
|
}, null, 8, ["svg-name"]),
|
|
@@ -513,7 +520,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
513
520
|
128
|
|
514
521
|
/* KEYED_FRAGMENT */
|
|
515
522
|
)),
|
|
516
|
-
vue.unref(index
|
|
523
|
+
vue.unref(index.operatorFilterHandler)(column, scope, "more")?.length ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
|
|
517
524
|
key: 0,
|
|
518
525
|
ref_for: true,
|
|
519
526
|
ref_key: "operatorDropdownRef",
|
|
@@ -521,7 +528,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
521
528
|
trigger: "click",
|
|
522
529
|
"popper-style": "min-width: 150px",
|
|
523
530
|
placement: "bottom",
|
|
524
|
-
onCommand: ($event) => vue.unref(index
|
|
531
|
+
onCommand: ($event) => vue.unref(index.operatorClickHandler)($event, column, scope, "more")
|
|
525
532
|
}, {
|
|
526
533
|
dropdown: vue.withCtx(() => [
|
|
527
534
|
vue.createVNode(
|
|
@@ -532,7 +539,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
532
539
|
(vue.openBlock(true), vue.createElementBlock(
|
|
533
540
|
vue.Fragment,
|
|
534
541
|
null,
|
|
535
|
-
vue.renderList(vue.unref(index
|
|
542
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
536
543
|
column,
|
|
537
544
|
scope,
|
|
538
545
|
"more"
|
|
@@ -540,7 +547,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
540
547
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
541
548
|
key: cindex,
|
|
542
549
|
command: cindex,
|
|
543
|
-
disabled: vue.unref(index
|
|
550
|
+
disabled: vue.unref(index.operatorDisabledHandler)(citem, scope)
|
|
544
551
|
}, {
|
|
545
552
|
default: vue.withCtx(() => [
|
|
546
553
|
vue.createElementVNode("span", null, [
|
|
@@ -551,13 +558,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
551
558
|
1
|
|
552
559
|
/* TEXT */
|
|
553
560
|
),
|
|
554
|
-
vue.unref(index
|
|
561
|
+
vue.unref(index.operatorDisabledHandler)(citem, scope) ? (vue.openBlock(), vue.createElementBlock(
|
|
555
562
|
"span",
|
|
556
563
|
{
|
|
557
564
|
key: 0,
|
|
558
565
|
class: "text-xs leading-1"
|
|
559
566
|
},
|
|
560
|
-
"\uFF08" + vue.toDisplayString(vue.unref(index
|
|
567
|
+
"\uFF08" + vue.toDisplayString(vue.unref(index.operatorDisableTextdHandler)(citem, scope)) + "\uFF09",
|
|
561
568
|
1
|
|
562
569
|
/* TEXT */
|
|
563
570
|
)) : vue.createCommentVNode("v-if", true)
|
|
@@ -585,7 +592,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
585
592
|
onContextmenu: vue.withModifiers(() => {
|
|
586
593
|
}, ["stop"])
|
|
587
594
|
}, [
|
|
588
|
-
vue.createVNode(vue.unref(index$
|
|
595
|
+
vue.createVNode(vue.unref(index$2.HyTooltip), {
|
|
589
596
|
"is-always": "",
|
|
590
597
|
overLine: 1,
|
|
591
598
|
content: vue.unref(t)("table.moreOperations")
|
|
@@ -623,11 +630,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
623
630
|
vue.Fragment,
|
|
624
631
|
{ key: 2 },
|
|
625
632
|
[
|
|
626
|
-
!vue.unref(is.isEmpty)(vue.unref(index
|
|
633
|
+
!vue.unref(is.isEmpty)(vue.unref(index.renderContentHandler)(column, scope)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
627
634
|
key: 0,
|
|
628
635
|
"over-line": 2,
|
|
629
636
|
"is-always": false,
|
|
630
|
-
content: vue.unref(index
|
|
637
|
+
content: vue.unref(index.renderContentHandler)(column, scope)
|
|
631
638
|
}, null, 8, ["content"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
632
639
|
key: 1,
|
|
633
640
|
class: "text-auxiliary"
|
|
@@ -754,7 +761,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
754
761
|
"virtual-triggering": "",
|
|
755
762
|
trigger: "contextmenu",
|
|
756
763
|
placement: "bottom",
|
|
757
|
-
onCommand: ($event) => vue.unref(index
|
|
764
|
+
onCommand: ($event) => vue.unref(index.operatorClickHandler)(
|
|
758
765
|
$event,
|
|
759
766
|
vue.unref(tableTriggerRef).column,
|
|
760
767
|
vue.unref(tableTriggerRef).scope
|
|
@@ -766,14 +773,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
766
773
|
(vue.openBlock(true), vue.createElementBlock(
|
|
767
774
|
vue.Fragment,
|
|
768
775
|
null,
|
|
769
|
-
vue.renderList(vue.unref(index
|
|
776
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
770
777
|
vue.unref(tableTriggerRef).column,
|
|
771
778
|
vue.unref(tableTriggerRef).scope
|
|
772
779
|
), (citem, cindex) => {
|
|
773
780
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
774
781
|
key: cindex,
|
|
775
782
|
command: cindex,
|
|
776
|
-
disabled: vue.unref(index
|
|
783
|
+
disabled: vue.unref(index.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope)
|
|
777
784
|
}, {
|
|
778
785
|
default: vue.withCtx(() => [
|
|
779
786
|
vue.createElementVNode("span", null, [
|
|
@@ -784,13 +791,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
784
791
|
1
|
|
785
792
|
/* TEXT */
|
|
786
793
|
),
|
|
787
|
-
vue.unref(index
|
|
794
|
+
vue.unref(index.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope) ? (vue.openBlock(), vue.createElementBlock(
|
|
788
795
|
"span",
|
|
789
796
|
{
|
|
790
797
|
key: 0,
|
|
791
798
|
class: "text-xs leading-1"
|
|
792
799
|
},
|
|
793
|
-
"\uFF08" + vue.toDisplayString(vue.unref(index
|
|
800
|
+
"\uFF08" + vue.toDisplayString(vue.unref(index.operatorDisableTextdHandler)(citem, vue.unref(tableTriggerRef).scope)) + "\uFF09",
|
|
794
801
|
1
|
|
795
802
|
/* TEXT */
|
|
796
803
|
)) : vue.createCommentVNode("v-if", true)
|