vue-devui 1.0.0-beta.18 → 1.0.0-beta.19
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/README.md +200 -187
- package/accordion/index.es.js +221 -6
- package/accordion/index.umd.js +1 -1
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +131 -269
- package/auto-complete/index.umd.js +1 -1
- package/auto-complete/style.css +1 -1
- package/back-top/index.es.js +4 -2
- package/badge/index.es.js +13 -19
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/breadcrumb/index.es.js +2 -1
- package/button/index.es.js +39 -40
- package/button/index.umd.js +1 -1
- package/carousel/index.es.js +38 -53
- package/carousel/index.umd.js +1 -1
- package/cascader/index.es.js +16 -8
- package/cascader/style.css +1 -1
- package/color-picker/index.es.js +97 -89
- package/color-picker/index.umd.js +7 -7
- package/countdown/index.es.js +2 -1
- package/date-picker/index.es.js +40 -57
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +162 -5741
- package/drawer/index.umd.js +1 -27
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +459 -301
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +6 -3
- package/form/index.es.js +1953 -1550
- package/form/index.umd.js +18 -18
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +112 -133
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/input/style.css +1 -1
- package/input-icon/index.es.js +38 -37
- package/input-icon/index.umd.js +1 -1
- package/input-icon/style.css +1 -1
- package/input-number/index.es.js +46 -57
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/{time-axis → list}/index.d.ts +0 -0
- package/list/index.es.js +39 -0
- package/list/index.umd.js +1 -0
- package/{toast → list}/package.json +1 -1
- package/list/style.css +1 -0
- package/modal/index.es.js +300 -934
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/{toast → notification}/index.d.ts +0 -0
- package/notification/index.es.js +284 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/List.js +3 -0
- package/nuxt/components/ListItem.js +3 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/overlayEmits.js +3 -0
- package/nuxt/components/overlayProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/popoverProps.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/overlay/index.es.js +152 -198
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +40 -87
- package/pagination/index.es.js +10 -12
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +5954 -201
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/read-tip/index.es.js +6 -3
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +9 -5
- package/search/index.es.js +19 -29
- package/search/index.umd.js +6 -6
- package/search/style.css +1 -1
- package/select/index.es.js +42 -42
- package/select/index.umd.js +1 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -1
- package/splitter/index.es.js +5814 -98
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps-guide/index.es.js +6 -3
- package/style.css +1 -1
- package/table/index.es.js +456 -299
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +3 -4
- package/tabs/index.umd.js +1 -1
- package/tag/index.es.js +2 -1
- package/tag-input/index.es.js +4 -2
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +43 -42
- package/time-picker/index.umd.js +1 -1
- package/timeline/index.d.ts +7 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{time-axis → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +5804 -94
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/transfer/index.es.js +440 -165
- package/transfer/index.umd.js +17 -17
- package/transfer/style.css +1 -1
- package/tree/index.es.js +12 -7
- package/tree/index.umd.js +10 -10
- package/tree-select/index.es.js +10 -6
- package/tree-select/index.umd.js +1 -1
- package/upload/index.es.js +335 -6068
- package/upload/index.umd.js +1 -27
- package/upload/style.css +1 -1
- package/vue-devui.es.js +2555 -2799
- package/vue-devui.umd.js +16 -16
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/Toast.js +0 -3
- package/nuxt/components/ToastService.js +0 -3
- package/time-axis/index.umd.js +0 -1
- package/time-axis/style.css +0 -1
- package/toast/index.es.js +0 -5918
- package/toast/index.umd.js +0 -27
- package/toast/style.css +0 -1
package/color-picker/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { ref, watch, defineComponent, reactive, provide, onUpdated, onBeforeMount, onMounted, createVNode, inject, getCurrentInstance, computed, nextTick, resolveComponent, readonly, unref, Teleport, Transition } from "vue";
|
|
32
|
+
import { ref, watch, defineComponent, reactive, provide, onUpdated, onBeforeMount, onMounted, createVNode, inject, getCurrentInstance, computed, toRefs, nextTick, resolveComponent, readonly, unref, Teleport, Transition } from "vue";
|
|
33
33
|
function colorPickerResize(colorCubeRef, top, left) {
|
|
34
34
|
var _a;
|
|
35
35
|
const rect = (_a = colorCubeRef.value) == null ? void 0 : _a.getBoundingClientRect();
|
|
@@ -135,7 +135,7 @@ var Tabs = defineComponent({
|
|
|
135
135
|
default: null
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
emits: ["update:modelValue", "
|
|
138
|
+
emits: ["update:modelValue", "active-tab-change"],
|
|
139
139
|
setup(props, {
|
|
140
140
|
emit,
|
|
141
141
|
slots
|
|
@@ -163,7 +163,6 @@ var Tabs = defineComponent({
|
|
|
163
163
|
if (result.then) {
|
|
164
164
|
changeResult = result;
|
|
165
165
|
} else {
|
|
166
|
-
console.log(result);
|
|
167
166
|
changeResult = Promise.resolve(result);
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -186,7 +185,7 @@ var Tabs = defineComponent({
|
|
|
186
185
|
this.offsetLeft = tabEl.getBoundingClientRect().left - this.tabsEle.nativeElement.getBoundingClientRect().left;
|
|
187
186
|
this.offsetWidth = tabEl.getBoundingClientRect().width;
|
|
188
187
|
}
|
|
189
|
-
emit("
|
|
188
|
+
emit("active-tab-change", tab.id);
|
|
190
189
|
}
|
|
191
190
|
});
|
|
192
191
|
};
|
|
@@ -263,7 +262,7 @@ var Tab = defineComponent({
|
|
|
263
262
|
slots
|
|
264
263
|
}) {
|
|
265
264
|
const tabs2 = inject("tabs");
|
|
266
|
-
tabs2.state.slots.push(slots.
|
|
265
|
+
tabs2.state.slots.push(slots.title);
|
|
267
266
|
tabs2.state.data.push(props);
|
|
268
267
|
return () => {
|
|
269
268
|
const {
|
|
@@ -318,8 +317,9 @@ class DOMUtils {
|
|
|
318
317
|
};
|
|
319
318
|
const downFn = (event) => {
|
|
320
319
|
var _a;
|
|
321
|
-
if (isDragging)
|
|
320
|
+
if (isDragging) {
|
|
322
321
|
return;
|
|
322
|
+
}
|
|
323
323
|
document.onselectstart = () => false;
|
|
324
324
|
document.ondragstart = () => false;
|
|
325
325
|
DOMUtils.addEventListener(document, "mousemove", moveFn);
|
|
@@ -440,16 +440,16 @@ class DOMUtils {
|
|
|
440
440
|
if (event.clientX > originX && event.clientY > originY) {
|
|
441
441
|
angle = 180 - angle;
|
|
442
442
|
}
|
|
443
|
-
if (event.clientX
|
|
443
|
+
if (event.clientX === originX && event.clientY > originY) {
|
|
444
444
|
angle = 180;
|
|
445
445
|
}
|
|
446
|
-
if (event.clientX > originX && event.clientY
|
|
446
|
+
if (event.clientX > originX && event.clientY === originY) {
|
|
447
447
|
angle = 90;
|
|
448
448
|
}
|
|
449
449
|
if (event.clientX < originX && event.clientY > originY) {
|
|
450
450
|
angle = 180 + angle;
|
|
451
451
|
}
|
|
452
|
-
if (event.clientX < originX && event.clientY
|
|
452
|
+
if (event.clientX < originX && event.clientY === originY) {
|
|
453
453
|
angle = 270;
|
|
454
454
|
}
|
|
455
455
|
if (event.clientX < originX && event.clientY < originY) {
|
|
@@ -496,8 +496,9 @@ function HSVAtoRGBA(hsva) {
|
|
|
496
496
|
return { r: rgb[0], g: rgb[1], b: rgb[2], a };
|
|
497
497
|
}
|
|
498
498
|
function RGBAtoHSVA(rgba) {
|
|
499
|
-
if (!rgba)
|
|
499
|
+
if (!rgba) {
|
|
500
500
|
return { h: 0, s: 1, v: 1, a: 1 };
|
|
501
|
+
}
|
|
501
502
|
const r = rgba.r / 255;
|
|
502
503
|
const g = rgba.g / 255;
|
|
503
504
|
const b = rgba.b / 255;
|
|
@@ -513,8 +514,9 @@ function RGBAtoHSVA(rgba) {
|
|
|
513
514
|
h = 60 * (4 + (r - g) / (max - min));
|
|
514
515
|
}
|
|
515
516
|
}
|
|
516
|
-
if (h < 0)
|
|
517
|
+
if (h < 0) {
|
|
517
518
|
h = h + 360;
|
|
519
|
+
}
|
|
518
520
|
const s = max === 0 ? 0 : (max - min) / max;
|
|
519
521
|
const hsv = [h, s, max];
|
|
520
522
|
return { h: Math.round(hsv[0]), s: hsv[1], v: hsv[2], a: rgba.a };
|
|
@@ -640,8 +642,9 @@ function fromHex(hex2) {
|
|
|
640
642
|
return fromHexa(parseHex(hex2));
|
|
641
643
|
}
|
|
642
644
|
function parseColor(color2, oldColor) {
|
|
643
|
-
if (!color2)
|
|
645
|
+
if (!color2) {
|
|
644
646
|
return fromRGBA({ r: 0, g: 0, b: 0, a: 1 });
|
|
647
|
+
}
|
|
645
648
|
if (typeof color2 === "string") {
|
|
646
649
|
if (color2.indexOf("#") !== -1)
|
|
647
650
|
;
|
|
@@ -673,8 +676,9 @@ function parseColor(color2, oldColor) {
|
|
|
673
676
|
}
|
|
674
677
|
return fromHSVA({ h: parts[0], s: parts[1], v: parts[2], a: alpha });
|
|
675
678
|
}
|
|
676
|
-
if (color2 === "transparent")
|
|
679
|
+
if (color2 === "transparent") {
|
|
677
680
|
return fromHexa("#00000000");
|
|
681
|
+
}
|
|
678
682
|
const hex2 = parseHex(color2);
|
|
679
683
|
if (oldColor && hex2 === oldColor.hexa) {
|
|
680
684
|
return oldColor;
|
|
@@ -683,24 +687,28 @@ function parseColor(color2, oldColor) {
|
|
|
683
687
|
}
|
|
684
688
|
}
|
|
685
689
|
if (typeof color2 === "object") {
|
|
686
|
-
if (color2.hasOwnProperty("alpha"))
|
|
690
|
+
if (color2.hasOwnProperty("alpha")) {
|
|
687
691
|
return color2;
|
|
692
|
+
}
|
|
688
693
|
const a = color2.hasOwnProperty("a") ? parseFloat(color2.a) : 1;
|
|
689
694
|
if (has(color2, ["r", "g", "b"])) {
|
|
690
|
-
if (oldColor && color2 === oldColor.rgba)
|
|
695
|
+
if (oldColor && color2 === oldColor.rgba) {
|
|
691
696
|
return oldColor;
|
|
692
|
-
else
|
|
697
|
+
} else {
|
|
693
698
|
return fromRGBA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
699
|
+
}
|
|
694
700
|
} else if (has(color2, ["h", "s", "l"])) {
|
|
695
|
-
if (oldColor && color2 === oldColor.hsla)
|
|
701
|
+
if (oldColor && color2 === oldColor.hsla) {
|
|
696
702
|
return oldColor;
|
|
697
|
-
else
|
|
703
|
+
} else {
|
|
698
704
|
return fromHSLA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
705
|
+
}
|
|
699
706
|
} else if (has(color2, ["h", "s", "v"])) {
|
|
700
|
-
if (oldColor && color2 === oldColor.hsva)
|
|
707
|
+
if (oldColor && color2 === oldColor.hsva) {
|
|
701
708
|
return oldColor;
|
|
702
|
-
else
|
|
709
|
+
} else {
|
|
703
710
|
return fromHSVA(__spreadProps(__spreadValues({}, color2), { a }));
|
|
711
|
+
}
|
|
704
712
|
}
|
|
705
713
|
}
|
|
706
714
|
return fromRGBA({ r: 255, g: 0, b: 0, a: 1 });
|
|
@@ -721,8 +729,9 @@ function extractColor(color2, input, mode, showAlpha) {
|
|
|
721
729
|
const blue = keepDecimal(color2.rgba.b);
|
|
722
730
|
const hsvSaturation = keepDecimal(color2.hsva.s, 2);
|
|
723
731
|
const value = keepDecimal(color2.hsva.v, 2);
|
|
724
|
-
if (input == null)
|
|
732
|
+
if (input == null) {
|
|
725
733
|
return color2;
|
|
734
|
+
}
|
|
726
735
|
function isShowAlpha(mode2) {
|
|
727
736
|
return showAlpha ? mode2 + "a" : mode2;
|
|
728
737
|
}
|
|
@@ -740,12 +749,13 @@ function extractColor(color2, input, mode, showAlpha) {
|
|
|
740
749
|
}
|
|
741
750
|
if (typeof input === "object") {
|
|
742
751
|
const shouldStrip = typeof input.a === "number" && input.a === 0 ? !!input.a : !input.a;
|
|
743
|
-
if (has(input, ["r", "g", "b"]))
|
|
752
|
+
if (has(input, ["r", "g", "b"])) {
|
|
744
753
|
return stripAlpha(color2.rgba, shouldStrip);
|
|
745
|
-
else if (has(input, ["h", "s", "l"]))
|
|
754
|
+
} else if (has(input, ["h", "s", "l"])) {
|
|
746
755
|
return stripAlpha(color2.hsla, shouldStrip);
|
|
747
|
-
else if (has(input, ["h", "s", "v"]))
|
|
756
|
+
} else if (has(input, ["h", "s", "v"])) {
|
|
748
757
|
return stripAlpha(color2.hsva, shouldStrip);
|
|
758
|
+
}
|
|
749
759
|
}
|
|
750
760
|
}
|
|
751
761
|
const colorPickerPaletteProps = {
|
|
@@ -804,20 +814,6 @@ var colorPalette = defineComponent({
|
|
|
804
814
|
canvas.fillStyle = valueGradient;
|
|
805
815
|
canvas.fillRect(0, 0, parentWidth, props.height);
|
|
806
816
|
}
|
|
807
|
-
function clickPalette(event) {
|
|
808
|
-
const target = event.target;
|
|
809
|
-
if (target !== paletteElement.value) {
|
|
810
|
-
handleDrag(event);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
function updatePosition() {
|
|
814
|
-
var _a, _b;
|
|
815
|
-
if (paletteInstance) {
|
|
816
|
-
const parentWidth = paletteElement.value.offsetWidth;
|
|
817
|
-
cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
|
|
818
|
-
cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
817
|
function handleDrag(event) {
|
|
822
818
|
const parentWidth = paletteElement.value.offsetWidth;
|
|
823
819
|
if (paletteInstance) {
|
|
@@ -845,6 +841,20 @@ var colorPalette = defineComponent({
|
|
|
845
841
|
ctx.emit("changeTextColor", isChangeTextColor.value);
|
|
846
842
|
}
|
|
847
843
|
}
|
|
844
|
+
function clickPalette(event) {
|
|
845
|
+
const target = event.target;
|
|
846
|
+
if (target !== paletteElement.value) {
|
|
847
|
+
handleDrag(event);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
function updatePosition() {
|
|
851
|
+
var _a, _b;
|
|
852
|
+
if (paletteInstance) {
|
|
853
|
+
const parentWidth = paletteElement.value.offsetWidth;
|
|
854
|
+
cursorLeft.value = Number((_a = props.modelValue) == null ? void 0 : _a.hsva.s) * parentWidth;
|
|
855
|
+
cursorTop.value = (1 - Number((_b = props.modelValue) == null ? void 0 : _b.hsva.v)) * props.height;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
848
858
|
onMounted(() => {
|
|
849
859
|
renderCanvas();
|
|
850
860
|
if (paletteInstance && paletteInstance.vnode.el && handlerElement.value) {
|
|
@@ -930,12 +940,6 @@ var colorHueSlider = defineComponent({
|
|
|
930
940
|
top: 0
|
|
931
941
|
}, clickTransfrom.value);
|
|
932
942
|
});
|
|
933
|
-
const onClickSider = (event) => {
|
|
934
|
-
const target = event.target;
|
|
935
|
-
if (target !== barElement.value) {
|
|
936
|
-
onMoveBar(event);
|
|
937
|
-
}
|
|
938
|
-
};
|
|
939
943
|
const onMoveBar = (event) => {
|
|
940
944
|
event.stopPropagation();
|
|
941
945
|
if (barElement.value && cursorElement.value) {
|
|
@@ -953,6 +957,12 @@ var colorHueSlider = defineComponent({
|
|
|
953
957
|
}));
|
|
954
958
|
}
|
|
955
959
|
};
|
|
960
|
+
const onClickSider = (event) => {
|
|
961
|
+
const target = event.target;
|
|
962
|
+
if (target !== barElement.value) {
|
|
963
|
+
onMoveBar(event);
|
|
964
|
+
}
|
|
965
|
+
};
|
|
956
966
|
onMounted(() => {
|
|
957
967
|
const dragConfig = {
|
|
958
968
|
drag: (event) => {
|
|
@@ -1017,12 +1027,6 @@ var colorAlphaSlider = defineComponent({
|
|
|
1017
1027
|
const clickTransfrom = ref(DEFAULT_TRANSITION);
|
|
1018
1028
|
const barElement = ref(null);
|
|
1019
1029
|
const cursorElement = ref(null);
|
|
1020
|
-
const onClickSider = (event) => {
|
|
1021
|
-
const target = event.target;
|
|
1022
|
-
if (target !== barElement.value) {
|
|
1023
|
-
onMoveBar(event);
|
|
1024
|
-
}
|
|
1025
|
-
};
|
|
1026
1030
|
const onMoveBar = (event) => {
|
|
1027
1031
|
event.stopPropagation();
|
|
1028
1032
|
if (barElement.value && cursorElement.value) {
|
|
@@ -1037,6 +1041,12 @@ var colorAlphaSlider = defineComponent({
|
|
|
1037
1041
|
})));
|
|
1038
1042
|
}
|
|
1039
1043
|
};
|
|
1044
|
+
const onClickSider = (event) => {
|
|
1045
|
+
const target = event.target;
|
|
1046
|
+
if (target !== barElement.value) {
|
|
1047
|
+
onMoveBar(event);
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1040
1050
|
const getBackgroundStyle = computed(() => {
|
|
1041
1051
|
return {
|
|
1042
1052
|
background: `linear-gradient(to right, transparent , ${RGBtoCSS(props.modelValue.rgba)})`
|
|
@@ -2445,55 +2455,53 @@ const colorPickerHistoryProps = {
|
|
|
2445
2455
|
type: Object
|
|
2446
2456
|
}
|
|
2447
2457
|
};
|
|
2458
|
+
const iconProps = {
|
|
2459
|
+
name: {
|
|
2460
|
+
type: String,
|
|
2461
|
+
default: "",
|
|
2462
|
+
required: true
|
|
2463
|
+
},
|
|
2464
|
+
size: {
|
|
2465
|
+
type: String,
|
|
2466
|
+
default: "inherit"
|
|
2467
|
+
},
|
|
2468
|
+
color: {
|
|
2469
|
+
type: String,
|
|
2470
|
+
default: "inherit"
|
|
2471
|
+
},
|
|
2472
|
+
classPrefix: {
|
|
2473
|
+
type: String,
|
|
2474
|
+
default: "icon"
|
|
2475
|
+
}
|
|
2476
|
+
};
|
|
2448
2477
|
var Icon = defineComponent({
|
|
2449
2478
|
name: "DIcon",
|
|
2450
|
-
props:
|
|
2451
|
-
name: {
|
|
2452
|
-
type: String,
|
|
2453
|
-
required: true
|
|
2454
|
-
},
|
|
2455
|
-
size: {
|
|
2456
|
-
type: String,
|
|
2457
|
-
default: "inherit"
|
|
2458
|
-
},
|
|
2459
|
-
color: {
|
|
2460
|
-
type: String,
|
|
2461
|
-
default: "inherit"
|
|
2462
|
-
},
|
|
2463
|
-
classPrefix: {
|
|
2464
|
-
type: String,
|
|
2465
|
-
default: "icon"
|
|
2466
|
-
}
|
|
2467
|
-
},
|
|
2479
|
+
props: iconProps,
|
|
2468
2480
|
setup(props) {
|
|
2469
|
-
return __spreadValues({}, props);
|
|
2470
|
-
},
|
|
2471
|
-
render() {
|
|
2472
2481
|
const {
|
|
2473
2482
|
name,
|
|
2474
2483
|
size,
|
|
2475
2484
|
color: color2,
|
|
2476
2485
|
classPrefix
|
|
2477
|
-
} =
|
|
2478
|
-
return
|
|
2479
|
-
"
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
"
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2486
|
+
} = toRefs(props);
|
|
2487
|
+
return () => {
|
|
2488
|
+
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
2489
|
+
"src": name.value,
|
|
2490
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
2491
|
+
"style": {
|
|
2492
|
+
width: size.value,
|
|
2493
|
+
verticalAlign: "text-bottom"
|
|
2494
|
+
}
|
|
2495
|
+
}, null) : createVNode("i", {
|
|
2496
|
+
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
2497
|
+
"style": {
|
|
2498
|
+
fontSize: size.value,
|
|
2499
|
+
color: color2.value
|
|
2500
|
+
}
|
|
2501
|
+
}, null);
|
|
2502
|
+
};
|
|
2492
2503
|
}
|
|
2493
2504
|
});
|
|
2494
|
-
Icon.install = function(app) {
|
|
2495
|
-
app.component(Icon.name, Icon);
|
|
2496
|
-
};
|
|
2497
2505
|
var colorHistory$1 = "";
|
|
2498
2506
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2499
2507
|
var lodash = { exports: {} };
|