lew-ui 2.7.50 → 2.7.53
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.css +1 -1
- package/dist/index.js +49 -31
- package/dist/index.umd.cjs +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5162,9 +5162,22 @@ function any2px(value) {
|
|
|
5162
5162
|
}
|
|
5163
5163
|
return "";
|
|
5164
5164
|
}
|
|
5165
|
+
let lastTimestamp = 0n;
|
|
5166
|
+
let counter = 0n;
|
|
5165
5167
|
function getUniqueId() {
|
|
5166
|
-
const
|
|
5167
|
-
|
|
5168
|
+
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
5169
|
+
const firstChar = letters[Math.floor(Math.random() * letters.length)];
|
|
5170
|
+
const timestamp = BigInt(Date.now());
|
|
5171
|
+
if (timestamp === lastTimestamp) {
|
|
5172
|
+
counter++;
|
|
5173
|
+
} else {
|
|
5174
|
+
counter = 0n;
|
|
5175
|
+
lastTimestamp = timestamp;
|
|
5176
|
+
}
|
|
5177
|
+
const random2 = BigInt(Math.floor(Math.random() * 1e3));
|
|
5178
|
+
const uniqueNumber = timestamp * 1000n + counter + random2;
|
|
5179
|
+
const rest = uniqueNumber.toString(36).slice(-7).padStart(7, "0");
|
|
5180
|
+
return firstChar + rest;
|
|
5168
5181
|
}
|
|
5169
5182
|
function formatFormByMap(formMap) {
|
|
5170
5183
|
const form = {};
|
|
@@ -22005,34 +22018,39 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
22005
22018
|
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_6$1, toDisplayString$1(modelValue.value), 1)) : createCommentVNode("", true),
|
|
22006
22019
|
_ctx.autoWidth && _ctx.clearable ? (openBlock(), createElementBlock("label", _hoisted_7)) : createCommentVNode("", true),
|
|
22007
22020
|
_ctx.showPassword || _ctx.clearable || _ctx.showCount ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
22008
|
-
|
|
22009
|
-
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
class:
|
|
22013
|
-
"lew-input-count-clearable": _ctx.clearable && modelValue.value
|
|
22014
|
-
}])
|
|
22015
|
-
}, toDisplayString$1(typeof modelValue.value === "string" ? modelValue.value.length : 0) + toDisplayString$1(_ctx.maxLength ? ` / ${_ctx.maxLength}` : ""), 3)) : createCommentVNode("", true),
|
|
22016
|
-
_ctx.showPassword && _ctx.type === "password" ? (openBlock(), createElementBlock("div", {
|
|
22017
|
-
key: 1,
|
|
22018
|
-
class: "lew-input-show-password",
|
|
22019
|
-
onMousedown: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
22020
|
-
}, ["prevent"])),
|
|
22021
|
-
onClick: showPasswordFn
|
|
22021
|
+
createElementVNode("div", {
|
|
22022
|
+
style: normalizeStyle({
|
|
22023
|
+
transform: _ctx.clearable && modelValue.value ? "translateX(-20px)" : "translateX(0px)"
|
|
22024
|
+
}),
|
|
22025
|
+
class: "lew-input-controls-box"
|
|
22022
22026
|
}, [
|
|
22023
|
-
|
|
22024
|
-
|
|
22025
|
-
|
|
22026
|
-
|
|
22027
|
-
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22027
|
+
modelValue.value && _ctx.showCount ? (openBlock(), createElementBlock("div", {
|
|
22028
|
+
key: 0,
|
|
22029
|
+
ref_key: "lewInputCountRef",
|
|
22030
|
+
ref: lewInputCountRef,
|
|
22031
|
+
class: "lew-input-count"
|
|
22032
|
+
}, toDisplayString$1(typeof modelValue.value === "string" ? modelValue.value.length : 0) + toDisplayString$1(_ctx.maxLength ? ` / ${_ctx.maxLength}` : ""), 513)) : createCommentVNode("", true),
|
|
22033
|
+
_ctx.showPassword && _ctx.type === "password" ? (openBlock(), createElementBlock("div", {
|
|
22034
|
+
key: 1,
|
|
22035
|
+
class: "lew-input-show-password",
|
|
22036
|
+
onMousedown: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
22037
|
+
}, ["prevent"])),
|
|
22038
|
+
onClick: showPasswordFn
|
|
22039
|
+
}, [
|
|
22040
|
+
withDirectives(createVNode(CommonIcon, {
|
|
22041
|
+
size: unref(getIconSize),
|
|
22042
|
+
type: "eye"
|
|
22043
|
+
}, null, 8, ["size"]), [
|
|
22044
|
+
[vShow, unref(_type) === "text"]
|
|
22045
|
+
]),
|
|
22046
|
+
withDirectives(createVNode(CommonIcon, {
|
|
22047
|
+
size: unref(getIconSize),
|
|
22048
|
+
type: "eye_off"
|
|
22049
|
+
}, null, 8, ["size"]), [
|
|
22050
|
+
[vShow, unref(_type) === "password"]
|
|
22051
|
+
])
|
|
22052
|
+
], 32)) : createCommentVNode("", true)
|
|
22053
|
+
], 4),
|
|
22036
22054
|
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
22037
22055
|
default: withCtx(() => [
|
|
22038
22056
|
_ctx.clearable && modelValue.value && !_ctx.readonly ? (openBlock(), createBlock(CommonIcon, {
|
|
@@ -22103,7 +22121,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
22103
22121
|
};
|
|
22104
22122
|
}
|
|
22105
22123
|
});
|
|
22106
|
-
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
22124
|
+
const LewInput = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-8127795f"]]);
|
|
22107
22125
|
const inputNumberEmits = {
|
|
22108
22126
|
change: (value) => value,
|
|
22109
22127
|
input: (value) => value
|
|
@@ -28980,7 +28998,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
28980
28998
|
};
|
|
28981
28999
|
}
|
|
28982
29000
|
});
|
|
28983
|
-
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
29001
|
+
const LewButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-63edc8ef"]]);
|
|
28984
29002
|
const flexProps = {
|
|
28985
29003
|
direction: {
|
|
28986
29004
|
type: String,
|