lew-ui 1.0.30 → 1.0.33
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/lew.es.ts +46 -28
- package/dist/lew.umd.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lew.es.ts
CHANGED
|
@@ -1609,7 +1609,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1609
1609
|
emit("change", v2.value);
|
|
1610
1610
|
setTimeout(() => {
|
|
1611
1611
|
hide2();
|
|
1612
|
-
},
|
|
1612
|
+
}, 500);
|
|
1613
1613
|
};
|
|
1614
1614
|
const open = () => {
|
|
1615
1615
|
if (props.options.length == 0)
|
|
@@ -1619,11 +1619,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1619
1619
|
const hide2 = () => {
|
|
1620
1620
|
lewDropdownRef.value.hide();
|
|
1621
1621
|
};
|
|
1622
|
-
const delayHide = () => {
|
|
1623
|
-
setTimeout(() => {
|
|
1624
|
-
hide2();
|
|
1625
|
-
}, 120);
|
|
1626
|
-
};
|
|
1627
1622
|
return (_ctx, _cache) => {
|
|
1628
1623
|
const _component_lew_input = resolveComponent("lew-input");
|
|
1629
1624
|
const _component_lew_dropdown = resolveComponent("lew-dropdown");
|
|
@@ -1657,7 +1652,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1657
1652
|
}, ["stop"])),
|
|
1658
1653
|
onInput: input,
|
|
1659
1654
|
onChange: _cache[2] || (_cache[2] = ($event) => emit("change", v2.value)),
|
|
1660
|
-
onBlur: _cache[3] || (_cache[3] = ($event) =>
|
|
1655
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => emit("blur", v2.value)),
|
|
1661
1656
|
onFocus: _cache[4] || (_cache[4] = ($event) => (open(), emit("focus", v2.value))),
|
|
1662
1657
|
onClear: clear
|
|
1663
1658
|
}, null, 8, ["modelValue", "type", "autoWidth", "size", "align", "placeholder", "clearable"])
|
|
@@ -1939,6 +1934,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1939
1934
|
const tagsValue = ref(props.modelValue);
|
|
1940
1935
|
const isInput = ref(false);
|
|
1941
1936
|
const lewInputRef = ref();
|
|
1937
|
+
let isEnter = false;
|
|
1942
1938
|
let delDownTimer;
|
|
1943
1939
|
let delDownCheck = 0;
|
|
1944
1940
|
watch(
|
|
@@ -1965,19 +1961,26 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1965
1961
|
delDownCheck = 0;
|
|
1966
1962
|
}
|
|
1967
1963
|
}
|
|
1964
|
+
} else {
|
|
1965
|
+
if (event.keyCode == 13) {
|
|
1966
|
+
isEnter = true;
|
|
1967
|
+
}
|
|
1968
1968
|
}
|
|
1969
1969
|
};
|
|
1970
1970
|
};
|
|
1971
|
-
const
|
|
1971
|
+
const blurFn = (e2) => {
|
|
1972
1972
|
isInput.value = false;
|
|
1973
1973
|
document.onkeydown = null;
|
|
1974
|
-
addTag(
|
|
1975
|
-
|
|
1976
|
-
const addTag = (value) => {
|
|
1977
|
-
if (!!value) {
|
|
1978
|
-
tagsValue.value.push(value);
|
|
1974
|
+
addTag();
|
|
1975
|
+
if (isEnter) {
|
|
1979
1976
|
openInput();
|
|
1980
1977
|
}
|
|
1978
|
+
isEnter = false;
|
|
1979
|
+
};
|
|
1980
|
+
const addTag = () => {
|
|
1981
|
+
if (!!inputValue.value) {
|
|
1982
|
+
tagsValue.value.push(inputValue.value);
|
|
1983
|
+
}
|
|
1981
1984
|
inputValue.value = "";
|
|
1982
1985
|
};
|
|
1983
1986
|
const delTag = (index2) => {
|
|
@@ -2017,7 +2020,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
2017
2020
|
ref: lewInputRef,
|
|
2018
2021
|
modelValue: inputValue.value,
|
|
2019
2022
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
2020
|
-
onBlur:
|
|
2023
|
+
onBlur: blurFn,
|
|
2021
2024
|
onFocus: addTag,
|
|
2022
2025
|
size: "small",
|
|
2023
2026
|
"auto-width": "",
|
|
@@ -2303,9 +2306,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2303
2306
|
}
|
|
2304
2307
|
});
|
|
2305
2308
|
var LewRadio = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-365d2981"], ["__file", "/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/radio/src/LewRadio.vue"]]);
|
|
2306
|
-
var
|
|
2309
|
+
var LewRadioGroup_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2307
2310
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2308
|
-
__name: "
|
|
2311
|
+
__name: "LewRadioGroup",
|
|
2309
2312
|
props: {
|
|
2310
2313
|
modelValue: {
|
|
2311
2314
|
type: String,
|
|
@@ -2374,7 +2377,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2374
2377
|
};
|
|
2375
2378
|
}
|
|
2376
2379
|
});
|
|
2377
|
-
var
|
|
2380
|
+
var LewRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-642e37a4"], ["__file", "/Users/kamtao/Documents/GitHub/Lew-UI/packages/components/radio/src/LewRadioGroup.vue"]]);
|
|
2378
2381
|
const selectProps = {
|
|
2379
2382
|
modelValue: {
|
|
2380
2383
|
type: [String, Array],
|
|
@@ -3238,7 +3241,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
3238
3241
|
}
|
|
3239
3242
|
);
|
|
3240
3243
|
let maxLen = computed(() => {
|
|
3241
|
-
return Math.
|
|
3244
|
+
return Math.ceil(props.total / pageSize.value);
|
|
3242
3245
|
});
|
|
3243
3246
|
let pageInterval = computed(() => {
|
|
3244
3247
|
let start2 = pageNum.value - props.pageShowSize;
|
|
@@ -3277,7 +3280,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
3277
3280
|
}
|
|
3278
3281
|
if (pageNum.value < 1) {
|
|
3279
3282
|
pageNum.value = 1;
|
|
3280
|
-
} else if (pageNum.value >
|
|
3283
|
+
} else if (pageNum.value > maxLen.value) {
|
|
3281
3284
|
pageNum.value = maxLen.value;
|
|
3282
3285
|
}
|
|
3283
3286
|
pageNumbackup.value = pageNum.value;
|
|
@@ -11772,7 +11775,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
11772
11775
|
LewFormItem,
|
|
11773
11776
|
LewCheckbox,
|
|
11774
11777
|
LewCheckboxGroup,
|
|
11775
|
-
|
|
11778
|
+
LewRadioGroup,
|
|
11776
11779
|
LewSelect,
|
|
11777
11780
|
LewSwitch,
|
|
11778
11781
|
LewDate,
|
|
@@ -12221,23 +12224,38 @@ const notification = (type, title, content) => {
|
|
|
12221
12224
|
const add = (type, title, content) => {
|
|
12222
12225
|
const LewMessageDom = document.getElementById("lew-notification");
|
|
12223
12226
|
const newMessage = document.createElement("div");
|
|
12227
|
+
const svgArr = {
|
|
12228
|
+
success: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z" fill="currentColor"></path></g></svg>`,
|
|
12229
|
+
warning: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z" fill="currentColor"></path></g></svg>`,
|
|
12230
|
+
error: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>`,
|
|
12231
|
+
normal: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z" fill="currentColor"></path></g></svg>`,
|
|
12232
|
+
info: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z" fill="currentColor"></path></g></svg>`
|
|
12233
|
+
};
|
|
12224
12234
|
newMessage.innerHTML = `
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12235
|
+
<div class="lew-notification-box">
|
|
12236
|
+
<div class="lew-notification-icon">
|
|
12237
|
+
${svgArr[type]}
|
|
12238
|
+
</div>
|
|
12239
|
+
<div class="lew-notification-body">
|
|
12240
|
+
<div class="lew-notification-title">${title}</div>
|
|
12241
|
+
${content ? '<div class="lew-notification-content">' + content + "</div>" : ""}
|
|
12242
|
+
</div>
|
|
12243
|
+
</div>
|
|
12229
12244
|
`;
|
|
12230
12245
|
LewMessageDom == null ? void 0 : LewMessageDom.appendChild(newMessage, LewMessageDom == null ? void 0 : LewMessageDom.childNodes[0]);
|
|
12231
|
-
newMessage.setAttribute(
|
|
12246
|
+
newMessage.setAttribute(
|
|
12247
|
+
"class",
|
|
12248
|
+
`lew-notification lew-notification-${type}`
|
|
12249
|
+
);
|
|
12232
12250
|
setTimeout(() => {
|
|
12233
12251
|
newMessage.setAttribute(
|
|
12234
12252
|
"class",
|
|
12235
|
-
`notification notification-${type} notification-show`
|
|
12253
|
+
`lew-notification lew-notification-${type} lew-notification-show`
|
|
12236
12254
|
);
|
|
12237
12255
|
setTimeout(() => {
|
|
12238
12256
|
newMessage.setAttribute(
|
|
12239
12257
|
"class",
|
|
12240
|
-
`notification notification-${type} notification-hidden`
|
|
12258
|
+
`lew-notification lew-notification-${type} lew-notification-hidden`
|
|
12241
12259
|
);
|
|
12242
12260
|
setTimeout(() => {
|
|
12243
12261
|
LewMessageDom == null ? void 0 : LewMessageDom.removeChild(newMessage);
|
|
@@ -12324,4 +12342,4 @@ const install = function(Vue) {
|
|
|
12324
12342
|
var index = {
|
|
12325
12343
|
install
|
|
12326
12344
|
};
|
|
12327
|
-
export { LewAlert, LewAvatar, LewBackTop, LewBadge, LewBreadcrumb, LewButton, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDemoBox, index$7 as LewDialog, LewDrawer, LewDropdown, LewFancyImage, index$a as LewFancybox, LewFlex, LewFormItem, LewInput, LewInputPro, LewInputTag, LewLayout, LewMark, index$8 as LewMessage, LewModal, index$3 as LewNotification, LewPagination, LewPlyrVideo, LewPopok, LewPopover,
|
|
12345
|
+
export { LewAlert, LewAvatar, LewBackTop, LewBadge, LewBreadcrumb, LewButton, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDemoBox, index$7 as LewDialog, LewDrawer, LewDropdown, LewFancyImage, index$a as LewFancybox, LewFlex, LewFormItem, LewInput, LewInputPro, LewInputTag, LewLayout, LewMark, index$8 as LewMessage, LewModal, index$3 as LewNotification, LewPagination, LewPlyrVideo, LewPopok, LewPopover, LewRadioGroup, LewSelect, LewSpace, LewSteps, LewSwitch, LewTable, LewTabs, LewTag, LewTitle, index$5 as LewVBacktop, index$6 as LewVTooltip, index as default };
|