element-pe 1.0.5 → 1.0.6
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +632 -1287
- package/dist/index.full.min.js +9 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +630 -1289
- package/es/component.d.ts +24 -2
- package/es/components/affix/index.js +1 -1
- package/es/components/autocomplete/index.d.ts +4 -4
- package/es/components/autocomplete/src/index.vue.d.ts +2 -2
- package/es/components/carousel/index.d.ts +2 -2
- package/es/components/carousel/src/main.vue.d.ts +2 -2
- package/es/components/cascader/index.d.ts +2 -2
- package/es/components/cascader/src/index.vue.d.ts +1 -1
- package/es/components/checkbox/index.d.ts +6 -6
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/es/components/color-picker/index.d.ts +2 -2
- package/es/components/color-picker/src/components/alpha-slider.vue.d.ts +1 -1
- package/es/components/color-picker/src/components/hue-slider.vue.d.ts +1 -1
- package/es/components/color-picker/src/index.vue.d.ts +1 -1
- package/es/components/descriptions/index.d.ts +8 -8
- package/es/components/descriptions/src/description-item.d.ts +2 -2
- package/es/components/descriptions/src/descriptions-cell.d.ts +1 -1
- package/es/components/descriptions/src/index.vue.d.ts +4 -4
- package/es/components/drawer/index.d.ts +6 -6
- package/es/components/drawer/src/index.vue.d.ts +3 -3
- package/es/components/dropdown/index.d.ts +2 -2
- package/es/components/dropdown/src/dropdown.vue.d.ts +2 -2
- package/es/components/form/index.js +2 -2
- package/es/components/icon/index.d.ts +1 -1
- package/es/components/icon/src/icon.vue.d.ts +1 -1
- package/es/components/image/index.d.ts +3 -3
- package/es/components/image/index.js +2 -3
- package/es/components/image/src/image.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +3 -3
- package/es/components/image-viewer/index.d.ts +28 -104
- package/es/components/image-viewer/index.js +60 -61
- package/es/components/image-viewer/src/image-viewer.d.ts +14 -0
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +55 -0
- package/es/components/input/index.d.ts +116 -360
- package/es/components/input/index.js +216 -209
- package/es/components/input/src/calc-textarea-height.d.ts +6 -0
- package/es/components/input/src/input.d.ts +46 -0
- package/es/components/input/src/input.vue.d.ts +162 -0
- package/es/components/input-number/index.d.ts +2 -2
- package/es/components/input-number/src/index.vue.d.ts +1 -1
- package/es/components/menu/index.d.ts +7 -3
- package/es/components/menu/index.js +8 -3
- package/es/components/menu/src/menu.d.ts +8 -3
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/progress/index.js +0 -1
- package/es/components/radio/index.d.ts +2 -2
- package/es/components/radio/src/radio.vue.d.ts +2 -2
- package/es/components/rate/index.js +1 -1
- package/es/components/row/index.d.ts +4 -4
- package/es/components/row/src/row.d.ts +2 -2
- package/es/components/scrollbar/index.d.ts +4 -4
- package/es/components/scrollbar/src/index.vue.d.ts +2 -2
- package/es/components/select/index.d.ts +3 -3
- package/es/components/select/src/select.vue.d.ts +3 -3
- package/es/components/select-v2/index.d.ts +6 -6
- package/es/components/select-v2/index.js +2 -0
- package/es/components/select-v2/src/select.vue.d.ts +3 -3
- package/es/components/slider/index.d.ts +4 -4
- package/es/components/slider/src/button.vue.d.ts +2 -2
- package/es/components/slider/src/index.vue.d.ts +2 -2
- package/es/components/space/index.d.ts +2 -2
- package/es/components/space/src/space.d.ts +2 -2
- package/es/components/steps/index.d.ts +2 -2
- package/es/components/steps/src/index.vue.d.ts +2 -2
- package/es/components/table/index.d.ts +4 -4
- package/es/components/table/index.js +17 -9
- package/es/components/table/src/table.vue.d.ts +4 -4
- package/es/components/tag/index.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +4 -4
- package/es/components/timeline/src/item.vue.d.ts +2 -2
- package/es/components/tree/index.js +1 -1
- package/es/components/tree-v2/index.d.ts +1 -1
- package/es/components/tree-v2/index.js +2 -24
- package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/es/components/upload/index.d.ts +4 -4
- package/es/components/upload/src/index.vue.d.ts +2 -2
- package/es/components/upload/src/upload.vue.d.ts +2 -2
- package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/scrollbar.d.ts +1 -1
- package/es/utils/dom.d.ts +5 -5
- package/es/utils/dom.js +29 -36
- package/es/utils/props.d.ts +2 -2
- package/es/utils/props.js +15 -7
- package/es/utils/util.d.ts +2 -2
- package/es/utils/util.js +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/component.d.ts +24 -2
- package/lib/components/affix/index.js +1 -1
- package/lib/components/autocomplete/index.d.ts +4 -4
- package/lib/components/autocomplete/src/index.vue.d.ts +2 -2
- package/lib/components/carousel/index.d.ts +2 -2
- package/lib/components/carousel/src/main.vue.d.ts +2 -2
- package/lib/components/cascader/index.d.ts +2 -2
- package/lib/components/cascader/src/index.vue.d.ts +1 -1
- package/lib/components/checkbox/index.d.ts +6 -6
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/lib/components/color-picker/index.d.ts +2 -2
- package/lib/components/color-picker/src/components/alpha-slider.vue.d.ts +1 -1
- package/lib/components/color-picker/src/components/hue-slider.vue.d.ts +1 -1
- package/lib/components/color-picker/src/index.vue.d.ts +1 -1
- package/lib/components/descriptions/index.d.ts +8 -8
- package/lib/components/descriptions/src/description-item.d.ts +2 -2
- package/lib/components/descriptions/src/descriptions-cell.d.ts +1 -1
- package/lib/components/descriptions/src/index.vue.d.ts +4 -4
- package/lib/components/drawer/index.d.ts +6 -6
- package/lib/components/drawer/src/index.vue.d.ts +3 -3
- package/lib/components/dropdown/index.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown.vue.d.ts +2 -2
- package/lib/components/form/index.js +2 -2
- package/lib/components/icon/index.d.ts +1 -1
- package/lib/components/icon/src/icon.vue.d.ts +1 -1
- package/lib/components/image/index.d.ts +3 -3
- package/lib/components/image/index.js +2 -3
- package/lib/components/image/src/image.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +3 -3
- package/lib/components/image-viewer/index.d.ts +28 -104
- package/lib/components/image-viewer/index.js +61 -60
- package/lib/components/image-viewer/src/image-viewer.d.ts +14 -0
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +55 -0
- package/lib/components/input/index.d.ts +116 -360
- package/lib/components/input/index.js +215 -206
- package/lib/components/input/src/calc-textarea-height.d.ts +6 -0
- package/lib/components/input/src/input.d.ts +46 -0
- package/lib/components/input/src/input.vue.d.ts +162 -0
- package/lib/components/input-number/index.d.ts +2 -2
- package/lib/components/input-number/src/index.vue.d.ts +1 -1
- package/lib/components/menu/index.d.ts +7 -3
- package/lib/components/menu/index.js +8 -3
- package/lib/components/menu/src/menu.d.ts +8 -3
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/progress/index.js +0 -1
- package/lib/components/radio/index.d.ts +2 -2
- package/lib/components/radio/src/radio.vue.d.ts +2 -2
- package/lib/components/rate/index.js +1 -1
- package/lib/components/row/index.d.ts +4 -4
- package/lib/components/row/src/row.d.ts +2 -2
- package/lib/components/scrollbar/index.d.ts +4 -4
- package/lib/components/scrollbar/src/index.vue.d.ts +2 -2
- package/lib/components/select/index.d.ts +3 -3
- package/lib/components/select/src/select.vue.d.ts +3 -3
- package/lib/components/select-v2/index.d.ts +6 -6
- package/lib/components/select-v2/index.js +2 -0
- package/lib/components/select-v2/src/select.vue.d.ts +3 -3
- package/lib/components/slider/index.d.ts +4 -4
- package/lib/components/slider/src/button.vue.d.ts +2 -2
- package/lib/components/slider/src/index.vue.d.ts +2 -2
- package/lib/components/space/index.d.ts +2 -2
- package/lib/components/space/src/space.d.ts +2 -2
- package/lib/components/steps/index.d.ts +2 -2
- package/lib/components/steps/src/index.vue.d.ts +2 -2
- package/lib/components/table/index.d.ts +4 -4
- package/lib/components/table/index.js +17 -9
- package/lib/components/table/src/table.vue.d.ts +4 -4
- package/lib/components/tag/index.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +4 -4
- package/lib/components/timeline/src/item.vue.d.ts +2 -2
- package/lib/components/tree/index.js +1 -1
- package/lib/components/tree-v2/index.d.ts +1 -1
- package/lib/components/tree-v2/index.js +2 -24
- package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
- package/lib/components/upload/index.d.ts +4 -4
- package/lib/components/upload/src/index.vue.d.ts +2 -2
- package/lib/components/upload/src/upload.vue.d.ts +2 -2
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +1 -1
- package/lib/utils/dom.d.ts +5 -5
- package/lib/utils/dom.js +29 -36
- package/lib/utils/props.d.ts +2 -2
- package/lib/utils/props.js +15 -7
- package/lib/utils/util.d.ts +2 -2
- package/lib/utils/util.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -2
- package/packages/components/affix/src/affix.vue +1 -1
- package/packages/components/color-picker/src/index.vue +1 -1
- package/packages/components/form/__tests__/form.spec.ts +1 -1
- package/packages/components/form/src/form-item.vue +2 -2
- package/packages/components/image/src/image.ts +3 -3
- package/packages/components/image/src/image.vue +1 -1
- package/packages/components/image-viewer/__tests__/image-viewer.spec.ts +1 -1
- package/packages/components/image-viewer/index.ts +5 -10
- package/packages/components/image-viewer/src/image-viewer.ts +32 -0
- package/packages/components/image-viewer/src/{index.vue → image-viewer.vue} +73 -82
- package/packages/components/input/__tests__/input.spec.ts +7 -7
- package/packages/components/input/index.ts +5 -10
- package/packages/components/input/src/{calcTextareaHeight.ts → calc-textarea-height.ts} +9 -7
- package/packages/components/input/src/input.ts +100 -0
- package/packages/components/input/src/{index.vue → input.vue} +135 -239
- package/packages/components/menu/src/menu.ts +10 -3
- package/packages/components/progress/src/index.vue +0 -1
- package/packages/components/rate/src/index.vue +1 -1
- package/packages/components/select-v2/src/useSelect.ts +2 -0
- package/packages/components/space/__tests__/space.spec.ts +1 -1
- package/packages/components/switch/__tests__/switch.spec.ts +1 -1
- package/packages/components/table/src/store/tree.ts +18 -3
- package/packages/components/table/src/table-body/render-helper.ts +1 -1
- package/packages/components/table/src/table-column/index.ts +4 -1
- package/packages/components/table/src/table-layout.ts +2 -2
- package/packages/components/table/src/util.ts +1 -1
- package/packages/components/tree/src/model/node.ts +1 -1
- package/packages/element-plus/package.json +3 -2
- package/packages/element-plus/version.ts +1 -1
- package/packages/theme-chalk/package.json +1 -2
- package/packages/theme-chalk/src/message-box.scss +1 -0
- package/packages/utils/dist/es/dom.d.ts +5 -5
- package/packages/utils/dist/es/dom.js +29 -36
- package/packages/utils/dist/es/props.d.ts +2 -2
- package/packages/utils/dist/es/props.js +15 -7
- package/packages/utils/dist/es/util.d.ts +2 -2
- package/packages/utils/dist/es/util.js +3 -3
- package/packages/utils/dist/lib/dom.d.ts +5 -5
- package/packages/utils/dist/lib/dom.js +29 -36
- package/packages/utils/dist/lib/props.d.ts +2 -2
- package/packages/utils/dist/lib/props.js +15 -7
- package/packages/utils/dist/lib/util.d.ts +2 -2
- package/packages/utils/dist/lib/util.js +2 -2
- package/packages/utils/dom.ts +34 -41
- package/packages/utils/props.ts +27 -11
- package/packages/utils/tests/dom.spec.ts +183 -0
- package/packages/utils/util.ts +8 -9
- package/tags.json +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/message-box.scss +1 -0
- package/web-types.json +1 -1
- package/es/components/image-viewer/src/index.vue.d.ts +0 -67
- package/es/components/input/src/calcTextareaHeight.d.ts +0 -6
- package/es/components/input/src/index.vue.d.ts +0 -197
- package/lib/components/image-viewer/src/index.vue.d.ts +0 -67
- package/lib/components/input/src/calcTextareaHeight.d.ts +0 -6
- package/lib/components/input/src/index.vue.d.ts +0 -197
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var withInstall = require('element-pe/lib/utils/with-install');
|
|
5
6
|
var vue = require('vue');
|
|
6
7
|
var tokens = require('element-pe/lib/tokens');
|
|
7
8
|
var hooks = require('element-pe/lib/hooks');
|
|
@@ -9,13 +10,14 @@ var constants = require('element-pe/lib/utils/constants');
|
|
|
9
10
|
var util = require('element-pe/lib/utils/util');
|
|
10
11
|
var isServer = require('element-pe/lib/utils/isServer');
|
|
11
12
|
var isDef = require('element-pe/lib/utils/isDef');
|
|
12
|
-
var
|
|
13
|
+
var shared = require('@vue/shared');
|
|
14
|
+
var props = require('element-pe/lib/utils/props');
|
|
13
15
|
|
|
14
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
17
|
|
|
16
18
|
var isServer__default = /*#__PURE__*/_interopDefaultLegacy(isServer);
|
|
17
19
|
|
|
18
|
-
let hiddenTextarea;
|
|
20
|
+
let hiddenTextarea = void 0;
|
|
19
21
|
const HIDDEN_STYLE = `
|
|
20
22
|
height:0 !important;
|
|
21
23
|
visibility:hidden !important;
|
|
@@ -50,7 +52,7 @@ function calculateNodeStyling(targetElement) {
|
|
|
50
52
|
const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
|
|
51
53
|
return { contextStyle, paddingSize, borderSize, boxSizing };
|
|
52
54
|
}
|
|
53
|
-
function calcTextareaHeight(targetElement, minRows = 1, maxRows
|
|
55
|
+
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
|
54
56
|
var _a;
|
|
55
57
|
if (!hiddenTextarea) {
|
|
56
58
|
hiddenTextarea = document.createElement("textarea");
|
|
@@ -68,7 +70,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
68
70
|
}
|
|
69
71
|
hiddenTextarea.value = "";
|
|
70
72
|
const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
71
|
-
if (minRows
|
|
73
|
+
if (util.isNumber(minRows)) {
|
|
72
74
|
let minHeight = singleRowHeight * minRows;
|
|
73
75
|
if (boxSizing === "border-box") {
|
|
74
76
|
minHeight = minHeight + paddingSize + borderSize;
|
|
@@ -76,7 +78,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
76
78
|
height = Math.max(minHeight, height);
|
|
77
79
|
result.minHeight = `${minHeight}px`;
|
|
78
80
|
}
|
|
79
|
-
if (maxRows
|
|
81
|
+
if (util.isNumber(maxRows)) {
|
|
80
82
|
let maxHeight = singleRowHeight * maxRows;
|
|
81
83
|
if (boxSizing === "border-box") {
|
|
82
84
|
maxHeight = maxHeight + paddingSize + borderSize;
|
|
@@ -85,13 +87,118 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
85
87
|
}
|
|
86
88
|
result.height = `${height}px`;
|
|
87
89
|
(_a = hiddenTextarea.parentNode) == null ? void 0 : _a.removeChild(hiddenTextarea);
|
|
88
|
-
hiddenTextarea =
|
|
90
|
+
hiddenTextarea = void 0;
|
|
89
91
|
return result;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
var __defProp = Object.defineProperty;
|
|
94
|
+
var __defProp$1 = Object.defineProperty;
|
|
93
95
|
var __defProps = Object.defineProperties;
|
|
94
96
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
97
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
98
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
99
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
100
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
101
|
+
var __spreadValues$1 = (a, b) => {
|
|
102
|
+
for (var prop in b || (b = {}))
|
|
103
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
104
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
105
|
+
if (__getOwnPropSymbols$1)
|
|
106
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
107
|
+
if (__propIsEnum$1.call(b, prop))
|
|
108
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
109
|
+
}
|
|
110
|
+
return a;
|
|
111
|
+
};
|
|
112
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
113
|
+
const inputProps = props.buildProps(__spreadProps(__spreadValues$1({}, hooks.useFormItemProps), {
|
|
114
|
+
modelValue: {
|
|
115
|
+
type: props.definePropType(void 0),
|
|
116
|
+
default: ""
|
|
117
|
+
},
|
|
118
|
+
type: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: "text"
|
|
121
|
+
},
|
|
122
|
+
resize: {
|
|
123
|
+
type: String,
|
|
124
|
+
values: ["none", "both", "horizontal", "vertical"]
|
|
125
|
+
},
|
|
126
|
+
autosize: {
|
|
127
|
+
type: props.definePropType([Boolean, Object]),
|
|
128
|
+
default: false
|
|
129
|
+
},
|
|
130
|
+
autocomplete: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: "off"
|
|
133
|
+
},
|
|
134
|
+
placeholder: {
|
|
135
|
+
type: String
|
|
136
|
+
},
|
|
137
|
+
form: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: ""
|
|
140
|
+
},
|
|
141
|
+
readonly: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
clearable: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
},
|
|
149
|
+
showPassword: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: false
|
|
152
|
+
},
|
|
153
|
+
showWordLimit: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: false
|
|
156
|
+
},
|
|
157
|
+
suffixIcon: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: ""
|
|
160
|
+
},
|
|
161
|
+
prefixIcon: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: ""
|
|
164
|
+
},
|
|
165
|
+
label: {
|
|
166
|
+
type: String
|
|
167
|
+
},
|
|
168
|
+
tabindex: {
|
|
169
|
+
type: [Number, String]
|
|
170
|
+
},
|
|
171
|
+
validateEvent: {
|
|
172
|
+
type: Boolean,
|
|
173
|
+
default: true
|
|
174
|
+
},
|
|
175
|
+
inputStyle: {
|
|
176
|
+
type: props.definePropType([Object, Array, String]),
|
|
177
|
+
default: () => props.mutable({})
|
|
178
|
+
},
|
|
179
|
+
maxlength: {
|
|
180
|
+
type: [Number, String]
|
|
181
|
+
},
|
|
182
|
+
widget: {
|
|
183
|
+
type: String
|
|
184
|
+
}
|
|
185
|
+
}));
|
|
186
|
+
const inputEmits = {
|
|
187
|
+
[constants.UPDATE_MODEL_EVENT]: (value) => shared.isString(value),
|
|
188
|
+
input: (value) => shared.isString(value),
|
|
189
|
+
change: (value) => shared.isString(value),
|
|
190
|
+
focus: (evt) => evt instanceof FocusEvent,
|
|
191
|
+
blur: (evt) => evt instanceof FocusEvent,
|
|
192
|
+
clear: () => true,
|
|
193
|
+
mouseleave: (evt) => evt instanceof MouseEvent,
|
|
194
|
+
mouseenter: (evt) => evt instanceof MouseEvent,
|
|
195
|
+
keydown: (evt) => evt instanceof KeyboardEvent,
|
|
196
|
+
compositionstart: (evt) => evt instanceof CompositionEvent,
|
|
197
|
+
compositionupdate: (evt) => evt instanceof CompositionEvent,
|
|
198
|
+
compositionend: (evt) => evt instanceof CompositionEvent
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var __defProp = Object.defineProperty;
|
|
95
202
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
96
203
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
97
204
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -107,7 +214,6 @@ var __spreadValues = (a, b) => {
|
|
|
107
214
|
}
|
|
108
215
|
return a;
|
|
109
216
|
};
|
|
110
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
111
217
|
const PENDANT_MAP = {
|
|
112
218
|
suffix: "append",
|
|
113
219
|
prefix: "prepend"
|
|
@@ -115,139 +221,40 @@ const PENDANT_MAP = {
|
|
|
115
221
|
var script = vue.defineComponent({
|
|
116
222
|
name: "ElInput",
|
|
117
223
|
inheritAttrs: false,
|
|
118
|
-
props:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
default: ""
|
|
122
|
-
},
|
|
123
|
-
type: {
|
|
124
|
-
type: String,
|
|
125
|
-
default: "text"
|
|
126
|
-
},
|
|
127
|
-
size: {
|
|
128
|
-
type: String,
|
|
129
|
-
validator: validators.isValidComponentSize
|
|
130
|
-
},
|
|
131
|
-
resize: {
|
|
132
|
-
type: String,
|
|
133
|
-
validator: (val) => ["none", "both", "horizontal", "vertical"].includes(val)
|
|
134
|
-
},
|
|
135
|
-
autosize: {
|
|
136
|
-
type: [Boolean, Object],
|
|
137
|
-
default: false
|
|
138
|
-
},
|
|
139
|
-
autocomplete: {
|
|
140
|
-
type: String,
|
|
141
|
-
default: "off"
|
|
142
|
-
},
|
|
143
|
-
placeholder: {
|
|
144
|
-
type: String
|
|
145
|
-
},
|
|
146
|
-
form: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: ""
|
|
149
|
-
},
|
|
150
|
-
disabled: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
default: false
|
|
153
|
-
},
|
|
154
|
-
readonly: {
|
|
155
|
-
type: Boolean,
|
|
156
|
-
default: false
|
|
157
|
-
},
|
|
158
|
-
clearable: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
default: false
|
|
161
|
-
},
|
|
162
|
-
showPassword: {
|
|
163
|
-
type: Boolean,
|
|
164
|
-
default: false
|
|
165
|
-
},
|
|
166
|
-
showWordLimit: {
|
|
167
|
-
type: Boolean,
|
|
168
|
-
default: false
|
|
169
|
-
},
|
|
170
|
-
suffixIcon: {
|
|
171
|
-
type: String,
|
|
172
|
-
default: ""
|
|
173
|
-
},
|
|
174
|
-
prefixIcon: {
|
|
175
|
-
type: String,
|
|
176
|
-
default: ""
|
|
177
|
-
},
|
|
178
|
-
label: {
|
|
179
|
-
type: String
|
|
180
|
-
},
|
|
181
|
-
tabindex: {
|
|
182
|
-
type: [Number, String]
|
|
183
|
-
},
|
|
184
|
-
validateEvent: {
|
|
185
|
-
type: Boolean,
|
|
186
|
-
default: true
|
|
187
|
-
},
|
|
188
|
-
inputStyle: {
|
|
189
|
-
type: Object,
|
|
190
|
-
default: () => ({})
|
|
191
|
-
},
|
|
192
|
-
maxlength: {
|
|
193
|
-
type: [Number, String]
|
|
194
|
-
},
|
|
195
|
-
widget: {
|
|
196
|
-
type: String
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
emits: [
|
|
200
|
-
constants.UPDATE_MODEL_EVENT,
|
|
201
|
-
"input",
|
|
202
|
-
"change",
|
|
203
|
-
"focus",
|
|
204
|
-
"blur",
|
|
205
|
-
"clear",
|
|
206
|
-
"mouseleave",
|
|
207
|
-
"mouseenter",
|
|
208
|
-
"keydown",
|
|
209
|
-
"compositionstart",
|
|
210
|
-
"compositionupdate",
|
|
211
|
-
"compositionend"
|
|
212
|
-
],
|
|
213
|
-
setup(props, ctx) {
|
|
224
|
+
props: inputProps,
|
|
225
|
+
emits: inputEmits,
|
|
226
|
+
setup(props, { slots, emit, attrs: rawAttrs }) {
|
|
214
227
|
const instance = vue.getCurrentInstance();
|
|
215
228
|
const attrs = hooks.useAttrs();
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const input = vue.ref(
|
|
220
|
-
const textarea = vue.ref(
|
|
229
|
+
const elForm = vue.inject(tokens.elFormKey, void 0);
|
|
230
|
+
const elFormItem = vue.inject(tokens.elFormItemKey, void 0);
|
|
231
|
+
const { size: inputSize, disabled: inputDisabled } = hooks.useFormItem({});
|
|
232
|
+
const input = vue.ref();
|
|
233
|
+
const textarea = vue.ref();
|
|
221
234
|
const focused = vue.ref(false);
|
|
222
235
|
const hovering = vue.ref(false);
|
|
223
236
|
const isComposing = vue.ref(false);
|
|
224
237
|
const passwordVisible = vue.ref(false);
|
|
225
238
|
const _textareaCalcStyle = vue.shallowRef(props.inputStyle);
|
|
226
239
|
const inputOrTextarea = vue.computed(() => input.value || textarea.value);
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
240
|
+
const needStatusIcon = vue.computed(() => {
|
|
241
|
+
var _a;
|
|
242
|
+
return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
|
|
243
|
+
});
|
|
244
|
+
const validateState = vue.computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
|
|
230
245
|
const validateIcon = vue.computed(() => constants.VALIDATE_STATE_MAP[validateState.value]);
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
246
|
+
const containerStyle = vue.computed(() => rawAttrs.style);
|
|
247
|
+
const computedTextareaStyle = vue.computed(() => [
|
|
248
|
+
props.inputStyle,
|
|
249
|
+
_textareaCalcStyle.value,
|
|
250
|
+
{ resize: props.resize }
|
|
251
|
+
]);
|
|
235
252
|
const nativeInputValue = vue.computed(() => props.modelValue === null || props.modelValue === void 0 ? "" : String(props.modelValue));
|
|
236
|
-
const showClear = vue.computed(() =>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
});
|
|
242
|
-
const isWordLimitVisible = vue.computed(() => {
|
|
243
|
-
return props.showWordLimit && props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword;
|
|
244
|
-
});
|
|
245
|
-
const textLength = vue.computed(() => {
|
|
246
|
-
return Array.from(nativeInputValue.value).length;
|
|
247
|
-
});
|
|
248
|
-
const inputExceed = vue.computed(() => {
|
|
249
|
-
return isWordLimitVisible.value && textLength.value > Number(props.maxlength);
|
|
250
|
-
});
|
|
253
|
+
const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
|
|
254
|
+
const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !props.readonly && (!!nativeInputValue.value || focused.value));
|
|
255
|
+
const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
|
|
256
|
+
const textLength = vue.computed(() => Array.from(nativeInputValue.value).length);
|
|
257
|
+
const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
|
|
251
258
|
const resizeTextarea = () => {
|
|
252
259
|
const { type, autosize } = props;
|
|
253
260
|
if (isServer__default["default"] || type !== "textarea")
|
|
@@ -270,12 +277,14 @@ var script = vue.defineComponent({
|
|
|
270
277
|
};
|
|
271
278
|
const calcIconOffset = (place) => {
|
|
272
279
|
const { el } = instance.vnode;
|
|
280
|
+
if (!el)
|
|
281
|
+
return;
|
|
273
282
|
const elList = Array.from(el.querySelectorAll(`.el-input__${place}`));
|
|
274
283
|
const target = elList.find((item) => item.parentNode === el);
|
|
275
284
|
if (!target)
|
|
276
285
|
return;
|
|
277
286
|
const pendant = PENDANT_MAP[place];
|
|
278
|
-
if (
|
|
287
|
+
if (slots[pendant]) {
|
|
279
288
|
target.style.transform = `translateX(${place === "suffix" ? "-" : ""}${el.querySelector(`.el-input-group__${pendant}`).offsetWidth}px)`;
|
|
280
289
|
} else {
|
|
281
290
|
target.removeAttribute("style");
|
|
@@ -295,77 +304,76 @@ var script = vue.defineComponent({
|
|
|
295
304
|
const sliceIndex = inputExceed.value ? textLength.value : props.maxlength;
|
|
296
305
|
value = Array.from(value).slice(0, Number(sliceIndex)).join("");
|
|
297
306
|
}
|
|
298
|
-
|
|
299
|
-
|
|
307
|
+
emit(constants.UPDATE_MODEL_EVENT, value);
|
|
308
|
+
emit("input", value);
|
|
300
309
|
vue.nextTick(setNativeInputValue);
|
|
301
310
|
};
|
|
302
311
|
const handleChange = (event) => {
|
|
303
|
-
|
|
312
|
+
emit("change", event.target.value);
|
|
304
313
|
};
|
|
305
314
|
const focus = () => {
|
|
306
315
|
vue.nextTick(() => {
|
|
307
|
-
|
|
316
|
+
var _a;
|
|
317
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.focus();
|
|
308
318
|
});
|
|
309
319
|
};
|
|
310
320
|
const blur = () => {
|
|
311
|
-
|
|
321
|
+
var _a;
|
|
322
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.blur();
|
|
312
323
|
};
|
|
313
324
|
const handleFocus = (event) => {
|
|
314
325
|
focused.value = true;
|
|
315
|
-
|
|
326
|
+
emit("focus", event);
|
|
316
327
|
};
|
|
317
328
|
const handleBlur = (event) => {
|
|
318
329
|
var _a;
|
|
319
330
|
focused.value = false;
|
|
320
|
-
|
|
331
|
+
emit("blur", event);
|
|
321
332
|
if (props.validateEvent) {
|
|
322
|
-
(_a = elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur");
|
|
333
|
+
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur");
|
|
323
334
|
}
|
|
324
335
|
};
|
|
325
336
|
const select = () => {
|
|
326
|
-
|
|
337
|
+
var _a;
|
|
338
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.select();
|
|
327
339
|
};
|
|
328
340
|
const handleCompositionStart = (event) => {
|
|
329
|
-
|
|
341
|
+
emit("compositionstart", event);
|
|
330
342
|
isComposing.value = true;
|
|
331
343
|
};
|
|
332
344
|
const handleCompositionUpdate = (event) => {
|
|
333
345
|
var _a;
|
|
334
|
-
|
|
346
|
+
emit("compositionupdate", event);
|
|
335
347
|
const text = (_a = event.target) == null ? void 0 : _a.value;
|
|
336
348
|
const lastCharacter = text[text.length - 1] || "";
|
|
337
349
|
isComposing.value = !isDef.isKorean(lastCharacter);
|
|
338
350
|
};
|
|
339
351
|
const handleCompositionEnd = (event) => {
|
|
340
|
-
|
|
352
|
+
emit("compositionend", event);
|
|
341
353
|
if (isComposing.value) {
|
|
342
354
|
isComposing.value = false;
|
|
343
355
|
handleInput(event);
|
|
344
356
|
}
|
|
345
357
|
};
|
|
346
358
|
const clear = () => {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
359
|
+
emit(constants.UPDATE_MODEL_EVENT, "");
|
|
360
|
+
emit("change", "");
|
|
361
|
+
emit("clear");
|
|
362
|
+
emit("input", "");
|
|
351
363
|
};
|
|
352
364
|
const handlePasswordVisible = () => {
|
|
353
365
|
passwordVisible.value = !passwordVisible.value;
|
|
354
366
|
focus();
|
|
355
367
|
};
|
|
356
|
-
const
|
|
357
|
-
return ctx.slots.suffix || props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || validateState.value && needStatusIcon.value;
|
|
358
|
-
};
|
|
368
|
+
const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
|
|
359
369
|
vue.watch(() => props.modelValue, () => {
|
|
360
370
|
var _a;
|
|
361
371
|
vue.nextTick(resizeTextarea);
|
|
362
372
|
if (props.validateEvent) {
|
|
363
|
-
(_a = elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change");
|
|
373
|
+
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change");
|
|
364
374
|
}
|
|
365
375
|
});
|
|
366
|
-
vue.watch(nativeInputValue, () =>
|
|
367
|
-
setNativeInputValue();
|
|
368
|
-
});
|
|
376
|
+
vue.watch(nativeInputValue, () => setNativeInputValue());
|
|
369
377
|
vue.watch(() => props.type, () => {
|
|
370
378
|
vue.nextTick(() => {
|
|
371
379
|
setNativeInputValue();
|
|
@@ -381,16 +389,16 @@ var script = vue.defineComponent({
|
|
|
381
389
|
vue.onUpdated(() => {
|
|
382
390
|
vue.nextTick(updateIconOffset);
|
|
383
391
|
});
|
|
384
|
-
const onMouseLeave = (
|
|
392
|
+
const onMouseLeave = (evt) => {
|
|
385
393
|
hovering.value = false;
|
|
386
|
-
|
|
394
|
+
emit("mouseleave", evt);
|
|
387
395
|
};
|
|
388
|
-
const onMouseEnter = (
|
|
396
|
+
const onMouseEnter = (evt) => {
|
|
389
397
|
hovering.value = true;
|
|
390
|
-
|
|
398
|
+
emit("mouseenter", evt);
|
|
391
399
|
};
|
|
392
|
-
const handleKeydown = (
|
|
393
|
-
|
|
400
|
+
const handleKeydown = (evt) => {
|
|
401
|
+
emit("keydown", evt);
|
|
394
402
|
};
|
|
395
403
|
return {
|
|
396
404
|
input,
|
|
@@ -399,8 +407,8 @@ var script = vue.defineComponent({
|
|
|
399
407
|
inputSize,
|
|
400
408
|
validateState,
|
|
401
409
|
validateIcon,
|
|
410
|
+
containerStyle,
|
|
402
411
|
computedTextareaStyle,
|
|
403
|
-
resizeTextarea,
|
|
404
412
|
inputDisabled,
|
|
405
413
|
showClear,
|
|
406
414
|
showPwdVisible,
|
|
@@ -410,6 +418,8 @@ var script = vue.defineComponent({
|
|
|
410
418
|
inputExceed,
|
|
411
419
|
passwordVisible,
|
|
412
420
|
inputOrTextarea,
|
|
421
|
+
suffixVisible,
|
|
422
|
+
resizeTextarea,
|
|
413
423
|
handleInput,
|
|
414
424
|
handleChange,
|
|
415
425
|
handleFocus,
|
|
@@ -422,7 +432,6 @@ var script = vue.defineComponent({
|
|
|
422
432
|
select,
|
|
423
433
|
focus,
|
|
424
434
|
blur,
|
|
425
|
-
getSuffixVisible,
|
|
426
435
|
onMouseLeave,
|
|
427
436
|
onMouseEnter,
|
|
428
437
|
handleKeydown
|
|
@@ -437,11 +446,11 @@ const _hoisted_2 = {
|
|
|
437
446
|
};
|
|
438
447
|
const _hoisted_3 = ["type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
|
|
439
448
|
const _hoisted_4 = {
|
|
440
|
-
key:
|
|
449
|
+
key: 1,
|
|
441
450
|
class: "el-input__prefix"
|
|
442
451
|
};
|
|
443
452
|
const _hoisted_5 = {
|
|
444
|
-
key:
|
|
453
|
+
key: 2,
|
|
445
454
|
class: "el-input__suffix"
|
|
446
455
|
};
|
|
447
456
|
const _hoisted_6 = { class: "el-input__suffix-inner" };
|
|
@@ -451,12 +460,12 @@ const _hoisted_7 = {
|
|
|
451
460
|
};
|
|
452
461
|
const _hoisted_8 = { class: "el-input__count-inner" };
|
|
453
462
|
const _hoisted_9 = {
|
|
454
|
-
key:
|
|
463
|
+
key: 3,
|
|
455
464
|
class: "el-input-group__append"
|
|
456
465
|
};
|
|
457
466
|
const _hoisted_10 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
|
|
458
467
|
const _hoisted_11 = {
|
|
459
|
-
key:
|
|
468
|
+
key: 0,
|
|
460
469
|
class: "el-input__count"
|
|
461
470
|
};
|
|
462
471
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -476,18 +485,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
476
485
|
},
|
|
477
486
|
_ctx.$attrs.class
|
|
478
487
|
]),
|
|
479
|
-
style: vue.normalizeStyle(_ctx
|
|
488
|
+
style: vue.normalizeStyle(_ctx.containerStyle),
|
|
480
489
|
widget: _ctx.widget,
|
|
481
490
|
onMouseenter: _cache[19] || (_cache[19] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),
|
|
482
491
|
onMouseleave: _cache[20] || (_cache[20] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args))
|
|
483
492
|
}, [
|
|
493
|
+
vue.createCommentVNode(" input "),
|
|
484
494
|
_ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
485
|
-
vue.createCommentVNode("
|
|
495
|
+
vue.createCommentVNode(" prepend slot "),
|
|
486
496
|
_ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
487
497
|
vue.renderSlot(_ctx.$slots, "prepend")
|
|
488
498
|
])) : vue.createCommentVNode("v-if", true),
|
|
489
|
-
|
|
490
|
-
key: 1,
|
|
499
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
491
500
|
ref: "input",
|
|
492
501
|
class: "el-input__inner"
|
|
493
502
|
}, _ctx.attrs, {
|
|
@@ -507,8 +516,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
507
516
|
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
508
517
|
onChange: _cache[6] || (_cache[6] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
|
|
509
518
|
onKeydown: _cache[7] || (_cache[7] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
|
|
510
|
-
}), null, 16, _hoisted_3)
|
|
511
|
-
vue.createCommentVNode("
|
|
519
|
+
}), null, 16, _hoisted_3),
|
|
520
|
+
vue.createCommentVNode(" prefix slot "),
|
|
512
521
|
_ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, [
|
|
513
522
|
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
514
523
|
_ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -516,8 +525,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
516
525
|
class: vue.normalizeClass(["el-input__icon", _ctx.prefixIcon])
|
|
517
526
|
}, null, 2)) : vue.createCommentVNode("v-if", true)
|
|
518
527
|
])) : vue.createCommentVNode("v-if", true),
|
|
519
|
-
vue.createCommentVNode("
|
|
520
|
-
_ctx.
|
|
528
|
+
vue.createCommentVNode(" suffix slot "),
|
|
529
|
+
_ctx.suffixVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5, [
|
|
521
530
|
vue.createElementVNode("span", _hoisted_6, [
|
|
522
531
|
!_ctx.showClear || !_ctx.showPwdVisible || !_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
523
532
|
vue.renderSlot(_ctx.$slots, "suffix"),
|
|
@@ -539,7 +548,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
539
548
|
onClick: _cache[10] || (_cache[10] = (...args) => _ctx.handlePasswordVisible && _ctx.handlePasswordVisible(...args))
|
|
540
549
|
})) : vue.createCommentVNode("v-if", true),
|
|
541
550
|
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, [
|
|
542
|
-
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(_ctx.textLength) + "/" + vue.toDisplayString(_ctx.maxlength), 1)
|
|
551
|
+
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(_ctx.textLength) + " / " + vue.toDisplayString(_ctx.maxlength), 1)
|
|
543
552
|
])) : vue.createCommentVNode("v-if", true)
|
|
544
553
|
]),
|
|
545
554
|
_ctx.validateState ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
@@ -547,43 +556,43 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
547
556
|
class: vue.normalizeClass(["el-input__icon", "el-input__validateIcon", _ctx.validateIcon])
|
|
548
557
|
}, null, 2)) : vue.createCommentVNode("v-if", true)
|
|
549
558
|
])) : vue.createCommentVNode("v-if", true),
|
|
550
|
-
vue.createCommentVNode("
|
|
559
|
+
vue.createCommentVNode(" append slot "),
|
|
551
560
|
_ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
552
561
|
vue.renderSlot(_ctx.$slots, "append")
|
|
553
562
|
])) : vue.createCommentVNode("v-if", true)
|
|
554
|
-
], 64)) : (vue.openBlock(), vue.createElementBlock(
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
563
|
+
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
564
|
+
vue.createCommentVNode(" textarea "),
|
|
565
|
+
vue.createElementVNode("textarea", vue.mergeProps({
|
|
566
|
+
ref: "textarea",
|
|
567
|
+
class: "el-textarea__inner"
|
|
568
|
+
}, _ctx.attrs, {
|
|
569
|
+
tabindex: _ctx.tabindex,
|
|
570
|
+
disabled: _ctx.inputDisabled,
|
|
571
|
+
readonly: _ctx.readonly,
|
|
572
|
+
autocomplete: _ctx.autocomplete,
|
|
573
|
+
style: _ctx.computedTextareaStyle,
|
|
574
|
+
"aria-label": _ctx.label,
|
|
575
|
+
placeholder: _ctx.placeholder,
|
|
576
|
+
onCompositionstart: _cache[11] || (_cache[11] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
|
|
577
|
+
onCompositionupdate: _cache[12] || (_cache[12] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
|
|
578
|
+
onCompositionend: _cache[13] || (_cache[13] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
|
|
579
|
+
onInput: _cache[14] || (_cache[14] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
580
|
+
onFocus: _cache[15] || (_cache[15] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
581
|
+
onBlur: _cache[16] || (_cache[16] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
582
|
+
onChange: _cache[17] || (_cache[17] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
|
|
583
|
+
onKeydown: _cache[18] || (_cache[18] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
|
|
584
|
+
}), null, 16, _hoisted_10),
|
|
585
|
+
_ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11, vue.toDisplayString(_ctx.textLength) + " / " + vue.toDisplayString(_ctx.maxlength), 1)) : vue.createCommentVNode("v-if", true)
|
|
586
|
+
], 64))
|
|
576
587
|
], 46, _hoisted_1);
|
|
577
588
|
}
|
|
578
589
|
|
|
579
590
|
script.render = render;
|
|
580
|
-
script.__file = "packages/components/input/src/
|
|
591
|
+
script.__file = "packages/components/input/src/input.vue";
|
|
581
592
|
|
|
582
|
-
|
|
583
|
-
app.component(script.name, script);
|
|
584
|
-
};
|
|
585
|
-
const _Input = script;
|
|
586
|
-
const ElInput = _Input;
|
|
593
|
+
const ElInput = withInstall.withInstall(script);
|
|
587
594
|
|
|
588
595
|
exports.ElInput = ElInput;
|
|
589
|
-
exports["default"] =
|
|
596
|
+
exports["default"] = ElInput;
|
|
597
|
+
exports.inputEmits = inputEmits;
|
|
598
|
+
exports.inputProps = inputProps;
|