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
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { withInstall } from 'element-pe/es/utils/with-install';
|
|
2
|
+
import { defineComponent, getCurrentInstance, inject, ref, shallowRef, computed, watch, nextTick, onMounted, onUpdated, openBlock, createElementBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderSlot, createElementVNode, mergeProps, withModifiers, toDisplayString } from 'vue';
|
|
2
3
|
import { elFormKey, elFormItemKey } from 'element-pe/es/tokens';
|
|
3
|
-
import { useAttrs } from 'element-pe/es/hooks';
|
|
4
|
+
import { useFormItemProps, useAttrs, useFormItem } from 'element-pe/es/hooks';
|
|
4
5
|
import { UPDATE_MODEL_EVENT, VALIDATE_STATE_MAP } from 'element-pe/es/utils/constants';
|
|
5
|
-
import {
|
|
6
|
+
import { isNumber, isObject } from 'element-pe/es/utils/util';
|
|
6
7
|
import isServer from 'element-pe/es/utils/isServer';
|
|
7
8
|
import { isKorean } from 'element-pe/es/utils/isDef';
|
|
8
|
-
import {
|
|
9
|
+
import { isString } from '@vue/shared';
|
|
10
|
+
import { buildProps, definePropType, mutable } from 'element-pe/es/utils/props';
|
|
9
11
|
|
|
10
|
-
let hiddenTextarea;
|
|
12
|
+
let hiddenTextarea = void 0;
|
|
11
13
|
const HIDDEN_STYLE = `
|
|
12
14
|
height:0 !important;
|
|
13
15
|
visibility:hidden !important;
|
|
@@ -42,7 +44,7 @@ function calculateNodeStyling(targetElement) {
|
|
|
42
44
|
const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
|
|
43
45
|
return { contextStyle, paddingSize, borderSize, boxSizing };
|
|
44
46
|
}
|
|
45
|
-
function calcTextareaHeight(targetElement, minRows = 1, maxRows
|
|
47
|
+
function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
|
|
46
48
|
var _a;
|
|
47
49
|
if (!hiddenTextarea) {
|
|
48
50
|
hiddenTextarea = document.createElement("textarea");
|
|
@@ -60,7 +62,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
60
62
|
}
|
|
61
63
|
hiddenTextarea.value = "";
|
|
62
64
|
const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
63
|
-
if (minRows
|
|
65
|
+
if (isNumber(minRows)) {
|
|
64
66
|
let minHeight = singleRowHeight * minRows;
|
|
65
67
|
if (boxSizing === "border-box") {
|
|
66
68
|
minHeight = minHeight + paddingSize + borderSize;
|
|
@@ -68,7 +70,7 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
68
70
|
height = Math.max(minHeight, height);
|
|
69
71
|
result.minHeight = `${minHeight}px`;
|
|
70
72
|
}
|
|
71
|
-
if (maxRows
|
|
73
|
+
if (isNumber(maxRows)) {
|
|
72
74
|
let maxHeight = singleRowHeight * maxRows;
|
|
73
75
|
if (boxSizing === "border-box") {
|
|
74
76
|
maxHeight = maxHeight + paddingSize + borderSize;
|
|
@@ -77,13 +79,118 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows = null) {
|
|
|
77
79
|
}
|
|
78
80
|
result.height = `${height}px`;
|
|
79
81
|
(_a = hiddenTextarea.parentNode) == null ? void 0 : _a.removeChild(hiddenTextarea);
|
|
80
|
-
hiddenTextarea =
|
|
82
|
+
hiddenTextarea = void 0;
|
|
81
83
|
return result;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
var __defProp = Object.defineProperty;
|
|
86
|
+
var __defProp$1 = Object.defineProperty;
|
|
85
87
|
var __defProps = Object.defineProperties;
|
|
86
88
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
89
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
90
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
91
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
92
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
93
|
+
var __spreadValues$1 = (a, b) => {
|
|
94
|
+
for (var prop in b || (b = {}))
|
|
95
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
96
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
97
|
+
if (__getOwnPropSymbols$1)
|
|
98
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
99
|
+
if (__propIsEnum$1.call(b, prop))
|
|
100
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
101
|
+
}
|
|
102
|
+
return a;
|
|
103
|
+
};
|
|
104
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
105
|
+
const inputProps = buildProps(__spreadProps(__spreadValues$1({}, useFormItemProps), {
|
|
106
|
+
modelValue: {
|
|
107
|
+
type: definePropType(void 0),
|
|
108
|
+
default: ""
|
|
109
|
+
},
|
|
110
|
+
type: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "text"
|
|
113
|
+
},
|
|
114
|
+
resize: {
|
|
115
|
+
type: String,
|
|
116
|
+
values: ["none", "both", "horizontal", "vertical"]
|
|
117
|
+
},
|
|
118
|
+
autosize: {
|
|
119
|
+
type: definePropType([Boolean, Object]),
|
|
120
|
+
default: false
|
|
121
|
+
},
|
|
122
|
+
autocomplete: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: "off"
|
|
125
|
+
},
|
|
126
|
+
placeholder: {
|
|
127
|
+
type: String
|
|
128
|
+
},
|
|
129
|
+
form: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: ""
|
|
132
|
+
},
|
|
133
|
+
readonly: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: false
|
|
136
|
+
},
|
|
137
|
+
clearable: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: false
|
|
140
|
+
},
|
|
141
|
+
showPassword: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
showWordLimit: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
},
|
|
149
|
+
suffixIcon: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: ""
|
|
152
|
+
},
|
|
153
|
+
prefixIcon: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: ""
|
|
156
|
+
},
|
|
157
|
+
label: {
|
|
158
|
+
type: String
|
|
159
|
+
},
|
|
160
|
+
tabindex: {
|
|
161
|
+
type: [Number, String]
|
|
162
|
+
},
|
|
163
|
+
validateEvent: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: true
|
|
166
|
+
},
|
|
167
|
+
inputStyle: {
|
|
168
|
+
type: definePropType([Object, Array, String]),
|
|
169
|
+
default: () => mutable({})
|
|
170
|
+
},
|
|
171
|
+
maxlength: {
|
|
172
|
+
type: [Number, String]
|
|
173
|
+
},
|
|
174
|
+
widget: {
|
|
175
|
+
type: String
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
const inputEmits = {
|
|
179
|
+
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
|
180
|
+
input: (value) => isString(value),
|
|
181
|
+
change: (value) => isString(value),
|
|
182
|
+
focus: (evt) => evt instanceof FocusEvent,
|
|
183
|
+
blur: (evt) => evt instanceof FocusEvent,
|
|
184
|
+
clear: () => true,
|
|
185
|
+
mouseleave: (evt) => evt instanceof MouseEvent,
|
|
186
|
+
mouseenter: (evt) => evt instanceof MouseEvent,
|
|
187
|
+
keydown: (evt) => evt instanceof KeyboardEvent,
|
|
188
|
+
compositionstart: (evt) => evt instanceof CompositionEvent,
|
|
189
|
+
compositionupdate: (evt) => evt instanceof CompositionEvent,
|
|
190
|
+
compositionend: (evt) => evt instanceof CompositionEvent
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
var __defProp = Object.defineProperty;
|
|
87
194
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
88
195
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
89
196
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -99,7 +206,6 @@ var __spreadValues = (a, b) => {
|
|
|
99
206
|
}
|
|
100
207
|
return a;
|
|
101
208
|
};
|
|
102
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
103
209
|
const PENDANT_MAP = {
|
|
104
210
|
suffix: "append",
|
|
105
211
|
prefix: "prepend"
|
|
@@ -107,139 +213,40 @@ const PENDANT_MAP = {
|
|
|
107
213
|
var script = defineComponent({
|
|
108
214
|
name: "ElInput",
|
|
109
215
|
inheritAttrs: false,
|
|
110
|
-
props:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
default: ""
|
|
114
|
-
},
|
|
115
|
-
type: {
|
|
116
|
-
type: String,
|
|
117
|
-
default: "text"
|
|
118
|
-
},
|
|
119
|
-
size: {
|
|
120
|
-
type: String,
|
|
121
|
-
validator: isValidComponentSize
|
|
122
|
-
},
|
|
123
|
-
resize: {
|
|
124
|
-
type: String,
|
|
125
|
-
validator: (val) => ["none", "both", "horizontal", "vertical"].includes(val)
|
|
126
|
-
},
|
|
127
|
-
autosize: {
|
|
128
|
-
type: [Boolean, Object],
|
|
129
|
-
default: false
|
|
130
|
-
},
|
|
131
|
-
autocomplete: {
|
|
132
|
-
type: String,
|
|
133
|
-
default: "off"
|
|
134
|
-
},
|
|
135
|
-
placeholder: {
|
|
136
|
-
type: String
|
|
137
|
-
},
|
|
138
|
-
form: {
|
|
139
|
-
type: String,
|
|
140
|
-
default: ""
|
|
141
|
-
},
|
|
142
|
-
disabled: {
|
|
143
|
-
type: Boolean,
|
|
144
|
-
default: false
|
|
145
|
-
},
|
|
146
|
-
readonly: {
|
|
147
|
-
type: Boolean,
|
|
148
|
-
default: false
|
|
149
|
-
},
|
|
150
|
-
clearable: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
default: false
|
|
153
|
-
},
|
|
154
|
-
showPassword: {
|
|
155
|
-
type: Boolean,
|
|
156
|
-
default: false
|
|
157
|
-
},
|
|
158
|
-
showWordLimit: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
default: false
|
|
161
|
-
},
|
|
162
|
-
suffixIcon: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: ""
|
|
165
|
-
},
|
|
166
|
-
prefixIcon: {
|
|
167
|
-
type: String,
|
|
168
|
-
default: ""
|
|
169
|
-
},
|
|
170
|
-
label: {
|
|
171
|
-
type: String
|
|
172
|
-
},
|
|
173
|
-
tabindex: {
|
|
174
|
-
type: [Number, String]
|
|
175
|
-
},
|
|
176
|
-
validateEvent: {
|
|
177
|
-
type: Boolean,
|
|
178
|
-
default: true
|
|
179
|
-
},
|
|
180
|
-
inputStyle: {
|
|
181
|
-
type: Object,
|
|
182
|
-
default: () => ({})
|
|
183
|
-
},
|
|
184
|
-
maxlength: {
|
|
185
|
-
type: [Number, String]
|
|
186
|
-
},
|
|
187
|
-
widget: {
|
|
188
|
-
type: String
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
emits: [
|
|
192
|
-
UPDATE_MODEL_EVENT,
|
|
193
|
-
"input",
|
|
194
|
-
"change",
|
|
195
|
-
"focus",
|
|
196
|
-
"blur",
|
|
197
|
-
"clear",
|
|
198
|
-
"mouseleave",
|
|
199
|
-
"mouseenter",
|
|
200
|
-
"keydown",
|
|
201
|
-
"compositionstart",
|
|
202
|
-
"compositionupdate",
|
|
203
|
-
"compositionend"
|
|
204
|
-
],
|
|
205
|
-
setup(props, ctx) {
|
|
216
|
+
props: inputProps,
|
|
217
|
+
emits: inputEmits,
|
|
218
|
+
setup(props, { slots, emit, attrs: rawAttrs }) {
|
|
206
219
|
const instance = getCurrentInstance();
|
|
207
220
|
const attrs = useAttrs();
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const input = ref(
|
|
212
|
-
const textarea = ref(
|
|
221
|
+
const elForm = inject(elFormKey, void 0);
|
|
222
|
+
const elFormItem = inject(elFormItemKey, void 0);
|
|
223
|
+
const { size: inputSize, disabled: inputDisabled } = useFormItem({});
|
|
224
|
+
const input = ref();
|
|
225
|
+
const textarea = ref();
|
|
213
226
|
const focused = ref(false);
|
|
214
227
|
const hovering = ref(false);
|
|
215
228
|
const isComposing = ref(false);
|
|
216
229
|
const passwordVisible = ref(false);
|
|
217
230
|
const _textareaCalcStyle = shallowRef(props.inputStyle);
|
|
218
231
|
const inputOrTextarea = computed(() => input.value || textarea.value);
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
232
|
+
const needStatusIcon = computed(() => {
|
|
233
|
+
var _a;
|
|
234
|
+
return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false;
|
|
235
|
+
});
|
|
236
|
+
const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
|
|
222
237
|
const validateIcon = computed(() => VALIDATE_STATE_MAP[validateState.value]);
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
238
|
+
const containerStyle = computed(() => rawAttrs.style);
|
|
239
|
+
const computedTextareaStyle = computed(() => [
|
|
240
|
+
props.inputStyle,
|
|
241
|
+
_textareaCalcStyle.value,
|
|
242
|
+
{ resize: props.resize }
|
|
243
|
+
]);
|
|
227
244
|
const nativeInputValue = computed(() => props.modelValue === null || props.modelValue === void 0 ? "" : String(props.modelValue));
|
|
228
|
-
const showClear = computed(() =>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
});
|
|
234
|
-
const isWordLimitVisible = computed(() => {
|
|
235
|
-
return props.showWordLimit && props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword;
|
|
236
|
-
});
|
|
237
|
-
const textLength = computed(() => {
|
|
238
|
-
return Array.from(nativeInputValue.value).length;
|
|
239
|
-
});
|
|
240
|
-
const inputExceed = computed(() => {
|
|
241
|
-
return isWordLimitVisible.value && textLength.value > Number(props.maxlength);
|
|
242
|
-
});
|
|
245
|
+
const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
|
|
246
|
+
const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !props.readonly && (!!nativeInputValue.value || focused.value));
|
|
247
|
+
const isWordLimitVisible = computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
|
|
248
|
+
const textLength = computed(() => Array.from(nativeInputValue.value).length);
|
|
249
|
+
const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
|
|
243
250
|
const resizeTextarea = () => {
|
|
244
251
|
const { type, autosize } = props;
|
|
245
252
|
if (isServer || type !== "textarea")
|
|
@@ -262,12 +269,14 @@ var script = defineComponent({
|
|
|
262
269
|
};
|
|
263
270
|
const calcIconOffset = (place) => {
|
|
264
271
|
const { el } = instance.vnode;
|
|
272
|
+
if (!el)
|
|
273
|
+
return;
|
|
265
274
|
const elList = Array.from(el.querySelectorAll(`.el-input__${place}`));
|
|
266
275
|
const target = elList.find((item) => item.parentNode === el);
|
|
267
276
|
if (!target)
|
|
268
277
|
return;
|
|
269
278
|
const pendant = PENDANT_MAP[place];
|
|
270
|
-
if (
|
|
279
|
+
if (slots[pendant]) {
|
|
271
280
|
target.style.transform = `translateX(${place === "suffix" ? "-" : ""}${el.querySelector(`.el-input-group__${pendant}`).offsetWidth}px)`;
|
|
272
281
|
} else {
|
|
273
282
|
target.removeAttribute("style");
|
|
@@ -287,77 +296,76 @@ var script = defineComponent({
|
|
|
287
296
|
const sliceIndex = inputExceed.value ? textLength.value : props.maxlength;
|
|
288
297
|
value = Array.from(value).slice(0, Number(sliceIndex)).join("");
|
|
289
298
|
}
|
|
290
|
-
|
|
291
|
-
|
|
299
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
300
|
+
emit("input", value);
|
|
292
301
|
nextTick(setNativeInputValue);
|
|
293
302
|
};
|
|
294
303
|
const handleChange = (event) => {
|
|
295
|
-
|
|
304
|
+
emit("change", event.target.value);
|
|
296
305
|
};
|
|
297
306
|
const focus = () => {
|
|
298
307
|
nextTick(() => {
|
|
299
|
-
|
|
308
|
+
var _a;
|
|
309
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.focus();
|
|
300
310
|
});
|
|
301
311
|
};
|
|
302
312
|
const blur = () => {
|
|
303
|
-
|
|
313
|
+
var _a;
|
|
314
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.blur();
|
|
304
315
|
};
|
|
305
316
|
const handleFocus = (event) => {
|
|
306
317
|
focused.value = true;
|
|
307
|
-
|
|
318
|
+
emit("focus", event);
|
|
308
319
|
};
|
|
309
320
|
const handleBlur = (event) => {
|
|
310
321
|
var _a;
|
|
311
322
|
focused.value = false;
|
|
312
|
-
|
|
323
|
+
emit("blur", event);
|
|
313
324
|
if (props.validateEvent) {
|
|
314
|
-
(_a = elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur");
|
|
325
|
+
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur");
|
|
315
326
|
}
|
|
316
327
|
};
|
|
317
328
|
const select = () => {
|
|
318
|
-
|
|
329
|
+
var _a;
|
|
330
|
+
(_a = inputOrTextarea.value) == null ? void 0 : _a.select();
|
|
319
331
|
};
|
|
320
332
|
const handleCompositionStart = (event) => {
|
|
321
|
-
|
|
333
|
+
emit("compositionstart", event);
|
|
322
334
|
isComposing.value = true;
|
|
323
335
|
};
|
|
324
336
|
const handleCompositionUpdate = (event) => {
|
|
325
337
|
var _a;
|
|
326
|
-
|
|
338
|
+
emit("compositionupdate", event);
|
|
327
339
|
const text = (_a = event.target) == null ? void 0 : _a.value;
|
|
328
340
|
const lastCharacter = text[text.length - 1] || "";
|
|
329
341
|
isComposing.value = !isKorean(lastCharacter);
|
|
330
342
|
};
|
|
331
343
|
const handleCompositionEnd = (event) => {
|
|
332
|
-
|
|
344
|
+
emit("compositionend", event);
|
|
333
345
|
if (isComposing.value) {
|
|
334
346
|
isComposing.value = false;
|
|
335
347
|
handleInput(event);
|
|
336
348
|
}
|
|
337
349
|
};
|
|
338
350
|
const clear = () => {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
351
|
+
emit(UPDATE_MODEL_EVENT, "");
|
|
352
|
+
emit("change", "");
|
|
353
|
+
emit("clear");
|
|
354
|
+
emit("input", "");
|
|
343
355
|
};
|
|
344
356
|
const handlePasswordVisible = () => {
|
|
345
357
|
passwordVisible.value = !passwordVisible.value;
|
|
346
358
|
focus();
|
|
347
359
|
};
|
|
348
|
-
const
|
|
349
|
-
return ctx.slots.suffix || props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || validateState.value && needStatusIcon.value;
|
|
350
|
-
};
|
|
360
|
+
const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
|
|
351
361
|
watch(() => props.modelValue, () => {
|
|
352
362
|
var _a;
|
|
353
363
|
nextTick(resizeTextarea);
|
|
354
364
|
if (props.validateEvent) {
|
|
355
|
-
(_a = elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change");
|
|
365
|
+
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change");
|
|
356
366
|
}
|
|
357
367
|
});
|
|
358
|
-
watch(nativeInputValue, () =>
|
|
359
|
-
setNativeInputValue();
|
|
360
|
-
});
|
|
368
|
+
watch(nativeInputValue, () => setNativeInputValue());
|
|
361
369
|
watch(() => props.type, () => {
|
|
362
370
|
nextTick(() => {
|
|
363
371
|
setNativeInputValue();
|
|
@@ -373,16 +381,16 @@ var script = defineComponent({
|
|
|
373
381
|
onUpdated(() => {
|
|
374
382
|
nextTick(updateIconOffset);
|
|
375
383
|
});
|
|
376
|
-
const onMouseLeave = (
|
|
384
|
+
const onMouseLeave = (evt) => {
|
|
377
385
|
hovering.value = false;
|
|
378
|
-
|
|
386
|
+
emit("mouseleave", evt);
|
|
379
387
|
};
|
|
380
|
-
const onMouseEnter = (
|
|
388
|
+
const onMouseEnter = (evt) => {
|
|
381
389
|
hovering.value = true;
|
|
382
|
-
|
|
390
|
+
emit("mouseenter", evt);
|
|
383
391
|
};
|
|
384
|
-
const handleKeydown = (
|
|
385
|
-
|
|
392
|
+
const handleKeydown = (evt) => {
|
|
393
|
+
emit("keydown", evt);
|
|
386
394
|
};
|
|
387
395
|
return {
|
|
388
396
|
input,
|
|
@@ -391,8 +399,8 @@ var script = defineComponent({
|
|
|
391
399
|
inputSize,
|
|
392
400
|
validateState,
|
|
393
401
|
validateIcon,
|
|
402
|
+
containerStyle,
|
|
394
403
|
computedTextareaStyle,
|
|
395
|
-
resizeTextarea,
|
|
396
404
|
inputDisabled,
|
|
397
405
|
showClear,
|
|
398
406
|
showPwdVisible,
|
|
@@ -402,6 +410,8 @@ var script = defineComponent({
|
|
|
402
410
|
inputExceed,
|
|
403
411
|
passwordVisible,
|
|
404
412
|
inputOrTextarea,
|
|
413
|
+
suffixVisible,
|
|
414
|
+
resizeTextarea,
|
|
405
415
|
handleInput,
|
|
406
416
|
handleChange,
|
|
407
417
|
handleFocus,
|
|
@@ -414,7 +424,6 @@ var script = defineComponent({
|
|
|
414
424
|
select,
|
|
415
425
|
focus,
|
|
416
426
|
blur,
|
|
417
|
-
getSuffixVisible,
|
|
418
427
|
onMouseLeave,
|
|
419
428
|
onMouseEnter,
|
|
420
429
|
handleKeydown
|
|
@@ -429,11 +438,11 @@ const _hoisted_2 = {
|
|
|
429
438
|
};
|
|
430
439
|
const _hoisted_3 = ["type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
|
|
431
440
|
const _hoisted_4 = {
|
|
432
|
-
key:
|
|
441
|
+
key: 1,
|
|
433
442
|
class: "el-input__prefix"
|
|
434
443
|
};
|
|
435
444
|
const _hoisted_5 = {
|
|
436
|
-
key:
|
|
445
|
+
key: 2,
|
|
437
446
|
class: "el-input__suffix"
|
|
438
447
|
};
|
|
439
448
|
const _hoisted_6 = { class: "el-input__suffix-inner" };
|
|
@@ -443,12 +452,12 @@ const _hoisted_7 = {
|
|
|
443
452
|
};
|
|
444
453
|
const _hoisted_8 = { class: "el-input__count-inner" };
|
|
445
454
|
const _hoisted_9 = {
|
|
446
|
-
key:
|
|
455
|
+
key: 3,
|
|
447
456
|
class: "el-input-group__append"
|
|
448
457
|
};
|
|
449
458
|
const _hoisted_10 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
|
|
450
459
|
const _hoisted_11 = {
|
|
451
|
-
key:
|
|
460
|
+
key: 0,
|
|
452
461
|
class: "el-input__count"
|
|
453
462
|
};
|
|
454
463
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -468,18 +477,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
468
477
|
},
|
|
469
478
|
_ctx.$attrs.class
|
|
470
479
|
]),
|
|
471
|
-
style: normalizeStyle(_ctx
|
|
480
|
+
style: normalizeStyle(_ctx.containerStyle),
|
|
472
481
|
widget: _ctx.widget,
|
|
473
482
|
onMouseenter: _cache[19] || (_cache[19] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),
|
|
474
483
|
onMouseleave: _cache[20] || (_cache[20] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args))
|
|
475
484
|
}, [
|
|
485
|
+
createCommentVNode(" input "),
|
|
476
486
|
_ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
477
|
-
createCommentVNode("
|
|
487
|
+
createCommentVNode(" prepend slot "),
|
|
478
488
|
_ctx.$slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
479
489
|
renderSlot(_ctx.$slots, "prepend")
|
|
480
490
|
])) : createCommentVNode("v-if", true),
|
|
481
|
-
|
|
482
|
-
key: 1,
|
|
491
|
+
createElementVNode("input", mergeProps({
|
|
483
492
|
ref: "input",
|
|
484
493
|
class: "el-input__inner"
|
|
485
494
|
}, _ctx.attrs, {
|
|
@@ -499,8 +508,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
499
508
|
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
500
509
|
onChange: _cache[6] || (_cache[6] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
|
|
501
510
|
onKeydown: _cache[7] || (_cache[7] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
|
|
502
|
-
}), null, 16, _hoisted_3)
|
|
503
|
-
createCommentVNode("
|
|
511
|
+
}), null, 16, _hoisted_3),
|
|
512
|
+
createCommentVNode(" prefix slot "),
|
|
504
513
|
_ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", _hoisted_4, [
|
|
505
514
|
renderSlot(_ctx.$slots, "prefix"),
|
|
506
515
|
_ctx.prefixIcon ? (openBlock(), createElementBlock("i", {
|
|
@@ -508,8 +517,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
508
517
|
class: normalizeClass(["el-input__icon", _ctx.prefixIcon])
|
|
509
518
|
}, null, 2)) : createCommentVNode("v-if", true)
|
|
510
519
|
])) : createCommentVNode("v-if", true),
|
|
511
|
-
createCommentVNode("
|
|
512
|
-
_ctx.
|
|
520
|
+
createCommentVNode(" suffix slot "),
|
|
521
|
+
_ctx.suffixVisible ? (openBlock(), createElementBlock("span", _hoisted_5, [
|
|
513
522
|
createElementVNode("span", _hoisted_6, [
|
|
514
523
|
!_ctx.showClear || !_ctx.showPwdVisible || !_ctx.isWordLimitVisible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
515
524
|
renderSlot(_ctx.$slots, "suffix"),
|
|
@@ -531,7 +540,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
531
540
|
onClick: _cache[10] || (_cache[10] = (...args) => _ctx.handlePasswordVisible && _ctx.handlePasswordVisible(...args))
|
|
532
541
|
})) : createCommentVNode("v-if", true),
|
|
533
542
|
_ctx.isWordLimitVisible ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
534
|
-
createElementVNode("span", _hoisted_8, toDisplayString(_ctx.textLength) + "/" + toDisplayString(_ctx.maxlength), 1)
|
|
543
|
+
createElementVNode("span", _hoisted_8, toDisplayString(_ctx.textLength) + " / " + toDisplayString(_ctx.maxlength), 1)
|
|
535
544
|
])) : createCommentVNode("v-if", true)
|
|
536
545
|
]),
|
|
537
546
|
_ctx.validateState ? (openBlock(), createElementBlock("i", {
|
|
@@ -539,42 +548,40 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
539
548
|
class: normalizeClass(["el-input__icon", "el-input__validateIcon", _ctx.validateIcon])
|
|
540
549
|
}, null, 2)) : createCommentVNode("v-if", true)
|
|
541
550
|
])) : createCommentVNode("v-if", true),
|
|
542
|
-
createCommentVNode("
|
|
551
|
+
createCommentVNode(" append slot "),
|
|
543
552
|
_ctx.$slots.append ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
544
553
|
renderSlot(_ctx.$slots, "append")
|
|
545
554
|
])) : createCommentVNode("v-if", true)
|
|
546
|
-
], 64)) : (openBlock(), createElementBlock(
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
555
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
556
|
+
createCommentVNode(" textarea "),
|
|
557
|
+
createElementVNode("textarea", mergeProps({
|
|
558
|
+
ref: "textarea",
|
|
559
|
+
class: "el-textarea__inner"
|
|
560
|
+
}, _ctx.attrs, {
|
|
561
|
+
tabindex: _ctx.tabindex,
|
|
562
|
+
disabled: _ctx.inputDisabled,
|
|
563
|
+
readonly: _ctx.readonly,
|
|
564
|
+
autocomplete: _ctx.autocomplete,
|
|
565
|
+
style: _ctx.computedTextareaStyle,
|
|
566
|
+
"aria-label": _ctx.label,
|
|
567
|
+
placeholder: _ctx.placeholder,
|
|
568
|
+
onCompositionstart: _cache[11] || (_cache[11] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
|
|
569
|
+
onCompositionupdate: _cache[12] || (_cache[12] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
|
|
570
|
+
onCompositionend: _cache[13] || (_cache[13] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
|
|
571
|
+
onInput: _cache[14] || (_cache[14] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
572
|
+
onFocus: _cache[15] || (_cache[15] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
573
|
+
onBlur: _cache[16] || (_cache[16] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
574
|
+
onChange: _cache[17] || (_cache[17] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
|
|
575
|
+
onKeydown: _cache[18] || (_cache[18] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
|
|
576
|
+
}), null, 16, _hoisted_10),
|
|
577
|
+
_ctx.isWordLimitVisible ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(_ctx.textLength) + " / " + toDisplayString(_ctx.maxlength), 1)) : createCommentVNode("v-if", true)
|
|
578
|
+
], 64))
|
|
568
579
|
], 46, _hoisted_1);
|
|
569
580
|
}
|
|
570
581
|
|
|
571
582
|
script.render = render;
|
|
572
|
-
script.__file = "packages/components/input/src/
|
|
583
|
+
script.__file = "packages/components/input/src/input.vue";
|
|
573
584
|
|
|
574
|
-
|
|
575
|
-
app.component(script.name, script);
|
|
576
|
-
};
|
|
577
|
-
const _Input = script;
|
|
578
|
-
const ElInput = _Input;
|
|
585
|
+
const ElInput = withInstall(script);
|
|
579
586
|
|
|
580
|
-
export { ElInput,
|
|
587
|
+
export { ElInput, ElInput as default, inputEmits, inputProps };
|