@dao-style/core 0.3.2 → 0.4.2
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/components/batch-bar/batch-bar.vue.d.ts +47 -0
- package/dist/components/batch-bar/index.d.ts +2 -0
- package/dist/components/batch-bar/props.d.ts +20 -0
- package/dist/components/batch-bar/test/batch-bar.spec.d.ts +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb-props.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +3 -3
- package/dist/components/expansion/expansion-item.vue.d.ts +5 -3
- package/dist/components/expansion/expansion.vue.d.ts +4 -4
- package/dist/components/expansion/props.d.ts +2 -2
- package/dist/components/header/props.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/nav/props.d.ts +1 -1
- package/dist/components/pagination/pagination-props.d.ts +4 -0
- package/dist/components/pagination/pagination.vue.d.ts +7 -0
- package/dist/components/radio/radio.vue.d.ts +2 -2
- package/dist/components/select/props.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +1 -1
- package/dist/components/table/table-props.d.ts +50 -6
- package/dist/components/table/table.vue.d.ts +102 -10
- package/dist/components/tabs/tab-item.vue.d.ts +1 -1
- package/dist/components/tag/tag.vue.d.ts +2 -2
- package/dist/components/text-button/text-button.vue.d.ts +3 -3
- package/dist/components/toolbar/toolbar-props.d.ts +33 -0
- package/dist/components/toolbar/toolbar.vue.d.ts +15 -9
- package/dist/components/transfer/transfer.vue.d.ts +1 -1
- package/dist/dao-style.es.js +1987 -1750
- package/dist/dao-style.umd.js +1 -1
- package/dist/locales/en-US.d.ts +5 -0
- package/dist/locales/zh-CN.d.ts +5 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/volar.d.ts +1 -0
package/dist/dao-style.es.js
CHANGED
|
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock,
|
|
21
|
-
import { isArray as isArray$2, isSet, looseIndexOf, looseEqual, isFunction as isFunction$1, NOOP } from "@vue/shared";
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, toRef, h, toDisplayString, createVNode, withCtx, createTextVNode, ref, inject, watchEffect, mergeProps, provide, readonly, toRefs, withKeys, normalizeStyle, withDirectives, vShow, watch, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, Transition, nextTick, resolveDynamicComponent, createSlots, withModifiers, reactive, renderList, getCurrentScope, onScopeDispose, vModelText, onUnmounted } from "vue";
|
|
22
21
|
import { useI18n } from "vue-i18n";
|
|
22
|
+
import { isFunction as isFunction$1, isArray as isArray$2, isSet, looseIndexOf, looseEqual, NOOP } from "@vue/shared";
|
|
23
23
|
var common = "";
|
|
24
24
|
var actionIcon_vue_vue_type_style_index_0_lang = "";
|
|
25
25
|
var _export_sfc = (sfc, props) => {
|
|
@@ -28,7 +28,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
28
28
|
}
|
|
29
29
|
return sfc;
|
|
30
30
|
};
|
|
31
|
-
const _sfc_main$
|
|
31
|
+
const _sfc_main$R = defineComponent({
|
|
32
32
|
name: "DaoActionIcon",
|
|
33
33
|
props: {
|
|
34
34
|
name: {
|
|
@@ -61,8 +61,8 @@ const _sfc_main$Q = defineComponent({
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
const _hoisted_1$
|
|
65
|
-
function _sfc_render$
|
|
64
|
+
const _hoisted_1$B = ["disabled"];
|
|
65
|
+
function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
66
66
|
return openBlock(), createElementBlock("button", {
|
|
67
67
|
class: normalizeClass([
|
|
68
68
|
"dao-action-icon",
|
|
@@ -78,9 +78,9 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
78
|
class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
|
|
79
79
|
}, null, 2)) : createCommentVNode("", true)
|
|
80
80
|
])
|
|
81
|
-
], 10, _hoisted_1$
|
|
81
|
+
], 10, _hoisted_1$B);
|
|
82
82
|
}
|
|
83
|
-
var DaoActionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
83
|
+
var DaoActionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$N]]);
|
|
84
84
|
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
|
|
85
85
|
var buttonProps = {
|
|
86
86
|
type: {
|
|
@@ -119,7 +119,7 @@ var buttonProps = {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
var icon_scss_vue_type_style_index_0_src_lang = "";
|
|
122
|
-
const _sfc_main$
|
|
122
|
+
const _sfc_main$Q = defineComponent({
|
|
123
123
|
name: "DaoIcon",
|
|
124
124
|
props: {
|
|
125
125
|
name: {
|
|
@@ -132,28 +132,28 @@ const _sfc_main$P = defineComponent({
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
|
-
const _hoisted_1$
|
|
135
|
+
const _hoisted_1$A = {
|
|
136
136
|
key: 1,
|
|
137
137
|
class: "dao-icon dao-svg-icon"
|
|
138
138
|
};
|
|
139
|
-
const _hoisted_2$
|
|
140
|
-
function _sfc_render$
|
|
139
|
+
const _hoisted_2$q = ["xlink:href"];
|
|
140
|
+
function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
141
141
|
return _ctx.useFont ? (openBlock(), createElementBlock("i", {
|
|
142
142
|
key: 0,
|
|
143
143
|
class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
|
|
144
|
-
}, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
144
|
+
}, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$A, [
|
|
145
145
|
createElementVNode("use", {
|
|
146
146
|
"xlink:href": `#${_ctx.name}`
|
|
147
|
-
}, null, 8, _hoisted_2$
|
|
147
|
+
}, null, 8, _hoisted_2$q)
|
|
148
148
|
]));
|
|
149
149
|
}
|
|
150
|
-
var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
150
|
+
var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$M]]);
|
|
151
151
|
var button_vue_vue_type_style_index_0_lang = "";
|
|
152
152
|
const NO_ICON = Symbol(0);
|
|
153
153
|
const RIGHT_ICON = Symbol(1);
|
|
154
154
|
const LEFT_ICON = Symbol(2);
|
|
155
155
|
const BOTH_ICON = Symbol(3);
|
|
156
|
-
const _sfc_main$
|
|
156
|
+
const _sfc_main$P = defineComponent({
|
|
157
157
|
name: "DaoButton",
|
|
158
158
|
components: {
|
|
159
159
|
DaoIcon
|
|
@@ -244,12 +244,12 @@ const _sfc_main$O = defineComponent({
|
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
|
-
const _hoisted_1$
|
|
248
|
-
const _hoisted_2$
|
|
247
|
+
const _hoisted_1$z = ["disabled"];
|
|
248
|
+
const _hoisted_2$p = {
|
|
249
249
|
key: 1,
|
|
250
250
|
class: "dao-btn__text"
|
|
251
251
|
};
|
|
252
|
-
function _sfc_render$
|
|
252
|
+
function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
253
253
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
254
254
|
return openBlock(), createElementBlock("button", {
|
|
255
255
|
class: normalizeClass(_ctx.classList),
|
|
@@ -263,7 +263,7 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
263
263
|
"use-font": _ctx.isIconLeftFont,
|
|
264
264
|
name: _ctx.realIconLeft
|
|
265
265
|
}, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true),
|
|
266
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
266
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$p, [
|
|
267
267
|
renderSlot(_ctx.$slots, "default")
|
|
268
268
|
])) : createCommentVNode("", true),
|
|
269
269
|
_ctx.realIconRight ? (openBlock(), createBlock(_component_dao_icon, {
|
|
@@ -273,11 +273,171 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
273
273
|
name: _ctx.realIconRight
|
|
274
274
|
}, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true)
|
|
275
275
|
], 64))
|
|
276
|
-
], 10, _hoisted_1$
|
|
276
|
+
], 10, _hoisted_1$z);
|
|
277
277
|
}
|
|
278
|
-
var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
279
|
-
|
|
278
|
+
var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$L]]);
|
|
279
|
+
const textButtonType = ["default", "action", "link", "custom"];
|
|
280
|
+
var TextButtonProps = {
|
|
281
|
+
tag: {
|
|
282
|
+
type: [Object, String],
|
|
283
|
+
default: "button"
|
|
284
|
+
},
|
|
285
|
+
prop: {
|
|
286
|
+
type: Object,
|
|
287
|
+
default: () => ({
|
|
288
|
+
type: "default"
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
var textButton_vue_vue_type_style_index_0_lang = "";
|
|
293
|
+
const _sfc_main$O = defineComponent({
|
|
294
|
+
name: "DaoTextButton",
|
|
295
|
+
components: {
|
|
296
|
+
DaoIcon
|
|
297
|
+
},
|
|
298
|
+
props: TextButtonProps,
|
|
299
|
+
setup(props, { slots, attrs }) {
|
|
300
|
+
const prop = toRef(props, "prop");
|
|
301
|
+
const computedType = computed(() => {
|
|
302
|
+
var _a2;
|
|
303
|
+
return ((_a2 = prop.value) == null ? void 0 : _a2.type) && textButtonType.includes(prop.value.type) ? prop.value.type : "custom";
|
|
304
|
+
});
|
|
305
|
+
const componentComputed = computed(() => ({
|
|
306
|
+
class: [
|
|
307
|
+
"dao-text-button",
|
|
308
|
+
`dao-text-button--${computedType.value}`,
|
|
309
|
+
attrs.disabled ? "is-disabled" : ""
|
|
310
|
+
]
|
|
311
|
+
}));
|
|
312
|
+
const iconTemp = computed(() => {
|
|
313
|
+
var _a2, _b2;
|
|
314
|
+
return ((_a2 = prop.value) == null ? void 0 : _a2.icon) ? h(DaoIcon, {
|
|
315
|
+
name: (_b2 = prop.value) == null ? void 0 : _b2.icon,
|
|
316
|
+
"use-font": true,
|
|
317
|
+
class: "dao-text-button__icon"
|
|
318
|
+
}) : null;
|
|
319
|
+
});
|
|
320
|
+
const slotTemp = computed(() => {
|
|
321
|
+
const _slots = __spreadValues({
|
|
322
|
+
default: () => ""
|
|
323
|
+
}, slots);
|
|
324
|
+
return Object.fromEntries(Object.entries(_slots).map(([key, item]) => {
|
|
325
|
+
const newSlot = isFunction$1(item) ? item : () => item || null;
|
|
326
|
+
if (key === "default") {
|
|
327
|
+
return [
|
|
328
|
+
key,
|
|
329
|
+
(...args) => {
|
|
330
|
+
const defaultSlot = newSlot.call(null, ...args);
|
|
331
|
+
return [
|
|
332
|
+
iconTemp.value,
|
|
333
|
+
defaultSlot ? h("span", { class: "dao-text-button__slot" }, { default: () => defaultSlot }) : ""
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
];
|
|
337
|
+
}
|
|
338
|
+
return [key, newSlot];
|
|
339
|
+
}));
|
|
340
|
+
});
|
|
341
|
+
return () => h(props.tag, __spreadValues({}, componentComputed.value), slotTemp.value);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
const BatchBarProps = {
|
|
345
|
+
total: {
|
|
346
|
+
type: Number,
|
|
347
|
+
default: 0
|
|
348
|
+
},
|
|
349
|
+
selectedFormat: {
|
|
350
|
+
type: Function,
|
|
351
|
+
default: void 0
|
|
352
|
+
},
|
|
353
|
+
deselectText: {
|
|
354
|
+
type: String,
|
|
355
|
+
default: void 0
|
|
356
|
+
},
|
|
357
|
+
removeText: {
|
|
358
|
+
type: String,
|
|
359
|
+
default: void 0
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
var batchBar_vue_vue_type_style_index_0_lang = "";
|
|
280
363
|
const _sfc_main$N = defineComponent({
|
|
364
|
+
name: "DaoBatchBar",
|
|
365
|
+
components: {
|
|
366
|
+
DaoButton,
|
|
367
|
+
DaoTextButton: _sfc_main$O
|
|
368
|
+
},
|
|
369
|
+
props: BatchBarProps,
|
|
370
|
+
emits: ["delete", "deselect"],
|
|
371
|
+
setup: (props, { emit }) => {
|
|
372
|
+
var _a2;
|
|
373
|
+
const { t } = useI18n();
|
|
374
|
+
const selectedFormatFun = (_a2 = props.selectedFormat) != null ? _a2 : (total) => t("core.batchBar.selectedFormat", {
|
|
375
|
+
n: total
|
|
376
|
+
});
|
|
377
|
+
const text = computed(() => {
|
|
378
|
+
var _a3, _b2;
|
|
379
|
+
return {
|
|
380
|
+
remove: (_a3 = props.removeText) != null ? _a3 : t("core.batchBar.removeText"),
|
|
381
|
+
deselect: (_b2 = props.deselectText) != null ? _b2 : t("core.batchBar.deselectText"),
|
|
382
|
+
selected: selectedFormatFun(props.total)
|
|
383
|
+
};
|
|
384
|
+
});
|
|
385
|
+
const onHandleDeselect = () => {
|
|
386
|
+
emit("deselect");
|
|
387
|
+
};
|
|
388
|
+
const onHandleDelete = () => {
|
|
389
|
+
emit("delete");
|
|
390
|
+
};
|
|
391
|
+
const showSelf = computed(() => props.total > 0);
|
|
392
|
+
return {
|
|
393
|
+
text,
|
|
394
|
+
showSelf,
|
|
395
|
+
onHandleDelete,
|
|
396
|
+
onHandleDeselect
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
const _hoisted_1$y = {
|
|
401
|
+
key: 0,
|
|
402
|
+
class: "dao-batch-bar"
|
|
403
|
+
};
|
|
404
|
+
const _hoisted_2$o = { class: "dao-batch-bar__text" };
|
|
405
|
+
const _hoisted_3$f = { class: "dao-batch-bar__text--select" };
|
|
406
|
+
const _hoisted_4$c = { class: "dao-batch-bar__action" };
|
|
407
|
+
function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
408
|
+
const _component_dao_text_button = resolveComponent("dao-text-button");
|
|
409
|
+
const _component_dao_button = resolveComponent("dao-button");
|
|
410
|
+
return _ctx.showSelf ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
411
|
+
createElementVNode("div", _hoisted_2$o, [
|
|
412
|
+
createElementVNode("span", _hoisted_3$f, toDisplayString(_ctx.text.selected), 1),
|
|
413
|
+
createVNode(_component_dao_text_button, {
|
|
414
|
+
class: "dao-batch-bar__text--deselect",
|
|
415
|
+
onClick: _ctx.onHandleDeselect
|
|
416
|
+
}, {
|
|
417
|
+
default: withCtx(() => [
|
|
418
|
+
createTextVNode(toDisplayString(_ctx.text.deselect), 1)
|
|
419
|
+
]),
|
|
420
|
+
_: 1
|
|
421
|
+
}, 8, ["onClick"])
|
|
422
|
+
]),
|
|
423
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
424
|
+
renderSlot(_ctx.$slots, "default", { onDelete: _ctx.onHandleDelete }, () => [
|
|
425
|
+
createVNode(_component_dao_button, {
|
|
426
|
+
type: "danger",
|
|
427
|
+
onClick: _ctx.onHandleDelete
|
|
428
|
+
}, {
|
|
429
|
+
default: withCtx(() => [
|
|
430
|
+
createTextVNode(toDisplayString(_ctx.text.remove), 1)
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["onClick"])
|
|
434
|
+
])
|
|
435
|
+
])
|
|
436
|
+
])) : createCommentVNode("", true);
|
|
437
|
+
}
|
|
438
|
+
var DaoBatchBar = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$K]]);
|
|
439
|
+
var buttonGroup_vue_vue_type_style_index_0_lang = "";
|
|
440
|
+
const _sfc_main$M = defineComponent({
|
|
281
441
|
name: "DaoButtonGroup"
|
|
282
442
|
});
|
|
283
443
|
const _hoisted_1$x = { class: "dao-btn-group" };
|
|
@@ -286,9 +446,9 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
286
446
|
renderSlot(_ctx.$slots, "default")
|
|
287
447
|
]);
|
|
288
448
|
}
|
|
289
|
-
var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
449
|
+
var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$J]]);
|
|
290
450
|
var card_scss_vue_type_style_index_0_src_lang = "";
|
|
291
|
-
const _sfc_main$
|
|
451
|
+
const _sfc_main$L = defineComponent({
|
|
292
452
|
name: "DaoCard",
|
|
293
453
|
components: {
|
|
294
454
|
DaoIcon
|
|
@@ -371,9 +531,9 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
371
531
|
], 2)
|
|
372
532
|
], 2);
|
|
373
533
|
}
|
|
374
|
-
var card = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
534
|
+
var card = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$I]]);
|
|
375
535
|
var cardItem_scss_vue_type_style_index_0_src_lang = "";
|
|
376
|
-
const _sfc_main$
|
|
536
|
+
const _sfc_main$K = defineComponent({
|
|
377
537
|
name: "DaoCardItem"
|
|
378
538
|
});
|
|
379
539
|
const _hoisted_1$v = { class: "dao-card-item" };
|
|
@@ -382,7 +542,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
382
542
|
renderSlot(_ctx.$slots, "default")
|
|
383
543
|
]);
|
|
384
544
|
}
|
|
385
|
-
var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
545
|
+
var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$H]]);
|
|
386
546
|
function isNullish(val) {
|
|
387
547
|
return val === null || val === void 0;
|
|
388
548
|
}
|
|
@@ -425,7 +585,7 @@ function getUnrefItem(set, item) {
|
|
|
425
585
|
index: index2
|
|
426
586
|
};
|
|
427
587
|
}
|
|
428
|
-
const _sfc_main$
|
|
588
|
+
const _sfc_main$J = defineComponent({
|
|
429
589
|
name: "DaoCheckbox",
|
|
430
590
|
props: {
|
|
431
591
|
modelValue: {
|
|
@@ -609,9 +769,9 @@ function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
609
769
|
])) : createCommentVNode("", true)
|
|
610
770
|
], 2);
|
|
611
771
|
}
|
|
612
|
-
var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
772
|
+
var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$G]]);
|
|
613
773
|
var checkboxGroup_vue_vue_type_style_index_0_lang = "";
|
|
614
|
-
const _sfc_main$
|
|
774
|
+
const _sfc_main$I = defineComponent({
|
|
615
775
|
name: "DaoCheckboxGroup",
|
|
616
776
|
props: {
|
|
617
777
|
modelValue: {
|
|
@@ -652,7 +812,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
652
812
|
renderSlot(_ctx.$slots, "default")
|
|
653
813
|
], 2);
|
|
654
814
|
}
|
|
655
|
-
var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
815
|
+
var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$F]]);
|
|
656
816
|
var top = "top";
|
|
657
817
|
var bottom = "bottom";
|
|
658
818
|
var right = "right";
|
|
@@ -1851,7 +2011,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
|
|
|
1851
2011
|
var createPopper = /* @__PURE__ */ popperGenerator({
|
|
1852
2012
|
defaultModifiers
|
|
1853
2013
|
});
|
|
1854
|
-
const _sfc_main$
|
|
2014
|
+
const _sfc_main$H = defineComponent({
|
|
1855
2015
|
name: "PopperContent",
|
|
1856
2016
|
props: {
|
|
1857
2017
|
popperId: {
|
|
@@ -1945,7 +2105,7 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1945
2105
|
])
|
|
1946
2106
|
], 42, _hoisted_1$t);
|
|
1947
2107
|
}
|
|
1948
|
-
var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2108
|
+
var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$E]]);
|
|
1949
2109
|
var PopperProps = {
|
|
1950
2110
|
modelValue: {
|
|
1951
2111
|
type: Boolean,
|
|
@@ -2051,7 +2211,7 @@ function getActualRoot(app) {
|
|
|
2051
2211
|
}
|
|
2052
2212
|
return internalRoot;
|
|
2053
2213
|
}
|
|
2054
|
-
const _sfc_main$
|
|
2214
|
+
const _sfc_main$G = defineComponent({
|
|
2055
2215
|
name: "DaoPopper",
|
|
2056
2216
|
components: {
|
|
2057
2217
|
PopperContent
|
|
@@ -2464,7 +2624,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2464
2624
|
], 8, ["to", "disabled"]))
|
|
2465
2625
|
], 2);
|
|
2466
2626
|
}
|
|
2467
|
-
var DaoPopper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2627
|
+
var DaoPopper = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$D]]);
|
|
2468
2628
|
var tooltipProps = __spreadProps(__spreadValues({}, PopperProps), {
|
|
2469
2629
|
offset: {
|
|
2470
2630
|
type: [Number, String],
|
|
@@ -2472,13 +2632,13 @@ var tooltipProps = __spreadProps(__spreadValues({}, PopperProps), {
|
|
|
2472
2632
|
}
|
|
2473
2633
|
});
|
|
2474
2634
|
var tooltip_scss_vue_type_style_index_0_src_lang = "";
|
|
2475
|
-
const _sfc_main$
|
|
2635
|
+
const _sfc_main$F = defineComponent(__spreadProps(__spreadValues({}, DaoPopper), {
|
|
2476
2636
|
name: "DaoTooltip",
|
|
2477
2637
|
props: tooltipProps,
|
|
2478
2638
|
daoPopperTheme: "dao-tooltip"
|
|
2479
2639
|
}));
|
|
2480
2640
|
var popover_scss_vue_type_style_index_0_src_lang = "";
|
|
2481
|
-
const _sfc_main$
|
|
2641
|
+
const _sfc_main$E = defineComponent(__spreadProps(__spreadValues({}, DaoPopper), {
|
|
2482
2642
|
name: "DaoPopover",
|
|
2483
2643
|
props: PopperProps,
|
|
2484
2644
|
daoPopperTheme: "dao-popover"
|
|
@@ -2548,17 +2708,17 @@ const ellipsisProps = {
|
|
|
2548
2708
|
}
|
|
2549
2709
|
};
|
|
2550
2710
|
var ellipsis_vue_vue_type_style_index_0_lang = "";
|
|
2551
|
-
const _sfc_main$
|
|
2711
|
+
const _sfc_main$D = defineComponent({
|
|
2552
2712
|
name: "DaoEllipsis",
|
|
2553
2713
|
components: {
|
|
2554
|
-
Tooltip: _sfc_main$
|
|
2555
|
-
Popover: _sfc_main$
|
|
2714
|
+
Tooltip: _sfc_main$F,
|
|
2715
|
+
Popover: _sfc_main$E
|
|
2556
2716
|
},
|
|
2557
2717
|
props: ellipsisProps,
|
|
2558
2718
|
setup(props) {
|
|
2559
2719
|
const disabled = ref(true);
|
|
2560
2720
|
const tooltipRef = ref();
|
|
2561
|
-
const ComponentType = computed(() => props.type === "tooltip" ? _sfc_main$
|
|
2721
|
+
const ComponentType = computed(() => props.type === "tooltip" ? _sfc_main$F : _sfc_main$E);
|
|
2562
2722
|
const isOpen = computed(() => {
|
|
2563
2723
|
var _a2, _b2, _c, _d;
|
|
2564
2724
|
return (_d = (_c = (_b2 = (_a2 = tooltipRef.value) == null ? void 0 : _a2.$) == null ? void 0 : _b2.ctx) == null ? void 0 : _c.isOpen) != null ? _d : false;
|
|
@@ -2600,7 +2760,7 @@ const _sfc_main$E = defineComponent({
|
|
|
2600
2760
|
tooltipRef,
|
|
2601
2761
|
isOpen,
|
|
2602
2762
|
isEllipsis,
|
|
2603
|
-
Tooltip: _sfc_main$
|
|
2763
|
+
Tooltip: _sfc_main$F,
|
|
2604
2764
|
ComponentType
|
|
2605
2765
|
};
|
|
2606
2766
|
}
|
|
@@ -2643,8 +2803,8 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2643
2803
|
} : void 0
|
|
2644
2804
|
]), 1032, ["disabled", "placement", "offset", "class", "append-to", "delay", "popper-class", "width"]);
|
|
2645
2805
|
}
|
|
2646
|
-
var DaoEllipsis = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2647
|
-
const _sfc_main$
|
|
2806
|
+
var DaoEllipsis = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C]]);
|
|
2807
|
+
const _sfc_main$C = defineComponent({
|
|
2648
2808
|
name: "DaoDialogHeader",
|
|
2649
2809
|
components: {
|
|
2650
2810
|
DaoActionIcon,
|
|
@@ -2696,8 +2856,8 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2696
2856
|
])
|
|
2697
2857
|
]);
|
|
2698
2858
|
}
|
|
2699
|
-
var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2700
|
-
const _sfc_main$
|
|
2859
|
+
var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B]]);
|
|
2860
|
+
const _sfc_main$B = defineComponent({
|
|
2701
2861
|
name: "DaoDialogFooter",
|
|
2702
2862
|
components: {
|
|
2703
2863
|
DaoButton
|
|
@@ -2766,14 +2926,14 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2766
2926
|
])
|
|
2767
2927
|
]);
|
|
2768
2928
|
}
|
|
2769
|
-
var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2929
|
+
var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A]]);
|
|
2770
2930
|
var dialog_scss_vue_type_style_index_0_src_lang = "";
|
|
2771
2931
|
const DIALOG_NUM_ATTR = "dao-dialog__num";
|
|
2772
2932
|
const DIALOG_MINIMUM_PADDING = "20px";
|
|
2773
2933
|
const DIALOG_DEFAULT_PADDING_TOP = "100px";
|
|
2774
2934
|
const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
|
|
2775
2935
|
const KEYBOARD_EVENT_NAME$1 = "keydown";
|
|
2776
|
-
const _sfc_main$
|
|
2936
|
+
const _sfc_main$A = defineComponent({
|
|
2777
2937
|
name: "DaoDialog",
|
|
2778
2938
|
components: {
|
|
2779
2939
|
DialogHeader,
|
|
@@ -3037,7 +3197,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3037
3197
|
_: 3
|
|
3038
3198
|
}, 8, ["onBeforeEnter", "onAfterEnter", "onBeforeLeave", "onAfterLeave"]);
|
|
3039
3199
|
}
|
|
3040
|
-
var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3200
|
+
var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z]]);
|
|
3041
3201
|
const drawerProps = {
|
|
3042
3202
|
modelValue: {
|
|
3043
3203
|
type: Boolean,
|
|
@@ -3108,7 +3268,7 @@ const trapTabKey = (e, firstTab, lastTab) => {
|
|
|
3108
3268
|
};
|
|
3109
3269
|
var drawer_vue_vue_type_style_index_0_lang = "";
|
|
3110
3270
|
const KEYBOARD_EVENT_NAME = "keydown";
|
|
3111
|
-
const _sfc_main$
|
|
3271
|
+
const _sfc_main$z = defineComponent({
|
|
3112
3272
|
name: "DaoDrawer",
|
|
3113
3273
|
components: {
|
|
3114
3274
|
DaoButton,
|
|
@@ -3321,8 +3481,8 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3321
3481
|
], 34)
|
|
3322
3482
|
]);
|
|
3323
3483
|
}
|
|
3324
|
-
var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3325
|
-
const _sfc_main$
|
|
3484
|
+
var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y]]);
|
|
3485
|
+
const _sfc_main$y = defineComponent({
|
|
3326
3486
|
name: "DaoDropdown",
|
|
3327
3487
|
components: {
|
|
3328
3488
|
DaoPopper
|
|
@@ -3403,9 +3563,9 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3403
3563
|
_: 3
|
|
3404
3564
|
}, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
|
|
3405
3565
|
}
|
|
3406
|
-
var DaoDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3566
|
+
var DaoDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x]]);
|
|
3407
3567
|
var dropdownMenu_vue_vue_type_style_index_0_lang = "";
|
|
3408
|
-
const _sfc_main$
|
|
3568
|
+
const _sfc_main$x = defineComponent({
|
|
3409
3569
|
name: "DaoDropdownMenu"
|
|
3410
3570
|
});
|
|
3411
3571
|
const _hoisted_1$m = { class: "dao-dropdown-menu" };
|
|
@@ -3414,9 +3574,9 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3414
3574
|
renderSlot(_ctx.$slots, "default")
|
|
3415
3575
|
]);
|
|
3416
3576
|
}
|
|
3417
|
-
var DaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3577
|
+
var DaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w]]);
|
|
3418
3578
|
var dropdownItem_vue_vue_type_style_index_0_lang = "";
|
|
3419
|
-
const _sfc_main$
|
|
3579
|
+
const _sfc_main$w = defineComponent({
|
|
3420
3580
|
name: "DaoDropdownItem",
|
|
3421
3581
|
props: {
|
|
3422
3582
|
type: {
|
|
@@ -3470,7 +3630,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3470
3630
|
_ctx.type !== "divider" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
|
|
3471
3631
|
], 16);
|
|
3472
3632
|
}
|
|
3473
|
-
var DaoDropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3633
|
+
var DaoDropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v]]);
|
|
3474
3634
|
const expansionProps = {
|
|
3475
3635
|
modelValue: {
|
|
3476
3636
|
type: [String, Symbol, Array]
|
|
@@ -3499,7 +3659,7 @@ const expansionItemProps = {
|
|
|
3499
3659
|
}
|
|
3500
3660
|
};
|
|
3501
3661
|
var expansion_vue_vue_type_style_index_0_lang = "";
|
|
3502
|
-
const _sfc_main$
|
|
3662
|
+
const _sfc_main$v = defineComponent({
|
|
3503
3663
|
name: "DaoExpansion",
|
|
3504
3664
|
props: expansionProps,
|
|
3505
3665
|
emits: ["update:modelValue", "change"],
|
|
@@ -3598,15 +3758,16 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3598
3758
|
renderSlot(_ctx.$slots, "default")
|
|
3599
3759
|
], 2);
|
|
3600
3760
|
}
|
|
3601
|
-
var expansion = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3761
|
+
var expansion = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u]]);
|
|
3602
3762
|
var expansionItem_vue_vue_type_style_index_0_lang = "";
|
|
3603
|
-
const _sfc_main$
|
|
3763
|
+
const _sfc_main$u = defineComponent({
|
|
3604
3764
|
name: "DaoExpansionItem",
|
|
3605
3765
|
components: {
|
|
3606
3766
|
DaoIcon,
|
|
3607
3767
|
DaoEllipsis
|
|
3608
3768
|
},
|
|
3609
3769
|
props: expansionItemProps,
|
|
3770
|
+
emits: ["close"],
|
|
3610
3771
|
setup(props) {
|
|
3611
3772
|
const toggleItem = inject(ToggleItemKey, null);
|
|
3612
3773
|
const parentState = inject(ExpansionStateKey, null);
|
|
@@ -3701,7 +3862,7 @@ const _hoisted_6$4 = {
|
|
|
3701
3862
|
key: 4,
|
|
3702
3863
|
class: "dao-expansion-item-header-item"
|
|
3703
3864
|
};
|
|
3704
|
-
const _hoisted_7$
|
|
3865
|
+
const _hoisted_7$2 = { class: "dao-expansion-item-content-container" };
|
|
3705
3866
|
const _hoisted_8$1 = { class: "dao-expansion-item-content" };
|
|
3706
3867
|
function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3707
3868
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
@@ -3715,7 +3876,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3715
3876
|
}, [
|
|
3716
3877
|
createElementVNode("div", {
|
|
3717
3878
|
class: "dao-expansion-item-header",
|
|
3718
|
-
onClick: _cache[
|
|
3879
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
|
|
3719
3880
|
}, [
|
|
3720
3881
|
_ctx.$slots.handler ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
3721
3882
|
renderSlot(_ctx.$slots, "handler")
|
|
@@ -3745,13 +3906,19 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3745
3906
|
_ctx.$slots["after-title"] ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
|
|
3746
3907
|
renderSlot(_ctx.$slots, "after-title")
|
|
3747
3908
|
])) : createCommentVNode("", true),
|
|
3748
|
-
_ctx.$slots.action ? (openBlock(), createElementBlock("div", {
|
|
3909
|
+
_ctx.$slots.action || _ctx.expansionType === "doc" ? (openBlock(), createElementBlock("div", {
|
|
3749
3910
|
key: 5,
|
|
3750
3911
|
class: "dao-expansion-item-action",
|
|
3751
|
-
onClick: _cache[
|
|
3912
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
3752
3913
|
}, ["stop"]))
|
|
3753
3914
|
}, [
|
|
3754
|
-
|
|
3915
|
+
_ctx.expansionType === "doc" ? (openBlock(), createBlock(_component_dao_icon, {
|
|
3916
|
+
key: 0,
|
|
3917
|
+
"use-font": "",
|
|
3918
|
+
name: "icon-close",
|
|
3919
|
+
class: "dao-expansion-item__close-icon",
|
|
3920
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close", _ctx.name))
|
|
3921
|
+
})) : renderSlot(_ctx.$slots, "action", { key: 1 })
|
|
3755
3922
|
])) : createCommentVNode("", true)
|
|
3756
3923
|
]),
|
|
3757
3924
|
createVNode(Transition, {
|
|
@@ -3764,7 +3931,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3764
3931
|
onAfterLeave: _ctx.onAfterLeave
|
|
3765
3932
|
}, {
|
|
3766
3933
|
default: withCtx(() => [
|
|
3767
|
-
withDirectives(createElementVNode("div", _hoisted_7$
|
|
3934
|
+
withDirectives(createElementVNode("div", _hoisted_7$2, [
|
|
3768
3935
|
createElementVNode("div", _hoisted_8$1, [
|
|
3769
3936
|
renderSlot(_ctx.$slots, "default")
|
|
3770
3937
|
])
|
|
@@ -3776,7 +3943,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3776
3943
|
}, 8, ["onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
|
|
3777
3944
|
], 2);
|
|
3778
3945
|
}
|
|
3779
|
-
var expansionItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3946
|
+
var expansionItem = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t]]);
|
|
3780
3947
|
const formType = ["horizontal", "vertical"];
|
|
3781
3948
|
const formClassNames = {
|
|
3782
3949
|
text: {
|
|
@@ -3804,7 +3971,7 @@ const formProps = {
|
|
|
3804
3971
|
};
|
|
3805
3972
|
const formKey = Symbol("formKey");
|
|
3806
3973
|
var form_vue_vue_type_style_index_0_lang = "";
|
|
3807
|
-
const _sfc_main$
|
|
3974
|
+
const _sfc_main$t = defineComponent({
|
|
3808
3975
|
name: "DaoForm",
|
|
3809
3976
|
props: formProps,
|
|
3810
3977
|
setup(props) {
|
|
@@ -3828,12 +3995,12 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3828
3995
|
renderSlot(_ctx.$slots, "default", { classNames: _ctx.formClassNames })
|
|
3829
3996
|
], 2);
|
|
3830
3997
|
}
|
|
3831
|
-
var form = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3998
|
+
var form = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s]]);
|
|
3832
3999
|
var formItem_vue_vue_type_style_index_0_lang = "";
|
|
3833
|
-
const _sfc_main$
|
|
4000
|
+
const _sfc_main$s = defineComponent({
|
|
3834
4001
|
name: "DaoFormItem",
|
|
3835
4002
|
components: {
|
|
3836
|
-
DaoTooltip: _sfc_main$
|
|
4003
|
+
DaoTooltip: _sfc_main$F,
|
|
3837
4004
|
DaoEllipsis
|
|
3838
4005
|
},
|
|
3839
4006
|
props: {
|
|
@@ -3933,9 +4100,9 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3933
4100
|
], 4)
|
|
3934
4101
|
], 2);
|
|
3935
4102
|
}
|
|
3936
|
-
var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4103
|
+
var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r]]);
|
|
3937
4104
|
var formGroup_vue_vue_type_style_index_0_lang = "";
|
|
3938
|
-
const _sfc_main$
|
|
4105
|
+
const _sfc_main$r = defineComponent({
|
|
3939
4106
|
name: "DaoFormGroup",
|
|
3940
4107
|
props: {
|
|
3941
4108
|
title: {
|
|
@@ -3956,11 +4123,11 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3956
4123
|
renderSlot(_ctx.$slots, "default")
|
|
3957
4124
|
]);
|
|
3958
4125
|
}
|
|
3959
|
-
var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4126
|
+
var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q]]);
|
|
3960
4127
|
const headerProps = {
|
|
3961
4128
|
type: {
|
|
3962
4129
|
type: String,
|
|
3963
|
-
default: "
|
|
4130
|
+
default: "2nd"
|
|
3964
4131
|
},
|
|
3965
4132
|
title: {
|
|
3966
4133
|
type: String,
|
|
@@ -3968,13 +4135,13 @@ const headerProps = {
|
|
|
3968
4135
|
}
|
|
3969
4136
|
};
|
|
3970
4137
|
var header_vue_vue_type_style_index_0_lang = "";
|
|
3971
|
-
const _sfc_main$
|
|
4138
|
+
const _sfc_main$q = defineComponent({
|
|
3972
4139
|
name: "DaoHeader",
|
|
3973
4140
|
props: headerProps,
|
|
3974
4141
|
setup(props, { slots }) {
|
|
3975
4142
|
const showInfo = computed(() => ({
|
|
3976
4143
|
title: props.type === "3rd" ? false : Boolean(props.title || slots.title),
|
|
3977
|
-
breadcrumb: props.type === "
|
|
4144
|
+
breadcrumb: props.type === "2nd" ? false : slots.breadcrumb
|
|
3978
4145
|
}));
|
|
3979
4146
|
return {
|
|
3980
4147
|
ns: "dao-header",
|
|
@@ -4014,7 +4181,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4014
4181
|
], 2)) : createCommentVNode("", true)
|
|
4015
4182
|
], 2);
|
|
4016
4183
|
}
|
|
4017
|
-
var header = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4184
|
+
var header = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p]]);
|
|
4018
4185
|
const breadcrumbProps = {
|
|
4019
4186
|
type: {
|
|
4020
4187
|
type: String,
|
|
@@ -4047,7 +4214,7 @@ const breadcrumbItemProps = {
|
|
|
4047
4214
|
type: [String, Object]
|
|
4048
4215
|
}
|
|
4049
4216
|
};
|
|
4050
|
-
const _sfc_main$
|
|
4217
|
+
const _sfc_main$p = defineComponent({
|
|
4051
4218
|
name: "DaoBreadcrumbItem",
|
|
4052
4219
|
props: breadcrumbItemProps,
|
|
4053
4220
|
setup(props) {
|
|
@@ -4101,9 +4268,9 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4101
4268
|
}, toDisplayString(_ctx.separator), 3)
|
|
4102
4269
|
], 2);
|
|
4103
4270
|
}
|
|
4104
|
-
var DaoBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4271
|
+
var DaoBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o]]);
|
|
4105
4272
|
var breadcrumb_vue_vue_type_style_index_0_lang = "";
|
|
4106
|
-
const _sfc_main$
|
|
4273
|
+
const _sfc_main$o = defineComponent({
|
|
4107
4274
|
name: "DaoBreadcrumb",
|
|
4108
4275
|
components: {
|
|
4109
4276
|
DaoIcon,
|
|
@@ -4150,7 +4317,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4150
4317
|
renderSlot(_ctx.$slots, "default")
|
|
4151
4318
|
], 2);
|
|
4152
4319
|
}
|
|
4153
|
-
var breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4320
|
+
var breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n]]);
|
|
4154
4321
|
if (typeof window !== "undefined") {
|
|
4155
4322
|
let loadSvg = function() {
|
|
4156
4323
|
var body = document.body;
|
|
@@ -4217,7 +4384,7 @@ var inputProps = {
|
|
|
4217
4384
|
}
|
|
4218
4385
|
};
|
|
4219
4386
|
var input_vue_vue_type_style_index_0_lang = "";
|
|
4220
|
-
const _sfc_main$
|
|
4387
|
+
const _sfc_main$n = defineComponent({
|
|
4221
4388
|
name: "DaoInput",
|
|
4222
4389
|
components: {
|
|
4223
4390
|
DaoIcon
|
|
@@ -4519,7 +4686,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4519
4686
|
])
|
|
4520
4687
|
], 2);
|
|
4521
4688
|
}
|
|
4522
|
-
var DaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4689
|
+
var DaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m]]);
|
|
4523
4690
|
var MessageProps = {
|
|
4524
4691
|
modelValue: {
|
|
4525
4692
|
type: Boolean,
|
|
@@ -4543,7 +4710,7 @@ var MessageProps = {
|
|
|
4543
4710
|
}
|
|
4544
4711
|
};
|
|
4545
4712
|
var message_vue_vue_type_style_index_0_lang = "";
|
|
4546
|
-
const _sfc_main$
|
|
4713
|
+
const _sfc_main$m = defineComponent({
|
|
4547
4714
|
name: "DaoMessage",
|
|
4548
4715
|
props: MessageProps,
|
|
4549
4716
|
emits: ["update:modelValue", "change", "beforeClose", "closed", "beforeShow", "show"],
|
|
@@ -4642,8 +4809,8 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4642
4809
|
])
|
|
4643
4810
|
], 34)) : createCommentVNode("", true);
|
|
4644
4811
|
}
|
|
4645
|
-
var message = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4646
|
-
const NAV_TYPES = ["
|
|
4812
|
+
var message = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l]]);
|
|
4813
|
+
const NAV_TYPES = ["2nd", "3rd"];
|
|
4647
4814
|
const navProps = {
|
|
4648
4815
|
accordion: {
|
|
4649
4816
|
type: Boolean,
|
|
@@ -4655,7 +4822,7 @@ const navProps = {
|
|
|
4655
4822
|
},
|
|
4656
4823
|
type: {
|
|
4657
4824
|
type: String,
|
|
4658
|
-
default: "
|
|
4825
|
+
default: "2nd",
|
|
4659
4826
|
validator: (value) => NAV_TYPES.includes(value)
|
|
4660
4827
|
}
|
|
4661
4828
|
};
|
|
@@ -4738,7 +4905,7 @@ const navItemProps = {
|
|
|
4738
4905
|
}
|
|
4739
4906
|
};
|
|
4740
4907
|
var nav_vue_vue_type_style_index_0_lang = "";
|
|
4741
|
-
const _sfc_main$
|
|
4908
|
+
const _sfc_main$l = defineComponent({
|
|
4742
4909
|
name: "DaoNav",
|
|
4743
4910
|
props: navProps,
|
|
4744
4911
|
emits: ["back", "select", "toggle"],
|
|
@@ -4822,8 +4989,8 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4822
4989
|
])
|
|
4823
4990
|
]);
|
|
4824
4991
|
}
|
|
4825
|
-
var nav = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4826
|
-
const _sfc_main$
|
|
4992
|
+
var nav = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k]]);
|
|
4993
|
+
const _sfc_main$k = defineComponent({
|
|
4827
4994
|
name: "DaoNavHead",
|
|
4828
4995
|
components: {
|
|
4829
4996
|
DaoIcon,
|
|
@@ -4837,14 +5004,14 @@ const _sfc_main$l = defineComponent({
|
|
|
4837
5004
|
}
|
|
4838
5005
|
const { icon, title, useFont } = toRefs(props);
|
|
4839
5006
|
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "3rd" || Boolean(unref(icon)));
|
|
4840
|
-
const headIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "
|
|
4841
|
-
const isFontType = computed(() => (rootNav == null ? void 0 : rootNav.type) === "
|
|
5007
|
+
const headIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2nd" ? unref(icon) : "icon-back");
|
|
5008
|
+
const isFontType = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2nd" ? unref(useFont) : true);
|
|
4842
5009
|
const classHeadList = computed(() => [
|
|
4843
5010
|
"dao-nav__head",
|
|
4844
5011
|
`dao-nav__head--${rootNav == null ? void 0 : rootNav.type}`
|
|
4845
5012
|
]);
|
|
4846
5013
|
const handleClickBack = () => {
|
|
4847
|
-
if ((rootNav == null ? void 0 : rootNav.type) === "
|
|
5014
|
+
if ((rootNav == null ? void 0 : rootNav.type) === "2nd") {
|
|
4848
5015
|
return;
|
|
4849
5016
|
}
|
|
4850
5017
|
rootNav == null ? void 0 : rootNav.handleNavHeadClick();
|
|
@@ -4887,8 +5054,8 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4887
5054
|
])
|
|
4888
5055
|
], 2);
|
|
4889
5056
|
}
|
|
4890
|
-
var navHead = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4891
|
-
const _sfc_main$
|
|
5057
|
+
var navHead = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j]]);
|
|
5058
|
+
const _sfc_main$j = defineComponent({
|
|
4892
5059
|
name: "DaoNavItem",
|
|
4893
5060
|
components: {
|
|
4894
5061
|
DaoIcon,
|
|
@@ -4910,7 +5077,7 @@ const _sfc_main$k = defineComponent({
|
|
|
4910
5077
|
isExactActive,
|
|
4911
5078
|
index: index2
|
|
4912
5079
|
} = toRefs(props);
|
|
4913
|
-
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "
|
|
5080
|
+
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2nd" && Boolean(icon.value));
|
|
4914
5081
|
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
|
|
4915
5082
|
const isNavItemActive = computed(() => {
|
|
4916
5083
|
const unrefIsActive = unref(isActive);
|
|
@@ -5005,8 +5172,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5005
5172
|
], 34)
|
|
5006
5173
|
], 2);
|
|
5007
5174
|
}
|
|
5008
|
-
var navItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5009
|
-
const _sfc_main$
|
|
5175
|
+
var navItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i]]);
|
|
5176
|
+
const _sfc_main$i = defineComponent({
|
|
5010
5177
|
name: "DaoNavSub",
|
|
5011
5178
|
components: {
|
|
5012
5179
|
DaoIcon,
|
|
@@ -5032,7 +5199,7 @@ const _sfc_main$j = defineComponent({
|
|
|
5032
5199
|
const currentActiveIndex = ref(false);
|
|
5033
5200
|
const opened = ref(false);
|
|
5034
5201
|
const childrenActiveMap = reactive(new Map());
|
|
5035
|
-
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "
|
|
5202
|
+
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2nd" && Boolean(icon.value));
|
|
5036
5203
|
const foldIcon = computed(() => opened.value ? "icon_caret-up" : "icon_caret-down");
|
|
5037
5204
|
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
|
|
5038
5205
|
const classSubList = computed(() => {
|
|
@@ -5186,7 +5353,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5186
5353
|
})
|
|
5187
5354
|
], 2);
|
|
5188
5355
|
}
|
|
5189
|
-
var navSub = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5356
|
+
var navSub = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]]);
|
|
5190
5357
|
const paginationProps = {
|
|
5191
5358
|
pageSize: {
|
|
5192
5359
|
type: Number,
|
|
@@ -5224,6 +5391,10 @@ const paginationProps = {
|
|
|
5224
5391
|
layout: {
|
|
5225
5392
|
type: Array,
|
|
5226
5393
|
default: ["total", "pager", "sizer"]
|
|
5394
|
+
},
|
|
5395
|
+
noShadow: {
|
|
5396
|
+
type: Boolean,
|
|
5397
|
+
default: false
|
|
5227
5398
|
}
|
|
5228
5399
|
};
|
|
5229
5400
|
function tryOnScopeDispose(fn2) {
|
|
@@ -5403,7 +5574,7 @@ var DaoSelectProps = {
|
|
|
5403
5574
|
}
|
|
5404
5575
|
};
|
|
5405
5576
|
var select_vue_vue_type_style_index_0_lang = "";
|
|
5406
|
-
const _sfc_main$
|
|
5577
|
+
const _sfc_main$h = defineComponent({
|
|
5407
5578
|
name: "DaoSelect",
|
|
5408
5579
|
components: {
|
|
5409
5580
|
DaoPopper,
|
|
@@ -5728,7 +5899,7 @@ const _hoisted_3$6 = {
|
|
|
5728
5899
|
const _hoisted_4$3 = ["placeholder"];
|
|
5729
5900
|
const _hoisted_5$3 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
|
|
5730
5901
|
const _hoisted_6$2 = { class: "dao-option-list" };
|
|
5731
|
-
const _hoisted_7$
|
|
5902
|
+
const _hoisted_7$1 = {
|
|
5732
5903
|
key: "dao-option-placeholder",
|
|
5733
5904
|
class: "dao-option-placeholder"
|
|
5734
5905
|
};
|
|
@@ -5784,7 +5955,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5784
5955
|
]),
|
|
5785
5956
|
createElementVNode("ul", _hoisted_6$2, [
|
|
5786
5957
|
renderSlot(_ctx.$slots, "default"),
|
|
5787
|
-
_ctx.isNoResult || _ctx.loading ? (openBlock(), createElementBlock("li", _hoisted_7$
|
|
5958
|
+
_ctx.isNoResult || _ctx.loading ? (openBlock(), createElementBlock("li", _hoisted_7$1, [
|
|
5788
5959
|
_ctx.loading ? (openBlock(), createBlock(_component_dao_button, {
|
|
5789
5960
|
key: 0,
|
|
5790
5961
|
type: "ghost",
|
|
@@ -5851,9 +6022,9 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5851
6022
|
_: 3
|
|
5852
6023
|
}, 8, ["modelValue", "disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
|
|
5853
6024
|
}
|
|
5854
|
-
var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6025
|
+
var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]]);
|
|
5855
6026
|
var option_vue_vue_type_style_index_0_lang = "";
|
|
5856
|
-
const _sfc_main$
|
|
6027
|
+
const _sfc_main$g = defineComponent({
|
|
5857
6028
|
name: "DaoOption",
|
|
5858
6029
|
props: {
|
|
5859
6030
|
value: {
|
|
@@ -5965,10 +6136,10 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5965
6136
|
[vShow, _ctx.visible]
|
|
5966
6137
|
]);
|
|
5967
6138
|
}
|
|
5968
|
-
var DaoOption = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6139
|
+
var DaoOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]);
|
|
5969
6140
|
var pagination_vue_vue_type_style_index_0_lang = "";
|
|
5970
6141
|
const numberAscSort = (a, b) => a - b;
|
|
5971
|
-
const _sfc_main$
|
|
6142
|
+
const _sfc_main$f = defineComponent({
|
|
5972
6143
|
name: "DaoPagination",
|
|
5973
6144
|
components: {
|
|
5974
6145
|
DaoSelect,
|
|
@@ -6091,7 +6262,11 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6091
6262
|
const _component_dao_select = resolveComponent("dao-select");
|
|
6092
6263
|
return _ctx.computedLayout.show ? (openBlock(), createElementBlock("div", {
|
|
6093
6264
|
key: 0,
|
|
6094
|
-
class: normalizeClass([
|
|
6265
|
+
class: normalizeClass([
|
|
6266
|
+
"dao-pagination",
|
|
6267
|
+
{ "dao-pagination--compact": _ctx.compact },
|
|
6268
|
+
{ "dao-pagination--with-shadow": !_ctx.noShadow }
|
|
6269
|
+
])
|
|
6095
6270
|
}, [
|
|
6096
6271
|
createElementVNode("div", {
|
|
6097
6272
|
class: normalizeClass(["dao-pagination__total", { "is-invisible": !_ctx.computedLayout.total }])
|
|
@@ -6147,9 +6322,9 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6147
6322
|
}, 8, ["class", "model-value", "style", "onChange"])
|
|
6148
6323
|
], 2)) : createCommentVNode("", true);
|
|
6149
6324
|
}
|
|
6150
|
-
var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6325
|
+
var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e]]);
|
|
6151
6326
|
var progress_vue_vue_type_style_index_0_lang = "";
|
|
6152
|
-
const _sfc_main$
|
|
6327
|
+
const _sfc_main$e = defineComponent({
|
|
6153
6328
|
name: "DaoProgress",
|
|
6154
6329
|
props: {
|
|
6155
6330
|
value: {
|
|
@@ -6232,9 +6407,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6232
6407
|
])) : createCommentVNode("", true)
|
|
6233
6408
|
]);
|
|
6234
6409
|
}
|
|
6235
|
-
var progress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6410
|
+
var progress = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]);
|
|
6236
6411
|
var radio_vue_vue_type_style_index_0_lang = "";
|
|
6237
|
-
const _sfc_main$
|
|
6412
|
+
const _sfc_main$d = defineComponent({
|
|
6238
6413
|
name: "DaoRadio",
|
|
6239
6414
|
props: {
|
|
6240
6415
|
modelValue: {
|
|
@@ -6347,9 +6522,9 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6347
6522
|
])) : createCommentVNode("", true)
|
|
6348
6523
|
], 2);
|
|
6349
6524
|
}
|
|
6350
|
-
var radio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6525
|
+
var radio = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]);
|
|
6351
6526
|
var radioGroup_vue_vue_type_style_index_0_lang = "";
|
|
6352
|
-
const _sfc_main$
|
|
6527
|
+
const _sfc_main$c = defineComponent({
|
|
6353
6528
|
name: "DaoRadioGroup",
|
|
6354
6529
|
props: {
|
|
6355
6530
|
modelValue: {
|
|
@@ -6390,9 +6565,9 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6390
6565
|
renderSlot(_ctx.$slots, "default")
|
|
6391
6566
|
], 2);
|
|
6392
6567
|
}
|
|
6393
|
-
var radioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6568
|
+
var radioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]]);
|
|
6394
6569
|
var switch_vue_vue_type_style_index_0_lang = "";
|
|
6395
|
-
const _sfc_main$
|
|
6570
|
+
const _sfc_main$b = defineComponent({
|
|
6396
6571
|
name: "DaoSwitch",
|
|
6397
6572
|
props: {
|
|
6398
6573
|
modelValue: {
|
|
@@ -6479,9 +6654,9 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6479
6654
|
_ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_2$5, toDisplayString(_ctx.currentValue ? _ctx.textContent.on : _ctx.textContent.off), 1)) : createCommentVNode("", true)
|
|
6480
6655
|
], 2);
|
|
6481
6656
|
}
|
|
6482
|
-
var _switch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6657
|
+
var _switch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]]);
|
|
6483
6658
|
var resizer_vue_vue_type_style_index_0_lang = "";
|
|
6484
|
-
const _sfc_main$
|
|
6659
|
+
const _sfc_main$a = defineComponent({
|
|
6485
6660
|
name: "DaoResizer",
|
|
6486
6661
|
props: {
|
|
6487
6662
|
column: {
|
|
@@ -6540,1765 +6715,1816 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6540
6715
|
}, null, 32)) : createCommentVNode("", true)
|
|
6541
6716
|
]);
|
|
6542
6717
|
}
|
|
6543
|
-
var DaoResizer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6544
|
-
var
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
} else {
|
|
6567
|
-
delete value[symToStringTag$1];
|
|
6718
|
+
var DaoResizer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]);
|
|
6719
|
+
var tag_vue_vue_type_style_index_0_lang = "";
|
|
6720
|
+
const _sfc_main$9 = defineComponent({
|
|
6721
|
+
name: "DaoTag",
|
|
6722
|
+
components: {
|
|
6723
|
+
DaoIcon
|
|
6724
|
+
},
|
|
6725
|
+
props: {
|
|
6726
|
+
closable: {
|
|
6727
|
+
type: Boolean,
|
|
6728
|
+
default: false
|
|
6729
|
+
},
|
|
6730
|
+
separator: {
|
|
6731
|
+
type: String,
|
|
6732
|
+
default: ": "
|
|
6733
|
+
},
|
|
6734
|
+
label: {
|
|
6735
|
+
type: String,
|
|
6736
|
+
default: ""
|
|
6737
|
+
},
|
|
6738
|
+
value: {
|
|
6739
|
+
type: String,
|
|
6740
|
+
default: ""
|
|
6568
6741
|
}
|
|
6569
|
-
}
|
|
6570
|
-
|
|
6571
|
-
}
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
}
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
}
|
|
6602
|
-
var coreJsData = root$1["__core-js_shared__"];
|
|
6603
|
-
var coreJsData$1 = coreJsData;
|
|
6604
|
-
var maskSrcKey = function() {
|
|
6605
|
-
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
6606
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
6607
|
-
}();
|
|
6608
|
-
function isMasked(func) {
|
|
6609
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
6610
|
-
}
|
|
6611
|
-
var funcProto$1 = Function.prototype;
|
|
6612
|
-
var funcToString$1 = funcProto$1.toString;
|
|
6613
|
-
function toSource(func) {
|
|
6614
|
-
if (func != null) {
|
|
6615
|
-
try {
|
|
6616
|
-
return funcToString$1.call(func);
|
|
6617
|
-
} catch (e) {
|
|
6618
|
-
}
|
|
6619
|
-
try {
|
|
6620
|
-
return func + "";
|
|
6621
|
-
} catch (e) {
|
|
6622
|
-
}
|
|
6623
|
-
}
|
|
6624
|
-
return "";
|
|
6625
|
-
}
|
|
6626
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
6627
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
6628
|
-
var funcProto = Function.prototype, objectProto$4 = Object.prototype;
|
|
6629
|
-
var funcToString = funcProto.toString;
|
|
6630
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
6631
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
6632
|
-
function baseIsNative(value) {
|
|
6633
|
-
if (!isObject(value) || isMasked(value)) {
|
|
6634
|
-
return false;
|
|
6635
|
-
}
|
|
6636
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
6637
|
-
return pattern.test(toSource(value));
|
|
6638
|
-
}
|
|
6639
|
-
function getValue(object, key) {
|
|
6640
|
-
return object == null ? void 0 : object[key];
|
|
6641
|
-
}
|
|
6642
|
-
function getNative(object, key) {
|
|
6643
|
-
var value = getValue(object, key);
|
|
6644
|
-
return baseIsNative(value) ? value : void 0;
|
|
6645
|
-
}
|
|
6646
|
-
var WeakMap = getNative(root$1, "WeakMap");
|
|
6647
|
-
var WeakMap$1 = WeakMap;
|
|
6648
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
6649
|
-
function isLength(value) {
|
|
6650
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
6651
|
-
}
|
|
6652
|
-
function isArrayLike(value) {
|
|
6653
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
6654
|
-
}
|
|
6655
|
-
var objectProto$3 = Object.prototype;
|
|
6656
|
-
function isPrototype(value) {
|
|
6657
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3;
|
|
6658
|
-
return value === proto;
|
|
6659
|
-
}
|
|
6660
|
-
var argsTag$1 = "[object Arguments]";
|
|
6661
|
-
function baseIsArguments(value) {
|
|
6662
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
6663
|
-
}
|
|
6664
|
-
var objectProto$2 = Object.prototype;
|
|
6665
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
6666
|
-
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
6667
|
-
var isArguments = baseIsArguments(function() {
|
|
6668
|
-
return arguments;
|
|
6669
|
-
}()) ? baseIsArguments : function(value) {
|
|
6670
|
-
return isObjectLike(value) && hasOwnProperty$2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
6671
|
-
};
|
|
6672
|
-
var isArguments$1 = isArguments;
|
|
6673
|
-
function stubFalse() {
|
|
6674
|
-
return false;
|
|
6675
|
-
}
|
|
6676
|
-
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
6677
|
-
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
6678
|
-
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
6679
|
-
var Buffer2 = moduleExports$1 ? root$1.Buffer : void 0;
|
|
6680
|
-
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
6681
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
6682
|
-
var isBuffer$1 = isBuffer;
|
|
6683
|
-
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag$2 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
6684
|
-
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
6685
|
-
var typedArrayTags = {};
|
|
6686
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
6687
|
-
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag$2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
6688
|
-
function baseIsTypedArray(value) {
|
|
6689
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
6690
|
-
}
|
|
6691
|
-
function baseUnary(func) {
|
|
6692
|
-
return function(value) {
|
|
6693
|
-
return func(value);
|
|
6694
|
-
};
|
|
6695
|
-
}
|
|
6696
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
6697
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
6698
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
6699
|
-
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
6700
|
-
var nodeUtil = function() {
|
|
6701
|
-
try {
|
|
6702
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
6703
|
-
if (types) {
|
|
6704
|
-
return types;
|
|
6705
|
-
}
|
|
6706
|
-
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
6707
|
-
} catch (e) {
|
|
6708
|
-
}
|
|
6709
|
-
}();
|
|
6710
|
-
var nodeUtil$1 = nodeUtil;
|
|
6711
|
-
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
6712
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
6713
|
-
var isTypedArray$1 = isTypedArray;
|
|
6714
|
-
function overArg(func, transform) {
|
|
6715
|
-
return function(arg) {
|
|
6716
|
-
return func(transform(arg));
|
|
6717
|
-
};
|
|
6742
|
+
},
|
|
6743
|
+
emits: ["close"]
|
|
6744
|
+
});
|
|
6745
|
+
const _hoisted_1$5 = { class: "dao-tag" };
|
|
6746
|
+
const _hoisted_2$4 = { class: "dao-tag__key" };
|
|
6747
|
+
const _hoisted_3$3 = { class: "dao-tag__value" };
|
|
6748
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6749
|
+
const _component_dao_icon = resolveComponent("dao-icon");
|
|
6750
|
+
return openBlock(), createElementBlock("span", _hoisted_1$5, [
|
|
6751
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
6752
|
+
createElementVNode("span", null, [
|
|
6753
|
+
createElementVNode("span", _hoisted_2$4, [
|
|
6754
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
6755
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
6756
|
+
]),
|
|
6757
|
+
createTextVNode(toDisplayString(_ctx.separator), 1)
|
|
6758
|
+
]),
|
|
6759
|
+
createElementVNode("span", _hoisted_3$3, [
|
|
6760
|
+
renderSlot(_ctx.$slots, "value", {}, () => [
|
|
6761
|
+
createTextVNode(toDisplayString(_ctx.value), 1)
|
|
6762
|
+
])
|
|
6763
|
+
])
|
|
6764
|
+
])
|
|
6765
|
+
]),
|
|
6766
|
+
_ctx.closable ? (openBlock(), createBlock(_component_dao_icon, {
|
|
6767
|
+
key: 0,
|
|
6768
|
+
class: "dao-tag__close-icon",
|
|
6769
|
+
name: "icon-close",
|
|
6770
|
+
"use-font": "",
|
|
6771
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
6772
|
+
})) : createCommentVNode("", true)
|
|
6773
|
+
]);
|
|
6718
6774
|
}
|
|
6719
|
-
var
|
|
6720
|
-
var
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6775
|
+
var DaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]);
|
|
6776
|
+
var toolbarFilter_vue_vue_type_style_index_0_lang = "";
|
|
6777
|
+
const _sfc_main$8 = defineComponent({
|
|
6778
|
+
name: "DaoToolbarFilter",
|
|
6779
|
+
components: {
|
|
6780
|
+
DaoInput,
|
|
6781
|
+
DaoDropdown,
|
|
6782
|
+
DaoDropdownMenu,
|
|
6783
|
+
DaoDropdownItem
|
|
6784
|
+
},
|
|
6785
|
+
props: {
|
|
6786
|
+
search: {
|
|
6787
|
+
type: Object,
|
|
6788
|
+
default: () => ({})
|
|
6789
|
+
},
|
|
6790
|
+
searchPlaceholder: {
|
|
6791
|
+
type: String,
|
|
6792
|
+
default: ""
|
|
6793
|
+
},
|
|
6794
|
+
searchOptions: {
|
|
6795
|
+
type: Array,
|
|
6796
|
+
default: () => []
|
|
6797
|
+
},
|
|
6798
|
+
fuzzy: {
|
|
6799
|
+
type: Object,
|
|
6800
|
+
default: void 0
|
|
6731
6801
|
}
|
|
6732
|
-
}
|
|
6733
|
-
|
|
6734
|
-
}
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6802
|
+
},
|
|
6803
|
+
emits: ["update:search", "search"],
|
|
6804
|
+
setup(props, { emit }) {
|
|
6805
|
+
const { t } = useI18n();
|
|
6806
|
+
const searchModel = useVModel(props, "search", emit, {
|
|
6807
|
+
passive: true,
|
|
6808
|
+
deep: true
|
|
6809
|
+
});
|
|
6810
|
+
const visible = ref(false);
|
|
6811
|
+
const searchText = ref("");
|
|
6812
|
+
const dropdownRef = ref();
|
|
6813
|
+
const computedSearchPlaceholder = computed(() => props.searchPlaceholder || t("core.toolbar.searchPlaceholder"));
|
|
6814
|
+
const daoInputSearchRef = ref();
|
|
6815
|
+
const type = computed(() => searchText.value.includes(":") ? "value" : "key");
|
|
6816
|
+
const searchKey = computed(() => searchText.value.split(":")[0]);
|
|
6817
|
+
const searchValue = computed(() => searchText.value.split(":")[1].trim());
|
|
6818
|
+
const selectedKey = computed(() => {
|
|
6819
|
+
if (type.value === "key") {
|
|
6820
|
+
return void 0;
|
|
6821
|
+
}
|
|
6822
|
+
return props.searchOptions.find((i) => i.label === searchKey.value || i.key === searchKey.value);
|
|
6823
|
+
});
|
|
6824
|
+
const resetSearch = () => {
|
|
6825
|
+
emit("search");
|
|
6826
|
+
searchText.value = "";
|
|
6827
|
+
visible.value = false;
|
|
6828
|
+
daoInputSearchRef.value.input.focus();
|
|
6829
|
+
daoInputSearchRef.value.input.click();
|
|
6830
|
+
};
|
|
6831
|
+
const singleHasChose = (searchOption) => {
|
|
6832
|
+
var _a2;
|
|
6833
|
+
if (searchOption.single && ((_a2 = searchModel.value[searchOption.key]) == null ? void 0 : _a2.length)) {
|
|
6834
|
+
return true;
|
|
6762
6835
|
}
|
|
6763
|
-
}
|
|
6764
|
-
return result;
|
|
6765
|
-
};
|
|
6766
|
-
}
|
|
6767
|
-
var getTag$1 = getTag;
|
|
6768
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
6769
|
-
var objectProto = Object.prototype;
|
|
6770
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
6771
|
-
function isEmpty(value) {
|
|
6772
|
-
if (value == null) {
|
|
6773
|
-
return true;
|
|
6774
|
-
}
|
|
6775
|
-
if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
|
|
6776
|
-
return !value.length;
|
|
6777
|
-
}
|
|
6778
|
-
var tag = getTag$1(value);
|
|
6779
|
-
if (tag == mapTag || tag == setTag) {
|
|
6780
|
-
return !value.size;
|
|
6781
|
-
}
|
|
6782
|
-
if (isPrototype(value)) {
|
|
6783
|
-
return !baseKeys(value).length;
|
|
6784
|
-
}
|
|
6785
|
-
for (var key in value) {
|
|
6786
|
-
if (hasOwnProperty.call(value, key)) {
|
|
6787
6836
|
return false;
|
|
6788
|
-
}
|
|
6837
|
+
};
|
|
6838
|
+
const hasFuzzyOption = (value) => {
|
|
6839
|
+
var _a2, _b2;
|
|
6840
|
+
const { fuzzy } = props;
|
|
6841
|
+
if (!fuzzy) {
|
|
6842
|
+
return true;
|
|
6843
|
+
}
|
|
6844
|
+
if ((fuzzy == null ? void 0 : fuzzy.single) && ((_a2 = searchModel.value[fuzzy.key]) == null ? void 0 : _a2.length)) {
|
|
6845
|
+
return true;
|
|
6846
|
+
}
|
|
6847
|
+
if ((_b2 = searchModel.value[fuzzy.key]) == null ? void 0 : _b2.includes(value)) {
|
|
6848
|
+
return true;
|
|
6849
|
+
}
|
|
6850
|
+
return false;
|
|
6851
|
+
};
|
|
6852
|
+
const addFuzzyOption = (value) => {
|
|
6853
|
+
const { fuzzy } = props;
|
|
6854
|
+
if (!fuzzy || hasFuzzyOption(value)) {
|
|
6855
|
+
return;
|
|
6856
|
+
}
|
|
6857
|
+
if (!searchModel.value[fuzzy.key]) {
|
|
6858
|
+
searchModel.value[fuzzy.key] = [value];
|
|
6859
|
+
} else {
|
|
6860
|
+
searchModel.value[fuzzy.key].push(value);
|
|
6861
|
+
}
|
|
6862
|
+
resetSearch();
|
|
6863
|
+
};
|
|
6864
|
+
const filteredKeys = computed(() => {
|
|
6865
|
+
if (type.value === "value") {
|
|
6866
|
+
return [];
|
|
6867
|
+
}
|
|
6868
|
+
return props.searchOptions.reduce((pre, cur) => {
|
|
6869
|
+
var _a2;
|
|
6870
|
+
const label = (_a2 = cur.label) != null ? _a2 : cur.key;
|
|
6871
|
+
if (!label.includes(searchKey.value) || singleHasChose(cur)) {
|
|
6872
|
+
return pre;
|
|
6873
|
+
}
|
|
6874
|
+
return [
|
|
6875
|
+
...pre,
|
|
6876
|
+
{
|
|
6877
|
+
label,
|
|
6878
|
+
key: cur.key
|
|
6879
|
+
}
|
|
6880
|
+
];
|
|
6881
|
+
}, []);
|
|
6882
|
+
});
|
|
6883
|
+
const filteredValues = computed(() => {
|
|
6884
|
+
var _a2, _b2;
|
|
6885
|
+
if (type.value === "key" || !selectedKey.value) {
|
|
6886
|
+
return [];
|
|
6887
|
+
}
|
|
6888
|
+
if (selectedKey.value.single && singleHasChose(selectedKey.value)) {
|
|
6889
|
+
return [];
|
|
6890
|
+
}
|
|
6891
|
+
return (_b2 = (_a2 = selectedKey.value.values) == null ? void 0 : _a2.filter((i) => {
|
|
6892
|
+
var _a3, _b3;
|
|
6893
|
+
return i.label.includes(searchValue.value) && !((_b3 = searchModel.value[((_a3 = selectedKey.value) == null ? void 0 : _a3.key) || ""]) == null ? void 0 : _b3.includes(i.value));
|
|
6894
|
+
})) != null ? _b2 : [];
|
|
6895
|
+
});
|
|
6896
|
+
const selectKey = (item) => {
|
|
6897
|
+
searchText.value = `${item.label}: `;
|
|
6898
|
+
daoInputSearchRef.value.input.focus();
|
|
6899
|
+
};
|
|
6900
|
+
const selectValue = (item) => {
|
|
6901
|
+
var _a2, _b2, _c;
|
|
6902
|
+
visible.value = false;
|
|
6903
|
+
const key = (_b2 = (_a2 = selectedKey.value) == null ? void 0 : _a2.key) != null ? _b2 : "";
|
|
6904
|
+
const target = (_c = searchModel.value) == null ? void 0 : _c[key];
|
|
6905
|
+
if (target) {
|
|
6906
|
+
target.push(item.value);
|
|
6907
|
+
} else {
|
|
6908
|
+
searchModel.value[key] = [item.value];
|
|
6909
|
+
}
|
|
6910
|
+
resetSearch();
|
|
6911
|
+
};
|
|
6912
|
+
const handleEnter = () => {
|
|
6913
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
6914
|
+
if (!searchText.value) {
|
|
6915
|
+
return;
|
|
6916
|
+
}
|
|
6917
|
+
if (type.value === "key") {
|
|
6918
|
+
const target2 = filteredKeys.value.find((i) => i.label === searchText.value || i.key === searchText.value);
|
|
6919
|
+
if (!target2) {
|
|
6920
|
+
addFuzzyOption(searchText.value);
|
|
6921
|
+
return;
|
|
6922
|
+
}
|
|
6923
|
+
selectKey(target2);
|
|
6924
|
+
return;
|
|
6925
|
+
}
|
|
6926
|
+
if (!searchValue.value) {
|
|
6927
|
+
return;
|
|
6928
|
+
}
|
|
6929
|
+
if (!((_a2 = selectedKey.value) == null ? void 0 : _a2.enum) || !((_c = (_b2 = selectedKey.value) == null ? void 0 : _b2.values) == null ? void 0 : _c.length)) {
|
|
6930
|
+
const key = (_e = (_d = selectedKey.value) == null ? void 0 : _d.key) != null ? _e : "";
|
|
6931
|
+
const target2 = (_f = searchModel.value) == null ? void 0 : _f[key];
|
|
6932
|
+
if (target2) {
|
|
6933
|
+
if (target2.includes(searchValue.value)) {
|
|
6934
|
+
return;
|
|
6935
|
+
}
|
|
6936
|
+
target2.push(searchValue.value);
|
|
6937
|
+
} else {
|
|
6938
|
+
searchModel.value[key] = [searchValue.value];
|
|
6939
|
+
}
|
|
6940
|
+
resetSearch();
|
|
6941
|
+
return;
|
|
6942
|
+
}
|
|
6943
|
+
const target = (_h = (_g = selectedKey.value) == null ? void 0 : _g.values) == null ? void 0 : _h.find((i) => i.label === searchValue.value);
|
|
6944
|
+
if (!target) {
|
|
6945
|
+
return;
|
|
6946
|
+
}
|
|
6947
|
+
selectValue(target);
|
|
6948
|
+
};
|
|
6949
|
+
const showPopover = () => {
|
|
6950
|
+
visible.value = true;
|
|
6951
|
+
};
|
|
6952
|
+
onClickOutside(dropdownRef, () => {
|
|
6953
|
+
visible.value = false;
|
|
6954
|
+
});
|
|
6955
|
+
return {
|
|
6956
|
+
computedSearchPlaceholder,
|
|
6957
|
+
daoInputSearchRef,
|
|
6958
|
+
filteredKeys,
|
|
6959
|
+
filteredValues,
|
|
6960
|
+
visible,
|
|
6961
|
+
searchText,
|
|
6962
|
+
type,
|
|
6963
|
+
selectedKey,
|
|
6964
|
+
dropdownRef,
|
|
6965
|
+
selectKey,
|
|
6966
|
+
selectValue,
|
|
6967
|
+
showPopover,
|
|
6968
|
+
handleEnter
|
|
6969
|
+
};
|
|
6789
6970
|
}
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
return
|
|
6971
|
+
});
|
|
6972
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6973
|
+
const _component_dao_input = resolveComponent("dao-input");
|
|
6974
|
+
const _component_dao_dropdown_item = resolveComponent("dao-dropdown-item");
|
|
6975
|
+
const _component_dao_dropdown_menu = resolveComponent("dao-dropdown-menu");
|
|
6976
|
+
const _component_dao_dropdown = resolveComponent("dao-dropdown");
|
|
6977
|
+
return openBlock(), createBlock(_component_dao_dropdown, {
|
|
6978
|
+
ref: "dropdownRef",
|
|
6979
|
+
"append-to": false,
|
|
6980
|
+
trigger: "manual",
|
|
6981
|
+
visible: _ctx.visible && !!(_ctx.filteredKeys.length || _ctx.filteredValues.length),
|
|
6982
|
+
placement: "bottom-start"
|
|
6983
|
+
}, {
|
|
6984
|
+
menu: withCtx(() => [
|
|
6985
|
+
createVNode(_component_dao_dropdown_menu, null, {
|
|
6986
|
+
default: withCtx(() => [
|
|
6987
|
+
_ctx.type === "key" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.filteredKeys, (item, index2) => {
|
|
6988
|
+
return openBlock(), createBlock(_component_dao_dropdown_item, {
|
|
6989
|
+
key: index2,
|
|
6990
|
+
onClick: ($event) => _ctx.selectKey(item)
|
|
6991
|
+
}, {
|
|
6992
|
+
default: withCtx(() => [
|
|
6993
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
6994
|
+
]),
|
|
6995
|
+
_: 2
|
|
6996
|
+
}, 1032, ["onClick"]);
|
|
6997
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.filteredValues, (item, index2) => {
|
|
6998
|
+
return openBlock(), createBlock(_component_dao_dropdown_item, {
|
|
6999
|
+
key: index2,
|
|
7000
|
+
onClick: ($event) => _ctx.selectValue(item)
|
|
7001
|
+
}, {
|
|
7002
|
+
default: withCtx(() => [
|
|
7003
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
7004
|
+
]),
|
|
7005
|
+
_: 2
|
|
7006
|
+
}, 1032, ["onClick"]);
|
|
7007
|
+
}), 128))
|
|
7008
|
+
]),
|
|
7009
|
+
_: 1
|
|
7010
|
+
})
|
|
7011
|
+
]),
|
|
7012
|
+
default: withCtx(() => [
|
|
7013
|
+
createVNode(_component_dao_input, {
|
|
7014
|
+
ref: "daoInputSearchRef",
|
|
7015
|
+
modelValue: _ctx.searchText,
|
|
7016
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchText = $event),
|
|
7017
|
+
type: "search",
|
|
7018
|
+
borderless: "",
|
|
7019
|
+
block: "",
|
|
7020
|
+
placeholder: _ctx.computedSearchPlaceholder,
|
|
7021
|
+
onKeyup: withKeys(_ctx.handleEnter, ["enter"]),
|
|
7022
|
+
onClick: _ctx.showPopover
|
|
7023
|
+
}, null, 8, ["modelValue", "placeholder", "onKeyup", "onClick"])
|
|
7024
|
+
]),
|
|
7025
|
+
_: 1
|
|
7026
|
+
}, 8, ["visible"]);
|
|
6797
7027
|
}
|
|
6798
|
-
|
|
6799
|
-
|
|
7028
|
+
var DaoToolbarFilter = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]);
|
|
7029
|
+
const toolbarProps = {
|
|
7030
|
+
search: {
|
|
7031
|
+
type: Object,
|
|
7032
|
+
default: () => ({})
|
|
7033
|
+
},
|
|
7034
|
+
searchPlaceholder: {
|
|
6800
7035
|
type: String,
|
|
6801
|
-
|
|
7036
|
+
default: ""
|
|
6802
7037
|
},
|
|
6803
|
-
|
|
7038
|
+
searchOptions: {
|
|
6804
7039
|
type: Array,
|
|
6805
7040
|
default: () => []
|
|
6806
7041
|
},
|
|
6807
|
-
|
|
6808
|
-
type:
|
|
6809
|
-
default:
|
|
7042
|
+
fuzzy: {
|
|
7043
|
+
type: Object,
|
|
7044
|
+
default: void 0
|
|
6810
7045
|
},
|
|
6811
|
-
|
|
7046
|
+
hideRefresh: {
|
|
6812
7047
|
type: Boolean,
|
|
6813
|
-
default:
|
|
7048
|
+
default: false
|
|
6814
7049
|
},
|
|
6815
|
-
|
|
6816
|
-
type:
|
|
7050
|
+
hideSearch: {
|
|
7051
|
+
type: Boolean,
|
|
6817
7052
|
default: false
|
|
6818
7053
|
},
|
|
6819
|
-
selectedRows: {
|
|
6820
|
-
type: Array,
|
|
6821
|
-
default: () => []
|
|
6822
|
-
},
|
|
6823
|
-
expandable: {
|
|
6824
|
-
type: Boolean,
|
|
6825
|
-
default: false
|
|
6826
|
-
},
|
|
6827
|
-
sort: {
|
|
6828
|
-
type: Object,
|
|
6829
|
-
default: () => ({ id: "", desc: true })
|
|
6830
|
-
},
|
|
6831
|
-
compact: {
|
|
6832
|
-
type: Boolean,
|
|
6833
|
-
default: false
|
|
6834
|
-
},
|
|
6835
|
-
pageSize: {
|
|
6836
|
-
type: Number,
|
|
6837
|
-
default: 10,
|
|
6838
|
-
validator: (val) => val > 0 && Math.floor(val) === val
|
|
6839
|
-
},
|
|
6840
|
-
pageSizeOptions: {
|
|
6841
|
-
type: Array,
|
|
6842
|
-
default: () => [10, 20, 50]
|
|
6843
|
-
},
|
|
6844
|
-
pageFormat: {
|
|
6845
|
-
type: Function,
|
|
6846
|
-
default: void 0
|
|
6847
|
-
},
|
|
6848
|
-
total: {
|
|
6849
|
-
type: Number,
|
|
6850
|
-
default: 0
|
|
6851
|
-
},
|
|
6852
|
-
totalFormat: {
|
|
6853
|
-
type: Function,
|
|
6854
|
-
required: false
|
|
6855
|
-
},
|
|
6856
|
-
currentPage: {
|
|
6857
|
-
type: Number,
|
|
6858
|
-
default: 1
|
|
6859
|
-
},
|
|
6860
|
-
pageSizerWidth: {
|
|
6861
|
-
type: Number,
|
|
6862
|
-
default: 110
|
|
6863
|
-
},
|
|
6864
|
-
emptyText: {
|
|
6865
|
-
type: String,
|
|
6866
|
-
default: void 0
|
|
6867
|
-
},
|
|
6868
7054
|
noShadow: {
|
|
6869
7055
|
type: Boolean,
|
|
6870
7056
|
default: false
|
|
6871
|
-
},
|
|
6872
|
-
pageLayout: paginationProps.layout
|
|
6873
|
-
};
|
|
6874
|
-
const _sfc_main$a = defineComponent({
|
|
6875
|
-
components: {
|
|
6876
|
-
DaoActionIcon,
|
|
6877
|
-
DaoDropdown,
|
|
6878
|
-
DaoDropdownMenu
|
|
6879
|
-
},
|
|
6880
|
-
setup() {
|
|
6881
|
-
function handleClick(e) {
|
|
6882
|
-
e.stopRowClick = true;
|
|
6883
|
-
}
|
|
6884
|
-
return {
|
|
6885
|
-
handleClick
|
|
6886
|
-
};
|
|
6887
7057
|
}
|
|
6888
|
-
});
|
|
6889
|
-
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6890
|
-
const _component_dao_action_icon = resolveComponent("dao-action-icon");
|
|
6891
|
-
const _component_dao_dropdown_menu = resolveComponent("dao-dropdown-menu");
|
|
6892
|
-
const _component_dao_dropdown = resolveComponent("dao-dropdown");
|
|
6893
|
-
return openBlock(), createBlock(_component_dao_dropdown, { placement: "bottom-end" }, {
|
|
6894
|
-
menu: withCtx(() => [
|
|
6895
|
-
createVNode(_component_dao_dropdown_menu, null, {
|
|
6896
|
-
default: withCtx(() => [
|
|
6897
|
-
renderSlot(_ctx.$slots, "default")
|
|
6898
|
-
]),
|
|
6899
|
-
_: 3
|
|
6900
|
-
})
|
|
6901
|
-
]),
|
|
6902
|
-
default: withCtx(() => [
|
|
6903
|
-
createVNode(_component_dao_action_icon, {
|
|
6904
|
-
name: "icon-more-vertical",
|
|
6905
|
-
"data-action-td": "",
|
|
6906
|
-
"use-font": "",
|
|
6907
|
-
onClick: _ctx.handleClick
|
|
6908
|
-
}, null, 8, ["onClick"])
|
|
6909
|
-
]),
|
|
6910
|
-
_: 3
|
|
6911
|
-
});
|
|
6912
|
-
}
|
|
6913
|
-
var TdAction = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
|
|
6914
|
-
var table_vue_vue_type_style_index_0_lang = "";
|
|
6915
|
-
const positiveIntegerNumberReg = /^[1-9]\d*$/;
|
|
6916
|
-
const defaultColumnConfig = {
|
|
6917
|
-
defaultWidth: 1,
|
|
6918
|
-
minWidth: 56,
|
|
6919
|
-
sortable: false,
|
|
6920
|
-
resizable: true,
|
|
6921
|
-
hidable: true,
|
|
6922
|
-
defaultHide: false
|
|
6923
7058
|
};
|
|
6924
|
-
|
|
6925
|
-
const _sfc_main$
|
|
6926
|
-
name: "
|
|
7059
|
+
var toolbar_vue_vue_type_style_index_0_lang = "";
|
|
7060
|
+
const _sfc_main$7 = defineComponent({
|
|
7061
|
+
name: "DaoToolbar",
|
|
6927
7062
|
components: {
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
TdAction
|
|
7063
|
+
DaoActionIcon,
|
|
7064
|
+
DaoToolbarFilter,
|
|
7065
|
+
DaoTag
|
|
6932
7066
|
},
|
|
6933
|
-
props:
|
|
6934
|
-
emits: [
|
|
6935
|
-
"select",
|
|
6936
|
-
"update:selectedRows",
|
|
6937
|
-
"sortChange",
|
|
6938
|
-
"hideColumn",
|
|
6939
|
-
"afterResize",
|
|
6940
|
-
"expandToggle",
|
|
6941
|
-
"update:current-page",
|
|
6942
|
-
"update:page-size",
|
|
6943
|
-
"next",
|
|
6944
|
-
"prev",
|
|
6945
|
-
"pageChange",
|
|
6946
|
-
"sizeChange",
|
|
6947
|
-
"row-click"
|
|
6948
|
-
],
|
|
7067
|
+
props: toolbarProps,
|
|
7068
|
+
emits: ["update:search", "search", "refresh"],
|
|
6949
7069
|
setup(props, { emit }) {
|
|
6950
7070
|
const { t } = useI18n();
|
|
6951
|
-
const
|
|
6952
|
-
const
|
|
6953
|
-
const sort = reactive(props.sort);
|
|
6954
|
-
const textContent = computed(() => ({
|
|
6955
|
-
emptyText: props.emptyText || t("core.table.emptyText")
|
|
6956
|
-
}));
|
|
6957
|
-
const expandRows = reactive([]);
|
|
6958
|
-
const global2 = reactive({
|
|
6959
|
-
checked: false,
|
|
6960
|
-
indeterminate: false
|
|
6961
|
-
});
|
|
6962
|
-
const selectedRowsModel = useVModel(props, "selectedRows", emit);
|
|
6963
|
-
const selectedRowsSet = reactive(new Set());
|
|
6964
|
-
const isRowSelected = (row) => selectedRowsSet.has(row);
|
|
6965
|
-
const selectableFn = computed(() => typeof props.selectable === "function" ? props.selectable : defaultSelectableFn);
|
|
6966
|
-
const selectableRows = computed(() => {
|
|
7071
|
+
const searchModel = useVModel(props, "search", emit);
|
|
7072
|
+
const isFuzzyOption = (key) => {
|
|
6967
7073
|
var _a2;
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
if (selectableFn.value(item, index2)) {
|
|
6971
|
-
selectableRowsSet.add(item);
|
|
6972
|
-
}
|
|
6973
|
-
});
|
|
6974
|
-
return selectableRowsSet;
|
|
6975
|
-
});
|
|
6976
|
-
const toggleSelected = (row) => {
|
|
6977
|
-
if (selectedRowsSet.has(row)) {
|
|
6978
|
-
selectedRowsSet.delete(row);
|
|
6979
|
-
} else {
|
|
6980
|
-
selectedRowsSet.add(row);
|
|
7074
|
+
if (((_a2 = props.fuzzy) == null ? void 0 : _a2.key) === key) {
|
|
7075
|
+
return true;
|
|
6981
7076
|
}
|
|
6982
|
-
|
|
7077
|
+
return false;
|
|
6983
7078
|
};
|
|
6984
|
-
const
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
}
|
|
6989
|
-
});
|
|
7079
|
+
const getKeyLabel = (key) => {
|
|
7080
|
+
var _a2;
|
|
7081
|
+
const target = props.searchOptions.find((i) => i.key === key);
|
|
7082
|
+
return (_a2 = target == null ? void 0 : target.label) != null ? _a2 : key;
|
|
6990
7083
|
};
|
|
6991
|
-
const
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
}
|
|
6996
|
-
});
|
|
7084
|
+
const getValueLabel = (key, value) => {
|
|
7085
|
+
var _a2, _b2, _c;
|
|
7086
|
+
const searchOption = props.searchOptions.find((i) => i.key === key);
|
|
7087
|
+
return (_c = (_b2 = (_a2 = searchOption == null ? void 0 : searchOption.values) == null ? void 0 : _a2.find((i) => i.value === value)) == null ? void 0 : _b2.label) != null ? _c : value;
|
|
6997
7088
|
};
|
|
6998
|
-
const
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
clearSelection();
|
|
7089
|
+
const removeValue = (key, valueIndex) => {
|
|
7090
|
+
searchModel.value[key].splice(valueIndex, 1);
|
|
7091
|
+
if (searchModel.value[key].length === 0) {
|
|
7092
|
+
delete searchModel.value[key];
|
|
7003
7093
|
}
|
|
7004
|
-
emit("
|
|
7094
|
+
emit("search");
|
|
7005
7095
|
};
|
|
7006
|
-
const
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
if (nowValue.length && length) {
|
|
7012
|
-
for (let index2 = 0; index2 < length; index2 += 1) {
|
|
7013
|
-
const row = data[index2];
|
|
7014
|
-
if (nowValue.includes(row)) {
|
|
7015
|
-
selectedRowsSet.add(row);
|
|
7016
|
-
}
|
|
7017
|
-
}
|
|
7018
|
-
}
|
|
7096
|
+
const clearFilter = () => {
|
|
7097
|
+
Object.keys(searchModel.value).forEach((key) => {
|
|
7098
|
+
delete searchModel.value[key];
|
|
7099
|
+
});
|
|
7100
|
+
emit("search");
|
|
7019
7101
|
};
|
|
7020
|
-
watch([() => props.data, selectedRowsModel], handleSelectedRows, {
|
|
7021
|
-
immediate: true,
|
|
7022
|
-
deep: true
|
|
7023
|
-
});
|
|
7024
|
-
watch([selectedRowsSet, selectableRows], () => {
|
|
7025
|
-
let have = 0;
|
|
7026
|
-
let notHave = 0;
|
|
7027
|
-
for (let i = 0; i < props.data.length; i += 1) {
|
|
7028
|
-
const item = props.data[i];
|
|
7029
|
-
if (selectedRowsSet.has(item)) {
|
|
7030
|
-
have += 1;
|
|
7031
|
-
} else if (selectableRows.value.has(item)) {
|
|
7032
|
-
notHave += 1;
|
|
7033
|
-
}
|
|
7034
|
-
if (have && notHave) {
|
|
7035
|
-
break;
|
|
7036
|
-
}
|
|
7037
|
-
}
|
|
7038
|
-
if (have && notHave) {
|
|
7039
|
-
global2.checked = false;
|
|
7040
|
-
global2.indeterminate = true;
|
|
7041
|
-
} else if (have) {
|
|
7042
|
-
global2.checked = true;
|
|
7043
|
-
global2.indeterminate = false;
|
|
7044
|
-
} else {
|
|
7045
|
-
global2.checked = false;
|
|
7046
|
-
global2.indeterminate = false;
|
|
7047
|
-
}
|
|
7048
|
-
selectedRowsModel.value.splice(0, selectedRowsModel.value.length, ...Array.from(selectedRowsSet));
|
|
7049
|
-
}, {
|
|
7050
|
-
deep: true,
|
|
7051
|
-
immediate: true,
|
|
7052
|
-
flush: "post"
|
|
7053
|
-
});
|
|
7054
|
-
const expandedRows = reactive(new WeakSet());
|
|
7055
|
-
const columnRefs = reactive({});
|
|
7056
|
-
const columns = reactive([]);
|
|
7057
|
-
const currentPage = computed({
|
|
7058
|
-
get() {
|
|
7059
|
-
return props.currentPage;
|
|
7060
|
-
},
|
|
7061
|
-
set(value) {
|
|
7062
|
-
emit("update:current-page", value);
|
|
7063
|
-
}
|
|
7064
|
-
});
|
|
7065
|
-
const pageSize = computed({
|
|
7066
|
-
get() {
|
|
7067
|
-
return props.pageSize;
|
|
7068
|
-
},
|
|
7069
|
-
set(value) {
|
|
7070
|
-
emit("update:page-size", value);
|
|
7071
|
-
}
|
|
7072
|
-
});
|
|
7073
|
-
const tableScroll = ref();
|
|
7074
|
-
const setColumnRef = (columnId, el) => {
|
|
7075
|
-
columnRefs[columnId] = el;
|
|
7076
|
-
};
|
|
7077
|
-
const getTableSetting = () => {
|
|
7078
|
-
const setting = localStorage.getItem(tableId.value) || "";
|
|
7079
|
-
try {
|
|
7080
|
-
return JSON.parse(setting);
|
|
7081
|
-
} catch (e) {
|
|
7082
|
-
console.warn("JSON parse error", setting);
|
|
7083
|
-
return null;
|
|
7084
|
-
}
|
|
7085
|
-
};
|
|
7086
|
-
const setTableSetting = (setting) => {
|
|
7087
|
-
try {
|
|
7088
|
-
localStorage.setItem(tableId.value, JSON.stringify(setting));
|
|
7089
|
-
} catch (e) {
|
|
7090
|
-
console.error("JSON stringify error", setting);
|
|
7091
|
-
}
|
|
7092
|
-
};
|
|
7093
|
-
watch(tableSetting, (val) => {
|
|
7094
|
-
setTableSetting(val);
|
|
7095
|
-
});
|
|
7096
|
-
function formatDefaultTableSetting(tempColumns) {
|
|
7097
|
-
return tempColumns.reduce((prev, current) => {
|
|
7098
|
-
const preValue = prev;
|
|
7099
|
-
preValue[current.id] = {
|
|
7100
|
-
width: current.defaultWidth,
|
|
7101
|
-
hide: current.hidable && current.defaultHide
|
|
7102
|
-
};
|
|
7103
|
-
return preValue;
|
|
7104
|
-
}, {});
|
|
7105
|
-
}
|
|
7106
|
-
const init = () => {
|
|
7107
|
-
const tempColumns = [];
|
|
7108
|
-
props.columns.forEach((column) => {
|
|
7109
|
-
tempColumns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
|
|
7110
|
-
});
|
|
7111
|
-
const storedTableSetting = getTableSetting();
|
|
7112
|
-
const defaultTableSetting = formatDefaultTableSetting(tempColumns);
|
|
7113
|
-
if (!storedTableSetting) {
|
|
7114
|
-
Object.assign(tableSetting, defaultTableSetting);
|
|
7115
|
-
} else {
|
|
7116
|
-
tempColumns.forEach((column) => {
|
|
7117
|
-
const { id } = column;
|
|
7118
|
-
if (!storedTableSetting[id]) {
|
|
7119
|
-
tableSetting[id] = {
|
|
7120
|
-
width: column.defaultWidth,
|
|
7121
|
-
hide: column.hidable && column.defaultHide
|
|
7122
|
-
};
|
|
7123
|
-
} else if (!column.hidable) {
|
|
7124
|
-
tableSetting[id] = {
|
|
7125
|
-
width: storedTableSetting[id].width,
|
|
7126
|
-
hide: false
|
|
7127
|
-
};
|
|
7128
|
-
} else {
|
|
7129
|
-
tableSetting[id] = storedTableSetting[id];
|
|
7130
|
-
}
|
|
7131
|
-
});
|
|
7132
|
-
}
|
|
7133
|
-
columns.splice(0, columns.length, ...tempColumns);
|
|
7134
|
-
};
|
|
7135
|
-
const columnStyle = (id) => {
|
|
7136
|
-
const setting = tableSetting[id];
|
|
7137
|
-
const { width } = setting;
|
|
7138
|
-
if (positiveIntegerNumberReg.test(width.toString())) {
|
|
7139
|
-
return { flex: `${width} ${width} auto` };
|
|
7140
|
-
}
|
|
7141
|
-
return { width };
|
|
7142
|
-
};
|
|
7143
|
-
const filterColumns = computed(() => columns.filter((c) => !tableSetting[c.id].hide));
|
|
7144
|
-
const tableWrapperClasses = computed(() => {
|
|
7145
|
-
const classes = [];
|
|
7146
|
-
if (props.compact) {
|
|
7147
|
-
classes.push("dao-table--compact");
|
|
7148
|
-
}
|
|
7149
|
-
if (props.selectable) {
|
|
7150
|
-
classes.push("dao-table--selectable");
|
|
7151
|
-
}
|
|
7152
|
-
if (props.expandable) {
|
|
7153
|
-
classes.push("dao-table--expandable");
|
|
7154
|
-
}
|
|
7155
|
-
return classes;
|
|
7156
|
-
});
|
|
7157
|
-
const isEmpty2 = computed(() => (props.data || []).length === 0);
|
|
7158
|
-
const sortColumn = (column) => {
|
|
7159
|
-
if (!column.sortable) {
|
|
7160
|
-
return;
|
|
7161
|
-
}
|
|
7162
|
-
if (sort.id === column.id) {
|
|
7163
|
-
sort.desc = !sort.desc;
|
|
7164
|
-
} else {
|
|
7165
|
-
sort.id = column.id;
|
|
7166
|
-
sort.desc = true;
|
|
7167
|
-
}
|
|
7168
|
-
emit("sortChange", sort);
|
|
7169
|
-
};
|
|
7170
|
-
const thClass = (column) => {
|
|
7171
|
-
if (column.sortable) {
|
|
7172
|
-
return "dao-table-th--sortable";
|
|
7173
|
-
}
|
|
7174
|
-
return "";
|
|
7175
|
-
};
|
|
7176
|
-
const isRowExpanded = (row) => expandRows.includes(row);
|
|
7177
|
-
const toggleExpand = (row, rowIndex) => {
|
|
7178
|
-
expandedRows.add(row);
|
|
7179
|
-
const index2 = expandRows.indexOf(row);
|
|
7180
|
-
if (index2 > -1) {
|
|
7181
|
-
expandRows.splice(index2, 1);
|
|
7182
|
-
emit("expandToggle", row, rowIndex, false);
|
|
7183
|
-
} else {
|
|
7184
|
-
expandRows.push(row);
|
|
7185
|
-
emit("expandToggle", row, rowIndex, true);
|
|
7186
|
-
}
|
|
7187
|
-
};
|
|
7188
|
-
const fixedColumnWidth = () => {
|
|
7189
|
-
columns.forEach((column) => {
|
|
7190
|
-
tableSetting[column.id].width = `${columnRefs[column.id].clientWidth}px`;
|
|
7191
|
-
});
|
|
7192
|
-
};
|
|
7193
|
-
const updateColumnWidth = (columnWidth, columnId) => {
|
|
7194
|
-
tableSetting[columnId].width = `${columnWidth}px`;
|
|
7195
|
-
};
|
|
7196
|
-
const clearExpansion = () => {
|
|
7197
|
-
expandRows.length = 0;
|
|
7198
|
-
};
|
|
7199
|
-
const clearState = () => {
|
|
7200
|
-
clearExpansion();
|
|
7201
|
-
clearSelection();
|
|
7202
|
-
};
|
|
7203
|
-
watch(() => props.columns, () => {
|
|
7204
|
-
init();
|
|
7205
|
-
}, { deep: true, immediate: true });
|
|
7206
|
-
const isEllipsis = () => {
|
|
7207
|
-
if (!tableScroll.value) {
|
|
7208
|
-
return false;
|
|
7209
|
-
}
|
|
7210
|
-
return tableScroll.value.offsetWidth < tableScroll.value.scrollWidth;
|
|
7211
|
-
};
|
|
7212
|
-
const windowResize = () => {
|
|
7213
|
-
if (isEllipsis()) {
|
|
7214
|
-
return;
|
|
7215
|
-
}
|
|
7216
|
-
columns.forEach((column) => {
|
|
7217
|
-
const width = column.defaultWidth;
|
|
7218
|
-
if (positiveIntegerNumberReg.test(width.toString())) {
|
|
7219
|
-
tableSetting[column.id].width = width;
|
|
7220
|
-
}
|
|
7221
|
-
});
|
|
7222
|
-
};
|
|
7223
|
-
onMounted(() => {
|
|
7224
|
-
window.addEventListener("resize", windowResize);
|
|
7225
|
-
});
|
|
7226
|
-
onUnmounted(() => {
|
|
7227
|
-
window.removeEventListener("resize", windowResize);
|
|
7228
|
-
});
|
|
7229
|
-
function onRowClick(e, row, rowIndex) {
|
|
7230
|
-
if (e.stopRowClick) {
|
|
7231
|
-
return;
|
|
7232
|
-
}
|
|
7233
|
-
emit("row-click", row, rowIndex);
|
|
7234
|
-
}
|
|
7235
7102
|
return {
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
sort,
|
|
7244
|
-
thClass,
|
|
7245
|
-
isRowExpanded,
|
|
7246
|
-
toggleExpand,
|
|
7247
|
-
setColumnRef,
|
|
7248
|
-
fixedColumnWidth,
|
|
7249
|
-
updateColumnWidth,
|
|
7250
|
-
currentPage,
|
|
7251
|
-
pageSize,
|
|
7252
|
-
clearState,
|
|
7253
|
-
global: global2,
|
|
7254
|
-
tableScroll,
|
|
7255
|
-
expandedRows,
|
|
7256
|
-
onRowClick,
|
|
7257
|
-
isEmpty: isEmpty2,
|
|
7258
|
-
selectableRows,
|
|
7259
|
-
isRowSelected,
|
|
7260
|
-
toggleSelected,
|
|
7261
|
-
toggleSelectedAll,
|
|
7262
|
-
withDefaultValue
|
|
7103
|
+
t,
|
|
7104
|
+
searchModel,
|
|
7105
|
+
isFuzzyOption,
|
|
7106
|
+
removeValue,
|
|
7107
|
+
clearFilter,
|
|
7108
|
+
getKeyLabel,
|
|
7109
|
+
getValueLabel
|
|
7263
7110
|
};
|
|
7264
7111
|
}
|
|
7265
7112
|
});
|
|
7266
|
-
const _hoisted_1$
|
|
7267
|
-
const _hoisted_2$
|
|
7268
|
-
key: 0,
|
|
7269
|
-
class: "dao-table-thead"
|
|
7270
|
-
};
|
|
7271
|
-
const _hoisted_3$3 = { class: "dao-table-tr" };
|
|
7272
|
-
const _hoisted_4$1 = {
|
|
7273
|
-
key: 0,
|
|
7274
|
-
class: "dao-table-th"
|
|
7275
|
-
};
|
|
7276
|
-
const _hoisted_5$1 = {
|
|
7277
|
-
key: 1,
|
|
7278
|
-
class: "dao-table-th dao-table-th--expandable"
|
|
7279
|
-
};
|
|
7280
|
-
const _hoisted_6$1 = ["onClick"];
|
|
7281
|
-
const _hoisted_7$1 = { class: "dao-table-th__content" };
|
|
7282
|
-
const _hoisted_8 = { class: "dao-table-tbody" };
|
|
7283
|
-
const _hoisted_9 = ["onClick"];
|
|
7284
|
-
const _hoisted_10 = {
|
|
7113
|
+
const _hoisted_1$4 = { class: "dao-toolbar" };
|
|
7114
|
+
const _hoisted_2$3 = {
|
|
7285
7115
|
key: 0,
|
|
7286
|
-
class: "dao-
|
|
7116
|
+
class: "dao-toolbar__filter"
|
|
7287
7117
|
};
|
|
7288
|
-
const
|
|
7118
|
+
const _hoisted_3$2 = {
|
|
7289
7119
|
key: 1,
|
|
7290
|
-
class: "dao-
|
|
7120
|
+
class: "dao-toolbar__search"
|
|
7291
7121
|
};
|
|
7292
|
-
const
|
|
7293
|
-
const
|
|
7294
|
-
key:
|
|
7295
|
-
class: "dao-
|
|
7122
|
+
const _hoisted_4$1 = { class: "dao-toolbar__actions" };
|
|
7123
|
+
const _hoisted_5$1 = {
|
|
7124
|
+
key: 2,
|
|
7125
|
+
class: "dao-toolbar__primary-action"
|
|
7296
7126
|
};
|
|
7297
|
-
const
|
|
7127
|
+
const _hoisted_6$1 = {
|
|
7298
7128
|
key: 0,
|
|
7299
|
-
class: "dao-
|
|
7129
|
+
class: "dao-toolbar__tag-container"
|
|
7300
7130
|
};
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
const
|
|
7304
|
-
const
|
|
7305
|
-
const _component_td_action = resolveComponent("td-action");
|
|
7306
|
-
const _component_dao_pagination = resolveComponent("dao-pagination");
|
|
7131
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7132
|
+
const _component_dao_toolbar_filter = resolveComponent("dao-toolbar-filter");
|
|
7133
|
+
const _component_dao_action_icon = resolveComponent("dao-action-icon");
|
|
7134
|
+
const _component_dao_tag = resolveComponent("dao-tag");
|
|
7307
7135
|
return openBlock(), createElementBlock("div", {
|
|
7308
|
-
class: normalizeClass(["dao-
|
|
7136
|
+
class: normalizeClass(["dao-toolbar-container", { "dao-toolbar-container--with-shadow": !_ctx.noShadow }])
|
|
7309
7137
|
}, [
|
|
7310
|
-
createElementVNode("div",
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
_ctx.
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
key: column.id,
|
|
7328
|
-
ref: (el) => _ctx.setColumnRef(column.id, el),
|
|
7329
|
-
class: normalizeClass(["dao-table-th", _ctx.thClass(column)]),
|
|
7330
|
-
style: normalizeStyle(_ctx.columnStyle(column.id)),
|
|
7331
|
-
onClick: ($event) => _ctx.sortColumn(column)
|
|
7332
|
-
}, [
|
|
7333
|
-
createElementVNode("span", _hoisted_7$1, [
|
|
7334
|
-
renderSlot(_ctx.$slots, `th-${column.id}`, { column }, () => [
|
|
7335
|
-
createTextVNode(toDisplayString(column.header), 1)
|
|
7336
|
-
])
|
|
7337
|
-
]),
|
|
7338
|
-
column.sortable ? withDirectives((openBlock(), createElementBlock("i", {
|
|
7339
|
-
key: 0,
|
|
7340
|
-
class: normalizeClass(["icon-sorting dao-table-sort-icon", { "dao-table-sort-icon--desc": _ctx.sort.desc }])
|
|
7341
|
-
}, null, 2)), [
|
|
7342
|
-
[vShow, _ctx.sort.id === column.id]
|
|
7343
|
-
]) : createCommentVNode("", true),
|
|
7344
|
-
createVNode(_component_dao_resizer, {
|
|
7345
|
-
disabled: !column.resizable,
|
|
7346
|
-
setting: _ctx.tableSetting[column.id],
|
|
7347
|
-
column,
|
|
7348
|
-
onFixedColumnWidth: _ctx.fixedColumnWidth,
|
|
7349
|
-
onUpdateColumnWidth: ($event) => _ctx.updateColumnWidth($event, column.id),
|
|
7350
|
-
onAfterResize: ($event) => _ctx.$emit("afterResize", column.id)
|
|
7351
|
-
}, null, 8, ["disabled", "setting", "column", "onFixedColumnWidth", "onUpdateColumnWidth", "onAfterResize"])
|
|
7352
|
-
], 14, _hoisted_6$1);
|
|
7353
|
-
}), 128))
|
|
7354
|
-
])
|
|
7355
|
-
])) : createCommentVNode("", true),
|
|
7356
|
-
createElementVNode("tbody", _hoisted_8, [
|
|
7357
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
|
|
7358
|
-
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
7359
|
-
createElementVNode("tr", {
|
|
7360
|
-
class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
|
|
7361
|
-
onClick: (e) => _ctx.onRowClick(e, row, index2)
|
|
7362
|
-
}, [
|
|
7363
|
-
_ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_10, [
|
|
7364
|
-
createVNode(_component_dao_checkbox, {
|
|
7365
|
-
disabled: !_ctx.selectableRows.has(row),
|
|
7366
|
-
checked: _ctx.isRowSelected(row),
|
|
7367
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
7368
|
-
}, ["stop"])),
|
|
7369
|
-
onChange: ($event) => _ctx.toggleSelected(row)
|
|
7370
|
-
}, null, 8, ["disabled", "checked", "onChange"])
|
|
7371
|
-
])) : createCommentVNode("", true),
|
|
7372
|
-
_ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
|
|
7373
|
-
createElementVNode("i", {
|
|
7374
|
-
class: "dao-table-expand-toggle icon-arrow-sharp",
|
|
7375
|
-
onClick: ($event) => _ctx.toggleExpand(row, index2)
|
|
7376
|
-
}, null, 8, _hoisted_12)
|
|
7377
|
-
])) : createCommentVNode("", true),
|
|
7378
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
7379
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
7380
|
-
key: column.id
|
|
7381
|
-
}, [
|
|
7382
|
-
column.id === "action" ? (openBlock(), createElementBlock("td", {
|
|
7383
|
-
key: 0,
|
|
7384
|
-
class: "dao-table-td",
|
|
7385
|
-
style: normalizeStyle(_ctx.columnStyle(column.id))
|
|
7386
|
-
}, [
|
|
7387
|
-
renderSlot(_ctx.$slots, `td-${column.id}`, {
|
|
7388
|
-
value: row[column.id],
|
|
7389
|
-
row,
|
|
7390
|
-
rowIndex: index2
|
|
7391
|
-
}, () => [
|
|
7392
|
-
createVNode(_component_td_action, null, {
|
|
7393
|
-
default: withCtx(() => [
|
|
7394
|
-
renderSlot(_ctx.$slots, `td-${column.id}-menu`, {
|
|
7395
|
-
value: row[column.id],
|
|
7396
|
-
row,
|
|
7397
|
-
rowIndex: index2
|
|
7398
|
-
})
|
|
7399
|
-
]),
|
|
7400
|
-
_: 2
|
|
7401
|
-
}, 1024)
|
|
7402
|
-
])
|
|
7403
|
-
], 4)) : (openBlock(), createElementBlock("td", {
|
|
7404
|
-
key: 1,
|
|
7405
|
-
class: "dao-table-td",
|
|
7406
|
-
style: normalizeStyle(_ctx.columnStyle(column.id))
|
|
7407
|
-
}, [
|
|
7408
|
-
renderSlot(_ctx.$slots, `td-${column.id}`, {
|
|
7409
|
-
value: row[column.id],
|
|
7410
|
-
row,
|
|
7411
|
-
rowIndex: index2
|
|
7412
|
-
}, () => [
|
|
7413
|
-
createElementVNode("span", null, toDisplayString(_ctx.withDefaultValue(row[column.id])), 1)
|
|
7414
|
-
])
|
|
7415
|
-
], 4))
|
|
7416
|
-
], 64);
|
|
7417
|
-
}), 128))
|
|
7418
|
-
], 10, _hoisted_9),
|
|
7419
|
-
_ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
|
|
7420
|
-
renderSlot(_ctx.$slots, "expand", {
|
|
7421
|
-
row,
|
|
7422
|
-
rowIndex: index2
|
|
7423
|
-
})
|
|
7424
|
-
], 512)), [
|
|
7425
|
-
[vShow, _ctx.isRowExpanded(row)]
|
|
7426
|
-
]) : createCommentVNode("", true)
|
|
7427
|
-
], 64);
|
|
7428
|
-
}), 128)),
|
|
7429
|
-
_ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
7430
|
-
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
7431
|
-
createTextVNode(toDisplayString(_ctx.textContent.emptyText), 1)
|
|
7432
|
-
])
|
|
7433
|
-
])) : createCommentVNode("", true)
|
|
7138
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
7139
|
+
_ctx.$slots.filter ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
7140
|
+
renderSlot(_ctx.$slots, "filter", { classNames: {
|
|
7141
|
+
label: "dao-toolbar__filter-label",
|
|
7142
|
+
widget: "dao-toolbar__filter-widget"
|
|
7143
|
+
} })
|
|
7144
|
+
])) : createCommentVNode("", true),
|
|
7145
|
+
!_ctx.hideSearch ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
7146
|
+
renderSlot(_ctx.$slots, "search", {}, () => [
|
|
7147
|
+
createVNode(_component_dao_toolbar_filter, {
|
|
7148
|
+
search: _ctx.searchModel,
|
|
7149
|
+
"onUpdate:search": _cache[0] || (_cache[0] = ($event) => _ctx.searchModel = $event),
|
|
7150
|
+
"search-placeholder": _ctx.searchPlaceholder,
|
|
7151
|
+
"search-options": _ctx.searchOptions,
|
|
7152
|
+
fuzzy: _ctx.fuzzy,
|
|
7153
|
+
onSearch: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("search"))
|
|
7154
|
+
}, null, 8, ["search", "search-placeholder", "search-options", "fuzzy"])
|
|
7434
7155
|
])
|
|
7435
|
-
])
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
_ctx.
|
|
7457
|
-
}
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
_ctx.
|
|
7469
|
-
}
|
|
7470
|
-
|
|
7471
|
-
|
|
7156
|
+
])) : createCommentVNode("", true),
|
|
7157
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
7158
|
+
!_ctx.hideRefresh ? (openBlock(), createBlock(_component_dao_action_icon, {
|
|
7159
|
+
key: 0,
|
|
7160
|
+
class: "dao-toolbar__actions-refresh",
|
|
7161
|
+
name: "icon-refresh",
|
|
7162
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("refresh"))
|
|
7163
|
+
})) : createCommentVNode("", true)
|
|
7164
|
+
]),
|
|
7165
|
+
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
7166
|
+
renderSlot(_ctx.$slots, "action")
|
|
7167
|
+
])) : createCommentVNode("", true)
|
|
7168
|
+
]),
|
|
7169
|
+
_ctx.search && Object.keys(_ctx.search).length ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
7170
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.search, (values, key) => {
|
|
7171
|
+
return openBlock(), createElementBlock(Fragment, { key }, [
|
|
7172
|
+
_ctx.isFuzzyOption(key) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(values, (value, index2) => {
|
|
7173
|
+
return openBlock(), createBlock(_component_dao_tag, {
|
|
7174
|
+
key: index2,
|
|
7175
|
+
"is-close-show": "",
|
|
7176
|
+
closable: "",
|
|
7177
|
+
onClose: ($event) => _ctx.removeValue(key, index2)
|
|
7178
|
+
}, {
|
|
7179
|
+
default: withCtx(() => [
|
|
7180
|
+
createTextVNode(toDisplayString(value), 1)
|
|
7181
|
+
]),
|
|
7182
|
+
_: 2
|
|
7183
|
+
}, 1032, ["onClose"]);
|
|
7184
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(values, (value, index2) => {
|
|
7185
|
+
return openBlock(), createBlock(_component_dao_tag, {
|
|
7186
|
+
key: index2,
|
|
7187
|
+
"is-close-show": "",
|
|
7188
|
+
closable: "",
|
|
7189
|
+
onClose: ($event) => _ctx.removeValue(key, index2)
|
|
7190
|
+
}, {
|
|
7191
|
+
label: withCtx(() => [
|
|
7192
|
+
createTextVNode(toDisplayString(_ctx.getKeyLabel(key)), 1)
|
|
7193
|
+
]),
|
|
7194
|
+
value: withCtx(() => [
|
|
7195
|
+
createTextVNode(toDisplayString(_ctx.getValueLabel(key, value)), 1)
|
|
7196
|
+
]),
|
|
7197
|
+
_: 2
|
|
7198
|
+
}, 1032, ["onClose"]);
|
|
7199
|
+
}), 128))
|
|
7200
|
+
], 64);
|
|
7201
|
+
}), 128)),
|
|
7202
|
+
createElementVNode("span", {
|
|
7203
|
+
class: "dao-toolbar__clear",
|
|
7204
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.clearFilter && _ctx.clearFilter(...args))
|
|
7205
|
+
}, toDisplayString(_ctx.t("core.toolbar.clear")), 1)
|
|
7206
|
+
])) : createCommentVNode("", true)
|
|
7207
|
+
], 2);
|
|
7208
|
+
}
|
|
7209
|
+
var DaoToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]);
|
|
7210
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
7211
|
+
var freeGlobal$1 = freeGlobal;
|
|
7212
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
7213
|
+
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
7214
|
+
var root$1 = root;
|
|
7215
|
+
var Symbol$1 = root$1.Symbol;
|
|
7216
|
+
var Symbol$2 = Symbol$1;
|
|
7217
|
+
var objectProto$6 = Object.prototype;
|
|
7218
|
+
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
|
|
7219
|
+
var nativeObjectToString$1 = objectProto$6.toString;
|
|
7220
|
+
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
7221
|
+
function getRawTag(value) {
|
|
7222
|
+
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
7223
|
+
try {
|
|
7224
|
+
value[symToStringTag$1] = void 0;
|
|
7225
|
+
var unmasked = true;
|
|
7226
|
+
} catch (e) {
|
|
7227
|
+
}
|
|
7228
|
+
var result = nativeObjectToString$1.call(value);
|
|
7229
|
+
if (unmasked) {
|
|
7230
|
+
if (isOwn) {
|
|
7231
|
+
value[symToStringTag$1] = tag;
|
|
7232
|
+
} else {
|
|
7233
|
+
delete value[symToStringTag$1];
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
7236
|
+
return result;
|
|
7237
|
+
}
|
|
7238
|
+
var objectProto$5 = Object.prototype;
|
|
7239
|
+
var nativeObjectToString = objectProto$5.toString;
|
|
7240
|
+
function objectToString(value) {
|
|
7241
|
+
return nativeObjectToString.call(value);
|
|
7242
|
+
}
|
|
7243
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
7244
|
+
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
7245
|
+
function baseGetTag(value) {
|
|
7246
|
+
if (value == null) {
|
|
7247
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
7248
|
+
}
|
|
7249
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
7250
|
+
}
|
|
7251
|
+
function isObjectLike(value) {
|
|
7252
|
+
return value != null && typeof value == "object";
|
|
7253
|
+
}
|
|
7254
|
+
var isArray = Array.isArray;
|
|
7255
|
+
var isArray$1 = isArray;
|
|
7256
|
+
function isObject(value) {
|
|
7257
|
+
var type = typeof value;
|
|
7258
|
+
return value != null && (type == "object" || type == "function");
|
|
7259
|
+
}
|
|
7260
|
+
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
7261
|
+
function isFunction(value) {
|
|
7262
|
+
if (!isObject(value)) {
|
|
7263
|
+
return false;
|
|
7264
|
+
}
|
|
7265
|
+
var tag = baseGetTag(value);
|
|
7266
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
7267
|
+
}
|
|
7268
|
+
var coreJsData = root$1["__core-js_shared__"];
|
|
7269
|
+
var coreJsData$1 = coreJsData;
|
|
7270
|
+
var maskSrcKey = function() {
|
|
7271
|
+
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
7272
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
7273
|
+
}();
|
|
7274
|
+
function isMasked(func) {
|
|
7275
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
7276
|
+
}
|
|
7277
|
+
var funcProto$1 = Function.prototype;
|
|
7278
|
+
var funcToString$1 = funcProto$1.toString;
|
|
7279
|
+
function toSource(func) {
|
|
7280
|
+
if (func != null) {
|
|
7281
|
+
try {
|
|
7282
|
+
return funcToString$1.call(func);
|
|
7283
|
+
} catch (e) {
|
|
7284
|
+
}
|
|
7285
|
+
try {
|
|
7286
|
+
return func + "";
|
|
7287
|
+
} catch (e) {
|
|
7288
|
+
}
|
|
7289
|
+
}
|
|
7290
|
+
return "";
|
|
7291
|
+
}
|
|
7292
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
7293
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
7294
|
+
var funcProto = Function.prototype, objectProto$4 = Object.prototype;
|
|
7295
|
+
var funcToString = funcProto.toString;
|
|
7296
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
7297
|
+
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
7298
|
+
function baseIsNative(value) {
|
|
7299
|
+
if (!isObject(value) || isMasked(value)) {
|
|
7300
|
+
return false;
|
|
7301
|
+
}
|
|
7302
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
7303
|
+
return pattern.test(toSource(value));
|
|
7304
|
+
}
|
|
7305
|
+
function getValue(object, key) {
|
|
7306
|
+
return object == null ? void 0 : object[key];
|
|
7307
|
+
}
|
|
7308
|
+
function getNative(object, key) {
|
|
7309
|
+
var value = getValue(object, key);
|
|
7310
|
+
return baseIsNative(value) ? value : void 0;
|
|
7311
|
+
}
|
|
7312
|
+
var WeakMap = getNative(root$1, "WeakMap");
|
|
7313
|
+
var WeakMap$1 = WeakMap;
|
|
7314
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
7315
|
+
function isLength(value) {
|
|
7316
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
7317
|
+
}
|
|
7318
|
+
function isArrayLike(value) {
|
|
7319
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
7320
|
+
}
|
|
7321
|
+
var objectProto$3 = Object.prototype;
|
|
7322
|
+
function isPrototype(value) {
|
|
7323
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3;
|
|
7324
|
+
return value === proto;
|
|
7325
|
+
}
|
|
7326
|
+
var argsTag$1 = "[object Arguments]";
|
|
7327
|
+
function baseIsArguments(value) {
|
|
7328
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
7329
|
+
}
|
|
7330
|
+
var objectProto$2 = Object.prototype;
|
|
7331
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
7332
|
+
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
7333
|
+
var isArguments = baseIsArguments(function() {
|
|
7334
|
+
return arguments;
|
|
7335
|
+
}()) ? baseIsArguments : function(value) {
|
|
7336
|
+
return isObjectLike(value) && hasOwnProperty$2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
7337
|
+
};
|
|
7338
|
+
var isArguments$1 = isArguments;
|
|
7339
|
+
function stubFalse() {
|
|
7340
|
+
return false;
|
|
7341
|
+
}
|
|
7342
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
7343
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
7344
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
7345
|
+
var Buffer2 = moduleExports$1 ? root$1.Buffer : void 0;
|
|
7346
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
7347
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
7348
|
+
var isBuffer$1 = isBuffer;
|
|
7349
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag$2 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
7350
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
7351
|
+
var typedArrayTags = {};
|
|
7352
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
7353
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag$2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
7354
|
+
function baseIsTypedArray(value) {
|
|
7355
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
7356
|
+
}
|
|
7357
|
+
function baseUnary(func) {
|
|
7358
|
+
return function(value) {
|
|
7359
|
+
return func(value);
|
|
7360
|
+
};
|
|
7361
|
+
}
|
|
7362
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
7363
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
7364
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
7365
|
+
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
7366
|
+
var nodeUtil = function() {
|
|
7367
|
+
try {
|
|
7368
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
7369
|
+
if (types) {
|
|
7370
|
+
return types;
|
|
7371
|
+
}
|
|
7372
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
7373
|
+
} catch (e) {
|
|
7374
|
+
}
|
|
7375
|
+
}();
|
|
7376
|
+
var nodeUtil$1 = nodeUtil;
|
|
7377
|
+
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
7378
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
7379
|
+
var isTypedArray$1 = isTypedArray;
|
|
7380
|
+
function overArg(func, transform) {
|
|
7381
|
+
return function(arg) {
|
|
7382
|
+
return func(transform(arg));
|
|
7383
|
+
};
|
|
7384
|
+
}
|
|
7385
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
7386
|
+
var nativeKeys$1 = nativeKeys;
|
|
7387
|
+
var objectProto$1 = Object.prototype;
|
|
7388
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
7389
|
+
function baseKeys(object) {
|
|
7390
|
+
if (!isPrototype(object)) {
|
|
7391
|
+
return nativeKeys$1(object);
|
|
7392
|
+
}
|
|
7393
|
+
var result = [];
|
|
7394
|
+
for (var key in Object(object)) {
|
|
7395
|
+
if (hasOwnProperty$1.call(object, key) && key != "constructor") {
|
|
7396
|
+
result.push(key);
|
|
7397
|
+
}
|
|
7398
|
+
}
|
|
7399
|
+
return result;
|
|
7400
|
+
}
|
|
7401
|
+
var Map$1 = getNative(root$1, "Map");
|
|
7402
|
+
var Map$2 = Map$1;
|
|
7403
|
+
var DataView = getNative(root$1, "DataView");
|
|
7404
|
+
var DataView$1 = DataView;
|
|
7405
|
+
var Promise$1 = getNative(root$1, "Promise");
|
|
7406
|
+
var Promise$2 = Promise$1;
|
|
7407
|
+
var Set$1 = getNative(root$1, "Set");
|
|
7408
|
+
var Set$2 = Set$1;
|
|
7409
|
+
var mapTag$1 = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
7410
|
+
var dataViewTag = "[object DataView]";
|
|
7411
|
+
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1);
|
|
7412
|
+
var getTag = baseGetTag;
|
|
7413
|
+
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag || Map$2 && getTag(new Map$2()) != mapTag$1 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$2 && getTag(new Set$2()) != setTag$1 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) {
|
|
7414
|
+
getTag = function(value) {
|
|
7415
|
+
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
7416
|
+
if (ctorString) {
|
|
7417
|
+
switch (ctorString) {
|
|
7418
|
+
case dataViewCtorString:
|
|
7419
|
+
return dataViewTag;
|
|
7420
|
+
case mapCtorString:
|
|
7421
|
+
return mapTag$1;
|
|
7422
|
+
case promiseCtorString:
|
|
7423
|
+
return promiseTag;
|
|
7424
|
+
case setCtorString:
|
|
7425
|
+
return setTag$1;
|
|
7426
|
+
case weakMapCtorString:
|
|
7427
|
+
return weakMapTag;
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7430
|
+
return result;
|
|
7431
|
+
};
|
|
7432
|
+
}
|
|
7433
|
+
var getTag$1 = getTag;
|
|
7434
|
+
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
7435
|
+
var objectProto = Object.prototype;
|
|
7436
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
7437
|
+
function isEmpty(value) {
|
|
7438
|
+
if (value == null) {
|
|
7439
|
+
return true;
|
|
7440
|
+
}
|
|
7441
|
+
if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
|
|
7442
|
+
return !value.length;
|
|
7443
|
+
}
|
|
7444
|
+
var tag = getTag$1(value);
|
|
7445
|
+
if (tag == mapTag || tag == setTag) {
|
|
7446
|
+
return !value.size;
|
|
7447
|
+
}
|
|
7448
|
+
if (isPrototype(value)) {
|
|
7449
|
+
return !baseKeys(value).length;
|
|
7450
|
+
}
|
|
7451
|
+
for (var key in value) {
|
|
7452
|
+
if (hasOwnProperty.call(value, key)) {
|
|
7453
|
+
return false;
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
7456
|
+
return true;
|
|
7457
|
+
}
|
|
7458
|
+
function isNil(value) {
|
|
7459
|
+
return value == null;
|
|
7460
|
+
}
|
|
7461
|
+
function withDefaultValue(val) {
|
|
7462
|
+
return isNil(val) || isObject(val) && isEmpty(val) ? "-" : val;
|
|
7463
|
+
}
|
|
7464
|
+
const tableProps = __spreadValues({
|
|
7465
|
+
id: {
|
|
7466
|
+
type: String,
|
|
7467
|
+
require: true
|
|
7468
|
+
},
|
|
7469
|
+
columns: {
|
|
7470
|
+
type: Array,
|
|
7471
|
+
default: () => []
|
|
7472
|
+
},
|
|
7473
|
+
data: {
|
|
7474
|
+
type: Array,
|
|
7475
|
+
default: () => []
|
|
7476
|
+
},
|
|
7477
|
+
showHeader: {
|
|
7478
|
+
type: Boolean,
|
|
7479
|
+
default: true
|
|
7480
|
+
},
|
|
7481
|
+
selectable: {
|
|
7482
|
+
type: [Function, Boolean],
|
|
7483
|
+
default: false
|
|
7484
|
+
},
|
|
7485
|
+
selectedRows: {
|
|
7486
|
+
type: Array,
|
|
7487
|
+
default: () => []
|
|
7488
|
+
},
|
|
7489
|
+
expandable: {
|
|
7490
|
+
type: Boolean,
|
|
7491
|
+
default: false
|
|
7492
|
+
},
|
|
7493
|
+
sort: {
|
|
7494
|
+
type: Object,
|
|
7495
|
+
default: () => ({ id: "", desc: true })
|
|
7496
|
+
},
|
|
7497
|
+
compact: {
|
|
7498
|
+
type: Boolean,
|
|
7499
|
+
default: false
|
|
7500
|
+
},
|
|
7501
|
+
pageSize: {
|
|
7502
|
+
type: Number,
|
|
7503
|
+
default: 10,
|
|
7504
|
+
validator: (val) => val > 0 && Math.floor(val) === val
|
|
7505
|
+
},
|
|
7506
|
+
pageSizeOptions: {
|
|
7507
|
+
type: Array,
|
|
7508
|
+
default: () => [10, 20, 50]
|
|
7509
|
+
},
|
|
7510
|
+
pageFormat: {
|
|
7511
|
+
type: Function,
|
|
7512
|
+
default: void 0
|
|
7513
|
+
},
|
|
7514
|
+
total: {
|
|
7515
|
+
type: Number,
|
|
7516
|
+
default: 0
|
|
7517
|
+
},
|
|
7518
|
+
totalFormat: {
|
|
7519
|
+
type: Function,
|
|
7520
|
+
required: false
|
|
7521
|
+
},
|
|
7522
|
+
currentPage: {
|
|
7523
|
+
type: Number,
|
|
7524
|
+
default: 1
|
|
7525
|
+
},
|
|
7526
|
+
pageSizerWidth: {
|
|
7527
|
+
type: Number,
|
|
7528
|
+
default: 110
|
|
7529
|
+
},
|
|
7530
|
+
emptyText: {
|
|
7531
|
+
type: String,
|
|
7532
|
+
default: void 0
|
|
7533
|
+
},
|
|
7534
|
+
pageLayout: paginationProps.layout,
|
|
7535
|
+
hideBatchBar: {
|
|
7536
|
+
type: Boolean,
|
|
7537
|
+
default: false
|
|
7538
|
+
},
|
|
7539
|
+
hideToolbar: {
|
|
7540
|
+
type: Boolean,
|
|
7541
|
+
default: false
|
|
7542
|
+
},
|
|
7543
|
+
selectedFormat: {
|
|
7544
|
+
type: Function,
|
|
7545
|
+
default: void 0
|
|
7546
|
+
},
|
|
7547
|
+
deselectText: {
|
|
7548
|
+
type: String,
|
|
7549
|
+
default: void 0
|
|
7550
|
+
},
|
|
7551
|
+
removeText: {
|
|
7552
|
+
type: String,
|
|
7553
|
+
default: void 0
|
|
7554
|
+
}
|
|
7555
|
+
}, toolbarProps);
|
|
7556
|
+
const _sfc_main$6 = defineComponent({
|
|
7557
|
+
components: {
|
|
7558
|
+
DaoActionIcon,
|
|
7559
|
+
DaoDropdown,
|
|
7560
|
+
DaoDropdownMenu
|
|
7561
|
+
},
|
|
7562
|
+
setup() {
|
|
7563
|
+
function handleClick(e) {
|
|
7564
|
+
e.stopRowClick = true;
|
|
7565
|
+
}
|
|
7566
|
+
return {
|
|
7567
|
+
handleClick
|
|
7568
|
+
};
|
|
7569
|
+
}
|
|
7570
|
+
});
|
|
7571
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7572
|
+
const _component_dao_action_icon = resolveComponent("dao-action-icon");
|
|
7573
|
+
const _component_dao_dropdown_menu = resolveComponent("dao-dropdown-menu");
|
|
7574
|
+
const _component_dao_dropdown = resolveComponent("dao-dropdown");
|
|
7575
|
+
return openBlock(), createBlock(_component_dao_dropdown, { placement: "bottom-end" }, {
|
|
7576
|
+
menu: withCtx(() => [
|
|
7577
|
+
createVNode(_component_dao_dropdown_menu, null, {
|
|
7578
|
+
default: withCtx(() => [
|
|
7579
|
+
renderSlot(_ctx.$slots, "default")
|
|
7580
|
+
]),
|
|
7581
|
+
_: 3
|
|
7472
7582
|
})
|
|
7473
|
-
])
|
|
7474
|
-
|
|
7583
|
+
]),
|
|
7584
|
+
default: withCtx(() => [
|
|
7585
|
+
createVNode(_component_dao_action_icon, {
|
|
7586
|
+
name: "icon-more-vertical",
|
|
7587
|
+
"data-action-td": "",
|
|
7588
|
+
"use-font": "",
|
|
7589
|
+
onClick: _ctx.handleClick
|
|
7590
|
+
}, null, 8, ["onClick"])
|
|
7591
|
+
]),
|
|
7592
|
+
_: 3
|
|
7593
|
+
});
|
|
7475
7594
|
}
|
|
7476
|
-
var
|
|
7477
|
-
var
|
|
7478
|
-
const
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7595
|
+
var TdAction = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
|
|
7596
|
+
var table_vue_vue_type_style_index_0_lang = "";
|
|
7597
|
+
const positiveIntegerNumberReg = /^[1-9]\d*$/;
|
|
7598
|
+
const defaultColumnConfig = {
|
|
7599
|
+
defaultWidth: 1,
|
|
7600
|
+
minWidth: 56,
|
|
7601
|
+
sortable: false,
|
|
7602
|
+
resizable: true,
|
|
7603
|
+
hidable: true,
|
|
7604
|
+
defaultHide: false
|
|
7605
|
+
};
|
|
7606
|
+
const defaultSelectableFn = () => true;
|
|
7607
|
+
const _sfc_main$5 = defineComponent({
|
|
7608
|
+
name: "DaoTable",
|
|
7609
|
+
components: {
|
|
7610
|
+
DaoBatchBar,
|
|
7611
|
+
DaoResizer,
|
|
7612
|
+
DaoPagination,
|
|
7613
|
+
DaoCheckbox,
|
|
7614
|
+
DaoToolbar,
|
|
7615
|
+
TdAction
|
|
7493
7616
|
},
|
|
7494
|
-
|
|
7617
|
+
props: tableProps,
|
|
7618
|
+
emits: [
|
|
7619
|
+
"select",
|
|
7620
|
+
"update:selectedRows",
|
|
7621
|
+
"sortChange",
|
|
7622
|
+
"hideColumn",
|
|
7623
|
+
"afterResize",
|
|
7624
|
+
"expandToggle",
|
|
7625
|
+
"update:current-page",
|
|
7626
|
+
"update:page-size",
|
|
7627
|
+
"next",
|
|
7628
|
+
"prev",
|
|
7629
|
+
"pageChange",
|
|
7630
|
+
"sizeChange",
|
|
7631
|
+
"row-click",
|
|
7632
|
+
"delete",
|
|
7633
|
+
"update:search",
|
|
7634
|
+
"search",
|
|
7635
|
+
"refresh"
|
|
7636
|
+
],
|
|
7495
7637
|
setup(props, { emit }) {
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
const
|
|
7499
|
-
const
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
const
|
|
7504
|
-
const
|
|
7505
|
-
|
|
7506
|
-
|
|
7638
|
+
const { t } = useI18n();
|
|
7639
|
+
const tableId = computed(() => `DAO_TABLE_${props.id}`);
|
|
7640
|
+
const tableSetting = reactive({});
|
|
7641
|
+
const sort = reactive(props.sort);
|
|
7642
|
+
const textContent = computed(() => ({
|
|
7643
|
+
emptyText: props.emptyText || t("core.table.emptyText")
|
|
7644
|
+
}));
|
|
7645
|
+
const expandRows = reactive([]);
|
|
7646
|
+
const global2 = reactive({
|
|
7647
|
+
checked: false,
|
|
7648
|
+
indeterminate: false
|
|
7649
|
+
});
|
|
7650
|
+
const selectedRowsModel = useVModel(props, "selectedRows", emit);
|
|
7651
|
+
const selectedRowsSet = reactive(new Set());
|
|
7652
|
+
const isRowSelected = (row) => selectedRowsSet.has(row);
|
|
7653
|
+
const selectableFn = computed(() => typeof props.selectable === "function" ? props.selectable : defaultSelectableFn);
|
|
7654
|
+
const selectableRows = computed(() => {
|
|
7655
|
+
var _a2;
|
|
7656
|
+
const selectableRowsSet = new Set();
|
|
7657
|
+
(_a2 = props.data) == null ? void 0 : _a2.forEach((item, index2) => {
|
|
7658
|
+
if (selectableFn.value(item, index2)) {
|
|
7659
|
+
selectableRowsSet.add(item);
|
|
7660
|
+
}
|
|
7661
|
+
});
|
|
7662
|
+
return selectableRowsSet;
|
|
7663
|
+
});
|
|
7664
|
+
const toggleSelected = (row) => {
|
|
7665
|
+
if (selectedRowsSet.has(row)) {
|
|
7666
|
+
selectedRowsSet.delete(row);
|
|
7667
|
+
emit("select", Array.from(selectedRowsSet), [], [row]);
|
|
7668
|
+
} else {
|
|
7669
|
+
selectedRowsSet.add(row);
|
|
7670
|
+
emit("select", Array.from(selectedRowsSet), [row], []);
|
|
7507
7671
|
}
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
}
|
|
7672
|
+
};
|
|
7673
|
+
const clearSelection = () => {
|
|
7674
|
+
let removedRowsSnapshot = Array.from(selectedRowsSet);
|
|
7675
|
+
selectedRowsSet.forEach((item) => {
|
|
7676
|
+
if (selectableRows.value.has(item)) {
|
|
7677
|
+
selectedRowsSet.delete(item);
|
|
7678
|
+
}
|
|
7515
7679
|
});
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7680
|
+
emit("select", Array.from(selectedRowsSet), [], removedRowsSnapshot);
|
|
7681
|
+
removedRowsSnapshot = [];
|
|
7682
|
+
};
|
|
7683
|
+
const selectedAll = () => {
|
|
7684
|
+
props.data.forEach((item) => {
|
|
7685
|
+
if (selectableRows.value.has(item)) {
|
|
7686
|
+
selectedRowsSet.add(item);
|
|
7519
7687
|
}
|
|
7520
|
-
};
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7688
|
+
});
|
|
7689
|
+
emit("select", Array.from(selectedRowsSet), Array.from(selectableRows.value), []);
|
|
7690
|
+
};
|
|
7691
|
+
const toggleSelectedAll = () => {
|
|
7692
|
+
if (!global2.checked || global2.indeterminate) {
|
|
7693
|
+
selectedAll();
|
|
7694
|
+
} else {
|
|
7695
|
+
clearSelection();
|
|
7696
|
+
}
|
|
7697
|
+
};
|
|
7698
|
+
const handleSelectedRows = () => {
|
|
7699
|
+
const nowValue = selectedRowsModel.value;
|
|
7700
|
+
const { data } = props;
|
|
7701
|
+
const { length } = data;
|
|
7702
|
+
selectedRowsSet.clear();
|
|
7703
|
+
if (nowValue.length && length) {
|
|
7704
|
+
for (let index2 = 0; index2 < length; index2 += 1) {
|
|
7705
|
+
const row = data[index2];
|
|
7706
|
+
if (nowValue.includes(row)) {
|
|
7707
|
+
selectedRowsSet.add(row);
|
|
7708
|
+
}
|
|
7524
7709
|
}
|
|
7525
|
-
}
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7710
|
+
}
|
|
7711
|
+
};
|
|
7712
|
+
watch([() => props.data, selectedRowsModel], handleSelectedRows, {
|
|
7713
|
+
immediate: true,
|
|
7714
|
+
deep: true
|
|
7715
|
+
});
|
|
7716
|
+
watch([selectedRowsSet, selectableRows], () => {
|
|
7717
|
+
let have = 0;
|
|
7718
|
+
let notHave = 0;
|
|
7719
|
+
for (let i = 0; i < props.data.length; i += 1) {
|
|
7720
|
+
const item = props.data[i];
|
|
7721
|
+
if (selectedRowsSet.has(item)) {
|
|
7722
|
+
have += 1;
|
|
7723
|
+
} else if (selectableRows.value.has(item)) {
|
|
7724
|
+
notHave += 1;
|
|
7534
7725
|
}
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
setActiveLineStyle();
|
|
7538
|
-
tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
|
|
7539
|
-
tabResizeObserver = new ResizeObserver(setActiveLineStyle);
|
|
7540
|
-
if (tabNav.value && val) {
|
|
7541
|
-
tabResizeObserver.observe(val);
|
|
7726
|
+
if (have && notHave) {
|
|
7727
|
+
break;
|
|
7542
7728
|
}
|
|
7543
|
-
}
|
|
7544
|
-
|
|
7729
|
+
}
|
|
7730
|
+
if (have && notHave) {
|
|
7731
|
+
global2.checked = false;
|
|
7732
|
+
global2.indeterminate = true;
|
|
7733
|
+
} else if (have) {
|
|
7734
|
+
global2.checked = true;
|
|
7735
|
+
global2.indeterminate = false;
|
|
7736
|
+
} else {
|
|
7737
|
+
global2.checked = false;
|
|
7738
|
+
global2.indeterminate = false;
|
|
7739
|
+
}
|
|
7740
|
+
selectedRowsModel.value.splice(0, selectedRowsModel.value.length, ...Array.from(selectedRowsSet));
|
|
7741
|
+
}, {
|
|
7742
|
+
deep: true,
|
|
7743
|
+
immediate: true,
|
|
7744
|
+
flush: "post"
|
|
7745
|
+
});
|
|
7746
|
+
const expandedRows = reactive(new WeakSet());
|
|
7747
|
+
const columnRefs = reactive({});
|
|
7748
|
+
const columns = reactive([]);
|
|
7749
|
+
const currentPage = computed({
|
|
7750
|
+
get() {
|
|
7751
|
+
return props.currentPage;
|
|
7752
|
+
},
|
|
7753
|
+
set(value) {
|
|
7754
|
+
emit("update:current-page", value);
|
|
7755
|
+
}
|
|
7756
|
+
});
|
|
7757
|
+
const pageSize = computed({
|
|
7758
|
+
get() {
|
|
7759
|
+
return props.pageSize;
|
|
7760
|
+
},
|
|
7761
|
+
set(value) {
|
|
7762
|
+
emit("update:page-size", value);
|
|
7763
|
+
}
|
|
7764
|
+
});
|
|
7765
|
+
const tableScroll = ref();
|
|
7766
|
+
const setColumnRef = (columnId, el) => {
|
|
7767
|
+
columnRefs[columnId] = el;
|
|
7545
7768
|
};
|
|
7546
|
-
const
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7769
|
+
const getTableSetting = () => {
|
|
7770
|
+
const setting = localStorage.getItem(tableId.value) || "";
|
|
7771
|
+
try {
|
|
7772
|
+
return JSON.parse(setting);
|
|
7773
|
+
} catch (e) {
|
|
7774
|
+
console.warn("JSON parse error", setting);
|
|
7775
|
+
return null;
|
|
7776
|
+
}
|
|
7777
|
+
};
|
|
7778
|
+
const setTableSetting = (setting) => {
|
|
7779
|
+
try {
|
|
7780
|
+
localStorage.setItem(tableId.value, JSON.stringify(setting));
|
|
7781
|
+
} catch (e) {
|
|
7782
|
+
console.error("JSON stringify error", setting);
|
|
7550
7783
|
}
|
|
7784
|
+
};
|
|
7785
|
+
watch(tableSetting, (val) => {
|
|
7786
|
+
setTableSetting(val);
|
|
7551
7787
|
});
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7788
|
+
function formatDefaultTableSetting(tempColumns) {
|
|
7789
|
+
return tempColumns.reduce((prev, current) => {
|
|
7790
|
+
const preValue = prev;
|
|
7791
|
+
preValue[current.id] = {
|
|
7792
|
+
width: current.defaultWidth,
|
|
7793
|
+
hide: current.hidable && current.defaultHide
|
|
7794
|
+
};
|
|
7795
|
+
return preValue;
|
|
7796
|
+
}, {});
|
|
7797
|
+
}
|
|
7798
|
+
const init = () => {
|
|
7799
|
+
const tempColumns = [];
|
|
7800
|
+
props.columns.forEach((column) => {
|
|
7801
|
+
tempColumns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
|
|
7802
|
+
});
|
|
7803
|
+
const storedTableSetting = getTableSetting();
|
|
7804
|
+
const defaultTableSetting = formatDefaultTableSetting(tempColumns);
|
|
7805
|
+
if (!storedTableSetting) {
|
|
7806
|
+
Object.assign(tableSetting, defaultTableSetting);
|
|
7807
|
+
} else {
|
|
7808
|
+
tempColumns.forEach((column) => {
|
|
7809
|
+
const { id } = column;
|
|
7810
|
+
if (!storedTableSetting[id]) {
|
|
7811
|
+
tableSetting[id] = {
|
|
7812
|
+
width: column.defaultWidth,
|
|
7813
|
+
hide: column.hidable && column.defaultHide
|
|
7814
|
+
};
|
|
7815
|
+
} else if (!column.hidable) {
|
|
7816
|
+
tableSetting[id] = {
|
|
7817
|
+
width: storedTableSetting[id].width,
|
|
7818
|
+
hide: false
|
|
7819
|
+
};
|
|
7820
|
+
} else {
|
|
7821
|
+
tableSetting[id] = storedTableSetting[id];
|
|
7822
|
+
}
|
|
7823
|
+
});
|
|
7824
|
+
}
|
|
7825
|
+
columns.splice(0, columns.length, ...tempColumns);
|
|
7826
|
+
};
|
|
7827
|
+
const columnStyle = (id) => {
|
|
7828
|
+
const setting = tableSetting[id];
|
|
7829
|
+
const { width } = setting;
|
|
7830
|
+
if (positiveIntegerNumberReg.test(width.toString())) {
|
|
7831
|
+
return { flex: `${width} ${width} auto` };
|
|
7832
|
+
}
|
|
7833
|
+
return { width };
|
|
7834
|
+
};
|
|
7835
|
+
const filterColumns = computed(() => columns.filter((c) => !tableSetting[c.id].hide));
|
|
7836
|
+
const tableWrapperClasses = computed(() => {
|
|
7837
|
+
const classes = [];
|
|
7838
|
+
if (props.compact) {
|
|
7839
|
+
classes.push("dao-table--compact");
|
|
7556
7840
|
}
|
|
7841
|
+
if (props.selectable) {
|
|
7842
|
+
classes.push("dao-table--selectable");
|
|
7843
|
+
}
|
|
7844
|
+
if (props.expandable) {
|
|
7845
|
+
classes.push("dao-table--expandable");
|
|
7846
|
+
}
|
|
7847
|
+
return classes;
|
|
7557
7848
|
});
|
|
7558
|
-
const
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
disabled
|
|
7562
|
-
} = tab;
|
|
7563
|
-
if (typeof disabled !== "undefined" && disabled) {
|
|
7849
|
+
const isEmpty2 = computed(() => (props.data || []).length === 0);
|
|
7850
|
+
const sortColumn = (column) => {
|
|
7851
|
+
if (!column.sortable) {
|
|
7564
7852
|
return;
|
|
7565
7853
|
}
|
|
7566
|
-
if (
|
|
7567
|
-
|
|
7854
|
+
if (sort.id === column.id) {
|
|
7855
|
+
sort.desc = !sort.desc;
|
|
7856
|
+
} else {
|
|
7857
|
+
sort.id = column.id;
|
|
7858
|
+
sort.desc = true;
|
|
7568
7859
|
}
|
|
7569
|
-
emit("
|
|
7860
|
+
emit("sortChange", sort);
|
|
7570
7861
|
};
|
|
7571
|
-
const
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
}
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
}
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
},
|
|
7622
|
-
modelValue: {
|
|
7623
|
-
type: String,
|
|
7624
|
-
default: null
|
|
7625
|
-
}
|
|
7626
|
-
},
|
|
7627
|
-
emits: ["change", "update:modelValue", "click"],
|
|
7628
|
-
setup(props, { emit }) {
|
|
7629
|
-
const { modelValue } = toRefs(props);
|
|
7630
|
-
const currentValue = ref(modelValue.value);
|
|
7631
|
-
watch(modelValue, (newV) => {
|
|
7632
|
-
emit("change", newV);
|
|
7633
|
-
if (newV !== currentValue.value) {
|
|
7634
|
-
currentValue.value = newV;
|
|
7862
|
+
const thClass = (column) => {
|
|
7863
|
+
if (column.sortable) {
|
|
7864
|
+
return "dao-table-th--sortable";
|
|
7865
|
+
}
|
|
7866
|
+
return "";
|
|
7867
|
+
};
|
|
7868
|
+
const isRowExpanded = (row) => expandRows.includes(row);
|
|
7869
|
+
const toggleExpand = (row, rowIndex) => {
|
|
7870
|
+
expandedRows.add(row);
|
|
7871
|
+
const index2 = expandRows.indexOf(row);
|
|
7872
|
+
if (index2 > -1) {
|
|
7873
|
+
expandRows.splice(index2, 1);
|
|
7874
|
+
emit("expandToggle", row, rowIndex, false);
|
|
7875
|
+
} else {
|
|
7876
|
+
expandRows.push(row);
|
|
7877
|
+
emit("expandToggle", row, rowIndex, true);
|
|
7878
|
+
}
|
|
7879
|
+
};
|
|
7880
|
+
const fixedColumnWidth = () => {
|
|
7881
|
+
columns.forEach((column) => {
|
|
7882
|
+
tableSetting[column.id].width = `${columnRefs[column.id].clientWidth}px`;
|
|
7883
|
+
});
|
|
7884
|
+
};
|
|
7885
|
+
const updateColumnWidth = (columnWidth, columnId) => {
|
|
7886
|
+
tableSetting[columnId].width = `${columnWidth}px`;
|
|
7887
|
+
};
|
|
7888
|
+
const clearExpansion = () => {
|
|
7889
|
+
expandRows.length = 0;
|
|
7890
|
+
};
|
|
7891
|
+
const clearState = () => {
|
|
7892
|
+
clearExpansion();
|
|
7893
|
+
clearSelection();
|
|
7894
|
+
};
|
|
7895
|
+
const batchDelete = () => {
|
|
7896
|
+
emit("delete");
|
|
7897
|
+
};
|
|
7898
|
+
const deselect = () => {
|
|
7899
|
+
clearSelection();
|
|
7900
|
+
};
|
|
7901
|
+
const onSearch = () => {
|
|
7902
|
+
emit("search");
|
|
7903
|
+
};
|
|
7904
|
+
const onRefresh = () => {
|
|
7905
|
+
emit("refresh");
|
|
7906
|
+
};
|
|
7907
|
+
const searchModel = useVModel(props, "search", emit);
|
|
7908
|
+
const showBatchBar = computed(() => props.selectable && !props.hideBatchBar);
|
|
7909
|
+
const showToolbar = computed(() => {
|
|
7910
|
+
if (props.hideToolbar || showBatchBar.value && selectedRowsSet.size !== 0) {
|
|
7911
|
+
return false;
|
|
7635
7912
|
}
|
|
7913
|
+
return true;
|
|
7636
7914
|
});
|
|
7637
|
-
watch(
|
|
7638
|
-
|
|
7639
|
-
|
|
7915
|
+
watch(() => props.columns, () => {
|
|
7916
|
+
init();
|
|
7917
|
+
}, { deep: true, immediate: true });
|
|
7918
|
+
const isEllipsis = () => {
|
|
7919
|
+
if (!tableScroll.value) {
|
|
7920
|
+
return false;
|
|
7640
7921
|
}
|
|
7641
|
-
|
|
7642
|
-
const updateValue = (tabValue) => {
|
|
7643
|
-
currentValue.value = tabValue;
|
|
7644
|
-
};
|
|
7645
|
-
provide(tabModelValueKey, modelValue);
|
|
7646
|
-
const onClick = (e, tabValue) => {
|
|
7647
|
-
emit("click", e, tabValue);
|
|
7922
|
+
return tableScroll.value.offsetWidth < tableScroll.value.scrollWidth;
|
|
7648
7923
|
};
|
|
7649
|
-
const
|
|
7650
|
-
|
|
7651
|
-
const addTab = (tab, child) => {
|
|
7652
|
-
var _a2;
|
|
7653
|
-
if (!child.value) {
|
|
7924
|
+
const windowResize = () => {
|
|
7925
|
+
if (isEllipsis()) {
|
|
7654
7926
|
return;
|
|
7655
7927
|
}
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7928
|
+
columns.forEach((column) => {
|
|
7929
|
+
const width = column.defaultWidth;
|
|
7930
|
+
if (positiveIntegerNumberReg.test(width.toString())) {
|
|
7931
|
+
tableSetting[column.id].width = width;
|
|
7932
|
+
}
|
|
7933
|
+
});
|
|
7660
7934
|
};
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7935
|
+
onMounted(() => {
|
|
7936
|
+
window.addEventListener("resize", windowResize);
|
|
7937
|
+
});
|
|
7938
|
+
onUnmounted(() => {
|
|
7939
|
+
window.removeEventListener("resize", windowResize);
|
|
7940
|
+
});
|
|
7941
|
+
function onRowClick(e, row, rowIndex) {
|
|
7942
|
+
if (e.stopRowClick) {
|
|
7943
|
+
return;
|
|
7666
7944
|
}
|
|
7667
|
-
|
|
7668
|
-
|
|
7945
|
+
emit("row-click", row, rowIndex);
|
|
7946
|
+
}
|
|
7669
7947
|
return {
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7948
|
+
textContent,
|
|
7949
|
+
columns,
|
|
7950
|
+
filterColumns,
|
|
7951
|
+
tableWrapperClasses,
|
|
7952
|
+
tableSetting,
|
|
7953
|
+
columnStyle,
|
|
7954
|
+
sortColumn,
|
|
7955
|
+
sort,
|
|
7956
|
+
thClass,
|
|
7957
|
+
isRowExpanded,
|
|
7958
|
+
toggleExpand,
|
|
7959
|
+
setColumnRef,
|
|
7960
|
+
fixedColumnWidth,
|
|
7961
|
+
updateColumnWidth,
|
|
7962
|
+
currentPage,
|
|
7963
|
+
pageSize,
|
|
7964
|
+
clearState,
|
|
7965
|
+
global: global2,
|
|
7966
|
+
tableScroll,
|
|
7967
|
+
expandedRows,
|
|
7968
|
+
onRowClick,
|
|
7969
|
+
isEmpty: isEmpty2,
|
|
7970
|
+
selectableRows,
|
|
7971
|
+
isRowSelected,
|
|
7972
|
+
toggleSelected,
|
|
7973
|
+
toggleSelectedAll,
|
|
7974
|
+
withDefaultValue,
|
|
7975
|
+
batchDelete,
|
|
7976
|
+
deselect,
|
|
7977
|
+
showBatchBar,
|
|
7978
|
+
onSearch,
|
|
7979
|
+
onRefresh,
|
|
7980
|
+
showToolbar,
|
|
7981
|
+
searchModel
|
|
7674
7982
|
};
|
|
7675
7983
|
}
|
|
7676
7984
|
});
|
|
7677
|
-
const _hoisted_1$
|
|
7678
|
-
const _hoisted_2$3 = {
|
|
7985
|
+
const _hoisted_1$3 = {
|
|
7679
7986
|
key: 0,
|
|
7680
|
-
class: "dao-
|
|
7987
|
+
class: "dao-table__toolbar"
|
|
7681
7988
|
};
|
|
7682
|
-
const
|
|
7683
|
-
|
|
7684
|
-
|
|
7989
|
+
const _hoisted_2$2 = { class: "dao-table" };
|
|
7990
|
+
const _hoisted_3$1 = {
|
|
7991
|
+
key: 0,
|
|
7992
|
+
class: "dao-table-thead"
|
|
7685
7993
|
};
|
|
7686
|
-
|
|
7687
|
-
|
|
7994
|
+
const _hoisted_4 = { class: "dao-table-tr" };
|
|
7995
|
+
const _hoisted_5 = {
|
|
7996
|
+
key: 0,
|
|
7997
|
+
class: "dao-table-th"
|
|
7998
|
+
};
|
|
7999
|
+
const _hoisted_6 = {
|
|
8000
|
+
key: 1,
|
|
8001
|
+
class: "dao-table-th dao-table-th--expandable"
|
|
8002
|
+
};
|
|
8003
|
+
const _hoisted_7 = ["onClick"];
|
|
8004
|
+
const _hoisted_8 = { class: "dao-table-th__content" };
|
|
8005
|
+
const _hoisted_9 = { class: "dao-table-tbody" };
|
|
8006
|
+
const _hoisted_10 = ["onClick"];
|
|
8007
|
+
const _hoisted_11 = {
|
|
8008
|
+
key: 0,
|
|
8009
|
+
class: "dao-table-td"
|
|
8010
|
+
};
|
|
8011
|
+
const _hoisted_12 = {
|
|
8012
|
+
key: 1,
|
|
8013
|
+
class: "dao-table-td"
|
|
8014
|
+
};
|
|
8015
|
+
const _hoisted_13 = ["onClick"];
|
|
8016
|
+
const _hoisted_14 = {
|
|
8017
|
+
key: 0,
|
|
8018
|
+
class: "dao-table-tr-expand"
|
|
8019
|
+
};
|
|
8020
|
+
const _hoisted_15 = {
|
|
8021
|
+
key: 0,
|
|
8022
|
+
class: "dao-table__empty-block"
|
|
8023
|
+
};
|
|
8024
|
+
const _hoisted_16 = { class: "dao-table-pagination" };
|
|
8025
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8026
|
+
const _component_dao_toolbar = resolveComponent("dao-toolbar");
|
|
8027
|
+
const _component_dao_batch_bar = resolveComponent("dao-batch-bar");
|
|
8028
|
+
const _component_dao_checkbox = resolveComponent("dao-checkbox");
|
|
8029
|
+
const _component_dao_resizer = resolveComponent("dao-resizer");
|
|
8030
|
+
const _component_td_action = resolveComponent("td-action");
|
|
8031
|
+
const _component_dao_pagination = resolveComponent("dao-pagination");
|
|
7688
8032
|
return openBlock(), createElementBlock("div", {
|
|
7689
|
-
class: normalizeClass(["dao-
|
|
8033
|
+
class: normalizeClass(["dao-table-container", { "dao-table-container--with-shadow": !_ctx.noShadow }])
|
|
7690
8034
|
}, [
|
|
8035
|
+
_ctx.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
8036
|
+
createVNode(_component_dao_toolbar, {
|
|
8037
|
+
search: _ctx.searchModel,
|
|
8038
|
+
"onUpdate:search": _cache[0] || (_cache[0] = ($event) => _ctx.searchModel = $event),
|
|
8039
|
+
"search-options": _ctx.searchOptions,
|
|
8040
|
+
fuzzy: _ctx.fuzzy,
|
|
8041
|
+
"search-placeholder": _ctx.searchPlaceholder,
|
|
8042
|
+
"hide-refresh": _ctx.hideRefresh,
|
|
8043
|
+
"hide-search": _ctx.hideSearch,
|
|
8044
|
+
"no-shadow": "",
|
|
8045
|
+
onSearch: _ctx.onSearch,
|
|
8046
|
+
onRefresh: _ctx.onRefresh
|
|
8047
|
+
}, createSlots({
|
|
8048
|
+
search: withCtx(() => [
|
|
8049
|
+
renderSlot(_ctx.$slots, "search")
|
|
8050
|
+
]),
|
|
8051
|
+
_: 2
|
|
8052
|
+
}, [
|
|
8053
|
+
_ctx.$slots.filter ? {
|
|
8054
|
+
name: "filter",
|
|
8055
|
+
fn: withCtx(({ classNames }) => [
|
|
8056
|
+
renderSlot(_ctx.$slots, "filter", { classNames })
|
|
8057
|
+
])
|
|
8058
|
+
} : void 0,
|
|
8059
|
+
_ctx.$slots.action ? {
|
|
8060
|
+
name: "action",
|
|
8061
|
+
fn: withCtx(() => [
|
|
8062
|
+
renderSlot(_ctx.$slots, "action")
|
|
8063
|
+
])
|
|
8064
|
+
} : void 0
|
|
8065
|
+
]), 1032, ["search", "search-options", "fuzzy", "search-placeholder", "hide-refresh", "hide-search", "onSearch", "onRefresh"])
|
|
8066
|
+
])) : createCommentVNode("", true),
|
|
8067
|
+
withDirectives(createVNode(_component_dao_batch_bar, {
|
|
8068
|
+
total: _ctx.selectedRows.length,
|
|
8069
|
+
"deselect-text": _ctx.deselectText,
|
|
8070
|
+
"remove-text": _ctx.removeText,
|
|
8071
|
+
"selected-format": _ctx.selectedFormat,
|
|
8072
|
+
onDelete: _ctx.batchDelete,
|
|
8073
|
+
onDeselect: _ctx.deselect
|
|
8074
|
+
}, {
|
|
8075
|
+
default: withCtx(() => [
|
|
8076
|
+
renderSlot(_ctx.$slots, "batch-action")
|
|
8077
|
+
]),
|
|
8078
|
+
_: 3
|
|
8079
|
+
}, 8, ["total", "deselect-text", "remove-text", "selected-format", "onDelete", "onDeselect"]), [
|
|
8080
|
+
[vShow, _ctx.showBatchBar]
|
|
8081
|
+
]),
|
|
7691
8082
|
createElementVNode("div", {
|
|
7692
|
-
|
|
8083
|
+
ref: "tableScroll",
|
|
8084
|
+
class: normalizeClass(["dao-table-scroll", _ctx.tableWrapperClasses])
|
|
7693
8085
|
}, [
|
|
7694
|
-
createElementVNode("
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
const addTabFn = inject(addTabFnKey, NOOP);
|
|
7735
|
-
const removeTabFn = inject(removeTabFnKey, NOOP);
|
|
7736
|
-
onMounted(() => addTabFn(props, tabItem2));
|
|
7737
|
-
onUnmounted(() => removeTabFn(props));
|
|
7738
|
-
return {
|
|
7739
|
-
active,
|
|
7740
|
-
tabItem: tabItem2
|
|
7741
|
-
};
|
|
7742
|
-
}
|
|
7743
|
-
});
|
|
7744
|
-
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7745
|
-
return openBlock(), createElementBlock("div", {
|
|
7746
|
-
ref: "tabItem",
|
|
7747
|
-
class: normalizeClass(["dao-tab-item", {
|
|
7748
|
-
"dao-tab-item--hidden": !_ctx.active
|
|
7749
|
-
}])
|
|
7750
|
-
}, [
|
|
7751
|
-
renderSlot(_ctx.$slots, "default")
|
|
7752
|
-
], 2);
|
|
7753
|
-
}
|
|
7754
|
-
var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
|
|
7755
|
-
var tag_vue_vue_type_style_index_0_lang = "";
|
|
7756
|
-
const _sfc_main$5 = defineComponent({
|
|
7757
|
-
name: "DaoTag",
|
|
7758
|
-
components: {
|
|
7759
|
-
DaoIcon
|
|
7760
|
-
},
|
|
7761
|
-
props: {
|
|
7762
|
-
closable: {
|
|
7763
|
-
type: Boolean,
|
|
7764
|
-
default: false
|
|
7765
|
-
},
|
|
7766
|
-
separator: {
|
|
7767
|
-
type: String,
|
|
7768
|
-
default: ": "
|
|
7769
|
-
},
|
|
7770
|
-
label: {
|
|
7771
|
-
type: String,
|
|
7772
|
-
default: ""
|
|
7773
|
-
},
|
|
7774
|
-
value: {
|
|
7775
|
-
type: String,
|
|
7776
|
-
default: ""
|
|
7777
|
-
}
|
|
7778
|
-
},
|
|
7779
|
-
emits: ["close"]
|
|
7780
|
-
});
|
|
7781
|
-
const _hoisted_1$3 = { class: "dao-tag" };
|
|
7782
|
-
const _hoisted_2$2 = { class: "dao-tag__key" };
|
|
7783
|
-
const _hoisted_3$1 = { class: "dao-tag__value" };
|
|
7784
|
-
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7785
|
-
const _component_dao_icon = resolveComponent("dao-icon");
|
|
7786
|
-
return openBlock(), createElementBlock("span", _hoisted_1$3, [
|
|
7787
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7788
|
-
createElementVNode("span", null, [
|
|
7789
|
-
createElementVNode("span", _hoisted_2$2, [
|
|
7790
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
7791
|
-
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
7792
|
-
]),
|
|
7793
|
-
createTextVNode(toDisplayString(_ctx.separator), 1)
|
|
7794
|
-
]),
|
|
7795
|
-
createElementVNode("span", _hoisted_3$1, [
|
|
7796
|
-
renderSlot(_ctx.$slots, "value", {}, () => [
|
|
7797
|
-
createTextVNode(toDisplayString(_ctx.value), 1)
|
|
8086
|
+
createElementVNode("table", _hoisted_2$2, [
|
|
8087
|
+
_ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_3$1, [
|
|
8088
|
+
createElementVNode("tr", _hoisted_4, [
|
|
8089
|
+
_ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_5, [
|
|
8090
|
+
createVNode(_component_dao_checkbox, {
|
|
8091
|
+
checked: _ctx.global.checked,
|
|
8092
|
+
indeterminate: _ctx.global.indeterminate,
|
|
8093
|
+
onChange: _ctx.toggleSelectedAll
|
|
8094
|
+
}, null, 8, ["checked", "indeterminate", "onChange"])
|
|
8095
|
+
])) : createCommentVNode("", true),
|
|
8096
|
+
_ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_6)) : createCommentVNode("", true),
|
|
8097
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
8098
|
+
return openBlock(), createElementBlock("th", {
|
|
8099
|
+
key: column.id,
|
|
8100
|
+
ref: (el) => _ctx.setColumnRef(column.id, el),
|
|
8101
|
+
class: normalizeClass(["dao-table-th", _ctx.thClass(column)]),
|
|
8102
|
+
style: normalizeStyle(_ctx.columnStyle(column.id)),
|
|
8103
|
+
onClick: ($event) => _ctx.sortColumn(column)
|
|
8104
|
+
}, [
|
|
8105
|
+
createElementVNode("span", _hoisted_8, [
|
|
8106
|
+
renderSlot(_ctx.$slots, `th-${column.id}`, { column }, () => [
|
|
8107
|
+
createTextVNode(toDisplayString(column.header), 1)
|
|
8108
|
+
])
|
|
8109
|
+
]),
|
|
8110
|
+
column.sortable ? withDirectives((openBlock(), createElementBlock("i", {
|
|
8111
|
+
key: 0,
|
|
8112
|
+
class: normalizeClass(["icon-sorting dao-table-sort-icon", { "dao-table-sort-icon--desc": _ctx.sort.desc }])
|
|
8113
|
+
}, null, 2)), [
|
|
8114
|
+
[vShow, _ctx.sort.id === column.id]
|
|
8115
|
+
]) : createCommentVNode("", true),
|
|
8116
|
+
createVNode(_component_dao_resizer, {
|
|
8117
|
+
disabled: !column.resizable,
|
|
8118
|
+
setting: _ctx.tableSetting[column.id],
|
|
8119
|
+
column,
|
|
8120
|
+
onFixedColumnWidth: _ctx.fixedColumnWidth,
|
|
8121
|
+
onUpdateColumnWidth: ($event) => _ctx.updateColumnWidth($event, column.id),
|
|
8122
|
+
onAfterResize: ($event) => _ctx.$emit("afterResize", column.id)
|
|
8123
|
+
}, null, 8, ["disabled", "setting", "column", "onFixedColumnWidth", "onUpdateColumnWidth", "onAfterResize"])
|
|
8124
|
+
], 14, _hoisted_7);
|
|
8125
|
+
}), 128))
|
|
7798
8126
|
])
|
|
8127
|
+
])) : createCommentVNode("", true),
|
|
8128
|
+
createElementVNode("tbody", _hoisted_9, [
|
|
8129
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
|
|
8130
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
8131
|
+
createElementVNode("tr", {
|
|
8132
|
+
class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
|
|
8133
|
+
onClick: (e) => _ctx.onRowClick(e, row, index2)
|
|
8134
|
+
}, [
|
|
8135
|
+
_ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_11, [
|
|
8136
|
+
createVNode(_component_dao_checkbox, {
|
|
8137
|
+
disabled: !_ctx.selectableRows.has(row),
|
|
8138
|
+
checked: _ctx.isRowSelected(row),
|
|
8139
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
8140
|
+
}, ["stop"])),
|
|
8141
|
+
onChange: ($event) => _ctx.toggleSelected(row)
|
|
8142
|
+
}, null, 8, ["disabled", "checked", "onChange"])
|
|
8143
|
+
])) : createCommentVNode("", true),
|
|
8144
|
+
_ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_12, [
|
|
8145
|
+
createElementVNode("i", {
|
|
8146
|
+
class: "dao-table-expand-toggle icon-arrow-sharp",
|
|
8147
|
+
onClick: ($event) => _ctx.toggleExpand(row, index2)
|
|
8148
|
+
}, null, 8, _hoisted_13)
|
|
8149
|
+
])) : createCommentVNode("", true),
|
|
8150
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
8151
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
8152
|
+
key: column.id
|
|
8153
|
+
}, [
|
|
8154
|
+
column.id === "action" ? (openBlock(), createElementBlock("td", {
|
|
8155
|
+
key: 0,
|
|
8156
|
+
class: "dao-table-td",
|
|
8157
|
+
style: normalizeStyle(_ctx.columnStyle(column.id))
|
|
8158
|
+
}, [
|
|
8159
|
+
renderSlot(_ctx.$slots, `td-${column.id}`, {
|
|
8160
|
+
value: row[column.id],
|
|
8161
|
+
row,
|
|
8162
|
+
rowIndex: index2
|
|
8163
|
+
}, () => [
|
|
8164
|
+
createVNode(_component_td_action, null, {
|
|
8165
|
+
default: withCtx(() => [
|
|
8166
|
+
renderSlot(_ctx.$slots, `td-${column.id}-menu`, {
|
|
8167
|
+
value: row[column.id],
|
|
8168
|
+
row,
|
|
8169
|
+
rowIndex: index2
|
|
8170
|
+
})
|
|
8171
|
+
]),
|
|
8172
|
+
_: 2
|
|
8173
|
+
}, 1024)
|
|
8174
|
+
])
|
|
8175
|
+
], 4)) : (openBlock(), createElementBlock("td", {
|
|
8176
|
+
key: 1,
|
|
8177
|
+
class: "dao-table-td",
|
|
8178
|
+
style: normalizeStyle(_ctx.columnStyle(column.id))
|
|
8179
|
+
}, [
|
|
8180
|
+
renderSlot(_ctx.$slots, `td-${column.id}`, {
|
|
8181
|
+
value: row[column.id],
|
|
8182
|
+
row,
|
|
8183
|
+
rowIndex: index2
|
|
8184
|
+
}, () => [
|
|
8185
|
+
createElementVNode("span", null, toDisplayString(_ctx.withDefaultValue(row[column.id])), 1)
|
|
8186
|
+
])
|
|
8187
|
+
], 4))
|
|
8188
|
+
], 64);
|
|
8189
|
+
}), 128))
|
|
8190
|
+
], 10, _hoisted_10),
|
|
8191
|
+
_ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_14, [
|
|
8192
|
+
renderSlot(_ctx.$slots, "expand", {
|
|
8193
|
+
row,
|
|
8194
|
+
rowIndex: index2
|
|
8195
|
+
})
|
|
8196
|
+
], 512)), [
|
|
8197
|
+
[vShow, _ctx.isRowExpanded(row)]
|
|
8198
|
+
]) : createCommentVNode("", true)
|
|
8199
|
+
], 64);
|
|
8200
|
+
}), 128)),
|
|
8201
|
+
_ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
8202
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
8203
|
+
createTextVNode(toDisplayString(_ctx.textContent.emptyText), 1)
|
|
8204
|
+
])
|
|
8205
|
+
])) : createCommentVNode("", true)
|
|
7799
8206
|
])
|
|
7800
8207
|
])
|
|
7801
|
-
]),
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
8208
|
+
], 2),
|
|
8209
|
+
createElementVNode("div", _hoisted_16, [
|
|
8210
|
+
renderSlot(_ctx.$slots, "pagination", {}, () => {
|
|
8211
|
+
var _a2;
|
|
8212
|
+
return [
|
|
8213
|
+
!_ctx.isEmpty && ((_a2 = _ctx.pageLayout) == null ? void 0 : _a2.length) ? (openBlock(), createBlock(_component_dao_pagination, {
|
|
8214
|
+
key: 0,
|
|
8215
|
+
"current-page": _ctx.currentPage,
|
|
8216
|
+
"onUpdate:current-page": _cache[2] || (_cache[2] = ($event) => _ctx.currentPage = $event),
|
|
8217
|
+
"page-size": _ctx.pageSize,
|
|
8218
|
+
"onUpdate:page-size": _cache[3] || (_cache[3] = ($event) => _ctx.pageSize = $event),
|
|
8219
|
+
"page-size-options": _ctx.pageSizeOptions,
|
|
8220
|
+
"page-format": _ctx.pageFormat,
|
|
8221
|
+
compact: _ctx.compact,
|
|
8222
|
+
total: _ctx.total,
|
|
8223
|
+
"total-format": _ctx.totalFormat,
|
|
8224
|
+
layout: _ctx.pageLayout,
|
|
8225
|
+
"page-sizer-width": _ctx.pageSizerWidth,
|
|
8226
|
+
"no-shadow": "",
|
|
8227
|
+
onNext: _cache[4] || (_cache[4] = ($event) => {
|
|
8228
|
+
_ctx.$emit("next", $event);
|
|
8229
|
+
_ctx.clearState();
|
|
8230
|
+
}),
|
|
8231
|
+
onPrev: _cache[5] || (_cache[5] = ($event) => {
|
|
8232
|
+
_ctx.$emit("prev", $event);
|
|
8233
|
+
_ctx.clearState();
|
|
8234
|
+
}),
|
|
8235
|
+
onPageChange: _cache[6] || (_cache[6] = ($event) => {
|
|
8236
|
+
_ctx.$emit("pageChange", $event);
|
|
8237
|
+
_ctx.clearState();
|
|
8238
|
+
}),
|
|
8239
|
+
onSizeChange: _cache[7] || (_cache[7] = ($event) => {
|
|
8240
|
+
_ctx.$emit("sizeChange", $event);
|
|
8241
|
+
_ctx.clearState();
|
|
8242
|
+
})
|
|
8243
|
+
}, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "layout", "page-sizer-width"])) : createCommentVNode("", true)
|
|
8244
|
+
];
|
|
8245
|
+
})
|
|
8246
|
+
])
|
|
8247
|
+
], 2);
|
|
7810
8248
|
}
|
|
7811
|
-
var
|
|
7812
|
-
var
|
|
8249
|
+
var table = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4]]);
|
|
8250
|
+
var tabNav_scss_vue_type_style_index_0_src_lang = "";
|
|
7813
8251
|
const _sfc_main$4 = defineComponent({
|
|
7814
|
-
name: "
|
|
7815
|
-
components: {
|
|
7816
|
-
DaoInput,
|
|
7817
|
-
DaoDropdown,
|
|
7818
|
-
DaoDropdownMenu,
|
|
7819
|
-
DaoDropdownItem
|
|
7820
|
-
},
|
|
8252
|
+
name: "DaoTabNav",
|
|
7821
8253
|
props: {
|
|
7822
|
-
|
|
7823
|
-
type: Object,
|
|
7824
|
-
default: () => ({})
|
|
7825
|
-
},
|
|
7826
|
-
searchPlaceholder: {
|
|
8254
|
+
type: {
|
|
7827
8255
|
type: String,
|
|
7828
|
-
default: ""
|
|
7829
|
-
},
|
|
7830
|
-
searchOptions: {
|
|
7831
|
-
type: Array,
|
|
7832
|
-
default: () => []
|
|
8256
|
+
default: "card"
|
|
7833
8257
|
},
|
|
7834
|
-
|
|
7835
|
-
type:
|
|
7836
|
-
default:
|
|
7837
|
-
}
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
const
|
|
7848
|
-
const
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
const
|
|
7853
|
-
const
|
|
7854
|
-
|
|
7855
|
-
if (type.value === "key") {
|
|
7856
|
-
return void 0;
|
|
7857
|
-
}
|
|
7858
|
-
return props.searchOptions.find((i) => i.label === searchKey.value || i.key === searchKey.value);
|
|
7859
|
-
});
|
|
7860
|
-
const resetSearch = () => {
|
|
7861
|
-
emit("search");
|
|
7862
|
-
searchText.value = "";
|
|
7863
|
-
visible.value = false;
|
|
7864
|
-
daoInputSearchRef.value.input.focus();
|
|
7865
|
-
daoInputSearchRef.value.input.click();
|
|
7866
|
-
};
|
|
7867
|
-
const singleHasChose = (searchOption) => {
|
|
7868
|
-
var _a2;
|
|
7869
|
-
if (searchOption.single && ((_a2 = searchModel.value[searchOption.key]) == null ? void 0 : _a2.length)) {
|
|
7870
|
-
return true;
|
|
7871
|
-
}
|
|
7872
|
-
return false;
|
|
7873
|
-
};
|
|
7874
|
-
const hasFuzzyOption = (value) => {
|
|
7875
|
-
var _a2, _b2;
|
|
7876
|
-
const { fuzzy } = props;
|
|
7877
|
-
if (!fuzzy) {
|
|
7878
|
-
return true;
|
|
7879
|
-
}
|
|
7880
|
-
if ((fuzzy == null ? void 0 : fuzzy.single) && ((_a2 = searchModel.value[fuzzy.key]) == null ? void 0 : _a2.length)) {
|
|
7881
|
-
return true;
|
|
7882
|
-
}
|
|
7883
|
-
if ((_b2 = searchModel.value[fuzzy.key]) == null ? void 0 : _b2.includes(value)) {
|
|
7884
|
-
return true;
|
|
7885
|
-
}
|
|
7886
|
-
return false;
|
|
7887
|
-
};
|
|
7888
|
-
const addFuzzyOption = (value) => {
|
|
7889
|
-
const { fuzzy } = props;
|
|
7890
|
-
if (!fuzzy || hasFuzzyOption(value)) {
|
|
7891
|
-
return;
|
|
7892
|
-
}
|
|
7893
|
-
if (!searchModel.value[fuzzy.key]) {
|
|
7894
|
-
searchModel.value[fuzzy.key] = [value];
|
|
7895
|
-
} else {
|
|
7896
|
-
searchModel.value[fuzzy.key].push(value);
|
|
7897
|
-
}
|
|
7898
|
-
resetSearch();
|
|
7899
|
-
};
|
|
7900
|
-
const filteredKeys = computed(() => {
|
|
7901
|
-
if (type.value === "value") {
|
|
7902
|
-
return [];
|
|
7903
|
-
}
|
|
7904
|
-
return props.searchOptions.reduce((pre, cur) => {
|
|
7905
|
-
var _a2;
|
|
7906
|
-
const label = (_a2 = cur.label) != null ? _a2 : cur.key;
|
|
7907
|
-
if (!label.includes(searchKey.value) || singleHasChose(cur)) {
|
|
7908
|
-
return pre;
|
|
7909
|
-
}
|
|
7910
|
-
return [
|
|
7911
|
-
...pre,
|
|
7912
|
-
{
|
|
7913
|
-
label,
|
|
7914
|
-
key: cur.key
|
|
7915
|
-
}
|
|
7916
|
-
];
|
|
7917
|
-
}, []);
|
|
7918
|
-
});
|
|
7919
|
-
const filteredValues = computed(() => {
|
|
7920
|
-
var _a2, _b2;
|
|
7921
|
-
if (type.value === "key" || !selectedKey.value) {
|
|
7922
|
-
return [];
|
|
7923
|
-
}
|
|
7924
|
-
if (selectedKey.value.single && singleHasChose(selectedKey.value)) {
|
|
7925
|
-
return [];
|
|
7926
|
-
}
|
|
7927
|
-
return (_b2 = (_a2 = selectedKey.value.values) == null ? void 0 : _a2.filter((i) => {
|
|
7928
|
-
var _a3, _b3;
|
|
7929
|
-
return i.label.includes(searchValue.value) && !((_b3 = searchModel.value[((_a3 = selectedKey.value) == null ? void 0 : _a3.key) || ""]) == null ? void 0 : _b3.includes(i.value));
|
|
7930
|
-
})) != null ? _b2 : [];
|
|
7931
|
-
});
|
|
7932
|
-
const selectKey = (item) => {
|
|
7933
|
-
searchText.value = `${item.label}: `;
|
|
7934
|
-
daoInputSearchRef.value.input.focus();
|
|
7935
|
-
};
|
|
7936
|
-
const selectValue = (item) => {
|
|
7937
|
-
var _a2, _b2, _c;
|
|
7938
|
-
visible.value = false;
|
|
7939
|
-
const key = (_b2 = (_a2 = selectedKey.value) == null ? void 0 : _a2.key) != null ? _b2 : "";
|
|
7940
|
-
const target = (_c = searchModel.value) == null ? void 0 : _c[key];
|
|
7941
|
-
if (target) {
|
|
7942
|
-
target.push(item.value);
|
|
7943
|
-
} else {
|
|
7944
|
-
searchModel.value[key] = [item.value];
|
|
7945
|
-
}
|
|
7946
|
-
resetSearch();
|
|
7947
|
-
};
|
|
7948
|
-
const handleEnter = () => {
|
|
7949
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
7950
|
-
if (!searchText.value) {
|
|
8258
|
+
currentTab: {
|
|
8259
|
+
type: String,
|
|
8260
|
+
default: null
|
|
8261
|
+
},
|
|
8262
|
+
tabList: {
|
|
8263
|
+
type: Array,
|
|
8264
|
+
required: true
|
|
8265
|
+
}
|
|
8266
|
+
},
|
|
8267
|
+
emits: ["updateValue", "click"],
|
|
8268
|
+
setup(props, { emit }) {
|
|
8269
|
+
let onMouseenter;
|
|
8270
|
+
let onMouseleave;
|
|
8271
|
+
const activeTab = ref();
|
|
8272
|
+
const tabNav = ref();
|
|
8273
|
+
let lineStyle;
|
|
8274
|
+
let setActiveLineStyle;
|
|
8275
|
+
let tabResizeObserver;
|
|
8276
|
+
const isLine = computed(() => props.type === "line");
|
|
8277
|
+
const renderLines = () => {
|
|
8278
|
+
if (!isLine.value) {
|
|
7951
8279
|
return;
|
|
7952
8280
|
}
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
8281
|
+
const hoverTab = ref();
|
|
8282
|
+
const hoverLineStyle = computed(() => {
|
|
8283
|
+
const tab = unref(hoverTab);
|
|
8284
|
+
return tab ? {
|
|
8285
|
+
"--hover-line-width": `${tab.offsetWidth || 0}px`,
|
|
8286
|
+
"--hover-line-left": `${tab.offsetLeft || 0}px`
|
|
8287
|
+
} : {};
|
|
8288
|
+
});
|
|
8289
|
+
onMouseenter = (event) => {
|
|
8290
|
+
if (event.target) {
|
|
8291
|
+
hoverTab.value = event.target;
|
|
7958
8292
|
}
|
|
7959
|
-
|
|
7960
|
-
|
|
8293
|
+
};
|
|
8294
|
+
onMouseleave = (event) => {
|
|
8295
|
+
if (event.target === hoverTab.value) {
|
|
8296
|
+
hoverTab.value = void 0;
|
|
8297
|
+
}
|
|
8298
|
+
};
|
|
8299
|
+
const activeLineStyle = ref({});
|
|
8300
|
+
setActiveLineStyle = () => {
|
|
8301
|
+
const tab = unref(activeTab);
|
|
8302
|
+
if (tab && tab.offsetWidth && tab.offsetLeft !== void 0) {
|
|
8303
|
+
activeLineStyle.value = {
|
|
8304
|
+
"--active-line-width": `${tab.offsetWidth || 0}px`,
|
|
8305
|
+
"--active-line-left": `${tab.offsetLeft || 0}px`
|
|
8306
|
+
};
|
|
8307
|
+
}
|
|
8308
|
+
};
|
|
8309
|
+
watch(activeTab, (val) => {
|
|
8310
|
+
setActiveLineStyle();
|
|
8311
|
+
tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
|
|
8312
|
+
tabResizeObserver = new ResizeObserver(setActiveLineStyle);
|
|
8313
|
+
if (tabNav.value && val) {
|
|
8314
|
+
tabResizeObserver.observe(val);
|
|
8315
|
+
}
|
|
8316
|
+
});
|
|
8317
|
+
lineStyle = computed(() => __spreadValues(__spreadValues({}, activeLineStyle.value), hoverLineStyle.value));
|
|
8318
|
+
};
|
|
8319
|
+
const stopWatch = watch(isLine, (val) => {
|
|
8320
|
+
if (val) {
|
|
8321
|
+
renderLines();
|
|
8322
|
+
stopWatch();
|
|
7961
8323
|
}
|
|
7962
|
-
|
|
7963
|
-
|
|
8324
|
+
});
|
|
8325
|
+
onMounted(renderLines);
|
|
8326
|
+
onUnmounted(() => {
|
|
8327
|
+
if (tabNav.value) {
|
|
8328
|
+
tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
|
|
7964
8329
|
}
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
target2.push(searchValue.value);
|
|
7973
|
-
} else {
|
|
7974
|
-
searchModel.value[key] = [searchValue.value];
|
|
7975
|
-
}
|
|
7976
|
-
resetSearch();
|
|
8330
|
+
});
|
|
8331
|
+
const handleClick = (event, tab) => {
|
|
8332
|
+
const {
|
|
8333
|
+
value,
|
|
8334
|
+
disabled
|
|
8335
|
+
} = tab;
|
|
8336
|
+
if (typeof disabled !== "undefined" && disabled) {
|
|
7977
8337
|
return;
|
|
7978
8338
|
}
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
return;
|
|
8339
|
+
if (value !== props.currentTab) {
|
|
8340
|
+
emit("updateValue", value);
|
|
7982
8341
|
}
|
|
7983
|
-
|
|
7984
|
-
};
|
|
7985
|
-
const showPopover = () => {
|
|
7986
|
-
visible.value = true;
|
|
7987
|
-
};
|
|
7988
|
-
onClickOutside(dropdownRef, () => {
|
|
7989
|
-
visible.value = false;
|
|
7990
|
-
});
|
|
7991
|
-
return {
|
|
7992
|
-
computedSearchPlaceholder,
|
|
7993
|
-
daoInputSearchRef,
|
|
7994
|
-
filteredKeys,
|
|
7995
|
-
filteredValues,
|
|
7996
|
-
visible,
|
|
7997
|
-
searchText,
|
|
7998
|
-
type,
|
|
7999
|
-
selectedKey,
|
|
8000
|
-
dropdownRef,
|
|
8001
|
-
selectKey,
|
|
8002
|
-
selectValue,
|
|
8003
|
-
showPopover,
|
|
8004
|
-
handleEnter
|
|
8342
|
+
emit("click", event, value);
|
|
8005
8343
|
};
|
|
8344
|
+
const tabsLi = computed(() => props.tabList.map((tab, index2) => {
|
|
8345
|
+
const { label } = tab;
|
|
8346
|
+
const isNotString = typeof label !== "string";
|
|
8347
|
+
const isActive = tab.value === props.currentTab;
|
|
8348
|
+
const hasHoverLine = isLine.value && !tab.disabled;
|
|
8349
|
+
const hasActiveLine = isLine.value && isActive;
|
|
8350
|
+
return h("div", {
|
|
8351
|
+
class: {
|
|
8352
|
+
"dao-tabs__nav-item": true,
|
|
8353
|
+
"dao-tabs__nav-item--active": isActive,
|
|
8354
|
+
"dao-tabs__nav-item--custom": isNotString,
|
|
8355
|
+
"dao-tabs__nav-item--disabled": tab.disabled
|
|
8356
|
+
},
|
|
8357
|
+
ref: hasActiveLine ? activeTab : void 0,
|
|
8358
|
+
key: index2,
|
|
8359
|
+
onClick: (event) => handleClick(event, tab),
|
|
8360
|
+
onMouseenter: hasHoverLine ? onMouseenter : void 0,
|
|
8361
|
+
onMouseleave: hasHoverLine ? onMouseleave : void 0
|
|
8362
|
+
}, [isNotString ? label() : label]);
|
|
8363
|
+
}));
|
|
8364
|
+
return () => h("div", {
|
|
8365
|
+
class: [
|
|
8366
|
+
"dao-tabs__nav__scroll"
|
|
8367
|
+
]
|
|
8368
|
+
}, h("div", {
|
|
8369
|
+
class: [
|
|
8370
|
+
"dao-tabs__nav"
|
|
8371
|
+
],
|
|
8372
|
+
style: lineStyle == null ? void 0 : lineStyle.value,
|
|
8373
|
+
ref: tabNav
|
|
8374
|
+
}, tabsLi.value));
|
|
8006
8375
|
}
|
|
8007
8376
|
});
|
|
8008
|
-
|
|
8009
|
-
const _component_dao_input = resolveComponent("dao-input");
|
|
8010
|
-
const _component_dao_dropdown_item = resolveComponent("dao-dropdown-item");
|
|
8011
|
-
const _component_dao_dropdown_menu = resolveComponent("dao-dropdown-menu");
|
|
8012
|
-
const _component_dao_dropdown = resolveComponent("dao-dropdown");
|
|
8013
|
-
return openBlock(), createBlock(_component_dao_dropdown, {
|
|
8014
|
-
ref: "dropdownRef",
|
|
8015
|
-
"append-to": false,
|
|
8016
|
-
trigger: "manual",
|
|
8017
|
-
visible: _ctx.visible && !!(_ctx.filteredKeys.length || _ctx.filteredValues.length),
|
|
8018
|
-
placement: "bottom-start"
|
|
8019
|
-
}, {
|
|
8020
|
-
menu: withCtx(() => [
|
|
8021
|
-
createVNode(_component_dao_dropdown_menu, null, {
|
|
8022
|
-
default: withCtx(() => [
|
|
8023
|
-
_ctx.type === "key" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.filteredKeys, (item, index2) => {
|
|
8024
|
-
return openBlock(), createBlock(_component_dao_dropdown_item, {
|
|
8025
|
-
key: index2,
|
|
8026
|
-
onClick: ($event) => _ctx.selectKey(item)
|
|
8027
|
-
}, {
|
|
8028
|
-
default: withCtx(() => [
|
|
8029
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
8030
|
-
]),
|
|
8031
|
-
_: 2
|
|
8032
|
-
}, 1032, ["onClick"]);
|
|
8033
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.filteredValues, (item, index2) => {
|
|
8034
|
-
return openBlock(), createBlock(_component_dao_dropdown_item, {
|
|
8035
|
-
key: index2,
|
|
8036
|
-
onClick: ($event) => _ctx.selectValue(item)
|
|
8037
|
-
}, {
|
|
8038
|
-
default: withCtx(() => [
|
|
8039
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
8040
|
-
]),
|
|
8041
|
-
_: 2
|
|
8042
|
-
}, 1032, ["onClick"]);
|
|
8043
|
-
}), 128))
|
|
8044
|
-
]),
|
|
8045
|
-
_: 1
|
|
8046
|
-
})
|
|
8047
|
-
]),
|
|
8048
|
-
default: withCtx(() => [
|
|
8049
|
-
createVNode(_component_dao_input, {
|
|
8050
|
-
ref: "daoInputSearchRef",
|
|
8051
|
-
modelValue: _ctx.searchText,
|
|
8052
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.searchText = $event),
|
|
8053
|
-
type: "search",
|
|
8054
|
-
borderless: "",
|
|
8055
|
-
block: "",
|
|
8056
|
-
placeholder: _ctx.computedSearchPlaceholder,
|
|
8057
|
-
onKeyup: withKeys(_ctx.handleEnter, ["enter"]),
|
|
8058
|
-
onClick: _ctx.showPopover
|
|
8059
|
-
}, null, 8, ["modelValue", "placeholder", "onKeyup", "onClick"])
|
|
8060
|
-
]),
|
|
8061
|
-
_: 1
|
|
8062
|
-
}, 8, ["visible"]);
|
|
8063
|
-
}
|
|
8064
|
-
var DaoToolbarFilter = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
|
|
8065
|
-
var toolbar_vue_vue_type_style_index_0_lang = "";
|
|
8377
|
+
var tabs_scss_vue_type_style_index_0_src_lang = "";
|
|
8066
8378
|
const _sfc_main$3 = defineComponent({
|
|
8067
|
-
name: "
|
|
8379
|
+
name: "DaoTabs",
|
|
8068
8380
|
components: {
|
|
8069
|
-
|
|
8070
|
-
DaoToolbarFilter,
|
|
8071
|
-
DaoTag
|
|
8381
|
+
TabNav: _sfc_main$4
|
|
8072
8382
|
},
|
|
8073
8383
|
props: {
|
|
8074
|
-
|
|
8075
|
-
type: Object,
|
|
8076
|
-
default: () => ({})
|
|
8077
|
-
},
|
|
8078
|
-
searchPlaceholder: {
|
|
8384
|
+
type: {
|
|
8079
8385
|
type: String,
|
|
8080
|
-
default: ""
|
|
8081
|
-
|
|
8082
|
-
searchOptions: {
|
|
8083
|
-
type: Array,
|
|
8084
|
-
default: () => []
|
|
8085
|
-
},
|
|
8086
|
-
fuzzy: {
|
|
8087
|
-
type: Object,
|
|
8088
|
-
default: void 0
|
|
8386
|
+
default: "card",
|
|
8387
|
+
validator: (value) => ["card", "line", "pill"].includes(value)
|
|
8089
8388
|
},
|
|
8090
|
-
|
|
8091
|
-
type:
|
|
8092
|
-
|
|
8389
|
+
direction: {
|
|
8390
|
+
type: String,
|
|
8391
|
+
required: false,
|
|
8392
|
+
default: "left",
|
|
8393
|
+
validator: (value) => ["left", "right"].includes(value)
|
|
8093
8394
|
},
|
|
8094
|
-
|
|
8095
|
-
type:
|
|
8096
|
-
default:
|
|
8395
|
+
modelValue: {
|
|
8396
|
+
type: String,
|
|
8397
|
+
default: null
|
|
8097
8398
|
}
|
|
8098
8399
|
},
|
|
8099
|
-
emits: ["
|
|
8400
|
+
emits: ["change", "update:modelValue", "click"],
|
|
8100
8401
|
setup(props, { emit }) {
|
|
8101
|
-
const {
|
|
8102
|
-
const
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
if (
|
|
8106
|
-
|
|
8402
|
+
const { modelValue } = toRefs(props);
|
|
8403
|
+
const currentValue = ref(modelValue.value);
|
|
8404
|
+
watch(modelValue, (newV) => {
|
|
8405
|
+
emit("change", newV);
|
|
8406
|
+
if (newV !== currentValue.value) {
|
|
8407
|
+
currentValue.value = newV;
|
|
8107
8408
|
}
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8409
|
+
});
|
|
8410
|
+
watch(currentValue, (newV) => {
|
|
8411
|
+
if (newV !== modelValue.value) {
|
|
8412
|
+
emit("update:modelValue", newV);
|
|
8413
|
+
}
|
|
8414
|
+
});
|
|
8415
|
+
const updateValue = (tabValue) => {
|
|
8416
|
+
currentValue.value = tabValue;
|
|
8114
8417
|
};
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
return (_c = (_b2 = (_a2 = searchOption == null ? void 0 : searchOption.values) == null ? void 0 : _a2.find((i) => i.value === value)) == null ? void 0 : _b2.label) != null ? _c : value;
|
|
8418
|
+
provide(tabModelValueKey, modelValue);
|
|
8419
|
+
const onClick = (e, tabValue) => {
|
|
8420
|
+
emit("click", e, tabValue);
|
|
8119
8421
|
};
|
|
8120
|
-
const
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8422
|
+
const tabList = reactive([]);
|
|
8423
|
+
const tabBody = ref();
|
|
8424
|
+
const addTab = (tab, child) => {
|
|
8425
|
+
var _a2;
|
|
8426
|
+
if (!child.value) {
|
|
8427
|
+
return;
|
|
8428
|
+
}
|
|
8429
|
+
const index2 = Array.from(((_a2 = tabBody.value) == null ? void 0 : _a2.children) || []).indexOf(child.value);
|
|
8430
|
+
if (index2 > -1) {
|
|
8431
|
+
tabList.splice(index2, 0, tab);
|
|
8124
8432
|
}
|
|
8125
|
-
emit("search");
|
|
8126
8433
|
};
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8434
|
+
provide(addTabFnKey, addTab);
|
|
8435
|
+
const removeTab = (tab) => {
|
|
8436
|
+
const index2 = tabList.indexOf(tab);
|
|
8437
|
+
if (index2 > -1) {
|
|
8438
|
+
tabList.splice(index2, 1);
|
|
8439
|
+
}
|
|
8132
8440
|
};
|
|
8441
|
+
provide(removeTabFnKey, removeTab);
|
|
8133
8442
|
return {
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
clearFilter,
|
|
8139
|
-
getKeyLabel,
|
|
8140
|
-
getValueLabel
|
|
8443
|
+
tabList,
|
|
8444
|
+
tabBody,
|
|
8445
|
+
onClick,
|
|
8446
|
+
updateValue
|
|
8141
8447
|
};
|
|
8142
8448
|
}
|
|
8143
8449
|
});
|
|
8144
|
-
const _hoisted_1$2 = { class: "dao-
|
|
8145
|
-
const _hoisted_2$1 = {
|
|
8146
|
-
const _hoisted_3 = {
|
|
8450
|
+
const _hoisted_1$2 = { class: "dao-tabs__nav__wrap" };
|
|
8451
|
+
const _hoisted_2$1 = {
|
|
8147
8452
|
key: 0,
|
|
8148
|
-
class: "dao-
|
|
8149
|
-
};
|
|
8150
|
-
const _hoisted_4 = {
|
|
8151
|
-
key: 1,
|
|
8152
|
-
class: "dao-toolbar__search"
|
|
8153
|
-
};
|
|
8154
|
-
const _hoisted_5 = { class: "dao-toolbar__actions" };
|
|
8155
|
-
const _hoisted_6 = {
|
|
8156
|
-
key: 2,
|
|
8157
|
-
class: "dao-toolbar__primary-action"
|
|
8453
|
+
class: "dao-tabs__action"
|
|
8158
8454
|
};
|
|
8159
|
-
const
|
|
8160
|
-
|
|
8161
|
-
class: "dao-
|
|
8455
|
+
const _hoisted_3 = {
|
|
8456
|
+
ref: "tabBody",
|
|
8457
|
+
class: "dao-tabs__body"
|
|
8162
8458
|
};
|
|
8163
|
-
function _sfc_render$
|
|
8164
|
-
const
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
createElementVNode("div",
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
fuzzy: _ctx.fuzzy,
|
|
8180
|
-
onSearch: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("search"))
|
|
8181
|
-
}, null, 8, ["search", "search-placeholder", "search-options", "fuzzy"])
|
|
8182
|
-
])
|
|
8183
|
-
])) : createCommentVNode("", true),
|
|
8184
|
-
createElementVNode("div", _hoisted_5, [
|
|
8185
|
-
!_ctx.hideRefresh ? (openBlock(), createBlock(_component_dao_action_icon, {
|
|
8186
|
-
key: 0,
|
|
8187
|
-
class: "dao-toolbar__actions-refresh",
|
|
8188
|
-
name: "icon-refresh",
|
|
8189
|
-
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("refresh"))
|
|
8190
|
-
})) : createCommentVNode("", true)
|
|
8459
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8460
|
+
const _component_tab_nav = resolveComponent("tab-nav");
|
|
8461
|
+
return openBlock(), createElementBlock("div", {
|
|
8462
|
+
class: normalizeClass(["dao-tabs", ["dao-tabs--" + _ctx.type, _ctx.direction === "right" ? "dao-tabs--right" : ""]])
|
|
8463
|
+
}, [
|
|
8464
|
+
createElementVNode("div", {
|
|
8465
|
+
class: normalizeClass(["dao-tabs__header", "dao-tabs__header--" + _ctx.type])
|
|
8466
|
+
}, [
|
|
8467
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
8468
|
+
createVNode(_component_tab_nav, {
|
|
8469
|
+
type: _ctx.type,
|
|
8470
|
+
"tab-list": _ctx.tabList,
|
|
8471
|
+
"current-tab": _ctx.modelValue,
|
|
8472
|
+
onUpdateValue: _ctx.updateValue,
|
|
8473
|
+
onClick: _ctx.onClick
|
|
8474
|
+
}, null, 8, ["type", "tab-list", "current-tab", "onUpdateValue", "onClick"])
|
|
8191
8475
|
]),
|
|
8192
|
-
_ctx.$slots.action ? (openBlock(), createElementBlock("div",
|
|
8476
|
+
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
8193
8477
|
renderSlot(_ctx.$slots, "action")
|
|
8194
8478
|
])) : createCommentVNode("", true)
|
|
8195
|
-
]),
|
|
8196
|
-
|
|
8197
|
-
(
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
return openBlock(), createBlock(_component_dao_tag, {
|
|
8201
|
-
key: index2,
|
|
8202
|
-
"is-close-show": "",
|
|
8203
|
-
closable: "",
|
|
8204
|
-
onClose: ($event) => _ctx.removeValue(key, index2)
|
|
8205
|
-
}, {
|
|
8206
|
-
default: withCtx(() => [
|
|
8207
|
-
createTextVNode(toDisplayString(value), 1)
|
|
8208
|
-
]),
|
|
8209
|
-
_: 2
|
|
8210
|
-
}, 1032, ["onClose"]);
|
|
8211
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(values, (value, index2) => {
|
|
8212
|
-
return openBlock(), createBlock(_component_dao_tag, {
|
|
8213
|
-
key: index2,
|
|
8214
|
-
"is-close-show": "",
|
|
8215
|
-
closable: "",
|
|
8216
|
-
onClose: ($event) => _ctx.removeValue(key, index2)
|
|
8217
|
-
}, {
|
|
8218
|
-
label: withCtx(() => [
|
|
8219
|
-
createTextVNode(toDisplayString(_ctx.getKeyLabel(key)), 1)
|
|
8220
|
-
]),
|
|
8221
|
-
value: withCtx(() => [
|
|
8222
|
-
createTextVNode(toDisplayString(_ctx.getValueLabel(key, value)), 1)
|
|
8223
|
-
]),
|
|
8224
|
-
_: 2
|
|
8225
|
-
}, 1032, ["onClose"]);
|
|
8226
|
-
}), 128))
|
|
8227
|
-
], 64);
|
|
8228
|
-
}), 128)),
|
|
8229
|
-
createElementVNode("span", {
|
|
8230
|
-
class: "dao-toolbar__clear",
|
|
8231
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.clearFilter && _ctx.clearFilter(...args))
|
|
8232
|
-
}, toDisplayString(_ctx.t("core.toolbar.clear")), 1)
|
|
8233
|
-
])) : createCommentVNode("", true)
|
|
8234
|
-
]);
|
|
8479
|
+
], 2),
|
|
8480
|
+
createElementVNode("div", _hoisted_3, [
|
|
8481
|
+
renderSlot(_ctx.$slots, "default")
|
|
8482
|
+
], 512)
|
|
8483
|
+
], 2);
|
|
8235
8484
|
}
|
|
8236
|
-
var
|
|
8237
|
-
|
|
8238
|
-
var TextButtonProps = {
|
|
8239
|
-
tag: {
|
|
8240
|
-
type: [Object, String],
|
|
8241
|
-
default: "button"
|
|
8242
|
-
},
|
|
8243
|
-
prop: {
|
|
8244
|
-
type: Object,
|
|
8245
|
-
default: () => ({
|
|
8246
|
-
type: "default"
|
|
8247
|
-
})
|
|
8248
|
-
}
|
|
8249
|
-
};
|
|
8250
|
-
var textButton_vue_vue_type_style_index_0_lang = "";
|
|
8485
|
+
var tabs = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
8486
|
+
var tabItem_scss_vue_type_style_index_0_src_lang = "";
|
|
8251
8487
|
const _sfc_main$2 = defineComponent({
|
|
8252
|
-
name: "
|
|
8253
|
-
|
|
8254
|
-
|
|
8488
|
+
name: "DaoTabItem",
|
|
8489
|
+
props: {
|
|
8490
|
+
label: {
|
|
8491
|
+
type: [String, Function],
|
|
8492
|
+
required: true
|
|
8493
|
+
},
|
|
8494
|
+
value: {
|
|
8495
|
+
type: String,
|
|
8496
|
+
required: true
|
|
8497
|
+
},
|
|
8498
|
+
disabled: {
|
|
8499
|
+
type: Boolean,
|
|
8500
|
+
default: false
|
|
8501
|
+
}
|
|
8255
8502
|
},
|
|
8256
|
-
props
|
|
8257
|
-
|
|
8258
|
-
const
|
|
8259
|
-
const
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
]
|
|
8269
|
-
}));
|
|
8270
|
-
const iconTemp = computed(() => {
|
|
8271
|
-
var _a2, _b2;
|
|
8272
|
-
return ((_a2 = prop.value) == null ? void 0 : _a2.icon) ? h(DaoIcon, {
|
|
8273
|
-
name: (_b2 = prop.value) == null ? void 0 : _b2.icon,
|
|
8274
|
-
"use-font": true,
|
|
8275
|
-
class: "dao-text-button__icon"
|
|
8276
|
-
}) : null;
|
|
8277
|
-
});
|
|
8278
|
-
const slotTemp = computed(() => {
|
|
8279
|
-
const _slots = __spreadValues({
|
|
8280
|
-
default: () => ""
|
|
8281
|
-
}, slots);
|
|
8282
|
-
return Object.fromEntries(Object.entries(_slots).map(([key, item]) => {
|
|
8283
|
-
const newSlot = isFunction$1(item) ? item : () => item || null;
|
|
8284
|
-
if (key === "default") {
|
|
8285
|
-
return [
|
|
8286
|
-
key,
|
|
8287
|
-
(...args) => {
|
|
8288
|
-
const defaultSlot = newSlot.call(null, ...args);
|
|
8289
|
-
return [
|
|
8290
|
-
iconTemp.value,
|
|
8291
|
-
defaultSlot ? h("span", { class: "dao-text-button__slot" }, { default: () => defaultSlot }) : ""
|
|
8292
|
-
];
|
|
8293
|
-
}
|
|
8294
|
-
];
|
|
8295
|
-
}
|
|
8296
|
-
return [key, newSlot];
|
|
8297
|
-
}));
|
|
8298
|
-
});
|
|
8299
|
-
return () => h(props.tag, __spreadValues({}, componentComputed.value), slotTemp.value);
|
|
8503
|
+
setup(props) {
|
|
8504
|
+
const tabModelValue = inject(tabModelValueKey);
|
|
8505
|
+
const active = computed(() => (tabModelValue == null ? void 0 : tabModelValue.value) === props.value);
|
|
8506
|
+
const tabItem2 = ref();
|
|
8507
|
+
const addTabFn = inject(addTabFnKey, NOOP);
|
|
8508
|
+
const removeTabFn = inject(removeTabFnKey, NOOP);
|
|
8509
|
+
onMounted(() => addTabFn(props, tabItem2));
|
|
8510
|
+
onUnmounted(() => removeTabFn(props));
|
|
8511
|
+
return {
|
|
8512
|
+
active,
|
|
8513
|
+
tabItem: tabItem2
|
|
8514
|
+
};
|
|
8300
8515
|
}
|
|
8301
8516
|
});
|
|
8517
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8518
|
+
return openBlock(), createElementBlock("div", {
|
|
8519
|
+
ref: "tabItem",
|
|
8520
|
+
class: normalizeClass(["dao-tab-item", {
|
|
8521
|
+
"dao-tab-item--hidden": !_ctx.active
|
|
8522
|
+
}])
|
|
8523
|
+
}, [
|
|
8524
|
+
renderSlot(_ctx.$slots, "default")
|
|
8525
|
+
], 2);
|
|
8526
|
+
}
|
|
8527
|
+
var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
8302
8528
|
const transferProps = {
|
|
8303
8529
|
source: {
|
|
8304
8530
|
type: Array,
|
|
@@ -8382,7 +8608,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
8382
8608
|
DaoCheckbox,
|
|
8383
8609
|
DaoInput,
|
|
8384
8610
|
DaoActionIcon,
|
|
8385
|
-
DaoTextButton: _sfc_main$
|
|
8611
|
+
DaoTextButton: _sfc_main$O,
|
|
8386
8612
|
DaoEllipsis
|
|
8387
8613
|
},
|
|
8388
8614
|
props: transferPanelProp,
|
|
@@ -8608,7 +8834,7 @@ const _sfc_main = defineComponent({
|
|
|
8608
8834
|
name: "DaoTransfer",
|
|
8609
8835
|
components: {
|
|
8610
8836
|
transferPanel,
|
|
8611
|
-
DaoTextButton: _sfc_main$
|
|
8837
|
+
DaoTextButton: _sfc_main$O
|
|
8612
8838
|
},
|
|
8613
8839
|
props: transferProps,
|
|
8614
8840
|
emits: ["update:modelValue", "add", "clear", "change", "refresh", "checkAll"],
|
|
@@ -8851,6 +9077,7 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
8851
9077
|
__proto__: null,
|
|
8852
9078
|
[Symbol.toStringTag]: "Module",
|
|
8853
9079
|
ActionIcon: DaoActionIcon,
|
|
9080
|
+
DaoBatchBar,
|
|
8854
9081
|
Button: DaoButton,
|
|
8855
9082
|
ButtonGroup: buttonGroup,
|
|
8856
9083
|
Card: card,
|
|
@@ -8883,7 +9110,7 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
8883
9110
|
NavItem: navItem,
|
|
8884
9111
|
NavSub: navSub,
|
|
8885
9112
|
Pagination: DaoPagination,
|
|
8886
|
-
Popover: _sfc_main$
|
|
9113
|
+
Popover: _sfc_main$E,
|
|
8887
9114
|
Popper: DaoPopper,
|
|
8888
9115
|
Progress: progress,
|
|
8889
9116
|
Radio: radio,
|
|
@@ -8893,12 +9120,12 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
8893
9120
|
Switch: _switch,
|
|
8894
9121
|
Table: table,
|
|
8895
9122
|
Tabs: tabs,
|
|
8896
|
-
TabNav: _sfc_main$
|
|
9123
|
+
TabNav: _sfc_main$4,
|
|
8897
9124
|
TabItem: tabItem,
|
|
8898
9125
|
Tag: DaoTag,
|
|
8899
|
-
Toolbar:
|
|
8900
|
-
Tooltip: _sfc_main$
|
|
8901
|
-
TextButton: _sfc_main$
|
|
9126
|
+
Toolbar: DaoToolbar,
|
|
9127
|
+
Tooltip: _sfc_main$F,
|
|
9128
|
+
TextButton: _sfc_main$O,
|
|
8902
9129
|
DaoEllipsis,
|
|
8903
9130
|
Transfer: transfer,
|
|
8904
9131
|
TransferPanel: transferPanel
|
|
@@ -8946,6 +9173,11 @@ var enUS = {
|
|
|
8946
9173
|
transfer: {
|
|
8947
9174
|
checkAll: "Check all",
|
|
8948
9175
|
clear: "Clear"
|
|
9176
|
+
},
|
|
9177
|
+
batchBar: {
|
|
9178
|
+
removeText: "Delete",
|
|
9179
|
+
deselectText: "Deselect",
|
|
9180
|
+
selectedFormat: "{n} item selected | {n} items selected"
|
|
8949
9181
|
}
|
|
8950
9182
|
}
|
|
8951
9183
|
};
|
|
@@ -8987,6 +9219,11 @@ var zhCN = {
|
|
|
8987
9219
|
transfer: {
|
|
8988
9220
|
checkAll: "\u5168\u9009",
|
|
8989
9221
|
clear: "\u6E05\u7A7A"
|
|
9222
|
+
},
|
|
9223
|
+
batchBar: {
|
|
9224
|
+
removeText: "\u5220\u9664",
|
|
9225
|
+
deselectText: "\u53D6\u6D88\u9009\u4E2D",
|
|
9226
|
+
selectedFormat: "\u9009\u4E2D {n} \u9879"
|
|
8990
9227
|
}
|
|
8991
9228
|
}
|
|
8992
9229
|
};
|
|
@@ -9016,4 +9253,4 @@ var index = {
|
|
|
9016
9253
|
install,
|
|
9017
9254
|
locale
|
|
9018
9255
|
};
|
|
9019
|
-
export { DaoActionIcon as ActionIcon, breadcrumb as Breadcrumb, DaoBreadcrumbItem as BreadcrumbItem, DaoButton as Button, buttonGroup as ButtonGroup, card as Card, cardItem as CardItem, DaoCheckbox as Checkbox, checkboxGroup as CheckboxGroup, DaoEllipsis, dialog as Dialog, DialogFooter, DialogHeader, drawer as Drawer, DaoDropdown as Dropdown, DaoDropdownItem as DropdownItem, DaoDropdownMenu as DropdownMenu, expansion as Expansion, expansionItem as ExpansionItem, form as Form, formGroup as FormGroup, formItem as FormItem, header as Header, DaoIcon as Icon, DaoInput as Input, message as Message, nav as Nav, navHead as NavHead, navItem as NavItem, navSub as NavSub, DaoOption as Option, DaoPagination as Pagination, _sfc_main$
|
|
9256
|
+
export { DaoActionIcon as ActionIcon, breadcrumb as Breadcrumb, DaoBreadcrumbItem as BreadcrumbItem, DaoButton as Button, buttonGroup as ButtonGroup, card as Card, cardItem as CardItem, DaoCheckbox as Checkbox, checkboxGroup as CheckboxGroup, DaoBatchBar, DaoEllipsis, dialog as Dialog, DialogFooter, DialogHeader, drawer as Drawer, DaoDropdown as Dropdown, DaoDropdownItem as DropdownItem, DaoDropdownMenu as DropdownMenu, expansion as Expansion, expansionItem as ExpansionItem, form as Form, formGroup as FormGroup, formItem as FormItem, header as Header, DaoIcon as Icon, DaoInput as Input, message as Message, nav as Nav, navHead as NavHead, navItem as NavItem, navSub as NavSub, DaoOption as Option, DaoPagination as Pagination, _sfc_main$E as Popover, DaoPopper as Popper, progress as Progress, radio as Radio, radioGroup as RadioGroup, DaoSelect as Select, _switch as Switch, tabItem as TabItem, _sfc_main$4 as TabNav, table as Table, tabs as Tabs, DaoTag as Tag, _sfc_main$O as TextButton, DaoToolbar as Toolbar, _sfc_main$F as Tooltip, transfer as Transfer, transferPanel as TransferPanel, index as default, formClassNames, formKey, formProps };
|