ll-plus 2.6.25 → 2.7.1
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/es/components/input/index.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +1 -1
- package/es/packages/components/input/src/input.vue2.mjs +17 -8
- package/es/packages/components/input/src/input.vue2.mjs.map +1 -1
- package/index.full.js +16 -7
- package/index.full.min.js +1 -1
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +1 -1
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +16 -7
- package/lib/components/input/index.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +1 -1
- package/lib/packages/components/input/src/input.vue2.js +16 -7
- package/lib/packages/components/input/src/input.vue2.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css/easy-cron.css +1 -1
- package/theme-chalk/css/index.css +1 -1
- package/types/packages/components/input/index.d.ts +1 -1
- package/types/packages/components/input/src/input.vue.d.ts +1 -1
|
@@ -45,7 +45,7 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
|
|
|
45
45
|
} & {}>;
|
|
46
46
|
innerValue: import("vue").Ref<string | number | undefined>;
|
|
47
47
|
inputRef: import("vue").Ref<any>;
|
|
48
|
-
allowClear: import("vue").Ref<
|
|
48
|
+
allowClear: import("vue").Ref<boolean>;
|
|
49
49
|
handleMouseOver: () => void;
|
|
50
50
|
handleMouseOut: (e: any) => void;
|
|
51
51
|
componentType: ({
|
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
44
|
} & {}>;
|
|
45
45
|
innerValue: import("vue").Ref<string | number | undefined>;
|
|
46
46
|
inputRef: import("vue").Ref<any>;
|
|
47
|
-
allowClear: import("vue").Ref<
|
|
47
|
+
allowClear: import("vue").Ref<boolean>;
|
|
48
48
|
handleMouseOver: () => void;
|
|
49
49
|
handleMouseOut: (e: any) => void;
|
|
50
50
|
componentType: ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watchEffect, computed, useAttrs, onMounted, resolveComponent, openBlock, createElementBlock, createBlock, resolveDynamicComponent,
|
|
1
|
+
import { defineComponent, ref, watchEffect, computed, useAttrs, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createBlock, resolveDynamicComponent, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createVNode } from 'vue';
|
|
2
2
|
import { Input } from 'ant-design-vue';
|
|
3
3
|
import '../../../utils/index.mjs';
|
|
4
4
|
import { inputProps } from './input.mjs';
|
|
@@ -14,13 +14,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
const props = __props;
|
|
15
15
|
const innerValue = ref("");
|
|
16
16
|
const inputRef = ref();
|
|
17
|
-
const allowClear = ref(
|
|
17
|
+
const allowClear = ref(false);
|
|
18
18
|
const handleMouseOver = () => {
|
|
19
19
|
if (props.allowClear) {
|
|
20
20
|
allowClear.value = true;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
const handleMouseOut = (e) => {
|
|
24
|
+
if (!props.allowClear) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (e.relatedTarget && (e.relatedTarget.classList.contains("ant-input-clear-icon") || e.relatedTarget.closest(".ant-input-clear-icon"))) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
allowClear.value = false;
|
|
24
31
|
};
|
|
25
32
|
watchEffect(() => {
|
|
26
33
|
if (props.value !== innerValue.value) {
|
|
@@ -58,15 +65,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
65
|
return openBlock(), createElementBlock(
|
|
59
66
|
"div",
|
|
60
67
|
{
|
|
68
|
+
class: normalizeClass(unref(bem).b()),
|
|
61
69
|
onMouseover: handleMouseOver,
|
|
62
70
|
onMouseout: handleMouseOut
|
|
63
71
|
},
|
|
64
72
|
[
|
|
65
73
|
(openBlock(), createBlock(resolveDynamicComponent(unref(componentType)), mergeProps({
|
|
66
74
|
ref_key: "inputRef",
|
|
67
|
-
ref: inputRef
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
ref: inputRef
|
|
76
|
+
}, computedAttrs.value, {
|
|
77
|
+
"allow-clear": props.allowClear ? allowClear.value : false
|
|
78
|
+
}), createSlots({
|
|
70
79
|
_: 2
|
|
71
80
|
/* DYNAMIC */
|
|
72
81
|
}, [
|
|
@@ -98,10 +107,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
107
|
]),
|
|
99
108
|
key: "1"
|
|
100
109
|
} : void 0
|
|
101
|
-
]), 1040, ["
|
|
110
|
+
]), 1040, ["allow-clear"]))
|
|
102
111
|
],
|
|
103
|
-
|
|
104
|
-
/* NEED_HYDRATION */
|
|
112
|
+
34
|
|
113
|
+
/* CLASS, NEED_HYDRATION */
|
|
105
114
|
);
|
|
106
115
|
};
|
|
107
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div @mouseover=\"handleMouseOver\" @mouseout=\"handleMouseOut\">\n <component\n :is=\"componentType\"\n ref=\"inputRef\"\n
|
|
1
|
+
{"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\" @mouseover=\"handleMouseOver\" @mouseout=\"handleMouseOut\">\n <component\n :is=\"componentType\"\n ref=\"inputRef\"\n v-bind=\"computedAttrs\"\n :allow-clear=\"props.allowClear ? allowClear : false\"\n >\n <template v-for=\"item in Object.keys($slots)\" :key=\"item\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"prefixIcon\" #prefix>\n <ll-icon :icon-name=\"prefixIcon\" class=\"prefix-icon\" />\n </template>\n <template v-if=\"suffixIcon\" #suffix>\n <ll-icon :icon-name=\"suffixIcon\" class=\"suffix-icon\" />\n </template>\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, useAttrs, watchEffect, onMounted } from 'vue'\nimport { Input } from 'ant-design-vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport { InputValue, inputProps } from './input'\n\ndefineOptions({ name: 'LlInput' })\n\nconst bem = createNamespace('input')\n\nconst props = defineProps(inputProps)\n\nconst innerValue = ref<InputValue>('')\n\nconst inputRef = ref()\n\nconst allowClear = ref(false)\n\n// 鼠标移入事件\nconst handleMouseOver = () => {\n if (props.allowClear) {\n allowClear.value = true\n }\n}\n\n// 鼠标移出事件\nconst handleMouseOut = (e: any) => {\n if (!props.allowClear) {\n return\n }\n if (\n e.relatedTarget &&\n (e.relatedTarget.classList.contains('ant-input-clear-icon') ||\n e.relatedTarget.closest('.ant-input-clear-icon'))\n ) {\n return\n }\n allowClear.value = false\n}\n\nwatchEffect(() => {\n if (props.value !== innerValue.value) {\n innerValue.value = props.value\n }\n})\n\nconst componentType = props.showPassword ? Input.Password : Input\n\nconst computedAttrs = computed(() => {\n const attrs = { ...useAttrs(), ...props }\n\n return attrs\n})\n\nconst focus = () => {\n inputRef.value.focus()\n}\n\n// 给图标阻止冒泡事件\nonMounted(() => {\n if (props.allowClear) {\n const clearIcon = inputRef.value?.$el.querySelector('.ant-input-clear-icon')\n if (clearIcon) {\n clearIcon.addEventListener('mouseover', (e: any) => {\n e.stopPropagation()\n allowClear.value = true\n })\n clearIcon.addEventListener('mouseout', (e: any) => {\n if (e.relatedTarget && inputRef.value.$el.contains(e.relatedTarget)) {\n return\n }\n allowClear.value = false\n })\n }\n }\n})\n\ndefineExpose({ focus })\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BA,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAEnC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,UAAA,GAAa,IAAgB,EAAE,CAAA,CAAA;AAErC,IAA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AAA;AACpB,QAAA,MAAM,SAAY,GAAA,QAAA,CAAS,KAAO,EAAA,GAAA,CAAI,cAAc,uBAAuB,CAAA,CAAA;AAC3E,QAAA,IAAI,SAAW,EAAA;AACb,UAAU,SAAA,CAAA,gBAAA,CAAiB,WAAa,EAAA,CAAC,CAAW,KAAA;AAClD,YAAA,CAAA,CAAE,eAAgB,EAAA,CAAA;AAClB,YAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,WACpB,CAAA,CAAA;AACD,UAAU,SAAA,CAAA,gBAAA,CAAiB,UAAY,EAAA,CAAC,CAAW,KAAA;AACjD,YAAI,IAAA,CAAA,CAAE,iBAAiB,QAAS,CAAA,KAAA,CAAM,IAAI,QAAS,CAAA,CAAA,CAAE,aAAa,CAAG,EAAA;AACnE,cAAA,OAAA;AAAA,aACF;AACA,YAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,WACpB,CAAA,CAAA;AAAA,SACH;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAED,IAAa,QAAA,CAAA,EAAE,OAAO,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.full.js
CHANGED
|
@@ -62850,13 +62850,20 @@
|
|
|
62850
62850
|
const props = __props;
|
|
62851
62851
|
const innerValue = require$$0.ref("");
|
|
62852
62852
|
const inputRef = require$$0.ref();
|
|
62853
|
-
const allowClear = require$$0.ref(
|
|
62853
|
+
const allowClear = require$$0.ref(false);
|
|
62854
62854
|
const handleMouseOver = () => {
|
|
62855
62855
|
if (props.allowClear) {
|
|
62856
62856
|
allowClear.value = true;
|
|
62857
62857
|
}
|
|
62858
62858
|
};
|
|
62859
62859
|
const handleMouseOut = (e) => {
|
|
62860
|
+
if (!props.allowClear) {
|
|
62861
|
+
return;
|
|
62862
|
+
}
|
|
62863
|
+
if (e.relatedTarget && (e.relatedTarget.classList.contains("ant-input-clear-icon") || e.relatedTarget.closest(".ant-input-clear-icon"))) {
|
|
62864
|
+
return;
|
|
62865
|
+
}
|
|
62866
|
+
allowClear.value = false;
|
|
62860
62867
|
};
|
|
62861
62868
|
require$$0.watchEffect(() => {
|
|
62862
62869
|
if (props.value !== innerValue.value) {
|
|
@@ -62894,15 +62901,17 @@
|
|
|
62894
62901
|
return require$$0.openBlock(), require$$0.createElementBlock(
|
|
62895
62902
|
"div",
|
|
62896
62903
|
{
|
|
62904
|
+
class: require$$0.normalizeClass(require$$0.unref(bem).b()),
|
|
62897
62905
|
onMouseover: handleMouseOver,
|
|
62898
62906
|
onMouseout: handleMouseOut
|
|
62899
62907
|
},
|
|
62900
62908
|
[
|
|
62901
62909
|
(require$$0.openBlock(), require$$0.createBlock(require$$0.resolveDynamicComponent(require$$0.unref(componentType)), require$$0.mergeProps({
|
|
62902
62910
|
ref_key: "inputRef",
|
|
62903
|
-
ref: inputRef
|
|
62904
|
-
|
|
62905
|
-
|
|
62911
|
+
ref: inputRef
|
|
62912
|
+
}, computedAttrs.value, {
|
|
62913
|
+
"allow-clear": props.allowClear ? allowClear.value : false
|
|
62914
|
+
}), require$$0.createSlots({
|
|
62906
62915
|
_: 2
|
|
62907
62916
|
/* DYNAMIC */
|
|
62908
62917
|
}, [
|
|
@@ -62934,10 +62943,10 @@
|
|
|
62934
62943
|
]),
|
|
62935
62944
|
key: "1"
|
|
62936
62945
|
} : void 0
|
|
62937
|
-
]), 1040, ["
|
|
62946
|
+
]), 1040, ["allow-clear"]))
|
|
62938
62947
|
],
|
|
62939
|
-
|
|
62940
|
-
/* NEED_HYDRATION */
|
|
62948
|
+
34
|
|
62949
|
+
/* CLASS, NEED_HYDRATION */
|
|
62941
62950
|
);
|
|
62942
62951
|
};
|
|
62943
62952
|
}
|