lew-ui 1.8.14 → 1.8.15
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 +46 -9
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3567,6 +3567,11 @@ const inputProps = {
|
|
|
3567
3567
|
default: false,
|
|
3568
3568
|
description: "\u662F\u5426\u53EA\u8BFB"
|
|
3569
3569
|
},
|
|
3570
|
+
copyable: {
|
|
3571
|
+
type: Boolean,
|
|
3572
|
+
default: false,
|
|
3573
|
+
description: "\u662F\u5426\u5141\u8BB8\u590D\u5236\uFF08\u53EA\u5728readonly\u4E3Atrue\uFF0C\u4E14suffix\u4E3Afalse\u65F6\u751F\u6548\uFF09"
|
|
3574
|
+
},
|
|
3570
3575
|
showPassword: {
|
|
3571
3576
|
type: Boolean,
|
|
3572
3577
|
default: false,
|
|
@@ -3659,7 +3664,7 @@ const _hoisted_4$c = {
|
|
|
3659
3664
|
};
|
|
3660
3665
|
const _hoisted_5$9 = ["disabled", "placeholder", "type", "readonly"];
|
|
3661
3666
|
const _hoisted_6$4 = {
|
|
3662
|
-
key:
|
|
3667
|
+
key: 2,
|
|
3663
3668
|
class: "lew-input-suffix"
|
|
3664
3669
|
};
|
|
3665
3670
|
const _hoisted_7$3 = {
|
|
@@ -3675,11 +3680,11 @@ const _hoisted_9$2 = {
|
|
|
3675
3680
|
class: "lew-input-suffix-select"
|
|
3676
3681
|
};
|
|
3677
3682
|
const _hoisted_10$2 = {
|
|
3678
|
-
key:
|
|
3683
|
+
key: 3,
|
|
3679
3684
|
class: "lew-input-auto-width"
|
|
3680
3685
|
};
|
|
3681
3686
|
const _hoisted_11$1 = {
|
|
3682
|
-
key:
|
|
3687
|
+
key: 4,
|
|
3683
3688
|
class: "lew-input-controls"
|
|
3684
3689
|
};
|
|
3685
3690
|
const _sfc_main$y = defineComponent({
|
|
@@ -3709,6 +3714,8 @@ const _sfc_main$y = defineComponent({
|
|
|
3709
3714
|
const prefixesValue = useVModel(props, "prefixesValue", emit);
|
|
3710
3715
|
const suffixValue = useVModel(props, "suffixValue", emit);
|
|
3711
3716
|
const lewInputRef = ref();
|
|
3717
|
+
const isCopy = ref(false);
|
|
3718
|
+
let timer2 = null;
|
|
3712
3719
|
const _type = ref(props.type);
|
|
3713
3720
|
const state = reactive({
|
|
3714
3721
|
prefixesDropdown: "hide",
|
|
@@ -3815,6 +3822,24 @@ const _sfc_main$y = defineComponent({
|
|
|
3815
3822
|
);
|
|
3816
3823
|
return (item == null ? void 0 : item.label) || "";
|
|
3817
3824
|
});
|
|
3825
|
+
const copy = () => {
|
|
3826
|
+
const textarea = document.createElement("textarea");
|
|
3827
|
+
textarea.style.position = "fixed";
|
|
3828
|
+
textarea.style.top = "-200vh";
|
|
3829
|
+
textarea.value = modelValue.value;
|
|
3830
|
+
document.body.appendChild(textarea);
|
|
3831
|
+
textarea.select();
|
|
3832
|
+
if (document.execCommand("copy")) {
|
|
3833
|
+
LewMessage.success("\u590D\u5236\u6210\u529F\uFF01");
|
|
3834
|
+
isCopy.value = true;
|
|
3835
|
+
timer2 = setTimeout(() => {
|
|
3836
|
+
isCopy.value = false;
|
|
3837
|
+
}, 2e3);
|
|
3838
|
+
} else {
|
|
3839
|
+
LewMessage.error("\u590D\u5236\u5931\u8D25\uFF01");
|
|
3840
|
+
}
|
|
3841
|
+
document.body.removeChild(textarea);
|
|
3842
|
+
};
|
|
3818
3843
|
if (props.okByEnter) {
|
|
3819
3844
|
watch(enter, (v) => {
|
|
3820
3845
|
if (v && state.isFocus && modelValue.value) {
|
|
@@ -3822,6 +3847,9 @@ const _sfc_main$y = defineComponent({
|
|
|
3822
3847
|
}
|
|
3823
3848
|
});
|
|
3824
3849
|
}
|
|
3850
|
+
onUnmounted(() => {
|
|
3851
|
+
clearTimeout(timer2);
|
|
3852
|
+
});
|
|
3825
3853
|
__expose({ toFocus });
|
|
3826
3854
|
return (_ctx, _cache) => {
|
|
3827
3855
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
@@ -3873,6 +3901,17 @@ const _sfc_main$y = defineComponent({
|
|
|
3873
3901
|
trigger: "mouseenter"
|
|
3874
3902
|
}]
|
|
3875
3903
|
]) : createCommentVNode("v-if", true),
|
|
3904
|
+
_ctx.copyable && _ctx.readonly && unref(modelValue) && !_ctx.suffix ? (openBlock(), createElementBlock("div", {
|
|
3905
|
+
key: 1,
|
|
3906
|
+
class: "lew-input-copy-btn",
|
|
3907
|
+
onClick: copy
|
|
3908
|
+
}, [
|
|
3909
|
+
createVNode(unref(script), {
|
|
3910
|
+
size: unref(getIconSize),
|
|
3911
|
+
type: unref(isCopy) ? "check" : "copy",
|
|
3912
|
+
class: normalizeClass({ "lew-input-copy-btn-check": unref(isCopy) })
|
|
3913
|
+
}, null, 8, ["size", "type", "class"])
|
|
3914
|
+
])) : createCommentVNode("v-if", true),
|
|
3876
3915
|
withDirectives(createElementVNode("input", {
|
|
3877
3916
|
ref_key: "lewInputRef",
|
|
3878
3917
|
ref: lewInputRef,
|
|
@@ -11549,7 +11588,6 @@ const _sfc_main$v = defineComponent({
|
|
|
11549
11588
|
componentOptions.value.forEach((__e, i) => {
|
|
11550
11589
|
var _a2, _b;
|
|
11551
11590
|
if (_e.field.lastIndexOf(".") >= 0) {
|
|
11552
|
-
console.log(_e.field);
|
|
11553
11591
|
const _$fieldKey = (_a2 = _e.field) == null ? void 0 : _a2.substring(
|
|
11554
11592
|
_e.field.lastIndexOf(".") + 1
|
|
11555
11593
|
);
|
|
@@ -12612,7 +12650,6 @@ const _sfc_main$q = defineComponent({
|
|
|
12612
12650
|
keyword
|
|
12613
12651
|
});
|
|
12614
12652
|
}
|
|
12615
|
-
console.log(result);
|
|
12616
12653
|
state.options = result;
|
|
12617
12654
|
}
|
|
12618
12655
|
state.loading = false;
|
|
@@ -19974,7 +20011,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
19974
20011
|
LewEmpty,
|
|
19975
20012
|
emptyProps
|
|
19976
20013
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19977
|
-
var index$
|
|
20014
|
+
var index$6 = "";
|
|
19978
20015
|
const warning$2 = (e) => {
|
|
19979
20016
|
message({
|
|
19980
20017
|
type: "warning",
|
|
@@ -20092,7 +20129,7 @@ const setMessage = ({ type, e }) => {
|
|
|
20092
20129
|
}, e.duration || 3e3);
|
|
20093
20130
|
}, 10);
|
|
20094
20131
|
};
|
|
20095
|
-
var
|
|
20132
|
+
var LewMessage = {
|
|
20096
20133
|
name: "LewMessage",
|
|
20097
20134
|
warning: warning$2,
|
|
20098
20135
|
info: info$2,
|
|
@@ -20631,7 +20668,7 @@ var LewLoading = {
|
|
|
20631
20668
|
};
|
|
20632
20669
|
var directives = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20633
20670
|
__proto__: null,
|
|
20634
|
-
LewMessage
|
|
20671
|
+
LewMessage,
|
|
20635
20672
|
LewDialog: index$5,
|
|
20636
20673
|
dialogProps,
|
|
20637
20674
|
LewTooltip,
|
|
@@ -20665,4 +20702,4 @@ const install = function(Vue) {
|
|
|
20665
20702
|
var index = {
|
|
20666
20703
|
install
|
|
20667
20704
|
};
|
|
20668
|
-
export { LewAlert, LewAvatar, LewBackTop, index$4 as LewBacktop, LewBadge, LewBreadcrumb, LewButton, LewCascader, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, index$5 as LewDialog, LewDrawer, LewDropdown, LewEmpty, LewFlex, LewForm, script as LewIcon, LewInput, LewInputTag, LewLayout, LewLoading, LewMagicNumber, LewMagicText, LewMark, LewMenu,
|
|
20705
|
+
export { LewAlert, LewAvatar, LewBackTop, index$4 as LewBacktop, LewBadge, LewBreadcrumb, LewButton, LewCascader, LewCheckbox, LewCheckboxGroup, LewDate, LewDatePicker, LewDateRange, LewDateRangePicker, index$5 as LewDialog, LewDrawer, LewDropdown, LewEmpty, LewFlex, LewForm, script as LewIcon, LewInput, LewInputTag, LewLayout, LewLoading, LewMagicNumber, LewMagicText, LewMark, LewMenu, 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, emptyProps, 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 };
|