vue-devui 1.5.11-hotfix.1 → 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 +2 -2
- package/editor-md/index.umd.js +7 -7
- 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 +97 -64
- package/vue-devui.umd.js +34 -34
package/tree/index.es.js
CHANGED
|
@@ -174,6 +174,29 @@ function omit(obj, fields) {
|
|
|
174
174
|
}
|
|
175
175
|
return shallowCopy;
|
|
176
176
|
}
|
|
177
|
+
function createBem$1(namespace, element, modifier) {
|
|
178
|
+
let cls = namespace;
|
|
179
|
+
if (element) {
|
|
180
|
+
cls += `__${element}`;
|
|
181
|
+
}
|
|
182
|
+
if (modifier) {
|
|
183
|
+
cls += `--${modifier}`;
|
|
184
|
+
}
|
|
185
|
+
return cls;
|
|
186
|
+
}
|
|
187
|
+
function useNamespace$1(block, needDot = false) {
|
|
188
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
189
|
+
const b = () => createBem$1(namespace);
|
|
190
|
+
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
191
|
+
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
192
|
+
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
193
|
+
return {
|
|
194
|
+
b,
|
|
195
|
+
e,
|
|
196
|
+
m,
|
|
197
|
+
em
|
|
198
|
+
};
|
|
199
|
+
}
|
|
177
200
|
let selectedNodes = [];
|
|
178
201
|
function useInitSelectCollection() {
|
|
179
202
|
const setInitSelectedNode2 = (node) => {
|
|
@@ -7668,7 +7691,8 @@ const commonProps = {
|
|
|
7668
7691
|
default: void 0
|
|
7669
7692
|
},
|
|
7670
7693
|
size: {
|
|
7671
|
-
type: String
|
|
7694
|
+
type: String,
|
|
7695
|
+
default: "md"
|
|
7672
7696
|
}
|
|
7673
7697
|
};
|
|
7674
7698
|
const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
@@ -10040,8 +10064,8 @@ function useCheckbox(props, ctx) {
|
|
|
10040
10064
|
var _a;
|
|
10041
10065
|
return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.color.value) != null ? _a : props.color;
|
|
10042
10066
|
});
|
|
10043
|
-
const itemWidth = checkboxGroupConf == null ? void 0 : checkboxGroupConf.itemWidth
|
|
10044
|
-
const direction = checkboxGroupConf == null ? void 0 : checkboxGroupConf.direction
|
|
10067
|
+
const itemWidth = checkboxGroupConf == null ? void 0 : checkboxGroupConf.itemWidth;
|
|
10068
|
+
const direction = checkboxGroupConf == null ? void 0 : checkboxGroupConf.direction;
|
|
10045
10069
|
const canChange = (checked, val) => {
|
|
10046
10070
|
var _a;
|
|
10047
10071
|
if (mergedDisabled.value) {
|
|
@@ -10058,15 +10082,14 @@ function useCheckbox(props, ctx) {
|
|
|
10058
10082
|
return Promise.resolve(true);
|
|
10059
10083
|
};
|
|
10060
10084
|
const toggle = () => {
|
|
10061
|
-
const current = !
|
|
10085
|
+
const current = !mergedChecked.value;
|
|
10062
10086
|
checkboxGroupConf == null ? void 0 : checkboxGroupConf.toggleGroupVal(props.value);
|
|
10063
10087
|
ctx.emit("update:checked", current);
|
|
10064
10088
|
ctx.emit("update:modelValue", current);
|
|
10065
10089
|
ctx.emit("change", current);
|
|
10066
10090
|
};
|
|
10067
|
-
const handleClick = (
|
|
10068
|
-
|
|
10069
|
-
canChange(!isChecked.value, props.label).then((res) => res && toggle());
|
|
10091
|
+
const handleClick = () => {
|
|
10092
|
+
canChange(!mergedChecked.value, props.label).then((res) => res && toggle());
|
|
10070
10093
|
};
|
|
10071
10094
|
const size = computed(() => props.size || (checkboxGroupConf == null ? void 0 : checkboxGroupConf.size.value) || (formContext == null ? void 0 : formContext.size) || "md");
|
|
10072
10095
|
const border = computed(() => {
|
|
@@ -10074,7 +10097,8 @@ function useCheckbox(props, ctx) {
|
|
|
10074
10097
|
return (_a = checkboxGroupConf == null ? void 0 : checkboxGroupConf.border.value) != null ? _a : props.border;
|
|
10075
10098
|
});
|
|
10076
10099
|
watch(() => props.modelValue, () => {
|
|
10077
|
-
formItemContext == null ? void 0 : formItemContext.validate("change").catch((
|
|
10100
|
+
formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
|
|
10101
|
+
});
|
|
10078
10102
|
});
|
|
10079
10103
|
return {
|
|
10080
10104
|
mergedChecked,
|
|
@@ -10132,7 +10156,8 @@ function useCheckboxGroup(props, ctx) {
|
|
|
10132
10156
|
}
|
|
10133
10157
|
};
|
|
10134
10158
|
watch(() => props.modelValue, () => {
|
|
10135
|
-
formItemContext == null ? void 0 : formItemContext.validate("change").catch((
|
|
10159
|
+
formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
|
|
10160
|
+
});
|
|
10136
10161
|
}, { deep: true });
|
|
10137
10162
|
const checkboxGroupSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "");
|
|
10138
10163
|
provide(checkboxGroupInjectionKey, {
|
|
@@ -10169,7 +10194,7 @@ var Checkbox = defineComponent({
|
|
|
10169
10194
|
props: checkboxProps,
|
|
10170
10195
|
emits: ["change", "update:checked", "update:modelValue"],
|
|
10171
10196
|
setup(props, ctx) {
|
|
10172
|
-
const ns2 = useNamespace("checkbox");
|
|
10197
|
+
const ns2 = useNamespace$1("checkbox");
|
|
10173
10198
|
const {
|
|
10174
10199
|
mergedChecked,
|
|
10175
10200
|
mergedDisabled,
|
|
@@ -10184,11 +10209,11 @@ var Checkbox = defineComponent({
|
|
|
10184
10209
|
} = useCheckbox(props, ctx);
|
|
10185
10210
|
return () => {
|
|
10186
10211
|
var _a, _b;
|
|
10187
|
-
const wrapperCls = {
|
|
10188
|
-
[ns2.e("column-margin")]: direction === "column",
|
|
10189
|
-
[ns2.e("wrap")]: typeof itemWidth !== "undefined"
|
|
10190
|
-
};
|
|
10191
|
-
const wrapperStyle = itemWidth ? [`width: ${itemWidth}px`] : [];
|
|
10212
|
+
const wrapperCls = computed(() => ({
|
|
10213
|
+
[ns2.e("column-margin")]: (direction == null ? void 0 : direction.value) === "column",
|
|
10214
|
+
[ns2.e("wrap")]: typeof (itemWidth == null ? void 0 : itemWidth.value) !== "undefined"
|
|
10215
|
+
}));
|
|
10216
|
+
const wrapperStyle = computed(() => (itemWidth == null ? void 0 : itemWidth.value) ? [`width: ${itemWidth.value}px`] : []);
|
|
10192
10217
|
const checkboxCls = {
|
|
10193
10218
|
[ns2.b()]: true,
|
|
10194
10219
|
active: mergedChecked.value,
|
|
@@ -10219,8 +10244,8 @@ var Checkbox = defineComponent({
|
|
|
10219
10244
|
indeterminate: props.halfChecked
|
|
10220
10245
|
};
|
|
10221
10246
|
return createVNode("div", {
|
|
10222
|
-
"class": wrapperCls,
|
|
10223
|
-
"style": wrapperStyle
|
|
10247
|
+
"class": wrapperCls.value,
|
|
10248
|
+
"style": wrapperStyle.value
|
|
10224
10249
|
}, [createVNode("div", {
|
|
10225
10250
|
"class": checkboxCls
|
|
10226
10251
|
}, [createVNode("label", {
|
|
@@ -10228,7 +10253,7 @@ var Checkbox = defineComponent({
|
|
|
10228
10253
|
"onClick": handleClick,
|
|
10229
10254
|
"class": labelCls,
|
|
10230
10255
|
"style": {
|
|
10231
|
-
width: itemWidth ? "100%" : "auto"
|
|
10256
|
+
width: (itemWidth == null ? void 0 : itemWidth.value) ? "100%" : "auto"
|
|
10232
10257
|
}
|
|
10233
10258
|
}, [createVNode("input", mergeProps({
|
|
10234
10259
|
"name": props.name || props.value,
|
|
@@ -10270,7 +10295,7 @@ defineComponent({
|
|
|
10270
10295
|
props: checkboxGroupProps,
|
|
10271
10296
|
emits: ["change", "update:modelValue"],
|
|
10272
10297
|
setup(props, ctx) {
|
|
10273
|
-
const ns2 = useNamespace("checkbox");
|
|
10298
|
+
const ns2 = useNamespace$1("checkbox");
|
|
10274
10299
|
const {
|
|
10275
10300
|
defaultOpt
|
|
10276
10301
|
} = useCheckboxGroup(props, ctx);
|
|
@@ -10316,7 +10341,7 @@ defineComponent({
|
|
|
10316
10341
|
props: checkboxProps,
|
|
10317
10342
|
emits: ["change", "update:checked", "update:modelValue"],
|
|
10318
10343
|
setup(props, ctx) {
|
|
10319
|
-
const ns2 = useNamespace("checkbox-button");
|
|
10344
|
+
const ns2 = useNamespace$1("checkbox-button");
|
|
10320
10345
|
const {
|
|
10321
10346
|
mergedChecked,
|
|
10322
10347
|
mergedDisabled,
|