@dao-style/core 0.0.1-beta.4 → 0.0.1-beta.5
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/action-icon/action-icon.vue.d.ts +35 -0
- package/dist/components/action-icon/index.d.ts +1 -0
- package/dist/components/action-icon/test/action-icon.spec.d.ts +1 -0
- package/dist/components/breadcrumb/breadcrumb-item-props.d.ts +16 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb-props.d.ts +40 -0
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +64 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/test/breadcrumb-item.spec.d.ts +1 -0
- package/dist/components/breadcrumb/test/breadcrumb.spec.d.ts +1 -0
- package/dist/components/button/button-group.vue.d.ts +2 -0
- package/dist/components/button/button-icon.vue.d.ts +20 -0
- package/dist/components/button/button.vue.d.ts +75 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/props.d.ts +40 -0
- package/dist/components/button/test/button.spec.d.ts +1 -0
- package/dist/components/card/card-item.vue.d.ts +2 -0
- package/dist/components/card/card.vue.d.ts +44 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/test/card.spec.d.ts +1 -0
- package/dist/components/card/types.d.ts +1 -0
- package/dist/components/checkbox/checkbox-group.vue.d.ts +26 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +73 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/test/checkbox-group.spec.d.ts +1 -0
- package/dist/components/checkbox/test/checkbox.spec.d.ts +1 -0
- package/dist/components/checkbox/test/utils.d.ts +6 -0
- package/dist/components/dialog/dialog-footer.vue.d.ts +33 -0
- package/dist/components/dialog/dialog-header.vue.d.ts +24 -0
- package/dist/components/dialog/dialog.vue.d.ts +133 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/test/dialog-footer.spec.d.ts +1 -0
- package/dist/components/dialog/test/dialog-header.spec.d.ts +1 -0
- package/dist/components/dialog/test/dialog.spec.d.ts +1 -0
- package/dist/components/dropdown/dropdown-item.vue.d.ts +36 -0
- package/dist/components/dropdown/dropdown-menu.vue.d.ts +2 -0
- package/dist/components/dropdown/dropdown.vue.d.ts +51 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/test/dropdown-item.spec.d.ts +1 -0
- package/dist/components/dropdown/test/dropdown-menu.spec.d.ts +1 -0
- package/dist/components/dropdown/test/dropdown.spec.d.ts +1 -0
- package/dist/components/form/form-group.vue.d.ts +13 -0
- package/dist/components/form/form-item.vue.d.ts +51 -0
- package/dist/components/form/form.vue.d.ts +22 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/test/form-group.spec.d.ts +1 -0
- package/dist/components/form/test/form-item.spec.d.ts +1 -0
- package/dist/components/form/test/form.spec.d.ts +1 -0
- package/dist/components/header/header.vue.d.ts +26 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/props.d.ts +15 -0
- package/dist/components/header/test/header.spec.d.ts +1 -0
- package/dist/components/icon/icon.vue.d.ts +19 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/svg.d.ts +1 -0
- package/dist/components/icon/test/icon.spec.d.ts +1 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.vue.d.ts +103 -0
- package/dist/components/input/props.d.ts +47 -0
- package/dist/components/input/test/input.spec.d.ts +1 -0
- package/dist/components/message/index.d.ts +1 -0
- package/dist/components/message/message.vue.d.ts +53 -0
- package/dist/components/message/props.d.ts +25 -0
- package/dist/components/message/test/message.spec.d.ts +1 -0
- package/dist/components/message/types.d.ts +1 -0
- package/dist/components/nav/index.d.ts +4 -0
- package/dist/components/nav/nav-head.vue.d.ts +34 -0
- package/dist/components/nav/nav-item.vue.d.ts +68 -0
- package/dist/components/nav/nav-sub.vue.d.ts +80 -0
- package/dist/components/nav/nav.vue.d.ts +33 -0
- package/dist/components/nav/props.d.ts +98 -0
- package/dist/components/nav/test/nav-head.spec.d.ts +1 -0
- package/dist/components/nav/test/nav-item.spec.d.ts +1 -0
- package/dist/components/nav/test/nav-sub.spec.d.ts +1 -0
- package/dist/components/nav/test/nav.spec.d.ts +1 -0
- package/dist/components/nav/types.d.ts +13 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination-props.d.ts +39 -0
- package/dist/components/pagination/pagination.vue.d.ts +82 -0
- package/dist/components/pagination/test/pagination.spec.d.ts +1 -0
- package/dist/components/plugin.d.ts +4 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.vue.d.ts +120 -0
- package/dist/components/popover/test/popover.spec.d.ts +1 -0
- package/dist/components/popper/index.d.ts +1 -0
- package/dist/components/popper/popper-content.vue.d.ts +57 -0
- package/dist/components/popper/popper-props.d.ts +74 -0
- package/dist/components/popper/popper.vue.d.ts +123 -0
- package/dist/components/popper/test/popper.spec.d.ts +1 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/progress.vue.d.ts +38 -0
- package/dist/components/progress/test/progress.spec.d.ts +1 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/radio-group.vue.d.ts +33 -0
- package/dist/components/radio/radio.vue.d.ts +55 -0
- package/dist/components/radio/test/radio-group.spec.d.ts +1 -0
- package/dist/components/radio/test/radio.spec.d.ts +1 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/option.vue.d.ts +32 -0
- package/dist/components/select/select.vue.d.ts +229 -0
- package/dist/components/select/test/option.spec.d.ts +1 -0
- package/dist/components/select/test/select.spec.d.ts +1 -0
- package/dist/components/select/types.d.ts +22 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.vue.d.ts +62 -0
- package/dist/components/switch/test/switch.spec.d.ts +1 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/resizer.vue.d.ts +33 -0
- package/dist/components/table/table-props.d.ts +66 -0
- package/dist/components/table/table.vue.d.ts +186 -0
- package/dist/components/table/test/table.spec.d.ts +1 -0
- package/dist/components/table/type.d.ts +20 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/tab-item.vue.d.ts +30 -0
- package/dist/components/tabs/tab-nav.vue.d.ts +33 -0
- package/dist/components/tabs/tabs.vue.d.ts +43 -0
- package/dist/components/tabs/test/tabs.spec.d.ts +1 -0
- package/dist/components/tabs/types.d.ts +9 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/test/tooltip.spec.d.ts +1 -0
- package/dist/components/tooltip/tooltip-props.d.ts +60 -0
- package/dist/components/tooltip/tooltip.vue.d.ts +120 -0
- package/dist/dao-style.es.js +571 -274
- package/dist/dao-style.umd.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/utils/assist.d.ts +7 -0
- package/dist/utils/constant.d.ts +17 -0
- package/dist/utils/copy-content.d.ts +2 -0
- package/dist/utils/is-nullish.d.ts +1 -0
- package/package.json +10 -14
- package/volar.d.ts +47 -0
package/dist/dao-style.es.js
CHANGED
|
@@ -17,7 +17,60 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock,
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, createBlock, unref, resolveComponent, Fragment, createTextVNode, toDisplayString, ref, inject, watchEffect, mergeProps, provide, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withKeys, withDirectives, vShow, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, renderList, reactive, vModelText, onUnmounted, h } from "vue";
|
|
21
|
+
import { isArray, isSet, looseIndexOf, looseEqual, isFunction, NOOP } from "@vue/shared";
|
|
22
|
+
var actionIcon_vue_vue_type_style_index_0_lang = "";
|
|
23
|
+
var _export_sfc = (sfc, props) => {
|
|
24
|
+
for (const [key, val] of props) {
|
|
25
|
+
sfc[key] = val;
|
|
26
|
+
}
|
|
27
|
+
return sfc;
|
|
28
|
+
};
|
|
29
|
+
const _sfc_main$G = defineComponent({
|
|
30
|
+
name: "DaoActionIcon",
|
|
31
|
+
props: {
|
|
32
|
+
name: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "button",
|
|
39
|
+
validator: (value) => ["button", "divider"].includes(value)
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
emits: ["click"],
|
|
47
|
+
setup(props, { emit }) {
|
|
48
|
+
const isDivider = props.type === "divider";
|
|
49
|
+
const handleClick = (event) => emit("click", event);
|
|
50
|
+
const realDisabled = computed(() => isDivider || props.disabled);
|
|
51
|
+
return {
|
|
52
|
+
handleClick,
|
|
53
|
+
isDivider,
|
|
54
|
+
realDisabled
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const _hoisted_1$u = ["disabled"];
|
|
59
|
+
function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
|
+
return openBlock(), createElementBlock("button", {
|
|
61
|
+
class: normalizeClass(["dao-action-icon", `dao-action-icon--type-${_ctx.type}`]),
|
|
62
|
+
disabled: _ctx.realDisabled,
|
|
63
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
64
|
+
}, [
|
|
65
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
66
|
+
!_ctx.isDivider ? (openBlock(), createElementBlock("i", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
|
|
69
|
+
}, null, 2)) : createCommentVNode("", true)
|
|
70
|
+
])
|
|
71
|
+
], 10, _hoisted_1$u);
|
|
72
|
+
}
|
|
73
|
+
var actionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$C]]);
|
|
21
74
|
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
|
|
22
75
|
var buttonProps = {
|
|
23
76
|
type: {
|
|
@@ -56,13 +109,7 @@ var buttonProps = {
|
|
|
56
109
|
}
|
|
57
110
|
};
|
|
58
111
|
var icon_scss_vue_type_style_index_0_src_lang = "";
|
|
59
|
-
|
|
60
|
-
for (const [key, val] of props) {
|
|
61
|
-
sfc[key] = val;
|
|
62
|
-
}
|
|
63
|
-
return sfc;
|
|
64
|
-
};
|
|
65
|
-
const _sfc_main$C = defineComponent({
|
|
112
|
+
const _sfc_main$F = defineComponent({
|
|
66
113
|
name: "DaoIcon",
|
|
67
114
|
props: {
|
|
68
115
|
name: {
|
|
@@ -80,7 +127,7 @@ const _hoisted_1$t = {
|
|
|
80
127
|
class: "dao-icon"
|
|
81
128
|
};
|
|
82
129
|
const _hoisted_2$j = ["xlink:href"];
|
|
83
|
-
function _sfc_render$
|
|
130
|
+
function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
84
131
|
return _ctx.useFont ? (openBlock(), createElementBlock("i", {
|
|
85
132
|
key: 0,
|
|
86
133
|
class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
|
|
@@ -90,8 +137,8 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
137
|
}, null, 8, _hoisted_2$j)
|
|
91
138
|
]));
|
|
92
139
|
}
|
|
93
|
-
var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
94
|
-
const _sfc_main$
|
|
140
|
+
var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$B]]);
|
|
141
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
95
142
|
props: {
|
|
96
143
|
useFont: {
|
|
97
144
|
type: Boolean,
|
|
@@ -120,10 +167,10 @@ const NO_ICON = Symbol(0);
|
|
|
120
167
|
const RIGHT_ICON = Symbol(1);
|
|
121
168
|
const LEFT_ICON = Symbol(2);
|
|
122
169
|
const BOTH_ICON = Symbol(3);
|
|
123
|
-
const _sfc_main$
|
|
170
|
+
const _sfc_main$D = defineComponent({
|
|
124
171
|
name: "DaoButton",
|
|
125
172
|
components: {
|
|
126
|
-
DaoButtonIcon: _sfc_main$
|
|
173
|
+
DaoButtonIcon: _sfc_main$E
|
|
127
174
|
},
|
|
128
175
|
props: buttonProps,
|
|
129
176
|
emits: ["click"],
|
|
@@ -212,7 +259,7 @@ const _hoisted_2$i = {
|
|
|
212
259
|
key: 1,
|
|
213
260
|
class: "dao-btn__text"
|
|
214
261
|
};
|
|
215
|
-
function _sfc_render$
|
|
262
|
+
function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
216
263
|
const _component_dao_button_icon = resolveComponent("dao-button-icon");
|
|
217
264
|
return openBlock(), createElementBlock("button", {
|
|
218
265
|
class: normalizeClass(_ctx.classList),
|
|
@@ -236,20 +283,20 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
236
283
|
], 64))
|
|
237
284
|
], 10, _hoisted_1$s);
|
|
238
285
|
}
|
|
239
|
-
var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
286
|
+
var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$A]]);
|
|
240
287
|
var buttonGroup_vue_vue_type_style_index_0_lang = "";
|
|
241
|
-
const _sfc_main$
|
|
288
|
+
const _sfc_main$C = defineComponent({
|
|
242
289
|
name: "DaoButtonGroup"
|
|
243
290
|
});
|
|
244
291
|
const _hoisted_1$r = { class: "dao-btn-group" };
|
|
245
|
-
function _sfc_render$
|
|
292
|
+
function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
246
293
|
return openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
247
294
|
renderSlot(_ctx.$slots, "default")
|
|
248
295
|
]);
|
|
249
296
|
}
|
|
250
|
-
var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
297
|
+
var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$z]]);
|
|
251
298
|
var card_scss_vue_type_style_index_0_src_lang = "";
|
|
252
|
-
const _sfc_main$
|
|
299
|
+
const _sfc_main$B = defineComponent({
|
|
253
300
|
name: "DaoCard",
|
|
254
301
|
components: {
|
|
255
302
|
DaoIcon
|
|
@@ -287,7 +334,7 @@ const _hoisted_2$h = {
|
|
|
287
334
|
};
|
|
288
335
|
const _hoisted_3$b = { class: "dao-card-header-item dao-card-header-title" };
|
|
289
336
|
const _hoisted_4$a = { class: "dao-card-header-item dao-card-header-action" };
|
|
290
|
-
function _sfc_render$
|
|
337
|
+
function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
291
338
|
const _component_dao_icon = resolveComponent("dao-icon");
|
|
292
339
|
return openBlock(), createElementBlock("div", {
|
|
293
340
|
class: normalizeClass(["dao-card", `dao-card--${_ctx.type}`])
|
|
@@ -332,73 +379,18 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
332
379
|
], 2)
|
|
333
380
|
], 2);
|
|
334
381
|
}
|
|
335
|
-
var card = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
382
|
+
var card = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$y]]);
|
|
336
383
|
var cardItem_scss_vue_type_style_index_0_src_lang = "";
|
|
337
|
-
const _sfc_main$
|
|
384
|
+
const _sfc_main$A = defineComponent({
|
|
338
385
|
name: "DaoCardItem"
|
|
339
386
|
});
|
|
340
387
|
const _hoisted_1$p = { class: "dao-card-item" };
|
|
341
|
-
function _sfc_render$
|
|
388
|
+
function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
|
|
342
389
|
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
343
390
|
renderSlot(_ctx.$slots, "default")
|
|
344
391
|
]);
|
|
345
392
|
}
|
|
346
|
-
var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
347
|
-
function looseCompareArrays(a, b) {
|
|
348
|
-
if (a.length !== b.length)
|
|
349
|
-
return false;
|
|
350
|
-
let equal = true;
|
|
351
|
-
for (let i = 0; equal && i < a.length; i++) {
|
|
352
|
-
equal = looseEqual(a[i], b[i]);
|
|
353
|
-
}
|
|
354
|
-
return equal;
|
|
355
|
-
}
|
|
356
|
-
function looseEqual(a, b) {
|
|
357
|
-
if (a === b)
|
|
358
|
-
return true;
|
|
359
|
-
let aValidType = isDate(a);
|
|
360
|
-
let bValidType = isDate(b);
|
|
361
|
-
if (aValidType || bValidType) {
|
|
362
|
-
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
|
|
363
|
-
}
|
|
364
|
-
aValidType = isArray(a);
|
|
365
|
-
bValidType = isArray(b);
|
|
366
|
-
if (aValidType || bValidType) {
|
|
367
|
-
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
|
|
368
|
-
}
|
|
369
|
-
aValidType = isObject(a);
|
|
370
|
-
bValidType = isObject(b);
|
|
371
|
-
if (aValidType || bValidType) {
|
|
372
|
-
if (!aValidType || !bValidType) {
|
|
373
|
-
return false;
|
|
374
|
-
}
|
|
375
|
-
const aKeysCount = Object.keys(a).length;
|
|
376
|
-
const bKeysCount = Object.keys(b).length;
|
|
377
|
-
if (aKeysCount !== bKeysCount) {
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
380
|
-
for (const key in a) {
|
|
381
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
382
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
383
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
384
|
-
return false;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return String(a) === String(b);
|
|
389
|
-
}
|
|
390
|
-
function looseIndexOf(arr, val) {
|
|
391
|
-
return arr.findIndex((item) => looseEqual(item, val));
|
|
392
|
-
}
|
|
393
|
-
const NOOP = () => {
|
|
394
|
-
};
|
|
395
|
-
const isArray = Array.isArray;
|
|
396
|
-
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
397
|
-
const isDate = (val) => val instanceof Date;
|
|
398
|
-
const isFunction = (val) => typeof val === "function";
|
|
399
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
400
|
-
const objectToString = Object.prototype.toString;
|
|
401
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
393
|
+
var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
|
|
402
394
|
function isNullish(val) {
|
|
403
395
|
return val === null || val === void 0;
|
|
404
396
|
}
|
|
@@ -429,9 +421,10 @@ const checkboxGroupChangeFnKey = Symbol("checkboxGroupChangeFnKey");
|
|
|
429
421
|
const formLabelWidthKey = Symbol("formLabelWidthKey");
|
|
430
422
|
const navRootKey = Symbol("rootNav");
|
|
431
423
|
const navSubKey = Symbol("subNav");
|
|
424
|
+
const breadcrumbKey = Symbol("breadcrumbKey");
|
|
432
425
|
var checkbox_vue_vue_type_style_index_0_lang = "";
|
|
433
426
|
const modelValueAny = [String, Number, Boolean, Symbol, Object, Set, Array];
|
|
434
|
-
const _sfc_main$
|
|
427
|
+
const _sfc_main$z = defineComponent({
|
|
435
428
|
name: "DaoCheckbox",
|
|
436
429
|
props: {
|
|
437
430
|
modelValue: {
|
|
@@ -526,13 +519,13 @@ const _sfc_main$w = defineComponent({
|
|
|
526
519
|
const modelValue = currentModelValue.value;
|
|
527
520
|
const { value } = props;
|
|
528
521
|
if (isArray(modelValue)) {
|
|
529
|
-
const
|
|
530
|
-
const found =
|
|
522
|
+
const index2 = looseIndexOf(modelValue, value);
|
|
523
|
+
const found = index2 !== -1;
|
|
531
524
|
if (checked && !found) {
|
|
532
525
|
emitModelValue(modelValue.concat(value), event);
|
|
533
526
|
} else if (!checked && found) {
|
|
534
527
|
const filtered = [...modelValue];
|
|
535
|
-
filtered.splice(
|
|
528
|
+
filtered.splice(index2, 1);
|
|
536
529
|
emitModelValue(filtered, event);
|
|
537
530
|
}
|
|
538
531
|
} else if (isSet(modelValue)) {
|
|
@@ -578,7 +571,7 @@ const _hoisted_5$5 = {
|
|
|
578
571
|
key: 1,
|
|
579
572
|
class: "dao-checkbox__label-helper"
|
|
580
573
|
};
|
|
581
|
-
function _sfc_render$
|
|
574
|
+
function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
582
575
|
return openBlock(), createElementBlock("label", {
|
|
583
576
|
class: normalizeClass(_ctx.wrapClasses)
|
|
584
577
|
}, [
|
|
@@ -608,9 +601,9 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
608
601
|
])) : createCommentVNode("", true)
|
|
609
602
|
], 2);
|
|
610
603
|
}
|
|
611
|
-
var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
604
|
+
var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
|
|
612
605
|
var checkboxGroup_vue_vue_type_style_index_0_lang = "";
|
|
613
|
-
const _sfc_main$
|
|
606
|
+
const _sfc_main$y = defineComponent({
|
|
614
607
|
name: "DaoCheckboxGroup",
|
|
615
608
|
props: {
|
|
616
609
|
modelValue: {
|
|
@@ -644,18 +637,18 @@ const _sfc_main$v = defineComponent({
|
|
|
644
637
|
};
|
|
645
638
|
}
|
|
646
639
|
});
|
|
647
|
-
function _sfc_render$
|
|
640
|
+
function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
648
641
|
return openBlock(), createElementBlock("div", {
|
|
649
642
|
class: normalizeClass(_ctx.checkboxGroupClasses)
|
|
650
643
|
}, [
|
|
651
644
|
renderSlot(_ctx.$slots, "default")
|
|
652
645
|
], 2);
|
|
653
646
|
}
|
|
654
|
-
var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
655
|
-
const _sfc_main$
|
|
647
|
+
var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
|
|
648
|
+
const _sfc_main$x = defineComponent({
|
|
656
649
|
name: "DaoDialogHeader",
|
|
657
650
|
components: {
|
|
658
|
-
|
|
651
|
+
DaoButton
|
|
659
652
|
},
|
|
660
653
|
props: {
|
|
661
654
|
showClose: {
|
|
@@ -676,33 +669,27 @@ const _sfc_main$u = defineComponent({
|
|
|
676
669
|
}
|
|
677
670
|
});
|
|
678
671
|
const _hoisted_1$n = { class: "dao-dialog-header" };
|
|
679
|
-
function _sfc_render$
|
|
680
|
-
const
|
|
672
|
+
function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
673
|
+
const _component_dao_button = resolveComponent("dao-button");
|
|
681
674
|
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
682
675
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
683
|
-
createElementVNode("span",
|
|
684
|
-
class: normalizeClass({ "center": !_ctx.showClose })
|
|
685
|
-
}, [
|
|
676
|
+
createElementVNode("span", null, [
|
|
686
677
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
687
678
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
688
679
|
])
|
|
689
|
-
]
|
|
690
|
-
_ctx.showClose ? (openBlock(),
|
|
680
|
+
]),
|
|
681
|
+
_ctx.showClose ? (openBlock(), createBlock(_component_dao_button, {
|
|
691
682
|
key: 0,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
name: "icon_close-circled",
|
|
698
|
-
class: "dao-dialog-header-close-btn__close"
|
|
699
|
-
})
|
|
700
|
-
])) : createCommentVNode("", true)
|
|
683
|
+
"use-font": "",
|
|
684
|
+
type: "ghost",
|
|
685
|
+
"icon-left": "icon-close",
|
|
686
|
+
onClick: _ctx.onClose
|
|
687
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
|
701
688
|
])
|
|
702
689
|
]);
|
|
703
690
|
}
|
|
704
|
-
var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
705
|
-
const _sfc_main$
|
|
691
|
+
var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
|
|
692
|
+
const _sfc_main$w = defineComponent({
|
|
706
693
|
name: "DaoDialogFooter",
|
|
707
694
|
components: {
|
|
708
695
|
DaoButton
|
|
@@ -739,12 +726,12 @@ const _sfc_main$t = defineComponent({
|
|
|
739
726
|
}
|
|
740
727
|
});
|
|
741
728
|
const _hoisted_1$m = { class: "dao-dialog-footer" };
|
|
742
|
-
function _sfc_render$
|
|
729
|
+
function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
|
|
743
730
|
const _component_dao_button = resolveComponent("dao-button");
|
|
744
731
|
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
745
732
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
746
733
|
createVNode(_component_dao_button, {
|
|
747
|
-
type: "
|
|
734
|
+
type: "ghost",
|
|
748
735
|
class: "dao-dialog-footer-cancel-btn",
|
|
749
736
|
onClick: _ctx.onCancel
|
|
750
737
|
}, {
|
|
@@ -766,13 +753,13 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
766
753
|
])
|
|
767
754
|
]);
|
|
768
755
|
}
|
|
769
|
-
var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
756
|
+
var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
|
|
770
757
|
var dialog_scss_vue_type_style_index_0_src_lang = "";
|
|
771
758
|
const DIALOG_NUM_ATTR = "dao-dialog-num";
|
|
772
759
|
const DIALOG_MINIMUM_PADDING = "20px";
|
|
773
760
|
const DIALOG_DEFAULT_PADDING_TOP = "100px";
|
|
774
761
|
const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
|
|
775
|
-
const _sfc_main$
|
|
762
|
+
const _sfc_main$v = defineComponent({
|
|
776
763
|
name: "DaoDialog",
|
|
777
764
|
components: {
|
|
778
765
|
DialogHeader,
|
|
@@ -850,7 +837,7 @@ const _sfc_main$s = defineComponent({
|
|
|
850
837
|
"before-close",
|
|
851
838
|
"closed"
|
|
852
839
|
],
|
|
853
|
-
setup(props, { emit
|
|
840
|
+
setup(props, { emit }) {
|
|
854
841
|
const {
|
|
855
842
|
modelValue,
|
|
856
843
|
middle,
|
|
@@ -858,7 +845,7 @@ const _sfc_main$s = defineComponent({
|
|
|
858
845
|
bottom: bottom2,
|
|
859
846
|
containerClass,
|
|
860
847
|
size,
|
|
861
|
-
header,
|
|
848
|
+
header: header2,
|
|
862
849
|
lockScroll,
|
|
863
850
|
closeOnPressEscape,
|
|
864
851
|
closeOnClickOutside
|
|
@@ -869,8 +856,8 @@ const _sfc_main$s = defineComponent({
|
|
|
869
856
|
containerClass.value,
|
|
870
857
|
`dao-dialog__size-${size.value}`
|
|
871
858
|
]);
|
|
872
|
-
const showHeader = computed(() => typeof
|
|
873
|
-
const headerTitle = computed(() => typeof
|
|
859
|
+
const showHeader = computed(() => typeof header2.value === "boolean" ? header2.value : true);
|
|
860
|
+
const headerTitle = computed(() => typeof header2.value === "string" ? header2.value : "");
|
|
874
861
|
watch(modelValue, (newV) => {
|
|
875
862
|
emit("change", newV);
|
|
876
863
|
});
|
|
@@ -937,7 +924,6 @@ const _sfc_main$s = defineComponent({
|
|
|
937
924
|
computedContainerClass,
|
|
938
925
|
headerTitle,
|
|
939
926
|
showHeader,
|
|
940
|
-
slots,
|
|
941
927
|
onBeforeEnter,
|
|
942
928
|
onAfterEnter,
|
|
943
929
|
onConfirm,
|
|
@@ -949,7 +935,7 @@ const _sfc_main$s = defineComponent({
|
|
|
949
935
|
}
|
|
950
936
|
});
|
|
951
937
|
const _hoisted_1$l = { class: "dao-dialog-body" };
|
|
952
|
-
function _sfc_render$
|
|
938
|
+
function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
953
939
|
const _component_dialog_header = resolveComponent("dialog-header");
|
|
954
940
|
const _component_dialog_footer = resolveComponent("dialog-footer");
|
|
955
941
|
return openBlock(), createBlock(Transition, {
|
|
@@ -1006,7 +992,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1006
992
|
_: 3
|
|
1007
993
|
}, 8, ["onBeforeEnter", "onAfterEnter", "onBeforeLeave", "onAfterLeave"]);
|
|
1008
994
|
}
|
|
1009
|
-
var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
995
|
+
var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
|
|
1010
996
|
var top = "top";
|
|
1011
997
|
var bottom = "bottom";
|
|
1012
998
|
var right = "right";
|
|
@@ -2140,13 +2126,13 @@ function popperGenerator(generatorOptions) {
|
|
|
2140
2126
|
state.orderedModifiers.forEach(function(modifier) {
|
|
2141
2127
|
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
2142
2128
|
});
|
|
2143
|
-
for (var
|
|
2129
|
+
for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {
|
|
2144
2130
|
if (state.reset === true) {
|
|
2145
2131
|
state.reset = false;
|
|
2146
|
-
|
|
2132
|
+
index2 = -1;
|
|
2147
2133
|
continue;
|
|
2148
2134
|
}
|
|
2149
|
-
var _state$orderedModifie = state.orderedModifiers[
|
|
2135
|
+
var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
|
|
2150
2136
|
if (typeof fn2 === "function") {
|
|
2151
2137
|
state = fn2({
|
|
2152
2138
|
state,
|
|
@@ -2205,7 +2191,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
|
|
|
2205
2191
|
var createPopper = /* @__PURE__ */ popperGenerator({
|
|
2206
2192
|
defaultModifiers
|
|
2207
2193
|
});
|
|
2208
|
-
const _sfc_main$
|
|
2194
|
+
const _sfc_main$u = defineComponent({
|
|
2209
2195
|
name: "PopperContent",
|
|
2210
2196
|
props: {
|
|
2211
2197
|
popperId: {
|
|
@@ -2260,22 +2246,22 @@ const _hoisted_2$f = {
|
|
|
2260
2246
|
};
|
|
2261
2247
|
const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
|
|
2262
2248
|
class: "dao-popper-arrow-viewbox",
|
|
2263
|
-
viewBox: "0 0
|
|
2249
|
+
viewBox: "0 0 15 15"
|
|
2264
2250
|
}, [
|
|
2265
2251
|
/* @__PURE__ */ createElementVNode("path", {
|
|
2266
2252
|
class: "pt-popper-arrow-border",
|
|
2267
|
-
d: "
|
|
2268
|
-
|
|
2253
|
+
d: "M4 7.5L14 -1L14 16Z",
|
|
2254
|
+
opacity: "0.1"
|
|
2269
2255
|
}),
|
|
2270
2256
|
/* @__PURE__ */ createElementVNode("path", {
|
|
2271
2257
|
class: "pt-popper-arrow-fill",
|
|
2272
|
-
d: "
|
|
2258
|
+
d: "M6 7.5L15 -1L15 16Z"
|
|
2273
2259
|
})
|
|
2274
2260
|
], -1);
|
|
2275
2261
|
const _hoisted_4$8 = [
|
|
2276
2262
|
_hoisted_3$9
|
|
2277
2263
|
];
|
|
2278
|
-
function _sfc_render$
|
|
2264
|
+
function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2279
2265
|
return openBlock(), createElementBlock("div", {
|
|
2280
2266
|
id: _ctx.popperId,
|
|
2281
2267
|
ref: "popover",
|
|
@@ -2299,7 +2285,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2299
2285
|
])
|
|
2300
2286
|
], 42, _hoisted_1$k);
|
|
2301
2287
|
}
|
|
2302
|
-
var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2288
|
+
var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
|
|
2303
2289
|
var PopperProps = {
|
|
2304
2290
|
modelValue: {
|
|
2305
2291
|
type: Boolean,
|
|
@@ -2389,7 +2375,7 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
|
|
|
2389
2375
|
});
|
|
2390
2376
|
});
|
|
2391
2377
|
}
|
|
2392
|
-
const _sfc_main$
|
|
2378
|
+
const _sfc_main$t = defineComponent({
|
|
2393
2379
|
name: "DaoPopper",
|
|
2394
2380
|
components: {
|
|
2395
2381
|
PopperContent
|
|
@@ -2739,7 +2725,7 @@ const _sfc_main$q = defineComponent({
|
|
|
2739
2725
|
};
|
|
2740
2726
|
}
|
|
2741
2727
|
});
|
|
2742
|
-
function _sfc_render$
|
|
2728
|
+
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2743
2729
|
const _component_popper_content = resolveComponent("popper-content");
|
|
2744
2730
|
return openBlock(), createElementBlock("div", {
|
|
2745
2731
|
ref: "reference",
|
|
@@ -2781,8 +2767,8 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2781
2767
|
], 8, ["to", "disabled"]))
|
|
2782
2768
|
], 2);
|
|
2783
2769
|
}
|
|
2784
|
-
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2785
|
-
const _sfc_main$
|
|
2770
|
+
var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
|
|
2771
|
+
const _sfc_main$s = defineComponent({
|
|
2786
2772
|
name: "DaoDropdown",
|
|
2787
2773
|
components: {
|
|
2788
2774
|
DaoPopper: Popper
|
|
@@ -2839,7 +2825,7 @@ const _sfc_main$p = defineComponent({
|
|
|
2839
2825
|
}
|
|
2840
2826
|
});
|
|
2841
2827
|
const _hoisted_1$j = { tabindex: "0" };
|
|
2842
|
-
function _sfc_render$
|
|
2828
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2843
2829
|
const _component_dao_popper = resolveComponent("dao-popper");
|
|
2844
2830
|
return openBlock(), createBlock(_component_dao_popper, {
|
|
2845
2831
|
ref: "popper",
|
|
@@ -2862,20 +2848,20 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2862
2848
|
_: 3
|
|
2863
2849
|
}, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
|
|
2864
2850
|
}
|
|
2865
|
-
var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2851
|
+
var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
|
|
2866
2852
|
var dropdownMenu_vue_vue_type_style_index_0_lang = "";
|
|
2867
|
-
const _sfc_main$
|
|
2853
|
+
const _sfc_main$r = defineComponent({
|
|
2868
2854
|
name: "DaoDropdownMenu"
|
|
2869
2855
|
});
|
|
2870
2856
|
const _hoisted_1$i = { class: "dao-dropdown-menu" };
|
|
2871
|
-
function _sfc_render$
|
|
2857
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2872
2858
|
return openBlock(), createElementBlock("ul", _hoisted_1$i, [
|
|
2873
2859
|
renderSlot(_ctx.$slots, "default")
|
|
2874
2860
|
]);
|
|
2875
2861
|
}
|
|
2876
|
-
var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2862
|
+
var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
|
|
2877
2863
|
var dropdownItem_vue_vue_type_style_index_0_lang = "";
|
|
2878
|
-
const _sfc_main$
|
|
2864
|
+
const _sfc_main$q = defineComponent({
|
|
2879
2865
|
name: "DaoDropdownItem",
|
|
2880
2866
|
props: {
|
|
2881
2867
|
type: {
|
|
@@ -2924,14 +2910,14 @@ const _sfc_main$n = defineComponent({
|
|
|
2924
2910
|
};
|
|
2925
2911
|
}
|
|
2926
2912
|
});
|
|
2927
|
-
function _sfc_render$
|
|
2913
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2928
2914
|
return openBlock(), createElementBlock("li", mergeProps({ class: _ctx.classList }, _ctx.itemAttrs), [
|
|
2929
2915
|
_ctx.type !== "divider" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
|
|
2930
2916
|
], 16);
|
|
2931
2917
|
}
|
|
2932
|
-
var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2918
|
+
var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
|
|
2933
2919
|
var form_vue_vue_type_style_index_0_lang = "";
|
|
2934
|
-
const _sfc_main$
|
|
2920
|
+
const _sfc_main$p = defineComponent({
|
|
2935
2921
|
name: "DaoForm",
|
|
2936
2922
|
props: {
|
|
2937
2923
|
type: {
|
|
@@ -2949,7 +2935,7 @@ const _sfc_main$m = defineComponent({
|
|
|
2949
2935
|
provide(formLabelWidthKey, labelWidth.value);
|
|
2950
2936
|
}
|
|
2951
2937
|
});
|
|
2952
|
-
function _sfc_render$
|
|
2938
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2953
2939
|
return openBlock(), createElementBlock("div", {
|
|
2954
2940
|
class: normalizeClass([
|
|
2955
2941
|
"dao-form",
|
|
@@ -2969,18 +2955,24 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2969
2955
|
} })
|
|
2970
2956
|
], 2);
|
|
2971
2957
|
}
|
|
2972
|
-
var form = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2958
|
+
var form = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
|
|
2959
|
+
var tooltipProps = __spreadProps(__spreadValues({}, PopperProps), {
|
|
2960
|
+
offset: {
|
|
2961
|
+
type: [Number, String],
|
|
2962
|
+
default: 10
|
|
2963
|
+
}
|
|
2964
|
+
});
|
|
2973
2965
|
var tooltip_scss_vue_type_style_index_0_src_lang = "";
|
|
2974
|
-
const _sfc_main$
|
|
2966
|
+
const _sfc_main$o = defineComponent(__spreadProps(__spreadValues({}, Popper), {
|
|
2975
2967
|
name: "DaoTooltip",
|
|
2976
|
-
props:
|
|
2968
|
+
props: tooltipProps,
|
|
2977
2969
|
daoPopperTheme: "dao-tooltip"
|
|
2978
2970
|
}));
|
|
2979
2971
|
var formItem_vue_vue_type_style_index_0_lang = "";
|
|
2980
|
-
const _sfc_main$
|
|
2972
|
+
const _sfc_main$n = defineComponent({
|
|
2981
2973
|
name: "DaoFormItem",
|
|
2982
2974
|
components: {
|
|
2983
|
-
DaoTooltip: _sfc_main$
|
|
2975
|
+
DaoTooltip: _sfc_main$o
|
|
2984
2976
|
},
|
|
2985
2977
|
props: {
|
|
2986
2978
|
label: {
|
|
@@ -3032,7 +3024,7 @@ const _hoisted_2$e = {
|
|
|
3032
3024
|
};
|
|
3033
3025
|
const _hoisted_3$8 = { class: "dao-form-item__label-icon-label" };
|
|
3034
3026
|
const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
|
|
3035
|
-
function _sfc_render$
|
|
3027
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3036
3028
|
const _component_dao_tooltip = resolveComponent("dao-tooltip");
|
|
3037
3029
|
return openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
3038
3030
|
createElementVNode("div", {
|
|
@@ -3063,9 +3055,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3063
3055
|
], 4)
|
|
3064
3056
|
]);
|
|
3065
3057
|
}
|
|
3066
|
-
var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3058
|
+
var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
|
|
3067
3059
|
var formGroup_vue_vue_type_style_index_0_lang = "";
|
|
3068
|
-
const _sfc_main$
|
|
3060
|
+
const _sfc_main$m = defineComponent({
|
|
3069
3061
|
name: "DaoFormGroup",
|
|
3070
3062
|
props: {
|
|
3071
3063
|
title: {
|
|
@@ -3076,7 +3068,7 @@ const _sfc_main$j = defineComponent({
|
|
|
3076
3068
|
});
|
|
3077
3069
|
const _hoisted_1$g = { class: "dao-form-group" };
|
|
3078
3070
|
const _hoisted_2$d = { class: "dao-form-group__title" };
|
|
3079
|
-
function _sfc_render$
|
|
3071
|
+
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3080
3072
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
3081
3073
|
createElementVNode("div", _hoisted_2$d, [
|
|
3082
3074
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
@@ -3086,20 +3078,216 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3086
3078
|
renderSlot(_ctx.$slots, "default")
|
|
3087
3079
|
]);
|
|
3088
3080
|
}
|
|
3089
|
-
var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3081
|
+
var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k]]);
|
|
3082
|
+
const headerProps = {
|
|
3083
|
+
type: {
|
|
3084
|
+
type: String,
|
|
3085
|
+
default: "2rd"
|
|
3086
|
+
},
|
|
3087
|
+
title: {
|
|
3088
|
+
type: String,
|
|
3089
|
+
default: ""
|
|
3090
|
+
}
|
|
3091
|
+
};
|
|
3092
|
+
var header_vue_vue_type_style_index_0_lang = "";
|
|
3093
|
+
const _sfc_main$l = defineComponent({
|
|
3094
|
+
name: "DaoHeader",
|
|
3095
|
+
props: headerProps,
|
|
3096
|
+
setup(props, { slots }) {
|
|
3097
|
+
const showInfo = computed(() => ({
|
|
3098
|
+
title: props.type === "3rd" ? false : Boolean(props.title || slots.title),
|
|
3099
|
+
breadcrumb: props.type === "2rd" ? false : slots.breadcrumb
|
|
3100
|
+
}));
|
|
3101
|
+
return {
|
|
3102
|
+
ns: "dao-header",
|
|
3103
|
+
showInfo
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
});
|
|
3107
|
+
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3108
|
+
return openBlock(), createElementBlock("div", {
|
|
3109
|
+
ref: "header",
|
|
3110
|
+
"aria-label": "Header",
|
|
3111
|
+
class: normalizeClass(_ctx.ns)
|
|
3112
|
+
}, [
|
|
3113
|
+
createElementVNode("div", {
|
|
3114
|
+
class: normalizeClass(_ctx.ns + "__left-container")
|
|
3115
|
+
}, [
|
|
3116
|
+
_ctx.showInfo.title ? (openBlock(), createElementBlock("div", {
|
|
3117
|
+
key: 0,
|
|
3118
|
+
class: normalizeClass(_ctx.ns + "__title")
|
|
3119
|
+
}, [
|
|
3120
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3121
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
3122
|
+
])
|
|
3123
|
+
], 2)) : createCommentVNode("", true),
|
|
3124
|
+
_ctx.showInfo.breadcrumb ? (openBlock(), createElementBlock("div", {
|
|
3125
|
+
key: 1,
|
|
3126
|
+
class: normalizeClass(_ctx.ns + "__breadcrumb")
|
|
3127
|
+
}, [
|
|
3128
|
+
renderSlot(_ctx.$slots, "breadcrumb")
|
|
3129
|
+
], 2)) : createCommentVNode("", true)
|
|
3130
|
+
], 2),
|
|
3131
|
+
_ctx.$slots.action ? (openBlock(), createElementBlock("div", {
|
|
3132
|
+
key: 0,
|
|
3133
|
+
class: normalizeClass(_ctx.ns + "__action")
|
|
3134
|
+
}, [
|
|
3135
|
+
renderSlot(_ctx.$slots, "action")
|
|
3136
|
+
], 2)) : createCommentVNode("", true)
|
|
3137
|
+
], 2);
|
|
3138
|
+
}
|
|
3139
|
+
var header = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$j]]);
|
|
3140
|
+
const breadcrumbProps = {
|
|
3141
|
+
type: {
|
|
3142
|
+
type: String,
|
|
3143
|
+
default: "3rd"
|
|
3144
|
+
},
|
|
3145
|
+
list: {
|
|
3146
|
+
type: Array,
|
|
3147
|
+
default: () => []
|
|
3148
|
+
},
|
|
3149
|
+
separator: {
|
|
3150
|
+
type: String,
|
|
3151
|
+
default: "/"
|
|
3152
|
+
},
|
|
3153
|
+
icon: {
|
|
3154
|
+
type: String,
|
|
3155
|
+
default: ""
|
|
3156
|
+
}
|
|
3157
|
+
};
|
|
3158
|
+
const breadcrumbEmits = {
|
|
3159
|
+
navigate: (to) => to
|
|
3160
|
+
};
|
|
3161
|
+
const breadcrumbItemProps = {
|
|
3162
|
+
label: {
|
|
3163
|
+
type: String
|
|
3164
|
+
},
|
|
3165
|
+
value: {
|
|
3166
|
+
type: String
|
|
3167
|
+
},
|
|
3168
|
+
to: {
|
|
3169
|
+
type: [String, Object]
|
|
3170
|
+
}
|
|
3171
|
+
};
|
|
3172
|
+
const _sfc_main$k = defineComponent({
|
|
3173
|
+
name: "DaoBreadcrumbItem",
|
|
3174
|
+
props: breadcrumbItemProps,
|
|
3175
|
+
setup(props) {
|
|
3176
|
+
const parent = inject(breadcrumbKey, null);
|
|
3177
|
+
const separator = computed(() => {
|
|
3178
|
+
var _a;
|
|
3179
|
+
return (_a = parent == null ? void 0 : parent.props) == null ? void 0 : _a.separator;
|
|
3180
|
+
});
|
|
3181
|
+
const handleClick = () => {
|
|
3182
|
+
const to = props == null ? void 0 : props.to;
|
|
3183
|
+
if (to && (parent == null ? void 0 : parent.emit)) {
|
|
3184
|
+
parent.emit("navigate", to);
|
|
3185
|
+
}
|
|
3186
|
+
};
|
|
3187
|
+
return {
|
|
3188
|
+
ns: "dao-breadcrumb",
|
|
3189
|
+
handleClick,
|
|
3190
|
+
separator
|
|
3191
|
+
};
|
|
3192
|
+
}
|
|
3193
|
+
});
|
|
3194
|
+
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3195
|
+
return openBlock(), createElementBlock("span", {
|
|
3196
|
+
class: normalizeClass(_ctx.ns + "__item")
|
|
3197
|
+
}, [
|
|
3198
|
+
createElementVNode("span", {
|
|
3199
|
+
role: "link",
|
|
3200
|
+
class: normalizeClass({ [_ctx.ns + "__link"]: !!_ctx.to }),
|
|
3201
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
3202
|
+
}, [
|
|
3203
|
+
_ctx.label ? (openBlock(), createElementBlock("span", {
|
|
3204
|
+
key: 0,
|
|
3205
|
+
role: "label",
|
|
3206
|
+
class: normalizeClass(_ctx.ns + "__label")
|
|
3207
|
+
}, toDisplayString(_ctx.label), 3)) : createCommentVNode("", true),
|
|
3208
|
+
_ctx.value ? (openBlock(), createElementBlock("span", {
|
|
3209
|
+
key: 1,
|
|
3210
|
+
class: normalizeClass(_ctx.ns + "__value"),
|
|
3211
|
+
role: "value"
|
|
3212
|
+
}, toDisplayString(_ctx.value), 3)) : createCommentVNode("", true),
|
|
3213
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
|
3214
|
+
key: 2,
|
|
3215
|
+
role: "slot",
|
|
3216
|
+
class: normalizeClass(_ctx.ns + "__slot")
|
|
3217
|
+
}, [
|
|
3218
|
+
renderSlot(_ctx.$slots, "default")
|
|
3219
|
+
], 2)) : createCommentVNode("", true)
|
|
3220
|
+
], 2),
|
|
3221
|
+
createElementVNode("span", {
|
|
3222
|
+
class: normalizeClass(_ctx.ns + "__separator")
|
|
3223
|
+
}, toDisplayString(_ctx.separator), 3)
|
|
3224
|
+
], 2);
|
|
3225
|
+
}
|
|
3226
|
+
var DaoBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i]]);
|
|
3227
|
+
var breadcrumb_vue_vue_type_style_index_0_lang = "";
|
|
3228
|
+
const _sfc_main$j = defineComponent({
|
|
3229
|
+
name: "DaoBreadcrumb",
|
|
3230
|
+
components: {
|
|
3231
|
+
DaoIcon,
|
|
3232
|
+
DaoBreadcrumbItem
|
|
3233
|
+
},
|
|
3234
|
+
props: breadcrumbProps,
|
|
3235
|
+
emits: breadcrumbEmits,
|
|
3236
|
+
setup(props, { emit }) {
|
|
3237
|
+
provide(breadcrumbKey, { props, emit });
|
|
3238
|
+
return {
|
|
3239
|
+
ns: "dao-breadcrumb"
|
|
3240
|
+
};
|
|
3241
|
+
}
|
|
3242
|
+
});
|
|
3243
|
+
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3244
|
+
var _a;
|
|
3245
|
+
const _component_dao_icon = resolveComponent("dao-icon");
|
|
3246
|
+
const _component_dao_breadcrumb_item = resolveComponent("dao-breadcrumb-item");
|
|
3247
|
+
return openBlock(), createElementBlock("div", {
|
|
3248
|
+
ref: "breadcrumb",
|
|
3249
|
+
"aria-label": "Breadcrumb",
|
|
3250
|
+
role: "navigation",
|
|
3251
|
+
class: normalizeClass(_ctx.ns)
|
|
3252
|
+
}, [
|
|
3253
|
+
_ctx.$slots.icon || _ctx.icon ? (openBlock(), createElementBlock("span", {
|
|
3254
|
+
key: 0,
|
|
3255
|
+
class: normalizeClass(_ctx.ns + "__icon")
|
|
3256
|
+
}, [
|
|
3257
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
3258
|
+
createVNode(_component_dao_icon, {
|
|
3259
|
+
"use-font": "",
|
|
3260
|
+
name: _ctx.icon
|
|
3261
|
+
}, null, 8, ["name"])
|
|
3262
|
+
])
|
|
3263
|
+
], 2)) : createCommentVNode("", true),
|
|
3264
|
+
((_a = _ctx.list) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
|
|
3265
|
+
return openBlock(), createBlock(_component_dao_breadcrumb_item, {
|
|
3266
|
+
key: index2,
|
|
3267
|
+
label: item.label,
|
|
3268
|
+
value: item.value,
|
|
3269
|
+
to: item.to
|
|
3270
|
+
}, null, 8, ["label", "value", "to"]);
|
|
3271
|
+
}), 128)) : createCommentVNode("", true),
|
|
3272
|
+
renderSlot(_ctx.$slots, "default")
|
|
3273
|
+
], 2);
|
|
3274
|
+
}
|
|
3275
|
+
var breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h]]);
|
|
3090
3276
|
if (typeof window !== "undefined") {
|
|
3091
3277
|
let loadSvg = function() {
|
|
3092
|
-
|
|
3093
|
-
|
|
3278
|
+
var body = document.body;
|
|
3279
|
+
var svgDom = document.getElementById("__svg__icons__dom__");
|
|
3094
3280
|
if (!svgDom) {
|
|
3095
3281
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3096
3282
|
svgDom.style.position = "absolute";
|
|
3097
3283
|
svgDom.style.width = "0";
|
|
3098
3284
|
svgDom.style.height = "0";
|
|
3099
|
-
svgDom.id = "
|
|
3285
|
+
svgDom.id = "__svg__icons__dom__";
|
|
3286
|
+
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
3287
|
+
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
3100
3288
|
}
|
|
3101
|
-
svgDom.innerHTML = '<symbol
|
|
3102
|
-
body.insertBefore(svgDom, body.
|
|
3289
|
+
svgDom.innerHTML = '<symbol viewBox="0 0 16 16" id="icon_arrow-down"><path d="m2.97 10.03 4.5 4.5a.749.749 0 0 0 1.06 0l4.5-4.5a.75.75 0 0 0-1.06-1.06L9 11.939V2a1 1 0 0 0-2 0v9.939L4.03 8.97a.75.75 0 1 0-1.06 1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-left"><path d="m5.97 2.97-4.5 4.5a.749.749 0 0 0 0 1.06l4.5 4.5a.75.75 0 0 0 1.06-1.06L4.061 9H14a1 1 0 0 0 0-2H4.061L7.03 4.03a.75.75 0 1 0-1.06-1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-right"><path d="m10.03 13.03 4.5-4.5a.749.749 0 0 0 0-1.06l-4.5-4.5a.75.75 0 1 0-1.06 1.06L11.939 7H2a1 1 0 0 0 0 2h9.939L8.97 11.97a.75.75 0 0 0 1.06 1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-up"><path d="m13.03 5.97-4.5-4.5a.749.749 0 0 0-1.06 0l-4.5 4.5a.75.75 0 1 0 1.06 1.06L7 4.061V14a1 1 0 0 0 2 0V4.061l2.97 2.969a.75.75 0 0 0 1.06-1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-down"><path d="M8 10.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 8.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-left"><path d="M5.25 8a.747.747 0 0 1 .22-.53l3.5-3.5a.75.75 0 0 1 1.06 1.06L7.061 8l2.97 2.97a.75.75 0 1 1-1.061 1.06l-3.5-3.5A.747.747 0 0 1 5.25 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-more"><path d="M13.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L11.939 8 8.97 5.03a.75.75 0 1 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53ZM7.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L5.939 8 2.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-right"><path d="M10.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L8.939 8 5.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-select"><path d="M8 14.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 12.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22ZM8 1.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 3.061 5.03 6.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 1.25Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-up"><path d="M8 5.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 7.061 5.03 10.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 5.25Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_close"><path d="m9.414 8 4.453-4.453a1 1 0 1 0-1.414-1.414L8 6.586 3.547 2.133a1 1 0 0 0-1.414 1.414L6.586 8l-4.453 4.453a1 1 0 1 0 1.414 1.414L8 9.414l4.453 4.453a1 1 0 0 0 1.414-1.414Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_reload"><path d="M15 7V1l-2.055 2.055a7 7 0 1 0 1.649 7.279 1 1 0 0 0-1.885-.668 5 5 0 1 1-1.177-5.2L9 7Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_search"><path d="m15.03 13.97-3.975-3.975a5.772 5.772 0 1 0-1.06 1.06l3.975 3.975a.75.75 0 0 0 1.06-1.06ZM1.75 6.5a4.75 4.75 0 1 1 4.75 4.75A4.75 4.75 0 0 1 1.75 6.5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_setting"><path d="M15.6 6.75h-2.335a.614.614 0 0 1-.572-.423 4.764 4.764 0 0 0-.192-.461.615.615 0 0 1 .105-.7l1.652-1.656a.4.4 0 0 0 0-.566l-1.2-1.2a.4.4 0 0 0-.566 0l-1.653 1.65a.616.616 0 0 1-.7.1 4.764 4.764 0 0 0-.461-.192.614.614 0 0 1-.423-.572V.4a.4.4 0 0 0-.4-.4H7.15a.4.4 0 0 0-.4.4v2.335a.614.614 0 0 1-.423.572 4.764 4.764 0 0 0-.461.192.616.616 0 0 1-.7-.1L3.51 1.742a.4.4 0 0 0-.566 0l-1.2 1.2a.4.4 0 0 0 0 .566l1.65 1.653a.615.615 0 0 1 .1.705 4.764 4.764 0 0 0-.192.461.614.614 0 0 1-.572.423H.4a.4.4 0 0 0-.4.4v1.7a.4.4 0 0 0 .4.4h2.335a.614.614 0 0 1 .572.423 4.764 4.764 0 0 0 .192.461.615.615 0 0 1-.1.705L1.742 12.49a.4.4 0 0 0 0 .566l1.2 1.2a.4.4 0 0 0 .566 0l1.651-1.652a.615.615 0 0 1 .705-.105 4.764 4.764 0 0 0 .461.192.614.614 0 0 1 .423.572V15.6a.4.4 0 0 0 .4.4h1.7a.4.4 0 0 0 .4-.4v-2.335a.614.614 0 0 1 .423-.572 4.764 4.764 0 0 0 .461-.192.615.615 0 0 1 .705.105l1.651 1.652a.4.4 0 0 0 .566 0l1.2-1.2a.4.4 0 0 0 0-.566l-1.652-1.651a.615.615 0 0 1-.105-.7 4.764 4.764 0 0 0 .192-.461.614.614 0 0 1 .572-.423H15.6a.4.4 0 0 0 .4-.4V7.15a.4.4 0 0 0-.4-.4ZM8 10a2 2 0 1 1 2-2 2 2 0 0 1-2 2Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_trash"><path d="M6 5h1v8H6zM9 5h1v8H9z" /><path d="M13 2h-2V1a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v1H3a1 1 0 0 0-1 1v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3a1 1 0 0 0-1-1ZM6 1h4v1H6Zm6 13H4V4h8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-down"><path d="M4 6h8l-4 5-4-5z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-left"><path d="M10 4v8L5 8l5-4z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-right"><path d="M6 12V4l5 4-5 4z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-up"><path d="M12 10H4l4-5 4 5z" /></symbol><symbol viewBox="0 0 16 16" id="icon_close-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm3.03 9.47a.75.75 0 1 1-1.06 1.06L8 9.061 6.03 11.03a.75.75 0 0 1-1.06-1.06L6.939 8 4.97 6.03a.75.75 0 0 1 1.06-1.06L8 6.939 9.97 4.97a.75.75 0 0 1 1.06 1.06L9.061 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_goto"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm0 11V9H4V7h4V4.5L12.4 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_info-line"><path d="M9 11V7H6v.7h1V11H6v1h4v-1H9z" /><circle cx="8" cy="5" r="1.1" /><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_minus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H4V7h8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_more"><circle cx="14" cy="8" r="2" /><circle cx="8" cy="8" r="2" /><circle cx="2" cy="8" r="2" /></symbol><symbol viewBox="0 0 16 16" id="icon_plus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H9v3H7V9H4V7h3V4h2v3h3Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_question-line"><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /><path d="M7 11h2v2H7zM8.75 10v-.5c.005-1.335 2.005-1.47 2-3.615A2.719 2.719 0 0 0 8 3.25 2.752 2.752 0 0 0 5.25 6h1.5a1.251 1.251 0 0 1 2.5-.052 1.614 1.614 0 0 1-.727 1.206A2.881 2.881 0 0 0 7.25 9.5v.5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-binary"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM4 6v5h3V6Zm2 4H5V7h1ZM11 10V6H9v1h1v3H9v1h3v-1h-1z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-code"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM6.5 11a.5.5 0 0 1-.354-.146l-2-2a.5.5 0 0 1 0-.708l2-2a.5.5 0 0 1 .708.708L5.207 8.5l1.647 1.646A.5.5 0 0 1 6.5 11ZM9.5 11a.5.5 0 0 1-.354-.854L10.793 8.5 9.146 6.854a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2A.5.5 0 0 1 9.5 11Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-picture"><circle cx="10" cy="7" r="1" /><path d="M13 14v-2.25l-2-2-1.5 1.5-3-3-3.5 3.5V14h10z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-text"><path d="M5 6h6v1H5zM5 8h6v1H5zM5 10h6v1H5z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-zip"><path d="M7 2h1v1H7zM6 3h1v1H6zM7 4h1v1H7zM6 5h1v1H6zM7 6h1v1H7zM8.692 8.692 8 8H7V7H6v1l-.692.692A1.051 1.051 0 0 0 5 9.435V10.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V9.435a1.051 1.051 0 0 0-.308-.743ZM8 10H6V9h2Z" /><path d="M14 4v11H2V1h4v1h1V1h4V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 14 14" id="icon_checkmark-symbol"><path d="m2.466 7.29 1.016-1.152 2.515 2.527 5.359-5.634.83.729-6.182 7.734L2.466 7.29z" /></symbol>';
|
|
3290
|
+
body.insertBefore(svgDom, body.lastChild);
|
|
3103
3291
|
};
|
|
3104
3292
|
if (document.readyState === "loading") {
|
|
3105
3293
|
document.addEventListener("DOMContentLoaded", loadSvg);
|
|
@@ -3107,55 +3295,59 @@ if (typeof window !== "undefined") {
|
|
|
3107
3295
|
loadSvg();
|
|
3108
3296
|
}
|
|
3109
3297
|
}
|
|
3298
|
+
const INPUT_STATUS = ["default", "error", "success", "loading"];
|
|
3299
|
+
const INPUT_TYPES = ["text", "search", "number", "password"];
|
|
3300
|
+
var inputProps = {
|
|
3301
|
+
modelValue: {
|
|
3302
|
+
type: [String, Number],
|
|
3303
|
+
default: ""
|
|
3304
|
+
},
|
|
3305
|
+
type: {
|
|
3306
|
+
type: String,
|
|
3307
|
+
default: "text",
|
|
3308
|
+
validator: (value) => INPUT_TYPES.includes(value)
|
|
3309
|
+
},
|
|
3310
|
+
disabled: {
|
|
3311
|
+
type: Boolean,
|
|
3312
|
+
default: false
|
|
3313
|
+
},
|
|
3314
|
+
size: {
|
|
3315
|
+
type: String,
|
|
3316
|
+
default: "md",
|
|
3317
|
+
validator: (value) => ["md", "sm"].includes(value)
|
|
3318
|
+
},
|
|
3319
|
+
block: {
|
|
3320
|
+
type: Boolean,
|
|
3321
|
+
default: false
|
|
3322
|
+
},
|
|
3323
|
+
status: {
|
|
3324
|
+
type: String,
|
|
3325
|
+
default: "default",
|
|
3326
|
+
validator: (value) => INPUT_STATUS.includes(value)
|
|
3327
|
+
},
|
|
3328
|
+
borderless: {
|
|
3329
|
+
type: Boolean,
|
|
3330
|
+
default: false
|
|
3331
|
+
},
|
|
3332
|
+
append: {
|
|
3333
|
+
type: String,
|
|
3334
|
+
default: ""
|
|
3335
|
+
},
|
|
3336
|
+
prepend: {
|
|
3337
|
+
type: String,
|
|
3338
|
+
default: ""
|
|
3339
|
+
}
|
|
3340
|
+
};
|
|
3110
3341
|
var input_vue_vue_type_style_index_0_lang = "";
|
|
3111
3342
|
const _sfc_main$i = defineComponent({
|
|
3112
3343
|
name: "DaoInput",
|
|
3113
3344
|
inheritAttrs: false,
|
|
3114
|
-
props:
|
|
3115
|
-
modelValue: {
|
|
3116
|
-
type: [String, Number],
|
|
3117
|
-
default: ""
|
|
3118
|
-
},
|
|
3119
|
-
type: {
|
|
3120
|
-
type: String,
|
|
3121
|
-
default: "text",
|
|
3122
|
-
validator: (value) => ["text", "search", "number", "password"].includes(value)
|
|
3123
|
-
},
|
|
3124
|
-
disabled: {
|
|
3125
|
-
type: Boolean,
|
|
3126
|
-
default: false
|
|
3127
|
-
},
|
|
3128
|
-
size: {
|
|
3129
|
-
type: String,
|
|
3130
|
-
default: "md",
|
|
3131
|
-
validator: (value) => ["md", "sm"].includes(value)
|
|
3132
|
-
},
|
|
3133
|
-
block: {
|
|
3134
|
-
type: Boolean,
|
|
3135
|
-
default: false
|
|
3136
|
-
},
|
|
3137
|
-
status: {
|
|
3138
|
-
type: String,
|
|
3139
|
-
default: "default",
|
|
3140
|
-
validator: (value) => ["default", "error", "success", "loading"].includes(value)
|
|
3141
|
-
},
|
|
3142
|
-
borderless: {
|
|
3143
|
-
type: Boolean,
|
|
3144
|
-
default: false
|
|
3145
|
-
},
|
|
3146
|
-
append: {
|
|
3147
|
-
type: String,
|
|
3148
|
-
default: ""
|
|
3149
|
-
},
|
|
3150
|
-
prepend: {
|
|
3151
|
-
type: String,
|
|
3152
|
-
default: ""
|
|
3153
|
-
}
|
|
3154
|
-
},
|
|
3345
|
+
props: inputProps,
|
|
3155
3346
|
emits: ["update:modelValue", "input", "change", "blur", "focus", "after-reset"],
|
|
3156
3347
|
setup(props, { emit, attrs, slots }) {
|
|
3157
3348
|
const prefixCls = "dao-input";
|
|
3158
3349
|
const statusMap = {
|
|
3350
|
+
default: "",
|
|
3159
3351
|
error: "dao-input-error-icon icon-sys-warning",
|
|
3160
3352
|
success: "dao-input-success-icon icon-sys-success",
|
|
3161
3353
|
loading: "dao-input-loading-icon icon-input-loading"
|
|
@@ -3173,6 +3365,11 @@ const _sfc_main$i = defineComponent({
|
|
|
3173
3365
|
const currentValue = ref(modelValue.value);
|
|
3174
3366
|
const isFocus = ref(false);
|
|
3175
3367
|
const input2 = ref(null);
|
|
3368
|
+
const isIncreaseDisabled = ref(false);
|
|
3369
|
+
const isDecreaseDisabled = ref(false);
|
|
3370
|
+
const isChangingNumber = ref(false);
|
|
3371
|
+
let counterInterval = null;
|
|
3372
|
+
let counterTimeout = null;
|
|
3176
3373
|
const clearable = computed(() => type.value === "search" && currentValue.value && !disabled.value);
|
|
3177
3374
|
const wrapClasses = computed(() => [
|
|
3178
3375
|
`${prefixCls}-wrapper`,
|
|
@@ -3194,10 +3391,18 @@ const _sfc_main$i = defineComponent({
|
|
|
3194
3391
|
[`${prefixCls}--with-append`]: !!append.value
|
|
3195
3392
|
}
|
|
3196
3393
|
]);
|
|
3394
|
+
const statusClasses = computed(() => statusMap[status.value]);
|
|
3197
3395
|
const setCurrentValue = (val) => {
|
|
3198
3396
|
if (val === currentValue.value) {
|
|
3199
3397
|
return;
|
|
3200
3398
|
}
|
|
3399
|
+
if (type.value === "number") {
|
|
3400
|
+
const inputVal = parseFloat(val);
|
|
3401
|
+
const maxVal = parseFloat(attrs.max);
|
|
3402
|
+
const minVal = parseFloat(attrs.min);
|
|
3403
|
+
isIncreaseDisabled.value = inputVal >= maxVal;
|
|
3404
|
+
isDecreaseDisabled.value = inputVal <= minVal;
|
|
3405
|
+
}
|
|
3201
3406
|
currentValue.value = val;
|
|
3202
3407
|
};
|
|
3203
3408
|
const updateModel = (val) => {
|
|
@@ -3214,6 +3419,63 @@ const _sfc_main$i = defineComponent({
|
|
|
3214
3419
|
emit("after-reset");
|
|
3215
3420
|
(_a = input2.value) == null ? void 0 : _a.focus();
|
|
3216
3421
|
};
|
|
3422
|
+
const getInputRealNumber = (val, fixedPointNum) => parseFloat(val.toFixed(fixedPointNum));
|
|
3423
|
+
const changeNumberValue = (changeType) => {
|
|
3424
|
+
var _a;
|
|
3425
|
+
if (type.value !== "number") {
|
|
3426
|
+
return;
|
|
3427
|
+
}
|
|
3428
|
+
const minimum = parseFloat(attrs.min);
|
|
3429
|
+
const maximum = parseFloat(attrs.max);
|
|
3430
|
+
const isMaximum = currentValue.value || currentValue.value === 0 ? maximum <= (currentValue == null ? void 0 : currentValue.value) : false;
|
|
3431
|
+
const isMinimum = currentValue.value || currentValue.value === 0 ? minimum >= (currentValue == null ? void 0 : currentValue.value) : false;
|
|
3432
|
+
if (changeType === "increase" && isMaximum || changeType === "decrease" && isMinimum) {
|
|
3433
|
+
return;
|
|
3434
|
+
}
|
|
3435
|
+
isChangingNumber.value = true;
|
|
3436
|
+
const stepValue = parseFloat(attrs.step) || 1;
|
|
3437
|
+
let stepPointNum = 0;
|
|
3438
|
+
if (stepValue.toString().split(".").length > 1) {
|
|
3439
|
+
stepPointNum = stepValue.toString().split(".")[1].length;
|
|
3440
|
+
}
|
|
3441
|
+
const inputVal = parseFloat(currentValue.value) || 0;
|
|
3442
|
+
const inputStepPointValue = getInputRealNumber(inputVal, stepPointNum);
|
|
3443
|
+
let setValue = inputVal;
|
|
3444
|
+
const changeStepValue = changeType === "increase" ? stepValue : -stepValue;
|
|
3445
|
+
setValue = (inputStepPointValue - inputVal) * changeStepValue > 0 ? inputStepPointValue : inputStepPointValue + changeStepValue;
|
|
3446
|
+
if (setValue >= maximum) {
|
|
3447
|
+
setValue = maximum;
|
|
3448
|
+
}
|
|
3449
|
+
if (setValue <= minimum) {
|
|
3450
|
+
setValue = minimum;
|
|
3451
|
+
}
|
|
3452
|
+
updateModel(getInputRealNumber(setValue, stepPointNum));
|
|
3453
|
+
(_a = input2.value) == null ? void 0 : _a.focus();
|
|
3454
|
+
if (!counterTimeout && !counterInterval) {
|
|
3455
|
+
counterTimeout = window.setTimeout(() => {
|
|
3456
|
+
counterInterval = window.setInterval(() => changeNumberValue(changeType), 100);
|
|
3457
|
+
}, 300);
|
|
3458
|
+
}
|
|
3459
|
+
};
|
|
3460
|
+
const onInputNumberMouseup = (event) => {
|
|
3461
|
+
var _a;
|
|
3462
|
+
if (isChangingNumber.value) {
|
|
3463
|
+
event.preventDefault();
|
|
3464
|
+
}
|
|
3465
|
+
const onEvents = !!counterTimeout || !!counterInterval;
|
|
3466
|
+
if (counterTimeout) {
|
|
3467
|
+
window.clearTimeout(counterTimeout);
|
|
3468
|
+
}
|
|
3469
|
+
if (counterInterval) {
|
|
3470
|
+
window.clearInterval(counterInterval);
|
|
3471
|
+
}
|
|
3472
|
+
counterTimeout = null;
|
|
3473
|
+
counterInterval = null;
|
|
3474
|
+
isChangingNumber.value = false;
|
|
3475
|
+
if (onEvents) {
|
|
3476
|
+
(_a = input2.value) == null ? void 0 : _a.focus();
|
|
3477
|
+
}
|
|
3478
|
+
};
|
|
3217
3479
|
const inputAttrs = computed(() => {
|
|
3218
3480
|
const events = {
|
|
3219
3481
|
onInput(event) {
|
|
@@ -3239,6 +3501,12 @@ const _sfc_main$i = defineComponent({
|
|
|
3239
3501
|
return __spreadValues(__spreadValues({}, attrs), events);
|
|
3240
3502
|
});
|
|
3241
3503
|
watch(modelValue, (newV) => setCurrentValue(newV));
|
|
3504
|
+
onMounted(() => {
|
|
3505
|
+
window.addEventListener("mouseup", onInputNumberMouseup);
|
|
3506
|
+
});
|
|
3507
|
+
onBeforeUnmount(() => {
|
|
3508
|
+
window.removeEventListener("mouseup", onInputNumberMouseup);
|
|
3509
|
+
});
|
|
3242
3510
|
return {
|
|
3243
3511
|
currentValue,
|
|
3244
3512
|
isFocus,
|
|
@@ -3249,7 +3517,11 @@ const _sfc_main$i = defineComponent({
|
|
|
3249
3517
|
inputAttrs,
|
|
3250
3518
|
slots,
|
|
3251
3519
|
resetCurrentVal,
|
|
3252
|
-
|
|
3520
|
+
statusClasses,
|
|
3521
|
+
changeNumberValue,
|
|
3522
|
+
isIncreaseDisabled,
|
|
3523
|
+
isDecreaseDisabled,
|
|
3524
|
+
isChangingNumber
|
|
3253
3525
|
};
|
|
3254
3526
|
}
|
|
3255
3527
|
});
|
|
@@ -3257,17 +3529,16 @@ const _hoisted_1$f = {
|
|
|
3257
3529
|
key: 0,
|
|
3258
3530
|
class: "dao-input-prepend"
|
|
3259
3531
|
};
|
|
3260
|
-
const _hoisted_2$c = {
|
|
3261
|
-
const _hoisted_3$7 = {
|
|
3532
|
+
const _hoisted_2$c = {
|
|
3262
3533
|
key: 0,
|
|
3263
3534
|
class: "dao-input-prefix"
|
|
3264
3535
|
};
|
|
3265
|
-
const
|
|
3266
|
-
const
|
|
3267
|
-
key:
|
|
3536
|
+
const _hoisted_3$7 = ["type", "disabled", "value"];
|
|
3537
|
+
const _hoisted_4$6 = {
|
|
3538
|
+
key: 4,
|
|
3268
3539
|
class: "dao-input-suffix"
|
|
3269
3540
|
};
|
|
3270
|
-
const
|
|
3541
|
+
const _hoisted_5$4 = {
|
|
3271
3542
|
key: 1,
|
|
3272
3543
|
class: "dao-input-append"
|
|
3273
3544
|
};
|
|
@@ -3277,13 +3548,15 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3277
3548
|
}, [
|
|
3278
3549
|
renderSlot(_ctx.$slots, "prepend"),
|
|
3279
3550
|
_ctx.prepend && !_ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true),
|
|
3280
|
-
createElementVNode("div",
|
|
3281
|
-
|
|
3551
|
+
createElementVNode("div", {
|
|
3552
|
+
class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
|
|
3553
|
+
}, [
|
|
3554
|
+
_ctx.slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
|
|
3282
3555
|
renderSlot(_ctx.$slots, "prefix")
|
|
3283
3556
|
])) : createCommentVNode("", true),
|
|
3284
3557
|
_ctx.type === "search" ? (openBlock(), createElementBlock("i", {
|
|
3285
3558
|
key: 1,
|
|
3286
|
-
class: normalizeClass(["dao-input-search-icon", "icon-search", {
|
|
3559
|
+
class: normalizeClass(["dao-input-search-icon", "icon-search", { "dao-input__active": _ctx.isFocus }])
|
|
3287
3560
|
}, null, 2)) : createCommentVNode("", true),
|
|
3288
3561
|
createElementVNode("input", mergeProps({
|
|
3289
3562
|
ref: "input",
|
|
@@ -3293,24 +3566,44 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3293
3566
|
disabled: _ctx.disabled,
|
|
3294
3567
|
value: _ctx.currentValue,
|
|
3295
3568
|
onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
|
|
3296
|
-
}), null, 16,
|
|
3569
|
+
}), null, 16, _hoisted_3$7),
|
|
3570
|
+
_ctx.type === "number" ? (openBlock(), createElementBlock("i", {
|
|
3571
|
+
key: 2,
|
|
3572
|
+
class: normalizeClass([
|
|
3573
|
+
"dao-input-number-icon",
|
|
3574
|
+
"icon-arrow-sharp",
|
|
3575
|
+
"number-icon-up",
|
|
3576
|
+
{ "dao-input-number-icon__disabled": _ctx.isIncreaseDisabled }
|
|
3577
|
+
]),
|
|
3578
|
+
onMousedown: _cache[1] || (_cache[1] = ($event) => _ctx.changeNumberValue("increase"))
|
|
3579
|
+
}, null, 34)) : createCommentVNode("", true),
|
|
3580
|
+
_ctx.type === "number" ? (openBlock(), createElementBlock("i", {
|
|
3581
|
+
key: 3,
|
|
3582
|
+
class: normalizeClass([
|
|
3583
|
+
"dao-input-number-icon",
|
|
3584
|
+
"icon-arrow-sharp",
|
|
3585
|
+
"number-icon-down",
|
|
3586
|
+
{ "dao-input-number-icon__disabled": _ctx.isDecreaseDisabled }
|
|
3587
|
+
]),
|
|
3588
|
+
onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
|
|
3589
|
+
}, null, 34)) : createCommentVNode("", true),
|
|
3297
3590
|
withDirectives(createElementVNode("i", {
|
|
3298
|
-
class: normalizeClass(["dao-input-close-icon", "icon-close", {
|
|
3299
|
-
onClick: _cache[
|
|
3591
|
+
class: normalizeClass(["dao-input-close-icon", "icon-close", { "dao-input__active": _ctx.isFocus }]),
|
|
3592
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
|
|
3300
3593
|
}, null, 2), [
|
|
3301
3594
|
[vShow, _ctx.clearable]
|
|
3302
3595
|
]),
|
|
3303
3596
|
withDirectives(createElementVNode("i", {
|
|
3304
|
-
class: normalizeClass(_ctx.
|
|
3597
|
+
class: normalizeClass(_ctx.statusClasses)
|
|
3305
3598
|
}, null, 2), [
|
|
3306
3599
|
[vShow, ["error", "success", "loading"].includes(_ctx.status)]
|
|
3307
3600
|
]),
|
|
3308
|
-
_ctx.slots.suffix ? (openBlock(), createElementBlock("div",
|
|
3601
|
+
_ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
3309
3602
|
renderSlot(_ctx.$slots, "suffix")
|
|
3310
3603
|
])) : createCommentVNode("", true)
|
|
3311
|
-
]),
|
|
3604
|
+
], 2),
|
|
3312
3605
|
renderSlot(_ctx.$slots, "append"),
|
|
3313
|
-
_ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div",
|
|
3606
|
+
_ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
|
|
3314
3607
|
], 2);
|
|
3315
3608
|
}
|
|
3316
3609
|
var input = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$g]]);
|
|
@@ -3538,31 +3831,31 @@ const _sfc_main$g = defineComponent({
|
|
|
3538
3831
|
const { type, accordion, activeOpened } = toRefs(props);
|
|
3539
3832
|
const openedNav = ref([]);
|
|
3540
3833
|
const activeItemIdx = ref();
|
|
3541
|
-
const openNavSub = (
|
|
3542
|
-
if (openedNav.value.includes(
|
|
3834
|
+
const openNavSub = (index2) => {
|
|
3835
|
+
if (openedNav.value.includes(index2)) {
|
|
3543
3836
|
return;
|
|
3544
3837
|
}
|
|
3545
3838
|
if (accordion.value) {
|
|
3546
3839
|
openedNav.value = [];
|
|
3547
3840
|
}
|
|
3548
|
-
openedNav.value.push(
|
|
3841
|
+
openedNav.value.push(index2);
|
|
3549
3842
|
emit("toggle", {
|
|
3550
3843
|
action: "open",
|
|
3551
|
-
index
|
|
3844
|
+
index: index2
|
|
3552
3845
|
});
|
|
3553
3846
|
};
|
|
3554
|
-
const closeNavSub = (
|
|
3555
|
-
const idx = openedNav.value.indexOf(
|
|
3847
|
+
const closeNavSub = (index2) => {
|
|
3848
|
+
const idx = openedNav.value.indexOf(index2);
|
|
3556
3849
|
if (idx !== -1) {
|
|
3557
3850
|
openedNav.value.splice(idx, 1);
|
|
3558
3851
|
}
|
|
3559
3852
|
emit("toggle", {
|
|
3560
3853
|
action: "close",
|
|
3561
|
-
index
|
|
3854
|
+
index: index2
|
|
3562
3855
|
});
|
|
3563
3856
|
};
|
|
3564
|
-
const close = (
|
|
3565
|
-
const open = (
|
|
3857
|
+
const close = (index2) => closeNavSub(index2);
|
|
3858
|
+
const open = (index2) => openNavSub(index2);
|
|
3566
3859
|
const initNav = () => {
|
|
3567
3860
|
activeOpened.value.forEach((v) => {
|
|
3568
3861
|
openNavSub(v);
|
|
@@ -3571,16 +3864,16 @@ const _sfc_main$g = defineComponent({
|
|
|
3571
3864
|
onMounted(() => {
|
|
3572
3865
|
initNav();
|
|
3573
3866
|
});
|
|
3574
|
-
const handleNavItemClick = (
|
|
3575
|
-
activeItemIdx.value =
|
|
3576
|
-
emit("select",
|
|
3867
|
+
const handleNavItemClick = (index2) => {
|
|
3868
|
+
activeItemIdx.value = index2;
|
|
3869
|
+
emit("select", index2);
|
|
3577
3870
|
};
|
|
3578
|
-
const handleNavSubClick = (
|
|
3579
|
-
const isOpened = openedNav.value.includes(
|
|
3871
|
+
const handleNavSubClick = (index2) => {
|
|
3872
|
+
const isOpened = openedNav.value.includes(index2);
|
|
3580
3873
|
if (isOpened) {
|
|
3581
|
-
closeNavSub(
|
|
3874
|
+
closeNavSub(index2);
|
|
3582
3875
|
} else {
|
|
3583
|
-
openNavSub(
|
|
3876
|
+
openNavSub(index2);
|
|
3584
3877
|
}
|
|
3585
3878
|
};
|
|
3586
3879
|
const handleNavHeadClick = () => {
|
|
@@ -3687,10 +3980,10 @@ const _sfc_main$e = defineComponent({
|
|
|
3687
3980
|
disabled,
|
|
3688
3981
|
isActive,
|
|
3689
3982
|
isExactActive,
|
|
3690
|
-
index
|
|
3983
|
+
index: index2
|
|
3691
3984
|
} = toRefs(props);
|
|
3692
3985
|
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" && Boolean(icon.value));
|
|
3693
|
-
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) ===
|
|
3986
|
+
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
|
|
3694
3987
|
const isNavItemActive = computed(() => {
|
|
3695
3988
|
const unrefIsActive = unref(isActive);
|
|
3696
3989
|
const unrefIsExactActive = unref(isExactActive);
|
|
@@ -3726,17 +4019,17 @@ const _sfc_main$e = defineComponent({
|
|
|
3726
4019
|
if (disabled.value) {
|
|
3727
4020
|
return;
|
|
3728
4021
|
}
|
|
3729
|
-
rootNav == null ? void 0 : rootNav.handleNavItemClick(
|
|
4022
|
+
rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
|
|
3730
4023
|
};
|
|
3731
4024
|
watchEffect(() => {
|
|
3732
4025
|
if (isActive.value || isExactActive.value) {
|
|
3733
|
-
subNav == null ? void 0 : subNav.handleNavItemActive(isActive.value || isExactActive.value,
|
|
3734
|
-
rootNav == null ? void 0 : rootNav.handleNavItemClick(
|
|
4026
|
+
subNav == null ? void 0 : subNav.handleNavItemActive(isActive.value || isExactActive.value, index2.value);
|
|
4027
|
+
rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
|
|
3735
4028
|
}
|
|
3736
4029
|
});
|
|
3737
4030
|
watch(() => rootNav == null ? void 0 : rootNav.activeItemIdx, (val) => {
|
|
3738
|
-
const active = val ===
|
|
3739
|
-
subNav == null ? void 0 : subNav.handleNavItemActive(active,
|
|
4031
|
+
const active = val === index2.value;
|
|
4032
|
+
subNav == null ? void 0 : subNav.handleNavItemActive(active, index2.value);
|
|
3740
4033
|
}, { immediate: true });
|
|
3741
4034
|
return {
|
|
3742
4035
|
classItemList,
|
|
@@ -3791,7 +4084,7 @@ const _sfc_main$d = defineComponent({
|
|
|
3791
4084
|
disabled,
|
|
3792
4085
|
isActive,
|
|
3793
4086
|
isExactActive,
|
|
3794
|
-
index,
|
|
4087
|
+
index: index2,
|
|
3795
4088
|
fold
|
|
3796
4089
|
} = toRefs(props);
|
|
3797
4090
|
const rootNav = inject(navRootKey);
|
|
@@ -3804,7 +4097,7 @@ const _sfc_main$d = defineComponent({
|
|
|
3804
4097
|
const childrenActiveMap = reactive(new Map());
|
|
3805
4098
|
const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" && Boolean(icon.value));
|
|
3806
4099
|
const foldIcon = computed(() => opened.value ? "icon_caret-up" : "icon_caret-down");
|
|
3807
|
-
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) ===
|
|
4100
|
+
const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
|
|
3808
4101
|
const classSubList = computed(() => {
|
|
3809
4102
|
const unrefDisabled = unref(disabled);
|
|
3810
4103
|
return [
|
|
@@ -3866,24 +4159,24 @@ const _sfc_main$d = defineComponent({
|
|
|
3866
4159
|
return;
|
|
3867
4160
|
}
|
|
3868
4161
|
if (fold.value) {
|
|
3869
|
-
rootNav == null ? void 0 : rootNav.handleNavSubClick(
|
|
4162
|
+
rootNav == null ? void 0 : rootNav.handleNavSubClick(index2.value);
|
|
3870
4163
|
} else {
|
|
3871
|
-
rootNav == null ? void 0 : rootNav.handleNavItemClick(
|
|
4164
|
+
rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
|
|
3872
4165
|
}
|
|
3873
4166
|
};
|
|
3874
4167
|
watchEffect(() => {
|
|
3875
4168
|
if (!fold.value && (isActive.value || isExactActive.value)) {
|
|
3876
|
-
rootNav == null ? void 0 : rootNav.handleNavItemClick(
|
|
4169
|
+
rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
|
|
3877
4170
|
}
|
|
3878
4171
|
});
|
|
3879
4172
|
watch(() => rootNav == null ? void 0 : rootNav.activeItemIdx, (val) => {
|
|
3880
|
-
currentActiveIndex.value = Boolean(val ===
|
|
4173
|
+
currentActiveIndex.value = Boolean(val === index2.value);
|
|
3881
4174
|
}, { immediate: true });
|
|
3882
4175
|
watch(() => rootNav == null ? void 0 : rootNav.openedNav, (val) => {
|
|
3883
4176
|
if (disabled.value && !fold.value) {
|
|
3884
4177
|
opened.value = false;
|
|
3885
4178
|
} else {
|
|
3886
|
-
opened.value = (val == null ? void 0 : val.indexOf(
|
|
4179
|
+
opened.value = (val == null ? void 0 : val.indexOf(index2.value)) !== -1;
|
|
3887
4180
|
}
|
|
3888
4181
|
}, { immediate: true, deep: true });
|
|
3889
4182
|
return {
|
|
@@ -4154,9 +4447,9 @@ const _sfc_main$c = defineComponent({
|
|
|
4154
4447
|
});
|
|
4155
4448
|
(_a = searchInput.value) == null ? void 0 : _a.focus();
|
|
4156
4449
|
};
|
|
4157
|
-
const remove = (
|
|
4158
|
-
if (
|
|
4159
|
-
const [removed] = state.options.splice(
|
|
4450
|
+
const remove = (index2) => {
|
|
4451
|
+
if (index2 > -1) {
|
|
4452
|
+
const [removed] = state.options.splice(index2, 1);
|
|
4160
4453
|
if (removed) {
|
|
4161
4454
|
checkRemovedOption(removed);
|
|
4162
4455
|
}
|
|
@@ -4339,8 +4632,8 @@ const _sfc_main$b = defineComponent({
|
|
|
4339
4632
|
onBeforeUnmount(() => {
|
|
4340
4633
|
var _a;
|
|
4341
4634
|
if (typeof removeFn === "function") {
|
|
4342
|
-
const
|
|
4343
|
-
removeFn(
|
|
4635
|
+
const index2 = (_a = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a : -1;
|
|
4636
|
+
removeFn(index2);
|
|
4344
4637
|
}
|
|
4345
4638
|
});
|
|
4346
4639
|
return {
|
|
@@ -5142,9 +5435,9 @@ const _sfc_main$3 = defineComponent({
|
|
|
5142
5435
|
const isRowSelected = (row) => selectedRows.has(row);
|
|
5143
5436
|
const toggleExpand = (row, rowIndex) => {
|
|
5144
5437
|
expandedRows.add(row);
|
|
5145
|
-
const
|
|
5146
|
-
if (
|
|
5147
|
-
expandRows.splice(
|
|
5438
|
+
const index2 = expandRows.indexOf(row);
|
|
5439
|
+
if (index2 > -1) {
|
|
5440
|
+
expandRows.splice(index2, 1);
|
|
5148
5441
|
emit("expandToggle", row, rowIndex, false);
|
|
5149
5442
|
} else {
|
|
5150
5443
|
expandRows.push(row);
|
|
@@ -5353,8 +5646,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5353
5646
|
])
|
|
5354
5647
|
])) : createCommentVNode("", true),
|
|
5355
5648
|
createElementVNode("tbody", _hoisted_9, [
|
|
5356
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row,
|
|
5357
|
-
return openBlock(), createElementBlock(Fragment, { key:
|
|
5649
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
|
|
5650
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
5358
5651
|
createElementVNode("tr", {
|
|
5359
5652
|
class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }])
|
|
5360
5653
|
}, [
|
|
@@ -5367,7 +5660,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5367
5660
|
_ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
|
|
5368
5661
|
createElementVNode("i", {
|
|
5369
5662
|
class: "dao-table-expand-toggle icon-arrow-sharp",
|
|
5370
|
-
onClick: ($event) => _ctx.toggleExpand(row,
|
|
5663
|
+
onClick: ($event) => _ctx.toggleExpand(row, index2)
|
|
5371
5664
|
}, null, 8, _hoisted_12)
|
|
5372
5665
|
])) : createCommentVNode("", true),
|
|
5373
5666
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
|
|
@@ -5379,7 +5672,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5379
5672
|
renderSlot(_ctx.$slots, `td-${column.id}`, {
|
|
5380
5673
|
value: row[column.id],
|
|
5381
5674
|
row,
|
|
5382
|
-
rowIndex:
|
|
5675
|
+
rowIndex: index2
|
|
5383
5676
|
})
|
|
5384
5677
|
], 4);
|
|
5385
5678
|
}), 128))
|
|
@@ -5387,7 +5680,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5387
5680
|
_ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
|
|
5388
5681
|
renderSlot(_ctx.$slots, "expand", {
|
|
5389
5682
|
row,
|
|
5390
|
-
rowIndex:
|
|
5683
|
+
rowIndex: index2
|
|
5391
5684
|
})
|
|
5392
5685
|
], 512)), [
|
|
5393
5686
|
[vShow, _ctx.isRowExpanded(row)]
|
|
@@ -5523,7 +5816,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
5523
5816
|
}
|
|
5524
5817
|
emit("click", event, value);
|
|
5525
5818
|
};
|
|
5526
|
-
const tabsLi = computed(() => props.tabList.map((tab,
|
|
5819
|
+
const tabsLi = computed(() => props.tabList.map((tab, index2) => {
|
|
5527
5820
|
const { label } = tab;
|
|
5528
5821
|
const isNotString = typeof label !== "string";
|
|
5529
5822
|
const isActive = tab.value === props.currentTab;
|
|
@@ -5537,7 +5830,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
5537
5830
|
"dao-tab-nav-item--disabled": tab.disabled
|
|
5538
5831
|
},
|
|
5539
5832
|
ref: hasActiveLine ? activeTab : void 0,
|
|
5540
|
-
key:
|
|
5833
|
+
key: index2,
|
|
5541
5834
|
onClick: (event) => handleClick(event, tab),
|
|
5542
5835
|
onMouseenter: hasHoverLine ? onMouseenter : void 0,
|
|
5543
5836
|
onMouseleave: hasHoverLine ? onMouseleave : void 0
|
|
@@ -5605,16 +5898,16 @@ const _sfc_main$1 = defineComponent({
|
|
|
5605
5898
|
if (!child.value) {
|
|
5606
5899
|
return;
|
|
5607
5900
|
}
|
|
5608
|
-
const
|
|
5609
|
-
if (
|
|
5610
|
-
tabList.splice(
|
|
5901
|
+
const index2 = Array.from(((_a = tabBody.value) == null ? void 0 : _a.children) || []).indexOf(child.value);
|
|
5902
|
+
if (index2 > -1) {
|
|
5903
|
+
tabList.splice(index2, 0, tab);
|
|
5611
5904
|
}
|
|
5612
5905
|
};
|
|
5613
5906
|
provide(addTabFnKey, addTab);
|
|
5614
5907
|
const removeTab = (tab) => {
|
|
5615
|
-
const
|
|
5616
|
-
if (
|
|
5617
|
-
tabList.splice(
|
|
5908
|
+
const index2 = tabList.indexOf(tab);
|
|
5909
|
+
if (index2 > -1) {
|
|
5910
|
+
tabList.splice(index2, 1);
|
|
5618
5911
|
}
|
|
5619
5912
|
};
|
|
5620
5913
|
provide(removeTabFnKey, removeTab);
|
|
@@ -5693,6 +5986,7 @@ var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
|
5693
5986
|
var components = /* @__PURE__ */ Object.freeze({
|
|
5694
5987
|
__proto__: null,
|
|
5695
5988
|
[Symbol.toStringTag]: "Module",
|
|
5989
|
+
ActionIcon: actionIcon,
|
|
5696
5990
|
Button: DaoButton,
|
|
5697
5991
|
ButtonGroup: buttonGroup,
|
|
5698
5992
|
Card: card,
|
|
@@ -5708,6 +6002,9 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
5708
6002
|
Form: form,
|
|
5709
6003
|
FormItem: formItem,
|
|
5710
6004
|
FormGroup: formGroup,
|
|
6005
|
+
Header: header,
|
|
6006
|
+
Breadcrumb: breadcrumb,
|
|
6007
|
+
BreadcrumbItem: DaoBreadcrumbItem,
|
|
5711
6008
|
Icon: DaoIcon,
|
|
5712
6009
|
Input: input,
|
|
5713
6010
|
Message: message,
|
|
@@ -5728,23 +6025,23 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
5728
6025
|
Tabs: tabs,
|
|
5729
6026
|
TabNav: _sfc_main$2,
|
|
5730
6027
|
TabItem: tabItem,
|
|
5731
|
-
Tooltip: _sfc_main$
|
|
6028
|
+
Tooltip: _sfc_main$o
|
|
5732
6029
|
});
|
|
5733
6030
|
var common = "";
|
|
5734
|
-
const plugin
|
|
6031
|
+
const plugin = (app) => {
|
|
5735
6032
|
Object.values(components).forEach((c) => {
|
|
5736
6033
|
app.component(c.name, c);
|
|
5737
6034
|
});
|
|
5738
6035
|
};
|
|
5739
6036
|
let installed = false;
|
|
5740
|
-
|
|
6037
|
+
const install = (Vue) => {
|
|
5741
6038
|
if (installed) {
|
|
5742
6039
|
return;
|
|
5743
6040
|
}
|
|
5744
|
-
Vue.use(plugin
|
|
6041
|
+
Vue.use(plugin);
|
|
5745
6042
|
installed = true;
|
|
5746
|
-
}
|
|
5747
|
-
var
|
|
6043
|
+
};
|
|
6044
|
+
var index = {
|
|
5748
6045
|
install
|
|
5749
6046
|
};
|
|
5750
|
-
export {
|
|
6047
|
+
export { index as default };
|