lew-ui 1.7.23 → 1.7.25
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/index.es.js +56 -39
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -83,7 +83,7 @@ const getColorType = (type) => {
|
|
|
83
83
|
};
|
|
84
84
|
return typeMap[type] || type;
|
|
85
85
|
};
|
|
86
|
-
const object2class
|
|
86
|
+
const object2class = (prefix, props) => {
|
|
87
87
|
let className = "";
|
|
88
88
|
for (const [key, value] of Object.entries(props)) {
|
|
89
89
|
if (typeof value === "boolean" && value) {
|
|
@@ -138,6 +138,27 @@ const any2px = (value) => {
|
|
|
138
138
|
}
|
|
139
139
|
return "";
|
|
140
140
|
};
|
|
141
|
+
let uid = 1;
|
|
142
|
+
function genUid() {
|
|
143
|
+
return Date.now() + uid++;
|
|
144
|
+
}
|
|
145
|
+
const lewSetForm = ({
|
|
146
|
+
domRef,
|
|
147
|
+
params
|
|
148
|
+
}) => {
|
|
149
|
+
let timeout = 0;
|
|
150
|
+
const _fn = () => {
|
|
151
|
+
timeout += 10;
|
|
152
|
+
if (domRef) {
|
|
153
|
+
domRef.setForm(params);
|
|
154
|
+
} else {
|
|
155
|
+
setTimeout(() => {
|
|
156
|
+
_fn();
|
|
157
|
+
}, timeout);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
_fn();
|
|
161
|
+
};
|
|
141
162
|
var LewFlex_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
142
163
|
var _export_sfc = (sfc, props) => {
|
|
143
164
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -1384,10 +1405,10 @@ var feather$2 = { exports: {} };
|
|
|
1384
1405
|
},
|
|
1385
1406
|
"./node_modules/core-js/internals/shared-key.js": function(module2, exports2, __webpack_require__) {
|
|
1386
1407
|
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
|
|
1387
|
-
var
|
|
1408
|
+
var uid2 = __webpack_require__("./node_modules/core-js/internals/uid.js");
|
|
1388
1409
|
var keys = shared("keys");
|
|
1389
1410
|
module2.exports = function(key) {
|
|
1390
|
-
return keys[key] || (keys[key] =
|
|
1411
|
+
return keys[key] || (keys[key] = uid2(key));
|
|
1391
1412
|
};
|
|
1392
1413
|
},
|
|
1393
1414
|
"./node_modules/core-js/internals/shared.js": function(module2, exports2, __webpack_require__) {
|
|
@@ -1489,12 +1510,12 @@ var feather$2 = { exports: {} };
|
|
|
1489
1510
|
"./node_modules/core-js/internals/well-known-symbol.js": function(module2, exports2, __webpack_require__) {
|
|
1490
1511
|
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
|
|
1491
1512
|
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
|
|
1492
|
-
var
|
|
1513
|
+
var uid2 = __webpack_require__("./node_modules/core-js/internals/uid.js");
|
|
1493
1514
|
var NATIVE_SYMBOL = __webpack_require__("./node_modules/core-js/internals/native-symbol.js");
|
|
1494
1515
|
var Symbol2 = global2.Symbol;
|
|
1495
1516
|
var store = shared("wks");
|
|
1496
1517
|
module2.exports = function(name) {
|
|
1497
|
-
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol2[name] || (NATIVE_SYMBOL ? Symbol2 :
|
|
1518
|
+
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol2[name] || (NATIVE_SYMBOL ? Symbol2 : uid2)("Symbol." + name));
|
|
1498
1519
|
};
|
|
1499
1520
|
},
|
|
1500
1521
|
"./node_modules/core-js/modules/es.array.from.js": function(module2, exports2, __webpack_require__) {
|
|
@@ -2885,16 +2906,16 @@ const _sfc_main$D = defineComponent({
|
|
|
2885
2906
|
const getCascaderClassName = computed(() => {
|
|
2886
2907
|
let { clearable, size } = props;
|
|
2887
2908
|
clearable = clearable ? !!cascaderValue.value : false;
|
|
2888
|
-
return object2class
|
|
2909
|
+
return object2class("lew-cascader", { clearable, size });
|
|
2889
2910
|
});
|
|
2890
2911
|
const getBodyClassName = computed(() => {
|
|
2891
2912
|
const { size, disabled } = props;
|
|
2892
|
-
return object2class
|
|
2913
|
+
return object2class("lew-cascader-body", { size, disabled });
|
|
2893
2914
|
});
|
|
2894
2915
|
const getCascaderViewClassName = computed(() => {
|
|
2895
2916
|
const { disabled, readonly: readonly2 } = props;
|
|
2896
2917
|
const focus = state.visible;
|
|
2897
|
-
return object2class
|
|
2918
|
+
return object2class("lew-cascader-view", { focus, disabled, readonly: readonly2 });
|
|
2898
2919
|
});
|
|
2899
2920
|
const getIconSize = computed(() => {
|
|
2900
2921
|
const size = {
|
|
@@ -3241,7 +3262,7 @@ const _sfc_main$B = defineComponent({
|
|
|
3241
3262
|
};
|
|
3242
3263
|
const getTabsWrapperClassName = computed(() => {
|
|
3243
3264
|
const { type, round: round2 } = props;
|
|
3244
|
-
return object2class
|
|
3265
|
+
return object2class("lew-tabs-wrapper", {
|
|
3245
3266
|
type,
|
|
3246
3267
|
round: round2,
|
|
3247
3268
|
hidLine: state.hidLine
|
|
@@ -3249,7 +3270,7 @@ const _sfc_main$B = defineComponent({
|
|
|
3249
3270
|
});
|
|
3250
3271
|
const getTabsClassName = computed(() => {
|
|
3251
3272
|
const { type, round: round2, size } = props;
|
|
3252
|
-
return object2class
|
|
3273
|
+
return object2class("lew-tabs", {
|
|
3253
3274
|
type,
|
|
3254
3275
|
round: round2,
|
|
3255
3276
|
size
|
|
@@ -3768,7 +3789,7 @@ const _sfc_main$x = defineComponent({
|
|
|
3768
3789
|
});
|
|
3769
3790
|
const getInputClassNames = computed(() => {
|
|
3770
3791
|
const { size, readonly: readonly2, disabled, align, autoWidth } = props;
|
|
3771
|
-
return object2class
|
|
3792
|
+
return object2class("lew-input-view", {
|
|
3772
3793
|
size,
|
|
3773
3794
|
readonly: readonly2,
|
|
3774
3795
|
disabled,
|
|
@@ -4103,7 +4124,7 @@ const _sfc_main$w = defineComponent({
|
|
|
4103
4124
|
});
|
|
4104
4125
|
const getTextareaClassNames = computed(() => {
|
|
4105
4126
|
const { size, readonly: readonly2, disabled } = props;
|
|
4106
|
-
return object2class
|
|
4127
|
+
return object2class("lew-textarea-view", {
|
|
4107
4128
|
size,
|
|
4108
4129
|
readonly: readonly2,
|
|
4109
4130
|
disabled
|
|
@@ -5996,7 +6017,7 @@ const _sfc_main$u = defineComponent({
|
|
|
5996
6017
|
});
|
|
5997
6018
|
const getFormClassNames = computed(() => {
|
|
5998
6019
|
const { direction, size } = props;
|
|
5999
|
-
return object2class
|
|
6020
|
+
return object2class("lew-form", { direction, size });
|
|
6000
6021
|
});
|
|
6001
6022
|
watchDebounced(
|
|
6002
6023
|
() => componentOptions.value,
|
|
@@ -6548,7 +6569,7 @@ const _sfc_main$t = defineComponent({
|
|
|
6548
6569
|
const { block, round: round2, iconable, size, disabled } = props;
|
|
6549
6570
|
const checked = modelValue.value || props.checked;
|
|
6550
6571
|
const unicon = !iconable && block;
|
|
6551
|
-
return object2class
|
|
6572
|
+
return object2class("lew-checkbox", {
|
|
6552
6573
|
block,
|
|
6553
6574
|
round: round2,
|
|
6554
6575
|
size,
|
|
@@ -6600,7 +6621,7 @@ const _sfc_main$s = defineComponent({
|
|
|
6600
6621
|
item
|
|
6601
6622
|
});
|
|
6602
6623
|
};
|
|
6603
|
-
watchArray(modelValue
|
|
6624
|
+
watchArray(modelValue, () => {
|
|
6604
6625
|
initCheckbox();
|
|
6605
6626
|
});
|
|
6606
6627
|
const initCheckbox = () => {
|
|
@@ -6613,7 +6634,7 @@ const _sfc_main$s = defineComponent({
|
|
|
6613
6634
|
};
|
|
6614
6635
|
const getCheckboxGroupClassName = computed(() => {
|
|
6615
6636
|
const { size, direction } = props;
|
|
6616
|
-
return object2class
|
|
6637
|
+
return object2class("lew-checkbox-group", { size, direction });
|
|
6617
6638
|
});
|
|
6618
6639
|
initCheckbox();
|
|
6619
6640
|
return (_ctx, _cache) => {
|
|
@@ -6742,7 +6763,7 @@ const _sfc_main$r = defineComponent({
|
|
|
6742
6763
|
const getRadioClassName = computed(() => {
|
|
6743
6764
|
const { block, checked, iconable, size, disabled } = props;
|
|
6744
6765
|
const unicon = !iconable && block;
|
|
6745
|
-
return object2class
|
|
6766
|
+
return object2class("lew-radio", {
|
|
6746
6767
|
block,
|
|
6747
6768
|
checked,
|
|
6748
6769
|
unicon,
|
|
@@ -6785,7 +6806,7 @@ const _sfc_main$q = defineComponent({
|
|
|
6785
6806
|
};
|
|
6786
6807
|
const getRadioGroupClassName = computed(() => {
|
|
6787
6808
|
const { size, direction } = props;
|
|
6788
|
-
return object2class
|
|
6809
|
+
return object2class("lew-radio-group", { size, direction });
|
|
6789
6810
|
});
|
|
6790
6811
|
return (_ctx, _cache) => {
|
|
6791
6812
|
const _component_lew_flex = resolveComponent("lew-flex");
|
|
@@ -7179,22 +7200,22 @@ const _sfc_main$p = defineComponent({
|
|
|
7179
7200
|
const getSelectClassName = computed(() => {
|
|
7180
7201
|
let { clearable, size, align } = props;
|
|
7181
7202
|
clearable = clearable ? !!selectValue.value : false;
|
|
7182
|
-
return object2class
|
|
7203
|
+
return object2class("lew-select", { clearable, size, align });
|
|
7183
7204
|
});
|
|
7184
7205
|
const getBodyClassName = computed(() => {
|
|
7185
7206
|
const { size, disabled } = props;
|
|
7186
|
-
return object2class
|
|
7207
|
+
return object2class("lew-select-body", { size, disabled });
|
|
7187
7208
|
});
|
|
7188
7209
|
const getSelectViewClassName = computed(() => {
|
|
7189
7210
|
const { disabled, readonly: readonly2 } = props;
|
|
7190
7211
|
const focus = state.visible;
|
|
7191
|
-
return object2class
|
|
7212
|
+
return object2class("lew-select-view", { focus, disabled, readonly: readonly2 });
|
|
7192
7213
|
});
|
|
7193
7214
|
const getSelectItemClassName = (e) => {
|
|
7194
7215
|
const { disabled } = e;
|
|
7195
7216
|
const active = getChecked.value(e.value);
|
|
7196
7217
|
const { align } = props;
|
|
7197
|
-
return object2class
|
|
7218
|
+
return object2class("lew-select-item", {
|
|
7198
7219
|
disabled,
|
|
7199
7220
|
align,
|
|
7200
7221
|
active
|
|
@@ -7593,22 +7614,22 @@ const _sfc_main$o = defineComponent({
|
|
|
7593
7614
|
const getSelectClassName = computed(() => {
|
|
7594
7615
|
let { clearable, size, align } = props;
|
|
7595
7616
|
clearable = clearable ? !!selectValue.value : false;
|
|
7596
|
-
return object2class
|
|
7617
|
+
return object2class("lew-select", { clearable, size, align });
|
|
7597
7618
|
});
|
|
7598
7619
|
const getBodyClassName = computed(() => {
|
|
7599
7620
|
const { size, disabled } = props;
|
|
7600
|
-
return object2class
|
|
7621
|
+
return object2class("lew-select-body", { size, disabled });
|
|
7601
7622
|
});
|
|
7602
7623
|
const getSelectViewClassName = computed(() => {
|
|
7603
7624
|
const { disabled, readonly: readonly2 } = props;
|
|
7604
7625
|
const focus = state.visible;
|
|
7605
|
-
return object2class
|
|
7626
|
+
return object2class("lew-select-view", { focus, disabled, readonly: readonly2 });
|
|
7606
7627
|
});
|
|
7607
7628
|
const getSelectItemClassName = (e) => {
|
|
7608
7629
|
const { disabled } = e;
|
|
7609
7630
|
const active = getChecked.value(e.value);
|
|
7610
7631
|
const { align } = props;
|
|
7611
|
-
return object2class
|
|
7632
|
+
return object2class("lew-select-item", {
|
|
7612
7633
|
disabled,
|
|
7613
7634
|
align,
|
|
7614
7635
|
active
|
|
@@ -8399,7 +8420,7 @@ const _sfc_main$m = defineComponent({
|
|
|
8399
8420
|
const v = `${dateState.year}-${dateState.month}-${item.showDate}`;
|
|
8400
8421
|
selected = dayjs(v).isSame(dayjs(modelValue.value));
|
|
8401
8422
|
}
|
|
8402
|
-
return object2class
|
|
8423
|
+
return object2class("lew-date-item", { e, selected });
|
|
8403
8424
|
});
|
|
8404
8425
|
return (_ctx, _cache) => {
|
|
8405
8426
|
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
@@ -8931,7 +8952,7 @@ const _sfc_main$k = defineComponent({
|
|
|
8931
8952
|
const lewDateClassNames = computed(() => {
|
|
8932
8953
|
const focus = visible.value;
|
|
8933
8954
|
const { size } = props;
|
|
8934
|
-
return object2class
|
|
8955
|
+
return object2class("lew-date-picker", { focus, size });
|
|
8935
8956
|
});
|
|
8936
8957
|
const clearHandle = () => {
|
|
8937
8958
|
modelValue.value = "";
|
|
@@ -10002,13 +10023,13 @@ const _sfc_main$e = defineComponent({
|
|
|
10002
10023
|
return isError.value ? props.errorSrc : props.src;
|
|
10003
10024
|
});
|
|
10004
10025
|
const dotClassName = computed(() => {
|
|
10005
|
-
return object2class
|
|
10026
|
+
return object2class("dot", {
|
|
10006
10027
|
status: props.status,
|
|
10007
10028
|
statusPosition: props.statusPosition
|
|
10008
10029
|
});
|
|
10009
10030
|
});
|
|
10010
10031
|
const avatarClassName = computed(() => {
|
|
10011
|
-
return object2class
|
|
10032
|
+
return object2class("lew-avatar", {
|
|
10012
10033
|
round: props.round,
|
|
10013
10034
|
skeletons: isLoading.value
|
|
10014
10035
|
});
|
|
@@ -10170,7 +10191,7 @@ const _sfc_main$c = defineComponent({
|
|
|
10170
10191
|
const { size, type, icon, text } = props;
|
|
10171
10192
|
const loading2 = _loading.value || props.loading;
|
|
10172
10193
|
const singleIcon = !!(!text && icon) && !hasDefaultSlot.value;
|
|
10173
|
-
return object2class
|
|
10194
|
+
return object2class("lew-button", {
|
|
10174
10195
|
size,
|
|
10175
10196
|
type,
|
|
10176
10197
|
loading: loading2,
|
|
@@ -10379,7 +10400,7 @@ const _sfc_main$a = defineComponent({
|
|
|
10379
10400
|
});
|
|
10380
10401
|
const tagClassName = computed(() => {
|
|
10381
10402
|
const { size, disabled } = props;
|
|
10382
|
-
return object2class
|
|
10403
|
+
return object2class("lew-tag", { size, disabled });
|
|
10383
10404
|
});
|
|
10384
10405
|
const getStyle2 = computed(() => {
|
|
10385
10406
|
const { round: round2, type, color } = props;
|
|
@@ -10455,7 +10476,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
10455
10476
|
emits: ["close"],
|
|
10456
10477
|
setup(__props, { emit }) {
|
|
10457
10478
|
const alertClassName = (item) => {
|
|
10458
|
-
return object2class
|
|
10479
|
+
return object2class("lew-alert", { type: item.type });
|
|
10459
10480
|
};
|
|
10460
10481
|
return (_ctx, _cache) => {
|
|
10461
10482
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
@@ -13186,7 +13207,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
13186
13207
|
});
|
|
13187
13208
|
const getClassNames = computed(() => {
|
|
13188
13209
|
const { x } = props;
|
|
13189
|
-
return object2class
|
|
13210
|
+
return object2class("lew-text-trim", { x });
|
|
13190
13211
|
});
|
|
13191
13212
|
let width = 0;
|
|
13192
13213
|
const check = () => {
|
|
@@ -13819,9 +13840,6 @@ const getPosition = (position) => {
|
|
|
13819
13840
|
return 0;
|
|
13820
13841
|
}
|
|
13821
13842
|
};
|
|
13822
|
-
const object2class = (position) => {
|
|
13823
|
-
return position ? `lew-drawer-main-${position}` : "lew-drawer-main-right";
|
|
13824
|
-
};
|
|
13825
13843
|
var LewDrawer_vue_vue_type_style_index_0_lang = "";
|
|
13826
13844
|
const _sfc_main$4 = defineComponent({
|
|
13827
13845
|
__name: "LewDrawer",
|
|
@@ -14431,7 +14449,6 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
14431
14449
|
drawerProps,
|
|
14432
14450
|
getStyle,
|
|
14433
14451
|
getPosition,
|
|
14434
|
-
object2class,
|
|
14435
14452
|
LewResult,
|
|
14436
14453
|
resultProps,
|
|
14437
14454
|
LewBackTop,
|
|
@@ -15130,4 +15147,4 @@ const install = function(Vue) {
|
|
|
15130
15147
|
var index = {
|
|
15131
15148
|
install
|
|
15132
15149
|
};
|
|
15133
|
-
export { LewAlert, LewAvatar, LewBackTop, index$4 as LewBacktop, LewBadge, LewBreadcrumb, LewButton, LewCascader, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, index$5 as LewDialog, LewDrawer, LewDropdown, LewFlex, LewForm, script as LewIcon, LewInput, LewInputTag, LewLayout, LewLoading, LewMagicNumber, LewMagicText, LewMark, LewMenu, index$6 as LewMessage, LewModal, index$2 as LewNotification, LewPagination, LewPopok, LewPopover, LewRadioGroup, LewResult, LewSelect, LewSelectMultiple, LewSpace, LewSteps, LewSwitch, LewTable, LewTabs, LewTag, LewTextTrim, LewTextarea, LewTitle, LewTooltip, LewTreeSelect, SpaceOptions, alertProps, avatarProps, backTopProps, badgeProps, breadcrumbProps, buttonProps, cascaderProps, checkboxGroupProps, checkboxProps, datePickerProps, dateProps, dateRangePickerProps, dateRangeProps, index as default, dialogProps, drawerProps, dropdownProps, flexProps, formProps, getPosition, getStyle, inputProps, inputTagProps, magicNumberProps, markProps, menuProps, modalProps, object2class, paginationProps, popokProps, popoverProps, radioGroupProps, radioProps, resultProps, selectMultipleProps, selectProps, steps, switchProps, tableProps, tabsProps, tagProps, textTrimProps, textareaProps, titleProps };
|
|
15150
|
+
export { LewAlert, LewAvatar, LewBackTop, index$4 as LewBacktop, LewBadge, LewBreadcrumb, LewButton, LewCascader, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, index$5 as LewDialog, LewDrawer, LewDropdown, LewFlex, LewForm, script as LewIcon, LewInput, LewInputTag, LewLayout, LewLoading, LewMagicNumber, LewMagicText, LewMark, LewMenu, index$6 as LewMessage, LewModal, index$2 as LewNotification, LewPagination, LewPopok, LewPopover, LewRadioGroup, LewResult, LewSelect, LewSelectMultiple, LewSpace, LewSteps, LewSwitch, LewTable, LewTabs, LewTag, LewTextTrim, LewTextarea, LewTitle, LewTooltip, LewTreeSelect, SpaceOptions, alertProps, any2px, avatarProps, backTopProps, badgeProps, breadcrumbProps, buttonProps, cascaderProps, checkboxGroupProps, checkboxProps, datePickerProps, dateProps, dateRangePickerProps, dateRangeProps, index as default, dialogProps, drawerProps, dropdownProps, flexProps, formProps, genUid, getColorType, getIconType, getPosition, getStyle, inputProps, inputTagProps, lewSetForm, magicNumberProps, markProps, menuProps, modalProps, numFormat, object2class, paginationProps, popokProps, popoverProps, radioGroupProps, radioProps, resultProps, selectMultipleProps, selectProps, steps, switchProps, tableProps, tabsProps, tagProps, textTrimProps, textareaProps, titleProps };
|