cy-element-ui 1.1.16 → 1.1.18
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/README.md +8 -8
- package/lib/{alert.js → Alert.js} +2 -2
- package/lib/{aside.js → Aside.js} +2 -2
- package/lib/Autocomplete.js +2051 -0
- package/lib/{avatar.js → Avatar.js} +2 -2
- package/lib/{backtop.js → Backtop.js} +4 -4
- package/lib/{badge.js → Badge.js} +2 -2
- package/lib/{breadcrumb.js → Breadcrumb.js} +2 -2
- package/lib/{breadcrumb-item.js → BreadcrumbItem.js} +2 -2
- package/lib/{button.js → Button.js} +2 -2
- package/lib/{button-group.js → ButtonGroup.js} +2 -2
- package/lib/{calendar.js → Calendar.js} +238 -25
- package/lib/{card.js → Card.js} +2 -2
- package/lib/{carousel.js → Carousel.js} +12 -12
- package/lib/{carousel-item.js → CarouselItem.js} +2 -2
- package/lib/Cascader.js +4641 -0
- package/lib/{cascader-panel.js → CascaderPanel.js} +1101 -57
- package/lib/{checkbox.js → Checkbox.js} +9 -9
- package/lib/{checkbox-button.js → CheckboxButton.js} +2 -2
- package/lib/{checkbox-group.js → CheckboxGroup.js} +9 -9
- package/lib/{col.js → Col.js} +2 -2
- package/lib/{collapse.js → Collapse.js} +2 -2
- package/lib/{collapse-item.js → CollapseItem.js} +4 -4
- package/lib/{color-picker.js → ColorPicker.js} +967 -25
- package/lib/{container.js → Container.js} +2 -2
- package/lib/{selectDisplayInput.js → CySelectDisplayInput.js} +8 -8
- package/lib/{subTitle.js → CySubTitle.js} +8 -8
- package/lib/{tabDialog.js → CyTabDialog.js} +26 -26
- package/lib/{treeSelect.js → CyTreeSelect.js} +3161 -3169
- package/lib/{date-picker.js → DatePicker.js} +1372 -139
- package/lib/{descriptions.js → Descriptions.js} +4 -4
- package/lib/{descriptions-item.js → DescriptionsItem.js} +2 -2
- package/lib/{dialog.js → Dialog.js} +12 -12
- package/lib/{divider.js → Divider.js} +2 -2
- package/lib/{drawer.js → Drawer.js} +4 -4
- package/lib/{dropdown.js → Dropdown.js} +244 -31
- package/lib/{dropdown-item.js → DropdownItem.js} +2 -2
- package/lib/{dropdown-menu.js → DropdownMenu.js} +2 -2
- package/lib/{empty.js → Empty.js} +4 -4
- package/lib/{footer.js → Footer.js} +2 -2
- package/lib/{form.js → Form.js} +10 -10
- package/lib/{form-item.js → FormItem.js} +12 -12
- package/lib/{header.js → Header.js} +2 -2
- package/lib/{icon.js → Icon.js} +2 -2
- package/lib/{image.js → Image.js} +22 -22
- package/lib/{infinite-scroll.js → InfiniteScroll.js} +16 -16
- package/lib/{input.js → Input.js} +27 -26
- package/lib/InputNumber.js +1552 -0
- package/lib/{link.js → Link.js} +2 -2
- package/lib/{loading.js → Loading.js} +15 -15
- package/lib/{main.js → Main.js} +2 -2
- package/lib/{menu.js → Menu.js} +10 -10
- package/lib/{menu-item.js → MenuItem.js} +339 -12
- package/lib/{menu-item-group.js → MenuItemGroup.js} +2 -2
- package/lib/{message.js → Message.js} +16 -16
- package/lib/{message-box.js → MessageBox.js} +973 -31
- package/lib/{notification.js → Notification.js} +11 -11
- package/lib/{option.js → Option.js} +11 -11
- package/lib/{option-group.js → OptionGroup.js} +2 -2
- package/lib/{page-header.js → PageHeader.js} +4 -4
- package/lib/Pagination.js +4123 -0
- package/lib/Popconfirm.js +1025 -0
- package/lib/{popover.js → Popover.js} +6 -6
- package/lib/{progress.js → Progress.js} +2 -2
- package/lib/{radio.js → Radio.js} +9 -9
- package/lib/{radio-button.js → RadioButton.js} +2 -2
- package/lib/{radio-group.js → RadioGroup.js} +2 -2
- package/lib/{rate.js → Rate.js} +20 -20
- package/lib/{result.js → Result.js} +2 -2
- package/lib/{row.js → Row.js} +2 -2
- package/lib/{scrollbar.js → Scrollbar.js} +26 -26
- package/lib/{select.js → Select.js} +1371 -170
- package/lib/{skeleton.js → Skeleton.js} +2 -2
- package/lib/{skeleton-item.js → SkeletonItem.js} +2 -2
- package/lib/Slider.js +2854 -0
- package/lib/{spinner.js → Spinner.js} +2 -2
- package/lib/{statistic.js → Statistic.js} +4 -4
- package/lib/{step.js → Step.js} +2 -2
- package/lib/{steps.js → Steps.js} +4 -4
- package/lib/{submenu.js → Submenu.js} +13 -13
- package/lib/{switch.js → Switch.js} +10 -10
- package/lib/{tab-pane.js → TabPane.js} +2 -2
- package/lib/{table.js → Table.js} +1231 -121
- package/lib/{table-column.js → TableColumn.js} +824 -295
- package/lib/{tabs.js → Tabs.js} +4 -4
- package/lib/{tag.js → Tag.js} +2 -2
- package/lib/{time-picker.js → TimePicker.js} +1183 -91
- package/lib/{time-select.js → TimeSelect.js} +1132 -26
- package/lib/{timeline.js → Timeline.js} +2 -2
- package/lib/{timeline-item.js → TimelineItem.js} +2 -2
- package/lib/{tooltip.js → Tooltip.js} +27 -27
- package/lib/Transfer.js +2557 -0
- package/lib/{tree.js → Tree.js} +436 -19
- package/lib/{upload.js → Upload.js} +411 -19
- package/lib/index.js +1 -1
- package/package.json +5 -23
- package/packages/{tabDialog → cy/tabDialog}/src/main.vue +1 -1
- package/packages/{treeSelect → cy/treeSelect}/src/main.vue +4 -4
- package/packages/theme-chalk/src/index.scss +3 -1
- package/src/index.js +16 -16
- package/types/cy/cy-element-ui.d.ts +31 -0
- package/types/cy/cy-select-display-input.d.ts +7 -0
- package/types/cy/cy-sub-title.d.ts +7 -0
- package/types/cy/cy-tab-dialog.d.ts +7 -0
- package/types/cy/cy-tree-select.d.ts +7 -0
- package/types/cy/index.d.ts +1 -0
- package/types/cy/select-display-input.d.ts +19 -0
- package/types/cy/sub-title.d.ts +10 -0
- package/types/cy/tab-dialog.d.ts +51 -0
- package/types/cy/tree-select.d.ts +44 -0
- package/types/index.d.ts +1 -0
- package/lib/autocomplete.js +0 -952
- package/lib/cascader.js +0 -1439
- package/lib/element-ui.common.js +0 -44918
- package/lib/input-number.js +0 -757
- package/lib/pagination.js +0 -950
- package/lib/popconfirm.js +0 -457
- package/lib/slider.js +0 -1199
- package/lib/theme-chalk/alert.css +0 -1
- package/lib/theme-chalk/aside.css +0 -1
- package/lib/theme-chalk/autocomplete.css +0 -1
- package/lib/theme-chalk/avatar.css +0 -1
- package/lib/theme-chalk/backtop.css +0 -1
- package/lib/theme-chalk/badge.css +0 -1
- package/lib/theme-chalk/base.css +0 -1
- package/lib/theme-chalk/breadcrumb-item.css +0 -0
- package/lib/theme-chalk/breadcrumb.css +0 -1
- package/lib/theme-chalk/button-group.css +0 -0
- package/lib/theme-chalk/button.css +0 -1
- package/lib/theme-chalk/calendar.css +0 -1
- package/lib/theme-chalk/card.css +0 -1
- package/lib/theme-chalk/carousel-item.css +0 -1
- package/lib/theme-chalk/carousel.css +0 -1
- package/lib/theme-chalk/cascader-panel.css +0 -1
- package/lib/theme-chalk/cascader.css +0 -1
- package/lib/theme-chalk/checkbox-button.css +0 -0
- package/lib/theme-chalk/checkbox-group.css +0 -0
- package/lib/theme-chalk/checkbox.css +0 -1
- package/lib/theme-chalk/col.css +0 -1
- package/lib/theme-chalk/collapse-item.css +0 -0
- package/lib/theme-chalk/collapse.css +0 -1
- package/lib/theme-chalk/color-picker.css +0 -1
- package/lib/theme-chalk/container.css +0 -1
- package/lib/theme-chalk/date-picker.css +0 -1
- package/lib/theme-chalk/descriptions-item.css +0 -1
- package/lib/theme-chalk/descriptions.css +0 -1
- package/lib/theme-chalk/dialog.css +0 -1
- package/lib/theme-chalk/display.css +0 -1
- package/lib/theme-chalk/divider.css +0 -1
- package/lib/theme-chalk/drawer.css +0 -1
- package/lib/theme-chalk/dropdown-item.css +0 -0
- package/lib/theme-chalk/dropdown-menu.css +0 -0
- package/lib/theme-chalk/dropdown.css +0 -1
- package/lib/theme-chalk/element.css +0 -1
- package/lib/theme-chalk/empty.css +0 -1
- package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
- package/lib/theme-chalk/fonts/element-icons.woff +0 -0
- package/lib/theme-chalk/footer.css +0 -1
- package/lib/theme-chalk/form-item.css +0 -0
- package/lib/theme-chalk/form.css +0 -1
- package/lib/theme-chalk/header.css +0 -1
- package/lib/theme-chalk/icon.css +0 -1
- package/lib/theme-chalk/image.css +0 -1
- package/lib/theme-chalk/index.css +0 -1
- package/lib/theme-chalk/infinite-scroll.css +0 -0
- package/lib/theme-chalk/infiniteScroll.css +0 -0
- package/lib/theme-chalk/input-number.css +0 -1
- package/lib/theme-chalk/input.css +0 -1
- package/lib/theme-chalk/link.css +0 -1
- package/lib/theme-chalk/loading.css +0 -1
- package/lib/theme-chalk/main.css +0 -1
- package/lib/theme-chalk/menu-item-group.css +0 -0
- package/lib/theme-chalk/menu-item.css +0 -0
- package/lib/theme-chalk/menu.css +0 -1
- package/lib/theme-chalk/message-box.css +0 -1
- package/lib/theme-chalk/message.css +0 -1
- package/lib/theme-chalk/notification.css +0 -1
- package/lib/theme-chalk/option-group.css +0 -1
- package/lib/theme-chalk/option.css +0 -1
- package/lib/theme-chalk/page-header.css +0 -1
- package/lib/theme-chalk/pagination.css +0 -1
- package/lib/theme-chalk/popconfirm.css +0 -1
- package/lib/theme-chalk/popover.css +0 -1
- package/lib/theme-chalk/popper.css +0 -1
- package/lib/theme-chalk/progress.css +0 -1
- package/lib/theme-chalk/radio-button.css +0 -1
- package/lib/theme-chalk/radio-group.css +0 -1
- package/lib/theme-chalk/radio.css +0 -1
- package/lib/theme-chalk/rate.css +0 -1
- package/lib/theme-chalk/reset.css +0 -1
- package/lib/theme-chalk/result.css +0 -1
- package/lib/theme-chalk/row.css +0 -1
- package/lib/theme-chalk/scrollbar.css +0 -1
- package/lib/theme-chalk/select-dropdown.css +0 -1
- package/lib/theme-chalk/select.css +0 -1
- package/lib/theme-chalk/selectDisplayInput.css +0 -1
- package/lib/theme-chalk/skeleton-item.css +0 -1
- package/lib/theme-chalk/skeleton.css +0 -1
- package/lib/theme-chalk/slider.css +0 -1
- package/lib/theme-chalk/spinner.css +0 -1
- package/lib/theme-chalk/statistic.css +0 -1
- package/lib/theme-chalk/step.css +0 -1
- package/lib/theme-chalk/steps.css +0 -1
- package/lib/theme-chalk/subTitle.css +0 -1
- package/lib/theme-chalk/submenu.css +0 -0
- package/lib/theme-chalk/switch.css +0 -1
- package/lib/theme-chalk/tab-pane.css +0 -0
- package/lib/theme-chalk/tabDialog.css +0 -1
- package/lib/theme-chalk/table-column.css +0 -1
- package/lib/theme-chalk/table.css +0 -1
- package/lib/theme-chalk/tabs.css +0 -1
- package/lib/theme-chalk/tag.css +0 -1
- package/lib/theme-chalk/time-picker.css +0 -1
- package/lib/theme-chalk/time-select.css +0 -1
- package/lib/theme-chalk/timeline-item.css +0 -1
- package/lib/theme-chalk/timeline.css +0 -1
- package/lib/theme-chalk/tooltip.css +0 -1
- package/lib/theme-chalk/transfer.css +0 -1
- package/lib/theme-chalk/tree.css +0 -1
- package/lib/theme-chalk/treeSelect.css +0 -1
- package/lib/theme-chalk/upload.css +0 -1
- package/lib/transfer.js +0 -1102
- package/lib/umd/locale/en.js +0 -142
- package/lib/umd/locale/zh-CN.js +0 -142
- package/lib/umd/locale/zh-TW.js +0 -142
- package/src/locale/lang/en.js +0 -123
- package/src/locale/lang/zh-TW.js +0 -123
- /package/packages/{selectDisplayInput → cy/selectDisplayInput}/index.js +0 -0
- /package/packages/{selectDisplayInput → cy/selectDisplayInput}/src/main.vue +0 -0
- /package/packages/{subTitle → cy/subTitle}/index.js +0 -0
- /package/packages/{subTitle → cy/subTitle}/src/main.vue +0 -0
- /package/packages/{tabDialog → cy/tabDialog}/index.js +0 -0
- /package/packages/{tabDialog → cy/tabDialog}/src/dialog/drag.js +0 -0
- /package/packages/{tabDialog → cy/tabDialog}/src/dialog/dragHeight.js +0 -0
- /package/packages/{tabDialog → cy/tabDialog}/src/dialog/dragWidth.js +0 -0
- /package/packages/{treeSelect → cy/treeSelect}/index.js +0 -0
|
@@ -82,180 +82,1280 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 48);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
|
-
/******/ (
|
|
88
|
+
/******/ ([
|
|
89
|
+
/* 0 */
|
|
90
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
91
|
+
|
|
92
|
+
"use strict";
|
|
93
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
94
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
95
|
+
|
|
96
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
97
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
98
|
+
// be included in the final webpack user bundle.
|
|
99
|
+
|
|
100
|
+
function normalizeComponent(
|
|
101
|
+
scriptExports,
|
|
102
|
+
render,
|
|
103
|
+
staticRenderFns,
|
|
104
|
+
functionalTemplate,
|
|
105
|
+
injectStyles,
|
|
106
|
+
scopeId,
|
|
107
|
+
moduleIdentifier /* server only */,
|
|
108
|
+
shadowMode /* vue-cli only */
|
|
109
|
+
) {
|
|
110
|
+
// Vue.extend constructor export interop
|
|
111
|
+
var options =
|
|
112
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
113
|
+
|
|
114
|
+
// render functions
|
|
115
|
+
if (render) {
|
|
116
|
+
options.render = render
|
|
117
|
+
options.staticRenderFns = staticRenderFns
|
|
118
|
+
options._compiled = true
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// functional template
|
|
122
|
+
if (functionalTemplate) {
|
|
123
|
+
options.functional = true
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// scopedId
|
|
127
|
+
if (scopeId) {
|
|
128
|
+
options._scopeId = 'data-v-' + scopeId
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
var hook
|
|
132
|
+
if (moduleIdentifier) {
|
|
133
|
+
// server build
|
|
134
|
+
hook = function (context) {
|
|
135
|
+
// 2.3 injection
|
|
136
|
+
context =
|
|
137
|
+
context || // cached call
|
|
138
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
139
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
140
|
+
// 2.2 with runInNewContext: true
|
|
141
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
142
|
+
context = __VUE_SSR_CONTEXT__
|
|
143
|
+
}
|
|
144
|
+
// inject component styles
|
|
145
|
+
if (injectStyles) {
|
|
146
|
+
injectStyles.call(this, context)
|
|
147
|
+
}
|
|
148
|
+
// register component module identifier for async chunk inferrence
|
|
149
|
+
if (context && context._registeredComponents) {
|
|
150
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// used by ssr in case component is cached and beforeCreate
|
|
154
|
+
// never gets called
|
|
155
|
+
options._ssrRegister = hook
|
|
156
|
+
} else if (injectStyles) {
|
|
157
|
+
hook = shadowMode
|
|
158
|
+
? function () {
|
|
159
|
+
injectStyles.call(
|
|
160
|
+
this,
|
|
161
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
: injectStyles
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (hook) {
|
|
168
|
+
if (options.functional) {
|
|
169
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
170
|
+
// go through the normalizer
|
|
171
|
+
options._injectStyles = hook
|
|
172
|
+
// register for functional component in vue file
|
|
173
|
+
var originalRender = options.render
|
|
174
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
175
|
+
hook.call(context)
|
|
176
|
+
return originalRender(h, context)
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
// inject component registration as beforeCreate hook
|
|
180
|
+
var existing = options.beforeCreate
|
|
181
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
exports: scriptExports,
|
|
187
|
+
options: options
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
/***/ }),
|
|
193
|
+
/* 1 */
|
|
194
|
+
/***/ (function(module, exports) {
|
|
195
|
+
|
|
196
|
+
module.exports = require("element-ui/lib/utils/dom");
|
|
197
|
+
|
|
198
|
+
/***/ }),
|
|
199
|
+
/* 2 */,
|
|
200
|
+
/* 3 */
|
|
201
|
+
/***/ (function(module, exports) {
|
|
202
|
+
|
|
203
|
+
module.exports = require("element-ui/lib/utils/util");
|
|
204
|
+
|
|
205
|
+
/***/ }),
|
|
206
|
+
/* 4 */
|
|
207
|
+
/***/ (function(module, exports) {
|
|
208
|
+
|
|
209
|
+
module.exports = require("element-ui/lib/mixins/emitter");
|
|
210
|
+
|
|
211
|
+
/***/ }),
|
|
212
|
+
/* 5 */
|
|
213
|
+
/***/ (function(module, exports) {
|
|
214
|
+
|
|
215
|
+
module.exports = require("element-ui/lib/utils/vue-popper");
|
|
216
|
+
|
|
217
|
+
/***/ }),
|
|
218
|
+
/* 6 */
|
|
219
|
+
/***/ (function(module, exports) {
|
|
220
|
+
|
|
221
|
+
module.exports = require("element-ui/lib/utils/merge");
|
|
222
|
+
|
|
223
|
+
/***/ }),
|
|
224
|
+
/* 7 */
|
|
225
|
+
/***/ (function(module, exports) {
|
|
226
|
+
|
|
227
|
+
module.exports = require("element-ui/lib/mixins/migrating");
|
|
228
|
+
|
|
229
|
+
/***/ }),
|
|
230
|
+
/* 8 */,
|
|
231
|
+
/* 9 */
|
|
232
|
+
/***/ (function(module, exports) {
|
|
233
|
+
|
|
234
|
+
module.exports = require("element-ui/lib/mixins/locale");
|
|
235
|
+
|
|
236
|
+
/***/ }),
|
|
237
|
+
/* 10 */
|
|
238
|
+
/***/ (function(module, exports) {
|
|
239
|
+
|
|
240
|
+
module.exports = require("element-ui/lib/utils/resize-event");
|
|
241
|
+
|
|
242
|
+
/***/ }),
|
|
243
|
+
/* 11 */
|
|
244
|
+
/***/ (function(module, exports) {
|
|
245
|
+
|
|
246
|
+
module.exports = require("element-ui/lib/utils/shared");
|
|
247
|
+
|
|
248
|
+
/***/ }),
|
|
249
|
+
/* 12 */,
|
|
250
|
+
/* 13 */
|
|
251
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
252
|
+
|
|
253
|
+
"use strict";
|
|
254
|
+
// ESM COMPAT FLAG
|
|
255
|
+
__webpack_require__.r(__webpack_exports__);
|
|
256
|
+
|
|
257
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=048a9cde
|
|
258
|
+
var render = function () {
|
|
259
|
+
var _vm = this
|
|
260
|
+
var _h = _vm.$createElement
|
|
261
|
+
var _c = _vm._self._c || _h
|
|
262
|
+
return _c(
|
|
263
|
+
"div",
|
|
264
|
+
{
|
|
265
|
+
class: [
|
|
266
|
+
_vm.type === "textarea" ? "el-textarea" : "el-input",
|
|
267
|
+
_vm.inputSize ? "el-input--" + _vm.inputSize : "",
|
|
268
|
+
{
|
|
269
|
+
"is-disabled": _vm.inputDisabled,
|
|
270
|
+
"is-exceed": _vm.inputExceed,
|
|
271
|
+
"el-input-group": _vm.$slots.prepend || _vm.$slots.append,
|
|
272
|
+
"el-input-group--append": _vm.$slots.append,
|
|
273
|
+
"el-input-group--prepend": _vm.$slots.prepend,
|
|
274
|
+
"el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
|
|
275
|
+
"el-input--suffix":
|
|
276
|
+
_vm.$slots.suffix ||
|
|
277
|
+
_vm.suffixIcon ||
|
|
278
|
+
_vm.clearable ||
|
|
279
|
+
_vm.showPassword,
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
on: {
|
|
283
|
+
mouseenter: function ($event) {
|
|
284
|
+
_vm.hovering = true
|
|
285
|
+
},
|
|
286
|
+
mouseleave: function ($event) {
|
|
287
|
+
_vm.hovering = false
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
[
|
|
292
|
+
_vm.type !== "textarea"
|
|
293
|
+
? [
|
|
294
|
+
_vm.$slots.prepend
|
|
295
|
+
? _c(
|
|
296
|
+
"div",
|
|
297
|
+
{ staticClass: "el-input-group__prepend" },
|
|
298
|
+
[_vm._t("prepend")],
|
|
299
|
+
2
|
|
300
|
+
)
|
|
301
|
+
: _vm._e(),
|
|
302
|
+
_vm.type !== "textarea"
|
|
303
|
+
? _c(
|
|
304
|
+
"input",
|
|
305
|
+
_vm._b(
|
|
306
|
+
{
|
|
307
|
+
ref: "input",
|
|
308
|
+
staticClass: "el-input__inner",
|
|
309
|
+
attrs: {
|
|
310
|
+
tabindex: _vm.tabindex,
|
|
311
|
+
type: _vm.showPassword
|
|
312
|
+
? _vm.passwordVisible
|
|
313
|
+
? "text"
|
|
314
|
+
: "password"
|
|
315
|
+
: _vm.type,
|
|
316
|
+
disabled: _vm.inputDisabled,
|
|
317
|
+
readonly: _vm.readonly,
|
|
318
|
+
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
319
|
+
"aria-label": _vm.label,
|
|
320
|
+
},
|
|
321
|
+
on: {
|
|
322
|
+
compositionstart: _vm.handleCompositionStart,
|
|
323
|
+
compositionupdate: _vm.handleCompositionUpdate,
|
|
324
|
+
compositionend: _vm.handleCompositionEnd,
|
|
325
|
+
input: _vm.handleInput,
|
|
326
|
+
focus: _vm.handleFocus,
|
|
327
|
+
blur: _vm.handleBlur,
|
|
328
|
+
change: _vm.handleChange,
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
"input",
|
|
332
|
+
_vm.$attrs,
|
|
333
|
+
false
|
|
334
|
+
)
|
|
335
|
+
)
|
|
336
|
+
: _vm._e(),
|
|
337
|
+
_vm.$slots.prefix || _vm.prefixIcon
|
|
338
|
+
? _c(
|
|
339
|
+
"span",
|
|
340
|
+
{ staticClass: "el-input__prefix" },
|
|
341
|
+
[
|
|
342
|
+
_vm._t("prefix"),
|
|
343
|
+
_vm.prefixIcon
|
|
344
|
+
? _c("i", {
|
|
345
|
+
staticClass: "el-input__icon",
|
|
346
|
+
class: _vm.prefixIcon,
|
|
347
|
+
})
|
|
348
|
+
: _vm._e(),
|
|
349
|
+
],
|
|
350
|
+
2
|
|
351
|
+
)
|
|
352
|
+
: _vm._e(),
|
|
353
|
+
_vm.getSuffixVisible()
|
|
354
|
+
? _c("span", { staticClass: "el-input__suffix" }, [
|
|
355
|
+
_c(
|
|
356
|
+
"span",
|
|
357
|
+
{ staticClass: "el-input__suffix-inner" },
|
|
358
|
+
[
|
|
359
|
+
!_vm.showClear ||
|
|
360
|
+
!_vm.showPwdVisible ||
|
|
361
|
+
!_vm.isWordLimitVisible
|
|
362
|
+
? [
|
|
363
|
+
_vm._t("suffix"),
|
|
364
|
+
_vm.suffixIcon
|
|
365
|
+
? _c("i", {
|
|
366
|
+
staticClass: "el-input__icon",
|
|
367
|
+
class: _vm.suffixIcon,
|
|
368
|
+
})
|
|
369
|
+
: _vm._e(),
|
|
370
|
+
]
|
|
371
|
+
: _vm._e(),
|
|
372
|
+
_vm.showClear
|
|
373
|
+
? _c("i", {
|
|
374
|
+
staticClass:
|
|
375
|
+
"el-input__icon el-icon-circle-close el-input__clear",
|
|
376
|
+
on: {
|
|
377
|
+
mousedown: function ($event) {
|
|
378
|
+
$event.preventDefault()
|
|
379
|
+
},
|
|
380
|
+
click: _vm.clear,
|
|
381
|
+
},
|
|
382
|
+
})
|
|
383
|
+
: _vm._e(),
|
|
384
|
+
_vm.showPwdVisible
|
|
385
|
+
? _c("i", {
|
|
386
|
+
staticClass:
|
|
387
|
+
"el-input__icon el-icon-view el-input__clear",
|
|
388
|
+
on: { click: _vm.handlePasswordVisible },
|
|
389
|
+
})
|
|
390
|
+
: _vm._e(),
|
|
391
|
+
_vm.isWordLimitVisible
|
|
392
|
+
? _c("span", { staticClass: "el-input__count" }, [
|
|
393
|
+
_c(
|
|
394
|
+
"span",
|
|
395
|
+
{ staticClass: "el-input__count-inner" },
|
|
396
|
+
[
|
|
397
|
+
_vm._v(
|
|
398
|
+
"\n\t\t\t\t\t\t\t" +
|
|
399
|
+
_vm._s(_vm.textLength) +
|
|
400
|
+
"/" +
|
|
401
|
+
_vm._s(_vm.upperLimit) +
|
|
402
|
+
"\n\t\t\t\t\t\t"
|
|
403
|
+
),
|
|
404
|
+
]
|
|
405
|
+
),
|
|
406
|
+
])
|
|
407
|
+
: _vm._e(),
|
|
408
|
+
],
|
|
409
|
+
2
|
|
410
|
+
),
|
|
411
|
+
_vm.validateState
|
|
412
|
+
? _c("i", {
|
|
413
|
+
staticClass: "el-input__icon",
|
|
414
|
+
class: ["el-input__validateIcon", _vm.validateIcon],
|
|
415
|
+
})
|
|
416
|
+
: _vm._e(),
|
|
417
|
+
])
|
|
418
|
+
: _vm._e(),
|
|
419
|
+
_vm.$slots.append
|
|
420
|
+
? _c(
|
|
421
|
+
"div",
|
|
422
|
+
{ staticClass: "el-input-group__append" },
|
|
423
|
+
[_vm._t("append")],
|
|
424
|
+
2
|
|
425
|
+
)
|
|
426
|
+
: _vm._e(),
|
|
427
|
+
]
|
|
428
|
+
: _c(
|
|
429
|
+
"textarea",
|
|
430
|
+
_vm._b(
|
|
431
|
+
{
|
|
432
|
+
ref: "textarea",
|
|
433
|
+
staticClass: "el-textarea__inner",
|
|
434
|
+
style: _vm.textareaStyle,
|
|
435
|
+
attrs: {
|
|
436
|
+
tabindex: _vm.tabindex,
|
|
437
|
+
disabled: _vm.inputDisabled,
|
|
438
|
+
readonly: _vm.readonly,
|
|
439
|
+
autocomplete: _vm.autoComplete || _vm.autocomplete,
|
|
440
|
+
"aria-label": _vm.label,
|
|
441
|
+
},
|
|
442
|
+
on: {
|
|
443
|
+
compositionstart: _vm.handleCompositionStart,
|
|
444
|
+
compositionupdate: _vm.handleCompositionUpdate,
|
|
445
|
+
compositionend: _vm.handleCompositionEnd,
|
|
446
|
+
input: _vm.handleInput,
|
|
447
|
+
focus: _vm.handleFocus,
|
|
448
|
+
blur: _vm.handleBlur,
|
|
449
|
+
change: _vm.handleChange,
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
"textarea",
|
|
453
|
+
_vm.$attrs,
|
|
454
|
+
false
|
|
455
|
+
)
|
|
456
|
+
),
|
|
457
|
+
_vm.isWordLimitVisible && _vm.type === "textarea"
|
|
458
|
+
? _c("span", { staticClass: "el-input__count" }, [
|
|
459
|
+
_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
|
|
460
|
+
])
|
|
461
|
+
: _vm._e(),
|
|
462
|
+
],
|
|
463
|
+
2
|
|
464
|
+
)
|
|
465
|
+
}
|
|
466
|
+
var staticRenderFns = []
|
|
467
|
+
render._withStripped = true
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=048a9cde
|
|
471
|
+
|
|
472
|
+
// EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
|
|
473
|
+
var emitter_ = __webpack_require__(4);
|
|
474
|
+
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
475
|
+
|
|
476
|
+
// EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
|
|
477
|
+
var migrating_ = __webpack_require__(7);
|
|
478
|
+
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
|
|
479
|
+
|
|
480
|
+
// CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
|
|
481
|
+
var hiddenTextarea = void 0;
|
|
482
|
+
|
|
483
|
+
var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
|
|
484
|
+
|
|
485
|
+
var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
|
|
486
|
+
|
|
487
|
+
function calculateNodeStyling(targetElement) {
|
|
488
|
+
var style = window.getComputedStyle(targetElement);
|
|
489
|
+
|
|
490
|
+
var boxSizing = style.getPropertyValue('box-sizing');
|
|
491
|
+
|
|
492
|
+
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
|
|
493
|
+
|
|
494
|
+
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
|
|
495
|
+
|
|
496
|
+
var contextStyle = CONTEXT_STYLE.map(function (name) {
|
|
497
|
+
return name + ':' + style.getPropertyValue(name);
|
|
498
|
+
}).join(';');
|
|
499
|
+
|
|
500
|
+
return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function calcTextareaHeight(targetElement) {
|
|
504
|
+
var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
505
|
+
var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
506
|
+
|
|
507
|
+
if (!hiddenTextarea) {
|
|
508
|
+
hiddenTextarea = document.createElement('textarea');
|
|
509
|
+
document.body.appendChild(hiddenTextarea);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
var _calculateNodeStyling = calculateNodeStyling(targetElement),
|
|
513
|
+
paddingSize = _calculateNodeStyling.paddingSize,
|
|
514
|
+
borderSize = _calculateNodeStyling.borderSize,
|
|
515
|
+
boxSizing = _calculateNodeStyling.boxSizing,
|
|
516
|
+
contextStyle = _calculateNodeStyling.contextStyle;
|
|
517
|
+
|
|
518
|
+
hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
|
|
519
|
+
hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
|
|
520
|
+
|
|
521
|
+
var height = hiddenTextarea.scrollHeight;
|
|
522
|
+
var result = {};
|
|
523
|
+
|
|
524
|
+
if (boxSizing === 'border-box') {
|
|
525
|
+
height = height + borderSize;
|
|
526
|
+
} else if (boxSizing === 'content-box') {
|
|
527
|
+
height = height - paddingSize;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
hiddenTextarea.value = '';
|
|
531
|
+
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
532
|
+
|
|
533
|
+
if (minRows !== null) {
|
|
534
|
+
var minHeight = singleRowHeight * minRows;
|
|
535
|
+
if (boxSizing === 'border-box') {
|
|
536
|
+
minHeight = minHeight + paddingSize + borderSize;
|
|
537
|
+
}
|
|
538
|
+
height = Math.max(minHeight, height);
|
|
539
|
+
result.minHeight = minHeight + 'px';
|
|
540
|
+
}
|
|
541
|
+
if (maxRows !== null) {
|
|
542
|
+
var maxHeight = singleRowHeight * maxRows;
|
|
543
|
+
if (boxSizing === 'border-box') {
|
|
544
|
+
maxHeight = maxHeight + paddingSize + borderSize;
|
|
545
|
+
}
|
|
546
|
+
height = Math.min(maxHeight, height);
|
|
547
|
+
}
|
|
548
|
+
result.height = height + 'px';
|
|
549
|
+
hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
|
|
550
|
+
hiddenTextarea = null;
|
|
551
|
+
return result;
|
|
552
|
+
};
|
|
553
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
|
|
554
|
+
var merge_ = __webpack_require__(6);
|
|
555
|
+
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
556
|
+
|
|
557
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
|
|
558
|
+
var shared_ = __webpack_require__(11);
|
|
559
|
+
|
|
560
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
|
|
561
|
+
//
|
|
562
|
+
//
|
|
563
|
+
//
|
|
564
|
+
//
|
|
565
|
+
//
|
|
566
|
+
//
|
|
567
|
+
//
|
|
568
|
+
//
|
|
569
|
+
//
|
|
570
|
+
//
|
|
571
|
+
//
|
|
572
|
+
//
|
|
573
|
+
//
|
|
574
|
+
//
|
|
575
|
+
//
|
|
576
|
+
//
|
|
577
|
+
//
|
|
578
|
+
//
|
|
579
|
+
//
|
|
580
|
+
//
|
|
581
|
+
//
|
|
582
|
+
//
|
|
583
|
+
//
|
|
584
|
+
//
|
|
585
|
+
//
|
|
586
|
+
//
|
|
587
|
+
//
|
|
588
|
+
//
|
|
589
|
+
//
|
|
590
|
+
//
|
|
591
|
+
//
|
|
592
|
+
//
|
|
593
|
+
//
|
|
594
|
+
//
|
|
595
|
+
//
|
|
596
|
+
//
|
|
597
|
+
//
|
|
598
|
+
//
|
|
599
|
+
//
|
|
600
|
+
//
|
|
601
|
+
//
|
|
602
|
+
//
|
|
603
|
+
//
|
|
604
|
+
//
|
|
605
|
+
//
|
|
606
|
+
//
|
|
607
|
+
//
|
|
608
|
+
//
|
|
609
|
+
//
|
|
610
|
+
//
|
|
611
|
+
//
|
|
612
|
+
//
|
|
613
|
+
//
|
|
614
|
+
//
|
|
615
|
+
//
|
|
616
|
+
//
|
|
617
|
+
//
|
|
618
|
+
//
|
|
619
|
+
//
|
|
620
|
+
//
|
|
621
|
+
//
|
|
622
|
+
//
|
|
623
|
+
//
|
|
624
|
+
//
|
|
625
|
+
//
|
|
626
|
+
//
|
|
627
|
+
//
|
|
628
|
+
//
|
|
629
|
+
//
|
|
630
|
+
//
|
|
631
|
+
//
|
|
632
|
+
//
|
|
633
|
+
//
|
|
634
|
+
//
|
|
635
|
+
//
|
|
636
|
+
//
|
|
637
|
+
//
|
|
638
|
+
//
|
|
639
|
+
//
|
|
640
|
+
//
|
|
641
|
+
//
|
|
642
|
+
//
|
|
643
|
+
//
|
|
644
|
+
//
|
|
645
|
+
//
|
|
646
|
+
//
|
|
647
|
+
//
|
|
648
|
+
//
|
|
649
|
+
//
|
|
650
|
+
//
|
|
651
|
+
//
|
|
652
|
+
//
|
|
653
|
+
//
|
|
654
|
+
//
|
|
655
|
+
//
|
|
656
|
+
//
|
|
657
|
+
//
|
|
658
|
+
//
|
|
659
|
+
//
|
|
660
|
+
//
|
|
661
|
+
//
|
|
662
|
+
//
|
|
663
|
+
//
|
|
664
|
+
//
|
|
665
|
+
//
|
|
666
|
+
//
|
|
667
|
+
//
|
|
668
|
+
//
|
|
669
|
+
//
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
/* harmony default export */ var inputvue_type_script_lang_js = ({
|
|
678
|
+
name: 'ElInput',
|
|
679
|
+
|
|
680
|
+
componentName: 'ElInput',
|
|
681
|
+
|
|
682
|
+
mixins: [emitter_default.a, migrating_default.a],
|
|
683
|
+
|
|
684
|
+
inheritAttrs: false,
|
|
685
|
+
|
|
686
|
+
inject: {
|
|
687
|
+
elForm: {
|
|
688
|
+
default: ''
|
|
689
|
+
},
|
|
690
|
+
elFormItem: {
|
|
691
|
+
default: ''
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
|
|
695
|
+
data: function data() {
|
|
696
|
+
return {
|
|
697
|
+
textareaCalcStyle: {},
|
|
698
|
+
hovering: false,
|
|
699
|
+
focused: false,
|
|
700
|
+
isComposing: false,
|
|
701
|
+
passwordVisible: false
|
|
702
|
+
};
|
|
703
|
+
},
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
props: {
|
|
707
|
+
value: [String, Number],
|
|
708
|
+
size: String,
|
|
709
|
+
resize: String,
|
|
710
|
+
form: String,
|
|
711
|
+
disabled: Boolean,
|
|
712
|
+
readonly: Boolean,
|
|
713
|
+
type: {
|
|
714
|
+
type: String,
|
|
715
|
+
default: 'text'
|
|
716
|
+
},
|
|
717
|
+
autosize: {
|
|
718
|
+
type: [Boolean, Object],
|
|
719
|
+
default: false
|
|
720
|
+
},
|
|
721
|
+
autocomplete: {
|
|
722
|
+
type: String,
|
|
723
|
+
default: 'off'
|
|
724
|
+
},
|
|
725
|
+
/** @Deprecated in next major version */
|
|
726
|
+
autoComplete: {
|
|
727
|
+
type: String,
|
|
728
|
+
validator: function validator(val) {
|
|
729
|
+
false && false;
|
|
730
|
+
return true;
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
validateEvent: {
|
|
734
|
+
type: Boolean,
|
|
735
|
+
default: true
|
|
736
|
+
},
|
|
737
|
+
suffixIcon: String,
|
|
738
|
+
prefixIcon: String,
|
|
739
|
+
label: String,
|
|
740
|
+
clearable: {
|
|
741
|
+
type: Boolean,
|
|
742
|
+
default: false
|
|
743
|
+
},
|
|
744
|
+
showPassword: {
|
|
745
|
+
type: Boolean,
|
|
746
|
+
default: false
|
|
747
|
+
},
|
|
748
|
+
showWordLimit: {
|
|
749
|
+
type: Boolean,
|
|
750
|
+
default: false
|
|
751
|
+
},
|
|
752
|
+
tabindex: String
|
|
753
|
+
},
|
|
754
|
+
|
|
755
|
+
computed: {
|
|
756
|
+
_elFormItemSize: function _elFormItemSize() {
|
|
757
|
+
return (this.elFormItem || {}).elFormItemSize;
|
|
758
|
+
},
|
|
759
|
+
validateState: function validateState() {
|
|
760
|
+
return this.elFormItem ? this.elFormItem.validateState : '';
|
|
761
|
+
},
|
|
762
|
+
needStatusIcon: function needStatusIcon() {
|
|
763
|
+
return this.elForm ? this.elForm.statusIcon : false;
|
|
764
|
+
},
|
|
765
|
+
validateIcon: function validateIcon() {
|
|
766
|
+
return {
|
|
767
|
+
validating: 'el-icon-loading',
|
|
768
|
+
success: 'el-icon-circle-check',
|
|
769
|
+
error: 'el-icon-circle-close'
|
|
770
|
+
}[this.validateState];
|
|
771
|
+
},
|
|
772
|
+
textareaStyle: function textareaStyle() {
|
|
773
|
+
return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
|
|
774
|
+
},
|
|
775
|
+
inputSize: function inputSize() {
|
|
776
|
+
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
777
|
+
},
|
|
778
|
+
inputDisabled: function inputDisabled() {
|
|
779
|
+
return this.disabled || (this.elForm || {}).disabled;
|
|
780
|
+
},
|
|
781
|
+
nativeInputValue: function nativeInputValue() {
|
|
782
|
+
return this.value === null || this.value === undefined ? '' : String(this.value);
|
|
783
|
+
},
|
|
784
|
+
showClear: function showClear() {
|
|
785
|
+
return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
|
|
786
|
+
},
|
|
787
|
+
showPwdVisible: function showPwdVisible() {
|
|
788
|
+
return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
|
|
789
|
+
},
|
|
790
|
+
isWordLimitVisible: function isWordLimitVisible() {
|
|
791
|
+
return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
|
|
792
|
+
},
|
|
793
|
+
upperLimit: function upperLimit() {
|
|
794
|
+
return this.$attrs.maxlength;
|
|
795
|
+
},
|
|
796
|
+
textLength: function textLength() {
|
|
797
|
+
if (typeof this.value === 'number') {
|
|
798
|
+
return String(this.value).length;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
return (this.value || '').length;
|
|
802
|
+
},
|
|
803
|
+
inputExceed: function inputExceed() {
|
|
804
|
+
// show exceed style if length of initial value greater then maxlength
|
|
805
|
+
return this.isWordLimitVisible && this.textLength > this.upperLimit;
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
|
|
809
|
+
watch: {
|
|
810
|
+
value: function value(val) {
|
|
811
|
+
this.$nextTick(this.resizeTextarea);
|
|
812
|
+
if (this.validateEvent) {
|
|
813
|
+
this.dispatch('ElFormItem', 'el.form.change', [val]);
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
|
|
817
|
+
// native input value is set explicitly
|
|
818
|
+
// do not use v-model / :value in template
|
|
819
|
+
// see: https://github.com/ElemeFE/element/issues/14521
|
|
820
|
+
nativeInputValue: function nativeInputValue() {
|
|
821
|
+
this.setNativeInputValue();
|
|
822
|
+
},
|
|
823
|
+
|
|
824
|
+
// when change between <input> and <textarea>,
|
|
825
|
+
// update DOM dependent value and styles
|
|
826
|
+
// https://github.com/ElemeFE/element/issues/14857
|
|
827
|
+
type: function type() {
|
|
828
|
+
var _this = this;
|
|
829
|
+
|
|
830
|
+
this.$nextTick(function () {
|
|
831
|
+
_this.setNativeInputValue();
|
|
832
|
+
_this.resizeTextarea();
|
|
833
|
+
_this.updateIconOffset();
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
|
|
838
|
+
methods: {
|
|
839
|
+
focus: function focus() {
|
|
840
|
+
this.getInput().focus();
|
|
841
|
+
},
|
|
842
|
+
blur: function blur() {
|
|
843
|
+
this.getInput().blur();
|
|
844
|
+
},
|
|
845
|
+
getMigratingConfig: function getMigratingConfig() {
|
|
846
|
+
return {
|
|
847
|
+
props: {
|
|
848
|
+
'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
|
|
849
|
+
'on-icon-click': 'on-icon-click is removed.'
|
|
850
|
+
},
|
|
851
|
+
events: {
|
|
852
|
+
'click': 'click is removed.'
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
},
|
|
856
|
+
handleBlur: function handleBlur(event) {
|
|
857
|
+
this.focused = false;
|
|
858
|
+
this.$emit('blur', event);
|
|
859
|
+
if (this.validateEvent) {
|
|
860
|
+
this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
select: function select() {
|
|
864
|
+
this.getInput().select();
|
|
865
|
+
},
|
|
866
|
+
resizeTextarea: function resizeTextarea() {
|
|
867
|
+
if (this.$isServer) return;
|
|
868
|
+
var autosize = this.autosize,
|
|
869
|
+
type = this.type;
|
|
870
|
+
|
|
871
|
+
if (type !== 'textarea') return;
|
|
872
|
+
if (!autosize) {
|
|
873
|
+
this.textareaCalcStyle = {
|
|
874
|
+
minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
|
|
875
|
+
};
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
var minRows = autosize.minRows;
|
|
879
|
+
var maxRows = autosize.maxRows;
|
|
880
|
+
|
|
881
|
+
this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
|
|
882
|
+
},
|
|
883
|
+
setNativeInputValue: function setNativeInputValue() {
|
|
884
|
+
var input = this.getInput();
|
|
885
|
+
if (!input) return;
|
|
886
|
+
if (input.value === this.nativeInputValue) return;
|
|
887
|
+
input.value = this.nativeInputValue;
|
|
888
|
+
},
|
|
889
|
+
handleFocus: function handleFocus(event) {
|
|
890
|
+
this.focused = true;
|
|
891
|
+
this.$emit('focus', event);
|
|
892
|
+
},
|
|
893
|
+
handleCompositionStart: function handleCompositionStart(event) {
|
|
894
|
+
this.$emit('compositionstart', event);
|
|
895
|
+
this.isComposing = true;
|
|
896
|
+
},
|
|
897
|
+
handleCompositionUpdate: function handleCompositionUpdate(event) {
|
|
898
|
+
this.$emit('compositionupdate', event);
|
|
899
|
+
var text = event.target.value;
|
|
900
|
+
var lastCharacter = text[text.length - 1] || '';
|
|
901
|
+
this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
|
|
902
|
+
},
|
|
903
|
+
handleCompositionEnd: function handleCompositionEnd(event) {
|
|
904
|
+
this.$emit('compositionend', event);
|
|
905
|
+
if (this.isComposing) {
|
|
906
|
+
this.isComposing = false;
|
|
907
|
+
this.handleInput(event);
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
handleInput: function handleInput(event) {
|
|
911
|
+
// should not emit input during composition
|
|
912
|
+
// see: https://github.com/ElemeFE/element/issues/10516
|
|
913
|
+
if (this.isComposing) return;
|
|
914
|
+
|
|
915
|
+
// hack for https://github.com/ElemeFE/element/issues/8548
|
|
916
|
+
// should remove the following line when we don't support IE
|
|
917
|
+
if (event.target.value === this.nativeInputValue) return;
|
|
918
|
+
|
|
919
|
+
this.$emit('input', event.target.value);
|
|
920
|
+
|
|
921
|
+
// ensure native input value is controlled
|
|
922
|
+
// see: https://github.com/ElemeFE/element/issues/12850
|
|
923
|
+
this.$nextTick(this.setNativeInputValue);
|
|
924
|
+
},
|
|
925
|
+
handleChange: function handleChange(event) {
|
|
926
|
+
this.$emit('change', event.target.value);
|
|
927
|
+
},
|
|
928
|
+
calcIconOffset: function calcIconOffset(place) {
|
|
929
|
+
var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
|
|
930
|
+
if (!elList.length) return;
|
|
931
|
+
var el = null;
|
|
932
|
+
for (var i = 0; i < elList.length; i++) {
|
|
933
|
+
if (elList[i].parentNode === this.$el) {
|
|
934
|
+
el = elList[i];
|
|
935
|
+
break;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
if (!el) return;
|
|
939
|
+
var pendantMap = {
|
|
940
|
+
suffix: 'append',
|
|
941
|
+
prefix: 'prepend'
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
var pendant = pendantMap[place];
|
|
945
|
+
if (this.$slots[pendant]) {
|
|
946
|
+
el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
|
|
947
|
+
} else {
|
|
948
|
+
el.removeAttribute('style');
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
updateIconOffset: function updateIconOffset() {
|
|
952
|
+
this.calcIconOffset('prefix');
|
|
953
|
+
this.calcIconOffset('suffix');
|
|
954
|
+
},
|
|
955
|
+
clear: function clear() {
|
|
956
|
+
this.$emit('input', '');
|
|
957
|
+
this.$emit('change', '');
|
|
958
|
+
this.$emit('clear');
|
|
959
|
+
},
|
|
960
|
+
handlePasswordVisible: function handlePasswordVisible() {
|
|
961
|
+
var _this2 = this;
|
|
962
|
+
|
|
963
|
+
this.passwordVisible = !this.passwordVisible;
|
|
964
|
+
this.$nextTick(function () {
|
|
965
|
+
_this2.focus();
|
|
966
|
+
});
|
|
967
|
+
},
|
|
968
|
+
getInput: function getInput() {
|
|
969
|
+
return this.$refs.input || this.$refs.textarea;
|
|
970
|
+
},
|
|
971
|
+
getSuffixVisible: function getSuffixVisible() {
|
|
972
|
+
return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
|
|
976
|
+
created: function created() {
|
|
977
|
+
this.$on('inputSelect', this.select);
|
|
978
|
+
},
|
|
979
|
+
mounted: function mounted() {
|
|
980
|
+
this.setNativeInputValue();
|
|
981
|
+
this.resizeTextarea();
|
|
982
|
+
this.updateIconOffset();
|
|
983
|
+
},
|
|
984
|
+
updated: function updated() {
|
|
985
|
+
this.$nextTick(this.updateIconOffset);
|
|
986
|
+
}
|
|
987
|
+
});
|
|
988
|
+
// CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
|
|
989
|
+
/* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
|
|
990
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
991
|
+
var componentNormalizer = __webpack_require__(0);
|
|
992
|
+
|
|
993
|
+
// CONCATENATED MODULE: ./packages/input/src/input.vue
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
/* normalize component */
|
|
1000
|
+
|
|
1001
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
1002
|
+
src_inputvue_type_script_lang_js,
|
|
1003
|
+
render,
|
|
1004
|
+
staticRenderFns,
|
|
1005
|
+
false,
|
|
1006
|
+
null,
|
|
1007
|
+
null,
|
|
1008
|
+
null
|
|
1009
|
+
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
/* harmony default export */ var input = (component.exports);
|
|
1013
|
+
// CONCATENATED MODULE: ./packages/input/index.js
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
/* istanbul ignore next */
|
|
1017
|
+
input.install = function (Vue) {
|
|
1018
|
+
Vue.component(input.name, input);
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
/* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
|
|
1022
|
+
|
|
1023
|
+
/***/ }),
|
|
1024
|
+
/* 14 */
|
|
1025
|
+
/***/ (function(module, exports) {
|
|
1026
|
+
|
|
1027
|
+
module.exports = require("element-ui/lib/utils/clickoutside");
|
|
1028
|
+
|
|
1029
|
+
/***/ }),
|
|
1030
|
+
/* 15 */
|
|
1031
|
+
/***/ (function(module, exports) {
|
|
89
1032
|
|
|
90
|
-
|
|
1033
|
+
module.exports = require("throttle-debounce/debounce");
|
|
1034
|
+
|
|
1035
|
+
/***/ }),
|
|
1036
|
+
/* 16 */,
|
|
1037
|
+
/* 17 */
|
|
1038
|
+
/***/ (function(module, exports) {
|
|
1039
|
+
|
|
1040
|
+
module.exports = require("element-ui/lib/utils/scrollbar-width");
|
|
1041
|
+
|
|
1042
|
+
/***/ }),
|
|
1043
|
+
/* 18 */
|
|
91
1044
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
1045
|
|
|
93
1046
|
"use strict";
|
|
94
|
-
|
|
95
|
-
|
|
1047
|
+
// ESM COMPAT FLAG
|
|
1048
|
+
__webpack_require__.r(__webpack_exports__);
|
|
96
1049
|
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
// be included in the final webpack user bundle.
|
|
1050
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
|
|
1051
|
+
var resize_event_ = __webpack_require__(10);
|
|
100
1052
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
staticRenderFns,
|
|
105
|
-
functionalTemplate,
|
|
106
|
-
injectStyles,
|
|
107
|
-
scopeId,
|
|
108
|
-
moduleIdentifier /* server only */,
|
|
109
|
-
shadowMode /* vue-cli only */
|
|
110
|
-
) {
|
|
111
|
-
// Vue.extend constructor export interop
|
|
112
|
-
var options =
|
|
113
|
-
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
1053
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/scrollbar-width"
|
|
1054
|
+
var scrollbar_width_ = __webpack_require__(17);
|
|
1055
|
+
var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
|
|
114
1056
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
options.render = render
|
|
118
|
-
options.staticRenderFns = staticRenderFns
|
|
119
|
-
options._compiled = true
|
|
120
|
-
}
|
|
1057
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
1058
|
+
var util_ = __webpack_require__(3);
|
|
121
1059
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1060
|
+
// EXTERNAL MODULE: external "element-ui/lib/utils/dom"
|
|
1061
|
+
var dom_ = __webpack_require__(1);
|
|
1062
|
+
|
|
1063
|
+
// CONCATENATED MODULE: ./packages/scrollbar/src/util.js
|
|
1064
|
+
var BAR_MAP = {
|
|
1065
|
+
vertical: {
|
|
1066
|
+
offset: 'offsetHeight',
|
|
1067
|
+
scroll: 'scrollTop',
|
|
1068
|
+
scrollSize: 'scrollHeight',
|
|
1069
|
+
size: 'height',
|
|
1070
|
+
key: 'vertical',
|
|
1071
|
+
axis: 'Y',
|
|
1072
|
+
client: 'clientY',
|
|
1073
|
+
direction: 'top'
|
|
1074
|
+
},
|
|
1075
|
+
horizontal: {
|
|
1076
|
+
offset: 'offsetWidth',
|
|
1077
|
+
scroll: 'scrollLeft',
|
|
1078
|
+
scrollSize: 'scrollWidth',
|
|
1079
|
+
size: 'width',
|
|
1080
|
+
key: 'horizontal',
|
|
1081
|
+
axis: 'X',
|
|
1082
|
+
client: 'clientX',
|
|
1083
|
+
direction: 'left'
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
126
1086
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1087
|
+
function renderThumbStyle(_ref) {
|
|
1088
|
+
var move = _ref.move,
|
|
1089
|
+
size = _ref.size,
|
|
1090
|
+
bar = _ref.bar;
|
|
131
1091
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
// server build
|
|
135
|
-
hook = function (context) {
|
|
136
|
-
// 2.3 injection
|
|
137
|
-
context =
|
|
138
|
-
context || // cached call
|
|
139
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
140
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
141
|
-
// 2.2 with runInNewContext: true
|
|
142
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
143
|
-
context = __VUE_SSR_CONTEXT__
|
|
144
|
-
}
|
|
145
|
-
// inject component styles
|
|
146
|
-
if (injectStyles) {
|
|
147
|
-
injectStyles.call(this, context)
|
|
148
|
-
}
|
|
149
|
-
// register component module identifier for async chunk inferrence
|
|
150
|
-
if (context && context._registeredComponents) {
|
|
151
|
-
context._registeredComponents.add(moduleIdentifier)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
// used by ssr in case component is cached and beforeCreate
|
|
155
|
-
// never gets called
|
|
156
|
-
options._ssrRegister = hook
|
|
157
|
-
} else if (injectStyles) {
|
|
158
|
-
hook = shadowMode
|
|
159
|
-
? function () {
|
|
160
|
-
injectStyles.call(
|
|
161
|
-
this,
|
|
162
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
: injectStyles
|
|
166
|
-
}
|
|
1092
|
+
var style = {};
|
|
1093
|
+
var translate = 'translate' + bar.axis + '(' + move + '%)';
|
|
167
1094
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
options._injectStyles = hook
|
|
173
|
-
// register for functional component in vue file
|
|
174
|
-
var originalRender = options.render
|
|
175
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
176
|
-
hook.call(context)
|
|
177
|
-
return originalRender(h, context)
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
// inject component registration as beforeCreate hook
|
|
181
|
-
var existing = options.beforeCreate
|
|
182
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
183
|
-
}
|
|
184
|
-
}
|
|
1095
|
+
style[bar.size] = size;
|
|
1096
|
+
style.transform = translate;
|
|
1097
|
+
style.msTransform = translate;
|
|
1098
|
+
style.webkitTransform = translate;
|
|
185
1099
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
}
|
|
1100
|
+
return style;
|
|
1101
|
+
};
|
|
1102
|
+
// CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
|
|
191
1103
|
|
|
192
1104
|
|
|
193
|
-
/***/ }),
|
|
194
1105
|
|
|
195
|
-
|
|
196
|
-
|
|
1106
|
+
/* istanbul ignore next */
|
|
1107
|
+
/* harmony default export */ var src_bar = ({
|
|
1108
|
+
name: 'Bar',
|
|
197
1109
|
|
|
198
|
-
|
|
1110
|
+
props: {
|
|
1111
|
+
vertical: Boolean,
|
|
1112
|
+
size: String,
|
|
1113
|
+
move: Number
|
|
1114
|
+
},
|
|
199
1115
|
|
|
200
|
-
|
|
1116
|
+
computed: {
|
|
1117
|
+
bar: function bar() {
|
|
1118
|
+
return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
|
|
1119
|
+
},
|
|
1120
|
+
wrap: function wrap() {
|
|
1121
|
+
return this.$parent.wrap;
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
201
1124
|
|
|
202
|
-
|
|
203
|
-
|
|
1125
|
+
render: function render(h) {
|
|
1126
|
+
var size = this.size,
|
|
1127
|
+
move = this.move,
|
|
1128
|
+
bar = this.bar;
|
|
204
1129
|
|
|
205
|
-
module.exports = require("element-ui/lib/utils/clickoutside");
|
|
206
1130
|
|
|
207
|
-
|
|
1131
|
+
return h(
|
|
1132
|
+
'div',
|
|
1133
|
+
{
|
|
1134
|
+
'class': ['el-scrollbar__bar', 'is-' + bar.key],
|
|
1135
|
+
on: {
|
|
1136
|
+
'mousedown': this.clickTrackHandler
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
[h('div', {
|
|
1140
|
+
ref: 'thumb',
|
|
1141
|
+
'class': 'el-scrollbar__thumb',
|
|
1142
|
+
on: {
|
|
1143
|
+
'mousedown': this.clickThumbHandler
|
|
1144
|
+
},
|
|
1145
|
+
|
|
1146
|
+
style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
|
|
1147
|
+
);
|
|
1148
|
+
},
|
|
208
1149
|
|
|
209
|
-
/***/ 16:
|
|
210
|
-
/***/ (function(module, exports) {
|
|
211
1150
|
|
|
212
|
-
|
|
1151
|
+
methods: {
|
|
1152
|
+
clickThumbHandler: function clickThumbHandler(e) {
|
|
1153
|
+
// prevent click event of right button
|
|
1154
|
+
if (e.ctrlKey || e.button === 2) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
this.startDrag(e);
|
|
1158
|
+
this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
|
|
1159
|
+
},
|
|
1160
|
+
clickTrackHandler: function clickTrackHandler(e) {
|
|
1161
|
+
var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
|
|
1162
|
+
var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
|
|
1163
|
+
var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
|
|
213
1164
|
|
|
214
|
-
|
|
1165
|
+
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
|
|
1166
|
+
},
|
|
1167
|
+
startDrag: function startDrag(e) {
|
|
1168
|
+
e.stopImmediatePropagation();
|
|
1169
|
+
this.cursorDown = true;
|
|
215
1170
|
|
|
216
|
-
|
|
217
|
-
|
|
1171
|
+
Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
|
|
1172
|
+
Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
|
|
1173
|
+
document.onselectstart = function () {
|
|
1174
|
+
return false;
|
|
1175
|
+
};
|
|
1176
|
+
},
|
|
1177
|
+
mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
|
|
1178
|
+
if (this.cursorDown === false) return;
|
|
1179
|
+
var prevPage = this[this.bar.axis];
|
|
218
1180
|
|
|
219
|
-
|
|
1181
|
+
if (!prevPage) return;
|
|
220
1182
|
|
|
221
|
-
|
|
1183
|
+
var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
|
|
1184
|
+
var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
|
|
1185
|
+
var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
|
|
222
1186
|
|
|
223
|
-
|
|
224
|
-
|
|
1187
|
+
this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
|
|
1188
|
+
},
|
|
1189
|
+
mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
|
|
1190
|
+
this.cursorDown = false;
|
|
1191
|
+
this[this.bar.axis] = 0;
|
|
1192
|
+
Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
|
|
1193
|
+
document.onselectstart = null;
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
225
1196
|
|
|
226
|
-
|
|
1197
|
+
destroyed: function destroyed() {
|
|
1198
|
+
Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
// CONCATENATED MODULE: ./packages/scrollbar/src/main.js
|
|
1202
|
+
// reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
|
|
227
1203
|
|
|
228
|
-
/***/ }),
|
|
229
1204
|
|
|
230
|
-
/***/ 21:
|
|
231
|
-
/***/ (function(module, exports) {
|
|
232
1205
|
|
|
233
|
-
module.exports = require("element-ui/lib/utils/shared");
|
|
234
1206
|
|
|
235
|
-
/***/ }),
|
|
236
1207
|
|
|
237
|
-
/***/ 22:
|
|
238
|
-
/***/ (function(module, exports) {
|
|
239
1208
|
|
|
240
|
-
|
|
1209
|
+
/* istanbul ignore next */
|
|
1210
|
+
/* harmony default export */ var main = ({
|
|
1211
|
+
name: 'ElScrollbar',
|
|
241
1212
|
|
|
242
|
-
|
|
1213
|
+
components: { Bar: src_bar },
|
|
243
1214
|
|
|
244
|
-
|
|
245
|
-
|
|
1215
|
+
props: {
|
|
1216
|
+
native: Boolean,
|
|
1217
|
+
wrapStyle: {},
|
|
1218
|
+
wrapClass: {},
|
|
1219
|
+
viewClass: {},
|
|
1220
|
+
viewStyle: {},
|
|
1221
|
+
noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
|
|
1222
|
+
tag: {
|
|
1223
|
+
type: String,
|
|
1224
|
+
default: 'div'
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
246
1227
|
|
|
247
|
-
|
|
1228
|
+
data: function data() {
|
|
1229
|
+
return {
|
|
1230
|
+
sizeWidth: '0',
|
|
1231
|
+
sizeHeight: '0',
|
|
1232
|
+
moveX: 0,
|
|
1233
|
+
moveY: 0
|
|
1234
|
+
};
|
|
1235
|
+
},
|
|
248
1236
|
|
|
249
|
-
/***/ }),
|
|
250
1237
|
|
|
251
|
-
|
|
252
|
-
|
|
1238
|
+
computed: {
|
|
1239
|
+
wrap: function wrap() {
|
|
1240
|
+
return this.$refs.wrap;
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
253
1243
|
|
|
254
|
-
|
|
1244
|
+
render: function render(h) {
|
|
1245
|
+
var gutter = scrollbar_width_default()();
|
|
1246
|
+
var style = this.wrapStyle;
|
|
1247
|
+
|
|
1248
|
+
if (gutter) {
|
|
1249
|
+
var gutterWith = '-' + gutter + 'px';
|
|
1250
|
+
var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
|
|
1251
|
+
|
|
1252
|
+
if (Array.isArray(this.wrapStyle)) {
|
|
1253
|
+
style = Object(util_["toObject"])(this.wrapStyle);
|
|
1254
|
+
style.marginRight = style.marginBottom = gutterWith;
|
|
1255
|
+
} else if (typeof this.wrapStyle === 'string') {
|
|
1256
|
+
style += gutterStyle;
|
|
1257
|
+
} else {
|
|
1258
|
+
style = gutterStyle;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
var view = h(this.tag, {
|
|
1262
|
+
class: ['el-scrollbar__view', this.viewClass],
|
|
1263
|
+
style: this.viewStyle,
|
|
1264
|
+
ref: 'resize'
|
|
1265
|
+
}, this.$slots.default);
|
|
1266
|
+
var wrap = h(
|
|
1267
|
+
'div',
|
|
1268
|
+
{
|
|
1269
|
+
ref: 'wrap',
|
|
1270
|
+
style: style,
|
|
1271
|
+
on: {
|
|
1272
|
+
'scroll': this.handleScroll
|
|
1273
|
+
},
|
|
1274
|
+
|
|
1275
|
+
'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
|
|
1276
|
+
[[view]]
|
|
1277
|
+
);
|
|
1278
|
+
var nodes = void 0;
|
|
1279
|
+
|
|
1280
|
+
if (!this.native) {
|
|
1281
|
+
nodes = [wrap, h(src_bar, {
|
|
1282
|
+
attrs: {
|
|
1283
|
+
move: this.moveX,
|
|
1284
|
+
size: this.sizeWidth }
|
|
1285
|
+
}), h(src_bar, {
|
|
1286
|
+
attrs: {
|
|
1287
|
+
vertical: true,
|
|
1288
|
+
move: this.moveY,
|
|
1289
|
+
size: this.sizeHeight }
|
|
1290
|
+
})];
|
|
1291
|
+
} else {
|
|
1292
|
+
nodes = [h(
|
|
1293
|
+
'div',
|
|
1294
|
+
{
|
|
1295
|
+
ref: 'wrap',
|
|
1296
|
+
'class': [this.wrapClass, 'el-scrollbar__wrap'],
|
|
1297
|
+
style: style },
|
|
1298
|
+
[[view]]
|
|
1299
|
+
)];
|
|
1300
|
+
}
|
|
1301
|
+
return h('div', { class: 'el-scrollbar' }, nodes);
|
|
1302
|
+
},
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
methods: {
|
|
1306
|
+
handleScroll: function handleScroll() {
|
|
1307
|
+
var wrap = this.wrap;
|
|
1308
|
+
|
|
1309
|
+
this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
|
|
1310
|
+
this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
|
|
1311
|
+
},
|
|
1312
|
+
update: function update() {
|
|
1313
|
+
var heightPercentage = void 0,
|
|
1314
|
+
widthPercentage = void 0;
|
|
1315
|
+
var wrap = this.wrap;
|
|
1316
|
+
if (!wrap) return;
|
|
1317
|
+
|
|
1318
|
+
heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
|
|
1319
|
+
widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
|
|
1320
|
+
|
|
1321
|
+
this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
|
|
1322
|
+
this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
|
|
1326
|
+
mounted: function mounted() {
|
|
1327
|
+
if (this.native) return;
|
|
1328
|
+
this.$nextTick(this.update);
|
|
1329
|
+
!this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
|
|
1330
|
+
},
|
|
1331
|
+
beforeDestroy: function beforeDestroy() {
|
|
1332
|
+
if (this.native) return;
|
|
1333
|
+
!this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
// CONCATENATED MODULE: ./packages/scrollbar/index.js
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
/* istanbul ignore next */
|
|
1340
|
+
main.install = function (Vue) {
|
|
1341
|
+
Vue.component(main.name, main);
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
/* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
|
|
255
1345
|
|
|
256
1346
|
/***/ }),
|
|
1347
|
+
/* 19 */,
|
|
1348
|
+
/* 20 */,
|
|
1349
|
+
/* 21 */,
|
|
1350
|
+
/* 22 */,
|
|
1351
|
+
/* 23 */
|
|
1352
|
+
/***/ (function(module, exports) {
|
|
1353
|
+
|
|
1354
|
+
module.exports = require("element-ui/lib/mixins/focus");
|
|
257
1355
|
|
|
258
|
-
/***/
|
|
1356
|
+
/***/ }),
|
|
1357
|
+
/* 24 */,
|
|
1358
|
+
/* 25 */
|
|
259
1359
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
260
1360
|
|
|
261
1361
|
"use strict";
|
|
@@ -502,29 +1602,141 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
502
1602
|
/* harmony default export */ var src_option = __webpack_exports__["a"] = (component.exports);
|
|
503
1603
|
|
|
504
1604
|
/***/ }),
|
|
505
|
-
|
|
506
|
-
/***/ 38:
|
|
1605
|
+
/* 26 */
|
|
507
1606
|
/***/ (function(module, exports) {
|
|
508
1607
|
|
|
509
|
-
module.exports = require("element-ui/lib/
|
|
1608
|
+
module.exports = require("element-ui/lib/utils/scroll-into-view");
|
|
510
1609
|
|
|
511
1610
|
/***/ }),
|
|
1611
|
+
/* 27 */,
|
|
1612
|
+
/* 28 */,
|
|
1613
|
+
/* 29 */,
|
|
1614
|
+
/* 30 */
|
|
1615
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
512
1616
|
|
|
513
|
-
|
|
514
|
-
|
|
1617
|
+
"use strict";
|
|
1618
|
+
// ESM COMPAT FLAG
|
|
1619
|
+
__webpack_require__.r(__webpack_exports__);
|
|
515
1620
|
|
|
516
|
-
|
|
1621
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js
|
|
517
1622
|
|
|
518
|
-
|
|
1623
|
+
/* harmony default export */ var tagvue_type_script_lang_js = ({
|
|
1624
|
+
name: 'ElTag',
|
|
1625
|
+
props: {
|
|
1626
|
+
text: String,
|
|
1627
|
+
closable: Boolean,
|
|
1628
|
+
type: String,
|
|
1629
|
+
hit: Boolean,
|
|
1630
|
+
disableTransitions: Boolean,
|
|
1631
|
+
color: String,
|
|
1632
|
+
size: String,
|
|
1633
|
+
effect: {
|
|
1634
|
+
type: String,
|
|
1635
|
+
default: 'light',
|
|
1636
|
+
validator: function validator(val) {
|
|
1637
|
+
return ['dark', 'light', 'plain'].indexOf(val) !== -1;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
methods: {
|
|
1642
|
+
handleClose: function handleClose(event) {
|
|
1643
|
+
event.stopPropagation();
|
|
1644
|
+
this.$emit('close', event);
|
|
1645
|
+
},
|
|
1646
|
+
handleClick: function handleClick(event) {
|
|
1647
|
+
this.$emit('click', event);
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
computed: {
|
|
1651
|
+
tagSize: function tagSize() {
|
|
1652
|
+
return this.size || (this.$ELEMENT || {}).size;
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
render: function render(h) {
|
|
1656
|
+
var type = this.type,
|
|
1657
|
+
tagSize = this.tagSize,
|
|
1658
|
+
hit = this.hit,
|
|
1659
|
+
effect = this.effect;
|
|
1660
|
+
|
|
1661
|
+
var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
|
|
1662
|
+
var tagEl = h(
|
|
1663
|
+
'span',
|
|
1664
|
+
{
|
|
1665
|
+
'class': classes,
|
|
1666
|
+
style: { backgroundColor: this.color },
|
|
1667
|
+
on: {
|
|
1668
|
+
'click': this.handleClick
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
[this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
|
|
1672
|
+
'click': this.handleClose
|
|
1673
|
+
}
|
|
1674
|
+
})]
|
|
1675
|
+
);
|
|
1676
|
+
|
|
1677
|
+
return this.disableTransitions ? tagEl : h(
|
|
1678
|
+
'transition',
|
|
1679
|
+
{
|
|
1680
|
+
attrs: { name: 'el-zoom-in-center' }
|
|
1681
|
+
},
|
|
1682
|
+
[tagEl]
|
|
1683
|
+
);
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
// CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js
|
|
1687
|
+
/* harmony default export */ var src_tagvue_type_script_lang_js = (tagvue_type_script_lang_js);
|
|
1688
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1689
|
+
var componentNormalizer = __webpack_require__(0);
|
|
519
1690
|
|
|
520
|
-
|
|
521
|
-
|
|
1691
|
+
// CONCATENATED MODULE: ./packages/tag/src/tag.vue
|
|
1692
|
+
var render, staticRenderFns
|
|
522
1693
|
|
|
523
|
-
module.exports = require("element-ui/lib/utils/vue-popper");
|
|
524
1694
|
|
|
525
|
-
/***/ }),
|
|
526
1695
|
|
|
527
|
-
|
|
1696
|
+
|
|
1697
|
+
/* normalize component */
|
|
1698
|
+
|
|
1699
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
1700
|
+
src_tagvue_type_script_lang_js,
|
|
1701
|
+
render,
|
|
1702
|
+
staticRenderFns,
|
|
1703
|
+
false,
|
|
1704
|
+
null,
|
|
1705
|
+
null,
|
|
1706
|
+
null
|
|
1707
|
+
|
|
1708
|
+
)
|
|
1709
|
+
|
|
1710
|
+
/* harmony default export */ var tag = (component.exports);
|
|
1711
|
+
// CONCATENATED MODULE: ./packages/tag/index.js
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
/* istanbul ignore next */
|
|
1715
|
+
tag.install = function (Vue) {
|
|
1716
|
+
Vue.component(tag.name, tag);
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
/* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
|
|
1720
|
+
|
|
1721
|
+
/***/ }),
|
|
1722
|
+
/* 31 */,
|
|
1723
|
+
/* 32 */,
|
|
1724
|
+
/* 33 */,
|
|
1725
|
+
/* 34 */,
|
|
1726
|
+
/* 35 */,
|
|
1727
|
+
/* 36 */,
|
|
1728
|
+
/* 37 */,
|
|
1729
|
+
/* 38 */,
|
|
1730
|
+
/* 39 */,
|
|
1731
|
+
/* 40 */,
|
|
1732
|
+
/* 41 */,
|
|
1733
|
+
/* 42 */,
|
|
1734
|
+
/* 43 */,
|
|
1735
|
+
/* 44 */,
|
|
1736
|
+
/* 45 */,
|
|
1737
|
+
/* 46 */,
|
|
1738
|
+
/* 47 */,
|
|
1739
|
+
/* 48 */
|
|
528
1740
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
529
1741
|
|
|
530
1742
|
"use strict";
|
|
@@ -1011,16 +2223,15 @@ var emitter_ = __webpack_require__(4);
|
|
|
1011
2223
|
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
|
|
1012
2224
|
|
|
1013
2225
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/focus"
|
|
1014
|
-
var focus_ = __webpack_require__(
|
|
2226
|
+
var focus_ = __webpack_require__(23);
|
|
1015
2227
|
var focus_default = /*#__PURE__*/__webpack_require__.n(focus_);
|
|
1016
2228
|
|
|
1017
2229
|
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
|
|
1018
|
-
var locale_ = __webpack_require__(
|
|
2230
|
+
var locale_ = __webpack_require__(9);
|
|
1019
2231
|
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
|
|
1020
2232
|
|
|
1021
|
-
// EXTERNAL MODULE:
|
|
1022
|
-
var
|
|
1023
|
-
var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
2233
|
+
// EXTERNAL MODULE: ./packages/input/index.js + 6 modules
|
|
2234
|
+
var packages_input = __webpack_require__(13);
|
|
1024
2235
|
|
|
1025
2236
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select-dropdown.vue?vue&type=template&id=278c4356
|
|
1026
2237
|
var select_dropdownvue_type_template_id_278c4356_render = function () {
|
|
@@ -1151,29 +2362,27 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
1151
2362
|
|
|
1152
2363
|
/* harmony default export */ var select_dropdown = (component.exports);
|
|
1153
2364
|
// EXTERNAL MODULE: ./packages/select/src/option.vue + 4 modules
|
|
1154
|
-
var src_option = __webpack_require__(
|
|
2365
|
+
var src_option = __webpack_require__(25);
|
|
1155
2366
|
|
|
1156
|
-
// EXTERNAL MODULE:
|
|
1157
|
-
var
|
|
1158
|
-
var tag_default = /*#__PURE__*/__webpack_require__.n(tag_);
|
|
2367
|
+
// EXTERNAL MODULE: ./packages/tag/index.js + 3 modules
|
|
2368
|
+
var tag = __webpack_require__(30);
|
|
1159
2369
|
|
|
1160
|
-
// EXTERNAL MODULE:
|
|
1161
|
-
var
|
|
1162
|
-
var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
|
|
2370
|
+
// EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
|
|
2371
|
+
var scrollbar = __webpack_require__(18);
|
|
1163
2372
|
|
|
1164
2373
|
// EXTERNAL MODULE: external "throttle-debounce/debounce"
|
|
1165
|
-
var debounce_ = __webpack_require__(
|
|
2374
|
+
var debounce_ = __webpack_require__(15);
|
|
1166
2375
|
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
|
|
1167
2376
|
|
|
1168
2377
|
// EXTERNAL MODULE: external "element-ui/lib/utils/clickoutside"
|
|
1169
|
-
var clickoutside_ = __webpack_require__(
|
|
2378
|
+
var clickoutside_ = __webpack_require__(14);
|
|
1170
2379
|
var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
|
|
1171
2380
|
|
|
1172
2381
|
// EXTERNAL MODULE: external "element-ui/lib/utils/resize-event"
|
|
1173
|
-
var resize_event_ = __webpack_require__(
|
|
2382
|
+
var resize_event_ = __webpack_require__(10);
|
|
1174
2383
|
|
|
1175
2384
|
// EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
|
|
1176
|
-
var scroll_into_view_ = __webpack_require__(
|
|
2385
|
+
var scroll_into_view_ = __webpack_require__(26);
|
|
1177
2386
|
var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
|
|
1178
2387
|
|
|
1179
2388
|
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
|
|
@@ -1244,7 +2453,7 @@ var util_ = __webpack_require__(3);
|
|
|
1244
2453
|
}
|
|
1245
2454
|
});
|
|
1246
2455
|
// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
|
|
1247
|
-
var shared_ = __webpack_require__(
|
|
2456
|
+
var shared_ = __webpack_require__(11);
|
|
1248
2457
|
|
|
1249
2458
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/select/src/select.vue?vue&type=script&lang=js
|
|
1250
2459
|
//
|
|
@@ -1482,11 +2691,11 @@ var shared_ = __webpack_require__(21);
|
|
|
1482
2691
|
},
|
|
1483
2692
|
|
|
1484
2693
|
components: {
|
|
1485
|
-
ElInput:
|
|
2694
|
+
ElInput: packages_input["default"],
|
|
1486
2695
|
ElSelectMenu: select_dropdown,
|
|
1487
2696
|
ElOption: src_option["a" /* default */],
|
|
1488
|
-
ElTag:
|
|
1489
|
-
ElScrollbar:
|
|
2697
|
+
ElTag: tag["default"],
|
|
2698
|
+
ElScrollbar: scrollbar["default"]
|
|
1490
2699
|
},
|
|
1491
2700
|
|
|
1492
2701
|
directives: { Clickoutside: clickoutside_default.a },
|
|
@@ -2155,13 +3364,5 @@ src_select.install = function (Vue) {
|
|
|
2155
3364
|
|
|
2156
3365
|
/* harmony default export */ var packages_select = __webpack_exports__["default"] = (src_select);
|
|
2157
3366
|
|
|
2158
|
-
/***/ }),
|
|
2159
|
-
|
|
2160
|
-
/***/ 7:
|
|
2161
|
-
/***/ (function(module, exports) {
|
|
2162
|
-
|
|
2163
|
-
module.exports = require("element-ui/lib/mixins/locale");
|
|
2164
|
-
|
|
2165
3367
|
/***/ })
|
|
2166
|
-
|
|
2167
|
-
/******/ });
|
|
3368
|
+
/******/ ]);
|