vue-devui 1.6.4 → 1.6.6
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/auto-complete/index.es.js +19 -6
- package/auto-complete/index.umd.js +10 -10
- package/auto-complete/style.css +1 -1
- package/breadcrumb/index.es.js +2 -15
- package/breadcrumb/index.umd.js +1 -1
- package/breadcrumb/style.css +1 -1
- package/button/index.es.js +31 -12
- package/button/index.umd.js +10 -10
- package/button/style.css +1 -1
- package/carousel/index.es.js +36 -213
- package/carousel/index.umd.js +1 -1
- package/carousel/style.css +1 -1
- package/category-search/index.es.js +53 -29
- package/category-search/index.umd.js +12 -12
- package/category-search/style.css +1 -1
- package/checkbox/index.es.js +22 -9
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/code-review/style.css +1 -1
- package/collapse/index.es.js +15 -18
- package/collapse/index.umd.js +5 -5
- package/data-grid/index.es.js +48 -29
- package/data-grid/index.umd.js +6 -6
- package/data-grid/style.css +1 -1
- package/date-picker-pro/index.es.js +91 -20
- package/date-picker-pro/index.umd.js +16 -16
- package/date-picker-pro/style.css +1 -1
- package/dropdown/index.es.js +2 -15
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +84 -207
- package/editable-select/index.umd.js +20 -16
- package/editable-select/style.css +1 -1
- package/editor-md/index.es.js +32 -18
- package/editor-md/index.umd.js +15 -15
- package/editor-md/style.css +1 -1
- package/form/style.css +1 -1
- package/icon/index.es.js +1 -2
- package/icon/index.umd.js +1 -1
- package/input/index.es.js +27 -7
- package/input/index.umd.js +11 -11
- package/input/style.css +1 -1
- package/input-number/index.es.js +5 -0
- package/input-number/index.umd.js +10 -10
- package/input-number/style.css +1 -1
- package/mention/index.es.js +12 -3
- package/mention/index.umd.js +8 -8
- package/mention/style.css +1 -1
- package/message/index.es.js +1 -2
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +27 -4
- package/modal/index.umd.js +7 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +1 -2
- package/notification/index.umd.js +2 -2
- package/overlay/style.css +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +83 -263
- package/pagination/index.umd.js +14 -19
- package/pagination/style.css +1 -1
- package/popover/style.css +1 -1
- package/radio/index.es.js +10 -28
- package/radio/index.umd.js +9 -9
- package/radio/style.css +1 -1
- package/result/index.es.js +1 -2
- package/result/index.umd.js +1 -1
- package/search/index.es.js +54 -28
- package/search/index.umd.js +18 -14
- package/search/style.css +1 -1
- package/select/index.es.js +71 -52
- package/select/index.umd.js +18 -23
- package/select/style.css +1 -1
- package/splitter/style.css +1 -1
- package/steps/index.es.js +1 -2
- package/steps/index.umd.js +1 -1
- package/style.css +2 -2
- package/switch/index.es.js +16 -2
- package/switch/index.umd.js +15 -15
- package/switch/style.css +1 -1
- package/table/index.es.js +49 -30
- package/table/index.umd.js +12 -12
- package/table/style.css +1 -1
- package/textarea/index.es.js +6 -1
- package/textarea/index.umd.js +1 -1
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +66 -14
- package/time-picker/index.umd.js +16 -16
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +71 -52
- package/time-select/index.umd.js +12 -17
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +1 -2
- package/timeline/index.umd.js +1 -1
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +22 -9
- package/tree/index.umd.js +9 -9
- package/tree/style.css +1 -1
- package/types/auto-complete/src/auto-complete-types.d.ts +4 -0
- package/types/carousel/src/components/carousel-icons.d.ts +2 -0
- package/types/cascader/src/cascader-types.d.ts +4 -0
- package/types/checkbox/src/checkbox-types.d.ts +8 -0
- package/types/date-picker-pro/src/date-picker-pro-types.d.ts +12 -0
- package/types/date-picker-pro/src/range-date-picker-types.d.ts +4 -0
- package/types/dropdown/src/use-dropdown.d.ts +1 -1
- package/types/editable-select/src/editable-select-types.d.ts +4 -0
- package/types/editor-md/src/composables/use-editor-md.d.ts +1 -0
- package/types/editor-md/src/editor-md-types.d.ts +3 -0
- package/types/icon/src/icon-types.d.ts +0 -1
- package/types/input/src/input-types.d.ts +4 -0
- package/types/input-icon/src/input-icon.d.ts +9 -0
- package/types/input-number/src/input-number-types.d.ts +4 -0
- package/types/mention/src/mention-types.d.ts +4 -0
- package/types/mention/src/mention.d.ts +9 -0
- package/types/modal/src/components/modal-icons.d.ts +1 -0
- package/types/radio/src/radio-types.d.ts +8 -0
- package/types/select/src/select-types.d.ts +4 -0
- package/types/svg-icons/index.d.ts +3 -0
- package/types/textarea/src/textarea-types.d.ts +4 -0
- package/types/time-picker/src/components/time-scroll/index.d.ts +9 -0
- package/types/time-picker/src/time-picker-types.d.ts +4 -0
- package/upload/index.es.js +1 -2
- package/upload/index.umd.js +2 -2
- package/vue-devui.es.js +393 -174
- package/vue-devui.umd.js +93 -82
- package/types/search/src/components/search-close-icon.d.ts +0 -2
- package/types/search/src/components/search-icon.d.ts +0 -2
- package/types/select/src/components/select-arrow-icon.d.ts +0 -2
package/pagination/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, resolveDirective
|
|
32
|
+
import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, resolveDirective } from "vue";
|
|
33
33
|
import { onClickOutside } from "@vueuse/core";
|
|
34
34
|
import "clipboard";
|
|
35
35
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
@@ -5587,9 +5587,6 @@ function useNamespace(block, needDot = false) {
|
|
|
5587
5587
|
em
|
|
5588
5588
|
};
|
|
5589
5589
|
}
|
|
5590
|
-
function isUrl(value) {
|
|
5591
|
-
return /^((http|https):)?\/\//.test(value);
|
|
5592
|
-
}
|
|
5593
5590
|
function useFieldCollection() {
|
|
5594
5591
|
const itemContexts = [];
|
|
5595
5592
|
const addItemContext = (field) => {
|
|
@@ -8143,6 +8140,9 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
8143
8140
|
(_a = dropdownRef.value) == null ? void 0 : _a.updatePosition();
|
|
8144
8141
|
}
|
|
8145
8142
|
}, { flush: "post" });
|
|
8143
|
+
onMounted(() => {
|
|
8144
|
+
nextTick(updateInjectOptionsStatus);
|
|
8145
|
+
});
|
|
8146
8146
|
return {
|
|
8147
8147
|
selectDisabled,
|
|
8148
8148
|
selectSize,
|
|
@@ -8257,6 +8257,10 @@ const selectProps = {
|
|
|
8257
8257
|
multipleLimit: {
|
|
8258
8258
|
type: Number,
|
|
8259
8259
|
default: 0
|
|
8260
|
+
},
|
|
8261
|
+
showGlowStyle: {
|
|
8262
|
+
type: Boolean,
|
|
8263
|
+
default: true
|
|
8260
8264
|
}
|
|
8261
8265
|
};
|
|
8262
8266
|
const optionProps = {
|
|
@@ -8323,6 +8327,10 @@ const commonProps = {
|
|
|
8323
8327
|
size: {
|
|
8324
8328
|
type: String,
|
|
8325
8329
|
default: "md"
|
|
8330
|
+
},
|
|
8331
|
+
showGlowStyle: {
|
|
8332
|
+
type: Boolean,
|
|
8333
|
+
default: true
|
|
8326
8334
|
}
|
|
8327
8335
|
};
|
|
8328
8336
|
const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
@@ -8578,7 +8586,10 @@ var Checkbox = defineComponent({
|
|
|
8578
8586
|
active: mergedChecked.value,
|
|
8579
8587
|
"half-checked": props.halfChecked,
|
|
8580
8588
|
disabled: mergedDisabled.value,
|
|
8581
|
-
unchecked: !mergedChecked.value
|
|
8589
|
+
unchecked: !mergedChecked.value,
|
|
8590
|
+
[ns2.m("glow-style")]: props.showGlowStyle,
|
|
8591
|
+
[ns2.m(`checkbox-${size.value}`)]: border.value,
|
|
8592
|
+
[ns2.m("checkbox-bordered")]: border.value
|
|
8582
8593
|
};
|
|
8583
8594
|
const labelTitle = mergedIsShowTitle.value ? props.title || props.label : "";
|
|
8584
8595
|
const bgImgStyle = mergedColor.value && props.halfChecked || mergedColor.value ? `linear-gradient(${mergedColor.value}, ${mergedColor.value})` : "";
|
|
@@ -8595,7 +8606,7 @@ var Checkbox = defineComponent({
|
|
|
8595
8606
|
[ns2.m("no-animation")]: !mergedShowAnimation.value
|
|
8596
8607
|
};
|
|
8597
8608
|
const labelCls = {
|
|
8598
|
-
[ns2.m(size.value)]:
|
|
8609
|
+
[ns2.m(size.value)]: border.value,
|
|
8599
8610
|
[ns2.m("bordered")]: border.value
|
|
8600
8611
|
};
|
|
8601
8612
|
const stopPropagation = ($event) => $event.stopPropagation();
|
|
@@ -8607,7 +8618,11 @@ var Checkbox = defineComponent({
|
|
|
8607
8618
|
"style": wrapperStyle.value
|
|
8608
8619
|
}, [createVNode("div", {
|
|
8609
8620
|
"class": checkboxCls
|
|
8610
|
-
}, [createVNode("
|
|
8621
|
+
}, [props.showGlowStyle && mergedShowAnimation.value && createVNode("div", {
|
|
8622
|
+
"class": ns2.e("glow-box")
|
|
8623
|
+
}, [createVNode("span", {
|
|
8624
|
+
"class": "glow-bg"
|
|
8625
|
+
}, null)]), createVNode("label", {
|
|
8611
8626
|
"title": labelTitle,
|
|
8612
8627
|
"onClick": handleClick,
|
|
8613
8628
|
"class": labelCls,
|
|
@@ -8629,18 +8644,20 @@ var Checkbox = defineComponent({
|
|
|
8629
8644
|
}, [createVNode("span", {
|
|
8630
8645
|
"class": ns2.e("halfchecked-bg")
|
|
8631
8646
|
}, null), createVNode("svg", {
|
|
8632
|
-
"viewBox": "0 0
|
|
8633
|
-
"
|
|
8634
|
-
"
|
|
8647
|
+
"viewBox": "0 0 14 14",
|
|
8648
|
+
"width": "14",
|
|
8649
|
+
"height": "14",
|
|
8635
8650
|
"class": ns2.e("tick-wrap")
|
|
8636
8651
|
}, [createVNode("g", {
|
|
8637
8652
|
"stroke": "none",
|
|
8638
8653
|
"stroke-width": "1",
|
|
8639
8654
|
"fill": "none",
|
|
8640
8655
|
"fill-rule": "evenodd"
|
|
8641
|
-
}, [createVNode("
|
|
8642
|
-
"
|
|
8643
|
-
"
|
|
8656
|
+
}, [createVNode("path", {
|
|
8657
|
+
"d": "M 2.3 7.0 5.6 9.6 11.4 3.5",
|
|
8658
|
+
"stroke": "#fff",
|
|
8659
|
+
"stroke-width": "1.5",
|
|
8660
|
+
"fill": "none",
|
|
8644
8661
|
"class": polygonCls
|
|
8645
8662
|
}, null)])])]), createVNode("span", {
|
|
8646
8663
|
"class": ns2.e("label-text")
|
|
@@ -8824,47 +8841,45 @@ var Option = defineComponent({
|
|
|
8824
8841
|
};
|
|
8825
8842
|
}
|
|
8826
8843
|
});
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
"
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
"fill-rule": "nonzero"
|
|
8867
|
-
}, null)])]);
|
|
8844
|
+
function SelectArrowIcon() {
|
|
8845
|
+
return createVNode("svg", {
|
|
8846
|
+
"width": "16px",
|
|
8847
|
+
"height": "16px",
|
|
8848
|
+
"viewBox": "0 0 16 16",
|
|
8849
|
+
"version": "1.1",
|
|
8850
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
8851
|
+
}, [createVNode("g", {
|
|
8852
|
+
"stroke": "none",
|
|
8853
|
+
"stroke-width": "1",
|
|
8854
|
+
"fill": "none",
|
|
8855
|
+
"fill-rule": "evenodd"
|
|
8856
|
+
}, [createVNode("path", {
|
|
8857
|
+
"d": `M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661
|
|
8858
|
+
L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661
|
|
8859
|
+
C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534
|
|
8860
|
+
C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339
|
|
8861
|
+
C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z`
|
|
8862
|
+
}, null)])]);
|
|
8863
|
+
}
|
|
8864
|
+
function InputClearIcon() {
|
|
8865
|
+
return createVNode("svg", {
|
|
8866
|
+
"width": "16px",
|
|
8867
|
+
"height": "16px",
|
|
8868
|
+
"viewBox": "0 0 16 16",
|
|
8869
|
+
"version": "1.1",
|
|
8870
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
8871
|
+
}, [createVNode("g", {
|
|
8872
|
+
"stroke": "none",
|
|
8873
|
+
"stroke-width": "1",
|
|
8874
|
+
"fill": "none",
|
|
8875
|
+
"fill-rule": "evenodd"
|
|
8876
|
+
}, [createVNode("path", {
|
|
8877
|
+
"d": "M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M5.87867966,5.17157288 C5.68341751,4.97631073 5.36683502,4.97631073 5.17157288,5.17157288 C4.99800652,5.34513923 4.97872137,5.61456363 5.11371742,5.80943177 L5.17157288,5.87867966 L7.29218611,7.99929289 L5.17157288,10.1213203 C4.97631073,10.3165825 4.97631073,10.633165 5.17157288,10.8284271 C5.34513923,11.0019935 5.61456363,11.0212786 5.80943177,10.8862826 L5.87867966,10.8284271 L7.99929289,8.70639967 L10.1213203,10.8284271 C10.3165825,11.0236893 10.633165,11.0236893 10.8284271,10.8284271 C11.0019935,10.6548608 11.0212786,10.3854364 10.8862826,10.1905682 L10.8284271,10.1213203 L8.70710678,8 L10.8284271,5.87867966 C11.0236893,5.68341751 11.0236893,5.36683502 10.8284271,5.17157288 C10.6548608,4.99800652 10.3854364,4.97872137 10.1905682,5.11371742 L10.1213203,5.17157288 L8,7.29289322 L5.87867966,5.17157288 Z",
|
|
8878
|
+
"id": "\u5F62\u72B6",
|
|
8879
|
+
"fill": "#D5D5DB",
|
|
8880
|
+
"fill-rule": "nonzero"
|
|
8881
|
+
}, null)])]);
|
|
8882
|
+
}
|
|
8868
8883
|
const tagProps = {
|
|
8869
8884
|
type: {
|
|
8870
8885
|
type: String,
|
|
@@ -9199,7 +9214,8 @@ function useSelectContent() {
|
|
|
9199
9214
|
const selectionCls = computed(() => {
|
|
9200
9215
|
return className(ns2.e("selection"), {
|
|
9201
9216
|
[ns2.e("clearable")]: mergeClearable.value,
|
|
9202
|
-
[ns2.em("selection", "error")]: isValidateError.value
|
|
9217
|
+
[ns2.em("selection", "error")]: isValidateError.value,
|
|
9218
|
+
[ns2.em("selection", "glow-style")]: Boolean(select2 == null ? void 0 : select2.showGlowStyle)
|
|
9203
9219
|
});
|
|
9204
9220
|
});
|
|
9205
9221
|
const inputCls = computed(() => {
|
|
@@ -9351,7 +9367,7 @@ var SelectContent = defineComponent({
|
|
|
9351
9367
|
}, null), createVNode("span", {
|
|
9352
9368
|
"onClick": handleClear,
|
|
9353
9369
|
"class": clearCls.value
|
|
9354
|
-
}, [createVNode(
|
|
9370
|
+
}, [createVNode(InputClearIcon, null, null)]), createVNode("span", {
|
|
9355
9371
|
"class": arrowCls.value
|
|
9356
9372
|
}, [createVNode(SelectArrowIcon, null, null)])]);
|
|
9357
9373
|
};
|
|
@@ -10100,188 +10116,6 @@ var PageNumBtn = defineComponent({
|
|
|
10100
10116
|
}, [createVNode(NextLinkIcon, null, null)])])]);
|
|
10101
10117
|
}
|
|
10102
10118
|
});
|
|
10103
|
-
const DEFAULT_PREFIX = "icon";
|
|
10104
|
-
const iconProps = {
|
|
10105
|
-
name: {
|
|
10106
|
-
type: String,
|
|
10107
|
-
default: "",
|
|
10108
|
-
required: true
|
|
10109
|
-
},
|
|
10110
|
-
size: {
|
|
10111
|
-
type: [Number, String],
|
|
10112
|
-
default: "inherit"
|
|
10113
|
-
},
|
|
10114
|
-
color: {
|
|
10115
|
-
type: String,
|
|
10116
|
-
default: "inherit"
|
|
10117
|
-
},
|
|
10118
|
-
component: {
|
|
10119
|
-
type: Object,
|
|
10120
|
-
default: null
|
|
10121
|
-
},
|
|
10122
|
-
classPrefix: {
|
|
10123
|
-
type: String,
|
|
10124
|
-
default: DEFAULT_PREFIX
|
|
10125
|
-
},
|
|
10126
|
-
operable: {
|
|
10127
|
-
type: Boolean,
|
|
10128
|
-
default: false
|
|
10129
|
-
},
|
|
10130
|
-
disabled: {
|
|
10131
|
-
type: Boolean,
|
|
10132
|
-
default: false
|
|
10133
|
-
},
|
|
10134
|
-
rotate: {
|
|
10135
|
-
type: [Number, String]
|
|
10136
|
-
}
|
|
10137
|
-
};
|
|
10138
|
-
const svgIconProps = {
|
|
10139
|
-
name: {
|
|
10140
|
-
type: String,
|
|
10141
|
-
default: "",
|
|
10142
|
-
required: true
|
|
10143
|
-
},
|
|
10144
|
-
color: {
|
|
10145
|
-
type: String,
|
|
10146
|
-
default: "inherit"
|
|
10147
|
-
},
|
|
10148
|
-
size: {
|
|
10149
|
-
type: [Number, String],
|
|
10150
|
-
default: "inherit"
|
|
10151
|
-
}
|
|
10152
|
-
};
|
|
10153
|
-
var icon = "";
|
|
10154
|
-
var svgIcon = defineComponent({
|
|
10155
|
-
name: "DSvgIcon",
|
|
10156
|
-
props: svgIconProps,
|
|
10157
|
-
setup(props) {
|
|
10158
|
-
const {
|
|
10159
|
-
name,
|
|
10160
|
-
color,
|
|
10161
|
-
size
|
|
10162
|
-
} = toRefs(props);
|
|
10163
|
-
const ns2 = useNamespace$1("svg-icon");
|
|
10164
|
-
const iconName = computed(() => `#icon-${name.value}`);
|
|
10165
|
-
const iconSize = computed(() => {
|
|
10166
|
-
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
10167
|
-
});
|
|
10168
|
-
const styles = {
|
|
10169
|
-
width: iconSize.value,
|
|
10170
|
-
height: iconSize.value
|
|
10171
|
-
};
|
|
10172
|
-
return () => {
|
|
10173
|
-
return createVNode("svg", {
|
|
10174
|
-
"class": ns2.b(),
|
|
10175
|
-
"style": styles
|
|
10176
|
-
}, [createVNode("use", {
|
|
10177
|
-
"xlink:href": iconName.value,
|
|
10178
|
-
"fill": color.value
|
|
10179
|
-
}, null)]);
|
|
10180
|
-
};
|
|
10181
|
-
}
|
|
10182
|
-
});
|
|
10183
|
-
function useIconDom(props, ctx2) {
|
|
10184
|
-
const {
|
|
10185
|
-
component,
|
|
10186
|
-
name,
|
|
10187
|
-
size,
|
|
10188
|
-
color,
|
|
10189
|
-
classPrefix,
|
|
10190
|
-
rotate
|
|
10191
|
-
} = toRefs(props);
|
|
10192
|
-
const ns2 = useNamespace$1("icon");
|
|
10193
|
-
const iconSize = computed(() => {
|
|
10194
|
-
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
10195
|
-
});
|
|
10196
|
-
const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
|
|
10197
|
-
const imgIconDom = () => {
|
|
10198
|
-
return createVNode("img", mergeProps({
|
|
10199
|
-
"src": name.value,
|
|
10200
|
-
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
10201
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
10202
|
-
"style": {
|
|
10203
|
-
width: iconSize.value || "",
|
|
10204
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
10205
|
-
verticalAlign: "middle"
|
|
10206
|
-
}
|
|
10207
|
-
}, ctx2.attrs), null);
|
|
10208
|
-
};
|
|
10209
|
-
const svgIconDom = () => {
|
|
10210
|
-
return createVNode(IconComponent, mergeProps({
|
|
10211
|
-
"name": name.value,
|
|
10212
|
-
"color": color.value,
|
|
10213
|
-
"size": iconSize.value,
|
|
10214
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
10215
|
-
"style": {
|
|
10216
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
10217
|
-
}
|
|
10218
|
-
}, ctx2.attrs), null);
|
|
10219
|
-
};
|
|
10220
|
-
const fontIconDom = () => {
|
|
10221
|
-
const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
|
|
10222
|
-
return createVNode("i", mergeProps({
|
|
10223
|
-
"class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
10224
|
-
"style": {
|
|
10225
|
-
fontSize: iconSize.value,
|
|
10226
|
-
color: color.value,
|
|
10227
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
10228
|
-
}
|
|
10229
|
-
}, ctx2.attrs), null);
|
|
10230
|
-
};
|
|
10231
|
-
const iconDom = () => {
|
|
10232
|
-
return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
|
|
10233
|
-
};
|
|
10234
|
-
return {
|
|
10235
|
-
iconDom
|
|
10236
|
-
};
|
|
10237
|
-
}
|
|
10238
|
-
var Icon = defineComponent({
|
|
10239
|
-
name: "DIcon",
|
|
10240
|
-
props: iconProps,
|
|
10241
|
-
emits: ["click"],
|
|
10242
|
-
setup(props, ctx2) {
|
|
10243
|
-
const {
|
|
10244
|
-
disabled,
|
|
10245
|
-
operable
|
|
10246
|
-
} = toRefs(props);
|
|
10247
|
-
const {
|
|
10248
|
-
iconDom
|
|
10249
|
-
} = useIconDom(props, ctx2);
|
|
10250
|
-
const ns2 = useNamespace$1("icon");
|
|
10251
|
-
const wrapClassed = computed(() => ({
|
|
10252
|
-
[ns2.e("container")]: true,
|
|
10253
|
-
[ns2.m("disabled")]: disabled.value,
|
|
10254
|
-
[ns2.m("operable")]: operable.value,
|
|
10255
|
-
[ns2.m("no-slots")]: !Object.keys(ctx2.slots).length
|
|
10256
|
-
}));
|
|
10257
|
-
const onClick = (e) => {
|
|
10258
|
-
if (disabled.value) {
|
|
10259
|
-
return;
|
|
10260
|
-
}
|
|
10261
|
-
ctx2.emit("click", e);
|
|
10262
|
-
};
|
|
10263
|
-
return () => {
|
|
10264
|
-
var _a, _b, _c, _d;
|
|
10265
|
-
return createVNode("div", {
|
|
10266
|
-
"class": wrapClassed.value,
|
|
10267
|
-
"onClick": onClick
|
|
10268
|
-
}, [(_b = (_a = ctx2.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx2.slots).suffix) == null ? void 0 : _d.call(_c)]);
|
|
10269
|
-
};
|
|
10270
|
-
}
|
|
10271
|
-
});
|
|
10272
|
-
var iconGroup = "";
|
|
10273
|
-
defineComponent({
|
|
10274
|
-
name: "DIconGroup",
|
|
10275
|
-
setup(_, ctx2) {
|
|
10276
|
-
const ns2 = useNamespace$1("icon-group");
|
|
10277
|
-
return () => {
|
|
10278
|
-
var _a, _b;
|
|
10279
|
-
return createVNode("div", {
|
|
10280
|
-
"class": ns2.b()
|
|
10281
|
-
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)]);
|
|
10282
|
-
};
|
|
10283
|
-
}
|
|
10284
|
-
});
|
|
10285
10119
|
const dropdownProps = {
|
|
10286
10120
|
visible: {
|
|
10287
10121
|
type: Boolean,
|
|
@@ -10413,17 +10247,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
10413
10247
|
onInvalidate(() => subscriptions.forEach((v) => v()));
|
|
10414
10248
|
});
|
|
10415
10249
|
};
|
|
10416
|
-
function useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
10417
|
-
const calcPopDirection = (dropdownEl) => {
|
|
10418
|
-
const elementHeight = dropdownEl.offsetHeight;
|
|
10419
|
-
const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
|
|
10420
|
-
const isBottomEnough = bottomDistance >= elementHeight;
|
|
10421
|
-
if (!isBottomEnough) {
|
|
10422
|
-
popDirection.value = "top";
|
|
10423
|
-
} else {
|
|
10424
|
-
popDirection.value = "bottom";
|
|
10425
|
-
}
|
|
10426
|
-
};
|
|
10250
|
+
function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
|
|
10427
10251
|
watch(visible, (newVal, oldVal) => {
|
|
10428
10252
|
if (oldVal === void 0) {
|
|
10429
10253
|
return;
|
|
@@ -10447,9 +10271,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
10447
10271
|
}
|
|
10448
10272
|
}
|
|
10449
10273
|
}
|
|
10450
|
-
if (dropdownEl) {
|
|
10451
|
-
calcPopDirection(dropdownEl);
|
|
10452
|
-
}
|
|
10453
10274
|
});
|
|
10454
10275
|
onMounted(() => {
|
|
10455
10276
|
dropdownMap.set(id, { toggleEl: origin.value });
|
|
@@ -10518,7 +10339,7 @@ var Dropdown = defineComponent({
|
|
|
10518
10339
|
props,
|
|
10519
10340
|
emit
|
|
10520
10341
|
});
|
|
10521
|
-
useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
10342
|
+
useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
|
|
10522
10343
|
const {
|
|
10523
10344
|
overlayModelValue,
|
|
10524
10345
|
overlayShowValue,
|
|
@@ -10675,7 +10496,7 @@ var PageSize = defineComponent({
|
|
|
10675
10496
|
setup() {
|
|
10676
10497
|
const ns2 = useNamespace("pagination");
|
|
10677
10498
|
const paginationContext = inject(paginationInjectionKey);
|
|
10678
|
-
const
|
|
10499
|
+
const isOpen = ref(false);
|
|
10679
10500
|
const {
|
|
10680
10501
|
size,
|
|
10681
10502
|
currentPageSize,
|
|
@@ -10684,8 +10505,13 @@ var PageSize = defineComponent({
|
|
|
10684
10505
|
pageSizeChange,
|
|
10685
10506
|
t
|
|
10686
10507
|
} = paginationContext;
|
|
10508
|
+
const pageSizeClasses = computed(() => ({
|
|
10509
|
+
[ns2.e("size")]: true,
|
|
10510
|
+
[ns2.em("size", size.value)]: Boolean(size.value),
|
|
10511
|
+
[ns2.em("size", "open")]: isOpen.value
|
|
10512
|
+
}));
|
|
10687
10513
|
const onDropdownToggle = (e) => {
|
|
10688
|
-
|
|
10514
|
+
isOpen.value = e;
|
|
10689
10515
|
};
|
|
10690
10516
|
return () => createVNode(Fragment, null, [createVNode(Dropdown, {
|
|
10691
10517
|
"position": pageSizeDirection.value,
|
|
@@ -10694,14 +10520,8 @@ var PageSize = defineComponent({
|
|
|
10694
10520
|
}, {
|
|
10695
10521
|
default: () => createVNode("div", {
|
|
10696
10522
|
"tabindex": "0",
|
|
10697
|
-
"class":
|
|
10698
|
-
}, [createVNode(
|
|
10699
|
-
"name": "select-arrow",
|
|
10700
|
-
"size": "16px",
|
|
10701
|
-
"rotate": iconRotate.value
|
|
10702
|
-
}, {
|
|
10703
|
-
prefix: () => createVNode("span", null, [currentPageSize.value])
|
|
10704
|
-
})]),
|
|
10523
|
+
"class": pageSizeClasses.value
|
|
10524
|
+
}, [createVNode("span", null, [currentPageSize.value]), createVNode(SelectArrowIcon, null, null)]),
|
|
10705
10525
|
menu: () => createVNode("ul", null, [pageSizeOptions.value.map((item, index2) => createVNode("li", {
|
|
10706
10526
|
"class": {
|
|
10707
10527
|
active: item === currentPageSize.value
|