vue-devui 1.5.11 → 1.5.12
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/checkbox/index.es.js +71 -45
- package/checkbox/index.umd.js +9 -9
- package/date-picker-pro/index.es.js +64 -40
- package/date-picker-pro/index.umd.js +11 -11
- package/date-picker-pro/style.css +1 -1
- package/editor-md/index.es.js +609 -1401
- package/editor-md/index.umd.js +47 -47
- package/editor-md/style.css +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +94 -68
- package/pagination/index.umd.js +13 -13
- package/radio/index.es.js +65 -30
- package/radio/index.umd.js +15 -15
- package/radio/style.css +1 -1
- package/select/index.es.js +71 -45
- package/select/index.umd.js +14 -14
- package/slider/index.es.js +2 -2
- package/slider/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +50 -26
- package/switch/index.umd.js +16 -16
- package/table/index.es.js +82 -57
- package/table/index.umd.js +18 -18
- package/time-picker/index.es.js +78 -53
- package/time-picker/index.umd.js +13 -13
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +71 -45
- package/time-select/index.umd.js +11 -11
- package/tree/index.es.js +45 -20
- package/tree/index.umd.js +9 -9
- package/types/checkbox/src/checkbox-button.d.ts +3 -0
- package/types/checkbox/src/checkbox-group.d.ts +3 -0
- package/types/checkbox/src/checkbox-types.d.ts +4 -2
- package/types/checkbox/src/checkbox.d.ts +3 -0
- package/types/radio/src/radio-button.d.ts +9 -0
- package/types/radio/src/radio-types.d.ts +5 -1
- package/types/radio/src/radio.d.ts +9 -0
- package/types/transfer/src/components/transfer-panel.d.ts +1 -1
- package/types/transfer/src/composables/use-transfer-panel.d.ts +1 -1
- package/types/transfer/src/composables/use-transfer.d.ts +2 -2
- package/types/transfer/src/transfer.d.ts +1 -1
- package/vue-devui.es.js +1111 -1870
- package/vue-devui.umd.js +85 -85
package/time-picker/index.es.js
CHANGED
|
@@ -35,6 +35,7 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
};
|
|
36
36
|
import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, ref, reactive, onMounted, onBeforeUnmount, onUnmounted, Fragment, h, render, inject, withDirectives, resolveComponent, vShow, provide, toRef, getCurrentInstance, watch, withModifiers, isVNode, Transition, unref, nextTick, Comment, Text, cloneVNode, Teleport, createTextVNode, shallowRef } from "vue";
|
|
37
37
|
import { onClickOutside } from "@vueuse/core";
|
|
38
|
+
import "clipboard";
|
|
38
39
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
39
40
|
const timePickerProps = {
|
|
40
41
|
modelValue: {
|
|
@@ -131,7 +132,7 @@ const svgIconProps = {
|
|
|
131
132
|
default: "inherit"
|
|
132
133
|
}
|
|
133
134
|
};
|
|
134
|
-
function createBem(namespace, element, modifier) {
|
|
135
|
+
function createBem$1(namespace, element, modifier) {
|
|
135
136
|
let cls = namespace;
|
|
136
137
|
if (element) {
|
|
137
138
|
cls += `__${element}`;
|
|
@@ -141,12 +142,12 @@ function createBem(namespace, element, modifier) {
|
|
|
141
142
|
}
|
|
142
143
|
return cls;
|
|
143
144
|
}
|
|
144
|
-
function useNamespace(block, needDot = false) {
|
|
145
|
+
function useNamespace$1(block, needDot = false) {
|
|
145
146
|
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
146
|
-
const b = () => createBem(namespace);
|
|
147
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
148
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
149
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
147
|
+
const b = () => createBem$1(namespace);
|
|
148
|
+
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
149
|
+
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
150
|
+
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
150
151
|
return {
|
|
151
152
|
b,
|
|
152
153
|
e,
|
|
@@ -164,7 +165,7 @@ var svgIcon = defineComponent({
|
|
|
164
165
|
color,
|
|
165
166
|
size
|
|
166
167
|
} = toRefs(props);
|
|
167
|
-
const ns2 = useNamespace("svg-icon");
|
|
168
|
+
const ns2 = useNamespace$1("svg-icon");
|
|
168
169
|
const iconName = computed(() => `#icon-${name.value}`);
|
|
169
170
|
const iconSize = computed(() => {
|
|
170
171
|
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
@@ -196,7 +197,7 @@ function useIconDom(props, ctx) {
|
|
|
196
197
|
classPrefix,
|
|
197
198
|
rotate
|
|
198
199
|
} = toRefs(props);
|
|
199
|
-
const ns2 = useNamespace("icon");
|
|
200
|
+
const ns2 = useNamespace$1("icon");
|
|
200
201
|
const iconSize = computed(() => {
|
|
201
202
|
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
202
203
|
});
|
|
@@ -254,7 +255,7 @@ var Icon = defineComponent({
|
|
|
254
255
|
const {
|
|
255
256
|
iconDom
|
|
256
257
|
} = useIconDom(props, ctx);
|
|
257
|
-
const ns2 = useNamespace("icon");
|
|
258
|
+
const ns2 = useNamespace$1("icon");
|
|
258
259
|
const wrapClassed = computed(() => ({
|
|
259
260
|
[ns2.e("container")]: true,
|
|
260
261
|
[ns2.m("disabled")]: disabled.value,
|
|
@@ -280,7 +281,7 @@ var iconGroup = "";
|
|
|
280
281
|
defineComponent({
|
|
281
282
|
name: "DIconGroup",
|
|
282
283
|
setup(_, ctx) {
|
|
283
|
-
const ns2 = useNamespace("icon-group");
|
|
284
|
+
const ns2 = useNamespace$1("icon-group");
|
|
284
285
|
return () => {
|
|
285
286
|
var _a, _b;
|
|
286
287
|
return createVNode("div", {
|
|
@@ -361,7 +362,7 @@ function useTimePicker(hh, mm, ss, format2, props) {
|
|
|
361
362
|
showPopup.value = true;
|
|
362
363
|
};
|
|
363
364
|
const clickVerifyFun = () => {
|
|
364
|
-
if (props.disabled
|
|
365
|
+
if (props.disabled) {
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
368
|
mouseInputFun();
|
|
@@ -788,6 +789,48 @@ function useTimeScroll() {
|
|
|
788
789
|
getScrollWidth
|
|
789
790
|
};
|
|
790
791
|
}
|
|
792
|
+
function lockScroll() {
|
|
793
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
794
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
795
|
+
const style = document.documentElement.getAttribute("style");
|
|
796
|
+
document.documentElement.style.position = "fixed";
|
|
797
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
798
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
799
|
+
document.documentElement.style.overflowY = "scroll";
|
|
800
|
+
return () => {
|
|
801
|
+
if (style) {
|
|
802
|
+
document.documentElement.setAttribute("style", style);
|
|
803
|
+
} else {
|
|
804
|
+
document.documentElement.removeAttribute("style");
|
|
805
|
+
}
|
|
806
|
+
document.documentElement.scrollTop = scrollTop;
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
function createBem(namespace, element, modifier) {
|
|
812
|
+
let cls = namespace;
|
|
813
|
+
if (element) {
|
|
814
|
+
cls += `__${element}`;
|
|
815
|
+
}
|
|
816
|
+
if (modifier) {
|
|
817
|
+
cls += `--${modifier}`;
|
|
818
|
+
}
|
|
819
|
+
return cls;
|
|
820
|
+
}
|
|
821
|
+
function useNamespace(block, needDot = false) {
|
|
822
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
823
|
+
const b = () => createBem(namespace);
|
|
824
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
825
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
826
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
827
|
+
return {
|
|
828
|
+
b,
|
|
829
|
+
e,
|
|
830
|
+
m,
|
|
831
|
+
em
|
|
832
|
+
};
|
|
833
|
+
}
|
|
791
834
|
var index$3 = "";
|
|
792
835
|
var TimeScroll = defineComponent({
|
|
793
836
|
name: "DTimeScroll",
|
|
@@ -853,11 +896,11 @@ var TimeScroll = defineComponent({
|
|
|
853
896
|
});
|
|
854
897
|
var index$2 = "";
|
|
855
898
|
var PopupLine = defineComponent({
|
|
856
|
-
name: "
|
|
899
|
+
name: "DPopupLine",
|
|
857
900
|
props: popupLineProps,
|
|
858
901
|
emits: ["change"],
|
|
859
902
|
setup(props, ctx) {
|
|
860
|
-
const ns2 = useNamespace("
|
|
903
|
+
const ns2 = useNamespace("popup-line");
|
|
861
904
|
const timeListDom = ref();
|
|
862
905
|
const {
|
|
863
906
|
getNewTime,
|
|
@@ -978,7 +1021,7 @@ var Loading = defineComponent({
|
|
|
978
1021
|
message,
|
|
979
1022
|
$slots
|
|
980
1023
|
} = this;
|
|
981
|
-
const ns2 = useNamespace("loading");
|
|
1024
|
+
const ns2 = useNamespace$1("loading");
|
|
982
1025
|
return isShow && createVNode("div", {
|
|
983
1026
|
"class": [ns2.b(), isFull ? ns2.m("full") : ""]
|
|
984
1027
|
}, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
|
|
@@ -6563,7 +6606,7 @@ var lodash = { exports: {} };
|
|
|
6563
6606
|
}).call(commonjsGlobal);
|
|
6564
6607
|
})(lodash, lodash.exports);
|
|
6565
6608
|
function useButton(props, ctx) {
|
|
6566
|
-
const ns2 = useNamespace("button");
|
|
6609
|
+
const ns2 = useNamespace$1("button");
|
|
6567
6610
|
const hasContent = computed(() => ctx.slots.default);
|
|
6568
6611
|
const colorMap = {
|
|
6569
6612
|
solid: "primary",
|
|
@@ -6652,7 +6695,7 @@ defineComponent({
|
|
|
6652
6695
|
setup(props, {
|
|
6653
6696
|
slots
|
|
6654
6697
|
}) {
|
|
6655
|
-
const ns2 = useNamespace("button-group");
|
|
6698
|
+
const ns2 = useNamespace$1("button-group");
|
|
6656
6699
|
provide(buttonGroupInjectionKey, {
|
|
6657
6700
|
size: toRef(props, "size")
|
|
6658
6701
|
});
|
|
@@ -7136,7 +7179,7 @@ defineComponent({
|
|
|
7136
7179
|
props: formProps,
|
|
7137
7180
|
emits: ["validate"],
|
|
7138
7181
|
setup(props, ctx) {
|
|
7139
|
-
const ns2 = useNamespace("form");
|
|
7182
|
+
const ns2 = useNamespace$1("form");
|
|
7140
7183
|
const {
|
|
7141
7184
|
itemContexts,
|
|
7142
7185
|
addItemContext,
|
|
@@ -7198,25 +7241,6 @@ const fixedOverlayProps = {
|
|
|
7198
7241
|
default: true
|
|
7199
7242
|
}
|
|
7200
7243
|
};
|
|
7201
|
-
function lockScroll() {
|
|
7202
|
-
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
7203
|
-
const scrollTop = document.documentElement.scrollTop;
|
|
7204
|
-
const style = document.documentElement.getAttribute("style");
|
|
7205
|
-
document.documentElement.style.position = "fixed";
|
|
7206
|
-
document.documentElement.style.top = `-${scrollTop}px`;
|
|
7207
|
-
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
7208
|
-
document.documentElement.style.overflowY = "scroll";
|
|
7209
|
-
return () => {
|
|
7210
|
-
if (style) {
|
|
7211
|
-
document.documentElement.setAttribute("style", style);
|
|
7212
|
-
} else {
|
|
7213
|
-
document.documentElement.removeAttribute("style");
|
|
7214
|
-
}
|
|
7215
|
-
document.documentElement.scrollTop = scrollTop;
|
|
7216
|
-
};
|
|
7217
|
-
}
|
|
7218
|
-
return;
|
|
7219
|
-
}
|
|
7220
7244
|
function useFixedOverlay(props, ctx) {
|
|
7221
7245
|
let lockScrollCb;
|
|
7222
7246
|
const onClick = (event) => {
|
|
@@ -7249,7 +7273,7 @@ defineComponent({
|
|
|
7249
7273
|
const {
|
|
7250
7274
|
modelValue
|
|
7251
7275
|
} = toRefs(props);
|
|
7252
|
-
const ns2 = useNamespace("fixed-overlay");
|
|
7276
|
+
const ns2 = useNamespace$1("fixed-overlay");
|
|
7253
7277
|
const {
|
|
7254
7278
|
onClick
|
|
7255
7279
|
} = useFixedOverlay(props, ctx);
|
|
@@ -7415,7 +7439,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
7415
7439
|
emit,
|
|
7416
7440
|
expose
|
|
7417
7441
|
}) {
|
|
7418
|
-
const ns2 = useNamespace("flexible-overlay");
|
|
7442
|
+
const ns2 = useNamespace$1("flexible-overlay");
|
|
7419
7443
|
const {
|
|
7420
7444
|
clickEventBubble
|
|
7421
7445
|
} = toRefs(props);
|
|
@@ -7444,7 +7468,7 @@ const FlexibleOverlay = defineComponent({
|
|
|
7444
7468
|
});
|
|
7445
7469
|
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
7446
7470
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
7447
|
-
const ns$1 = useNamespace("popper-trigger");
|
|
7471
|
+
const ns$1 = useNamespace$1("popper-trigger");
|
|
7448
7472
|
function wrapContent(content) {
|
|
7449
7473
|
return h("span", { class: ns$1.b() }, content);
|
|
7450
7474
|
}
|
|
@@ -7631,7 +7655,7 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
7631
7655
|
});
|
|
7632
7656
|
return { placement, handlePositionChange, onMouseenter, onMouseleave };
|
|
7633
7657
|
}
|
|
7634
|
-
const ns = useNamespace("popover");
|
|
7658
|
+
const ns = useNamespace$1("popover");
|
|
7635
7659
|
function SuccessIcon$1() {
|
|
7636
7660
|
return createVNode("svg", {
|
|
7637
7661
|
"class": [ns.e("icon"), ns.em("icon", "success")],
|
|
@@ -7733,7 +7757,7 @@ var PopoverIcon = defineComponent({
|
|
|
7733
7757
|
}
|
|
7734
7758
|
},
|
|
7735
7759
|
setup(props) {
|
|
7736
|
-
const ns2 = useNamespace("popover");
|
|
7760
|
+
const ns2 = useNamespace$1("popover");
|
|
7737
7761
|
return () => props.type && props.type !== "default" && createVNode("span", {
|
|
7738
7762
|
"class": ns2.e("icon-wrap")
|
|
7739
7763
|
}, [props.type === "success" && createVNode(SuccessIcon$1, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon$1, null, null)]);
|
|
@@ -7770,7 +7794,7 @@ var Popover = defineComponent({
|
|
|
7770
7794
|
const {
|
|
7771
7795
|
overlayStyles
|
|
7772
7796
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
7773
|
-
const ns2 = useNamespace("popover");
|
|
7797
|
+
const ns2 = useNamespace$1("popover");
|
|
7774
7798
|
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
7775
7799
|
watch(visible, (newVal) => {
|
|
7776
7800
|
if (newVal) {
|
|
@@ -7903,7 +7927,7 @@ function useFormLabel() {
|
|
|
7903
7927
|
const formContext = inject(FORM_TOKEN);
|
|
7904
7928
|
const formItemContext = inject(FORM_ITEM_TOKEN);
|
|
7905
7929
|
const labelData = inject(LABEL_DATA);
|
|
7906
|
-
const ns2 = useNamespace("form");
|
|
7930
|
+
const ns2 = useNamespace$1("form");
|
|
7907
7931
|
const labelClasses = computed(() => ({
|
|
7908
7932
|
[`${ns2.e("label")}`]: true,
|
|
7909
7933
|
[`${ns2.em("label", "vertical")}`]: labelData.value.layout === "vertical",
|
|
@@ -7922,7 +7946,7 @@ var FormLabel = defineComponent({
|
|
|
7922
7946
|
name: "DFormLabel",
|
|
7923
7947
|
props: formLabelProps,
|
|
7924
7948
|
setup(props, ctx) {
|
|
7925
|
-
const ns2 = useNamespace("form");
|
|
7949
|
+
const ns2 = useNamespace$1("form");
|
|
7926
7950
|
const {
|
|
7927
7951
|
labelClasses,
|
|
7928
7952
|
labelInnerClasses
|
|
@@ -7957,7 +7981,7 @@ const formControlProps = {
|
|
|
7957
7981
|
};
|
|
7958
7982
|
function useFormControl(props) {
|
|
7959
7983
|
const labelData = inject(LABEL_DATA);
|
|
7960
|
-
const ns2 = useNamespace("form");
|
|
7984
|
+
const ns2 = useNamespace$1("form");
|
|
7961
7985
|
const { feedbackStatus } = toRefs(props);
|
|
7962
7986
|
const controlClasses = computed(() => ({
|
|
7963
7987
|
[ns2.e("control")]: true,
|
|
@@ -7987,7 +8011,7 @@ var FormControl = defineComponent({
|
|
|
7987
8011
|
props: formControlProps,
|
|
7988
8012
|
setup(props, ctx) {
|
|
7989
8013
|
const formControl2 = ref();
|
|
7990
|
-
const ns2 = useNamespace("form");
|
|
8014
|
+
const ns2 = useNamespace$1("form");
|
|
7991
8015
|
const {
|
|
7992
8016
|
controlClasses,
|
|
7993
8017
|
controlContainerClasses
|
|
@@ -9041,7 +9065,7 @@ function getFieldValue(obj, path) {
|
|
|
9041
9065
|
}
|
|
9042
9066
|
function useFormItem(messageType, _rules, validateState) {
|
|
9043
9067
|
const formContext = inject(FORM_TOKEN);
|
|
9044
|
-
const ns2 = useNamespace("form");
|
|
9068
|
+
const ns2 = useNamespace$1("form");
|
|
9045
9069
|
const itemClasses = computed(() => ({
|
|
9046
9070
|
[`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
|
|
9047
9071
|
[`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
|
|
@@ -9275,8 +9299,8 @@ function useInputRender(props, ctx) {
|
|
|
9275
9299
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
9276
9300
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
9277
9301
|
const isValidateError = computed(() => (formItemContext == null ? void 0 : formItemContext.validateState) === "error");
|
|
9278
|
-
const ns2 = useNamespace("input");
|
|
9279
|
-
const slotNs = useNamespace("input-slot");
|
|
9302
|
+
const ns2 = useNamespace$1("input");
|
|
9303
|
+
const slotNs = useNamespace$1("input-slot");
|
|
9280
9304
|
const isFocus = ref(false);
|
|
9281
9305
|
const { error, size, disabled } = toRefs(props);
|
|
9282
9306
|
const slots = ctx.slots;
|
|
@@ -9362,8 +9386,8 @@ var DInput = defineComponent({
|
|
|
9362
9386
|
const {
|
|
9363
9387
|
modelValue
|
|
9364
9388
|
} = toRefs(props);
|
|
9365
|
-
const ns2 = useNamespace("input");
|
|
9366
|
-
const slotNs = useNamespace("input-slot");
|
|
9389
|
+
const ns2 = useNamespace$1("input");
|
|
9390
|
+
const slotNs = useNamespace$1("input-slot");
|
|
9367
9391
|
const {
|
|
9368
9392
|
inputDisabled,
|
|
9369
9393
|
inputSize,
|
|
@@ -9514,10 +9538,11 @@ var TimePicker = defineComponent({
|
|
|
9514
9538
|
"disabled": props.disabled,
|
|
9515
9539
|
"readonly": props.readonly,
|
|
9516
9540
|
"size": props.size,
|
|
9517
|
-
"onFocus":
|
|
9541
|
+
"onFocus": clickVerifyFun
|
|
9518
9542
|
}, {
|
|
9519
9543
|
suffix: () => createVNode("span", {
|
|
9520
|
-
"class": "time-input-icon"
|
|
9544
|
+
"class": "time-input-icon",
|
|
9545
|
+
"onClick": clickVerifyFun
|
|
9521
9546
|
}, [createVNode("span", {
|
|
9522
9547
|
"onClick": clearAll,
|
|
9523
9548
|
"class": "clear-button"
|