cy-element-ui 1.1.18 → 1.1.20

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.
Files changed (255) hide show
  1. package/lib/index.js +1 -1
  2. package/lib/theme-chalk/BreadcrumbItem.css +0 -0
  3. package/lib/theme-chalk/ButtonGroup.css +0 -0
  4. package/lib/theme-chalk/CarouselItem.css +0 -0
  5. package/lib/theme-chalk/CascaderPanel.css +0 -0
  6. package/lib/theme-chalk/CheckboxButton.css +0 -0
  7. package/lib/theme-chalk/CheckboxGroup.css +0 -0
  8. package/lib/theme-chalk/CollapseItem.css +0 -0
  9. package/lib/theme-chalk/ColorPicker.css +0 -0
  10. package/lib/theme-chalk/DatePicker.css +0 -0
  11. package/lib/theme-chalk/DescriptionsItem.css +0 -0
  12. package/lib/theme-chalk/DropdownItem.css +0 -0
  13. package/lib/theme-chalk/DropdownMenu.css +0 -0
  14. package/lib/theme-chalk/FormItem.css +0 -0
  15. package/lib/theme-chalk/InputNumber.css +0 -0
  16. package/lib/theme-chalk/MenuItem.css +0 -0
  17. package/lib/theme-chalk/MenuItemGroup.css +0 -0
  18. package/lib/theme-chalk/MessageBox.css +0 -0
  19. package/lib/theme-chalk/OptionGroup.css +0 -0
  20. package/lib/theme-chalk/PageHeader.css +0 -0
  21. package/lib/theme-chalk/RadioButton.css +0 -0
  22. package/lib/theme-chalk/RadioGroup.css +0 -0
  23. package/lib/theme-chalk/SkeletonItem.css +0 -0
  24. package/lib/theme-chalk/TabPane.css +0 -0
  25. package/lib/theme-chalk/TableColumn.css +0 -0
  26. package/lib/theme-chalk/TimePicker.css +0 -0
  27. package/lib/theme-chalk/TimeSelect.css +0 -0
  28. package/lib/theme-chalk/TimelineItem.css +0 -0
  29. package/lib/theme-chalk/alert.css +1 -0
  30. package/lib/theme-chalk/aside.css +1 -0
  31. package/lib/theme-chalk/autocomplete.css +1 -0
  32. package/lib/theme-chalk/avatar.css +1 -0
  33. package/lib/theme-chalk/backtop.css +1 -0
  34. package/lib/theme-chalk/badge.css +1 -0
  35. package/lib/theme-chalk/base.css +1 -0
  36. package/lib/theme-chalk/breadcrumb-item.css +0 -0
  37. package/lib/theme-chalk/breadcrumb.css +1 -0
  38. package/lib/theme-chalk/button-group.css +0 -0
  39. package/lib/theme-chalk/button.css +1 -0
  40. package/lib/theme-chalk/calendar.css +1 -0
  41. package/lib/theme-chalk/card.css +1 -0
  42. package/lib/theme-chalk/carousel-item.css +1 -0
  43. package/lib/theme-chalk/carousel.css +1 -0
  44. package/lib/theme-chalk/cascader-panel.css +1 -0
  45. package/lib/theme-chalk/cascader.css +1 -0
  46. package/lib/theme-chalk/checkbox-button.css +0 -0
  47. package/lib/theme-chalk/checkbox-group.css +0 -0
  48. package/lib/theme-chalk/checkbox.css +1 -0
  49. package/lib/theme-chalk/col.css +1 -0
  50. package/lib/theme-chalk/collapse-item.css +0 -0
  51. package/lib/theme-chalk/collapse.css +1 -0
  52. package/lib/theme-chalk/color-picker.css +1 -0
  53. package/lib/theme-chalk/container.css +1 -0
  54. package/lib/theme-chalk/date-picker.css +1 -0
  55. package/lib/theme-chalk/descriptions-item.css +1 -0
  56. package/lib/theme-chalk/descriptions.css +1 -0
  57. package/lib/theme-chalk/dialog.css +1 -0
  58. package/lib/theme-chalk/display.css +1 -0
  59. package/lib/theme-chalk/divider.css +1 -0
  60. package/lib/theme-chalk/drawer.css +1 -0
  61. package/lib/theme-chalk/dropdown-item.css +0 -0
  62. package/lib/theme-chalk/dropdown-menu.css +0 -0
  63. package/lib/theme-chalk/dropdown.css +1 -0
  64. package/lib/theme-chalk/element.css +1 -0
  65. package/lib/theme-chalk/empty.css +1 -0
  66. package/lib/theme-chalk/fonts/element-icons.ttf +0 -0
  67. package/lib/theme-chalk/fonts/element-icons.woff +0 -0
  68. package/lib/theme-chalk/footer.css +1 -0
  69. package/lib/theme-chalk/form-item.css +0 -0
  70. package/lib/theme-chalk/form.css +1 -0
  71. package/lib/theme-chalk/header.css +1 -0
  72. package/lib/theme-chalk/icon.css +1 -0
  73. package/lib/theme-chalk/image.css +1 -0
  74. package/lib/theme-chalk/index.css +1 -0
  75. package/lib/theme-chalk/infinite-scroll.css +0 -0
  76. package/lib/theme-chalk/infiniteScroll.css +0 -0
  77. package/lib/theme-chalk/input-number.css +1 -0
  78. package/lib/theme-chalk/input.css +1 -0
  79. package/lib/theme-chalk/link.css +1 -0
  80. package/lib/theme-chalk/loading.css +1 -0
  81. package/lib/theme-chalk/main.css +1 -0
  82. package/lib/theme-chalk/menu-item-group.css +0 -0
  83. package/lib/theme-chalk/menu-item.css +0 -0
  84. package/lib/theme-chalk/menu.css +1 -0
  85. package/lib/theme-chalk/message-box.css +1 -0
  86. package/lib/theme-chalk/message.css +1 -0
  87. package/lib/theme-chalk/notification.css +1 -0
  88. package/lib/theme-chalk/option-group.css +1 -0
  89. package/lib/theme-chalk/option.css +1 -0
  90. package/lib/theme-chalk/page-header.css +1 -0
  91. package/lib/theme-chalk/pagination.css +1 -0
  92. package/lib/theme-chalk/popconfirm.css +1 -0
  93. package/lib/theme-chalk/popover.css +1 -0
  94. package/lib/theme-chalk/popper.css +1 -0
  95. package/lib/theme-chalk/progress.css +1 -0
  96. package/lib/theme-chalk/radio-button.css +1 -0
  97. package/lib/theme-chalk/radio-group.css +1 -0
  98. package/lib/theme-chalk/radio.css +1 -0
  99. package/lib/theme-chalk/rate.css +1 -0
  100. package/lib/theme-chalk/reset.css +1 -0
  101. package/lib/theme-chalk/result.css +1 -0
  102. package/lib/theme-chalk/row.css +1 -0
  103. package/lib/theme-chalk/scrollbar.css +1 -0
  104. package/lib/theme-chalk/select-dropdown.css +1 -0
  105. package/lib/theme-chalk/select.css +1 -0
  106. package/lib/theme-chalk/selectDisplayInput.css +1 -0
  107. package/lib/theme-chalk/skeleton-item.css +1 -0
  108. package/lib/theme-chalk/skeleton.css +1 -0
  109. package/lib/theme-chalk/slider.css +1 -0
  110. package/lib/theme-chalk/spinner.css +1 -0
  111. package/lib/theme-chalk/statistic.css +1 -0
  112. package/lib/theme-chalk/step.css +1 -0
  113. package/lib/theme-chalk/steps.css +1 -0
  114. package/lib/theme-chalk/subTitle.css +1 -0
  115. package/lib/theme-chalk/submenu.css +0 -0
  116. package/lib/theme-chalk/switch.css +1 -0
  117. package/lib/theme-chalk/tab-pane.css +0 -0
  118. package/lib/theme-chalk/tabDialog.css +1 -0
  119. package/lib/theme-chalk/table-column.css +1 -0
  120. package/lib/theme-chalk/table.css +1 -0
  121. package/lib/theme-chalk/tabs.css +1 -0
  122. package/lib/theme-chalk/tag.css +1 -0
  123. package/lib/theme-chalk/time-picker.css +1 -0
  124. package/lib/theme-chalk/time-select.css +1 -0
  125. package/lib/theme-chalk/timeline-item.css +1 -0
  126. package/lib/theme-chalk/timeline.css +1 -0
  127. package/lib/theme-chalk/tooltip.css +1 -0
  128. package/lib/theme-chalk/transfer.css +1 -0
  129. package/lib/theme-chalk/tree.css +1 -0
  130. package/lib/theme-chalk/treeSelect.css +1 -0
  131. package/lib/theme-chalk/upload.css +1 -0
  132. package/package.json +1 -1
  133. package/packages/theme-chalk/gulpfile.js +0 -1
  134. package/packages/theme-chalk/src/BreadcrumbItem.scss +0 -0
  135. package/packages/theme-chalk/src/ButtonGroup.scss +0 -0
  136. package/packages/theme-chalk/src/CarouselItem.scss +0 -0
  137. package/packages/theme-chalk/src/CascaderPanel.scss +0 -0
  138. package/packages/theme-chalk/src/CheckboxButton.scss +0 -0
  139. package/packages/theme-chalk/src/CheckboxGroup.scss +0 -0
  140. package/packages/theme-chalk/src/CollapseItem.scss +0 -0
  141. package/packages/theme-chalk/src/ColorPicker.scss +0 -0
  142. package/packages/theme-chalk/src/DatePicker.scss +0 -0
  143. package/packages/theme-chalk/src/DescriptionsItem.scss +0 -0
  144. package/packages/theme-chalk/src/DropdownItem.scss +0 -0
  145. package/packages/theme-chalk/src/DropdownMenu.scss +0 -0
  146. package/packages/theme-chalk/src/FormItem.scss +0 -0
  147. package/packages/theme-chalk/src/InputNumber.scss +0 -0
  148. package/packages/theme-chalk/src/MenuItem.scss +0 -0
  149. package/packages/theme-chalk/src/MenuItemGroup.scss +0 -0
  150. package/packages/theme-chalk/src/MessageBox.scss +0 -0
  151. package/packages/theme-chalk/src/OptionGroup.scss +0 -0
  152. package/packages/theme-chalk/src/PageHeader.scss +0 -0
  153. package/packages/theme-chalk/src/RadioButton.scss +0 -0
  154. package/packages/theme-chalk/src/RadioGroup.scss +0 -0
  155. package/packages/theme-chalk/src/SkeletonItem.scss +0 -0
  156. package/packages/theme-chalk/src/TabPane.scss +0 -0
  157. package/packages/theme-chalk/src/TableColumn.scss +0 -0
  158. package/packages/theme-chalk/src/TimePicker.scss +0 -0
  159. package/packages/theme-chalk/src/TimeSelect.scss +0 -0
  160. package/packages/theme-chalk/src/TimelineItem.scss +0 -0
  161. package/packages/theme-chalk/src/index.scss +89 -89
  162. package/src/index.js +1 -1
  163. package/lib/Alert.js +0 -420
  164. package/lib/Aside.js +0 -277
  165. package/lib/Autocomplete.js +0 -2051
  166. package/lib/Avatar.js +0 -363
  167. package/lib/Backtop.js +0 -404
  168. package/lib/Badge.js +0 -334
  169. package/lib/Breadcrumb.js +0 -293
  170. package/lib/BreadcrumbItem.js +0 -322
  171. package/lib/Button.js +0 -357
  172. package/lib/ButtonGroup.js +0 -262
  173. package/lib/Calendar.js +0 -1146
  174. package/lib/Card.js +0 -297
  175. package/lib/Carousel.js +0 -707
  176. package/lib/CarouselItem.js +0 -434
  177. package/lib/Cascader.js +0 -4641
  178. package/lib/CascaderPanel.js +0 -2602
  179. package/lib/Checkbox.js +0 -627
  180. package/lib/CheckboxButton.js +0 -583
  181. package/lib/CheckboxGroup.js +0 -313
  182. package/lib/Col.js +0 -177
  183. package/lib/Collapse.js +0 -329
  184. package/lib/CollapseItem.js +0 -497
  185. package/lib/ColorPicker.js +0 -2885
  186. package/lib/Container.js +0 -288
  187. package/lib/CySelectDisplayInput.js +0 -367
  188. package/lib/CySubTitle.js +0 -295
  189. package/lib/CyTabDialog.js +0 -1184
  190. package/lib/CyTreeSelect.js +0 -4422
  191. package/lib/DatePicker.js +0 -7574
  192. package/lib/Descriptions.js +0 -457
  193. package/lib/DescriptionsItem.js +0 -140
  194. package/lib/Dialog.js +0 -598
  195. package/lib/Divider.js +0 -313
  196. package/lib/Drawer.js +0 -592
  197. package/lib/Dropdown.js +0 -856
  198. package/lib/DropdownItem.js +0 -316
  199. package/lib/DropdownMenu.js +0 -351
  200. package/lib/Empty.js +0 -730
  201. package/lib/Footer.js +0 -277
  202. package/lib/Form.js +0 -466
  203. package/lib/FormItem.js +0 -826
  204. package/lib/Header.js +0 -277
  205. package/lib/Icon.js +0 -265
  206. package/lib/Image.js +0 -1138
  207. package/lib/InfiniteScroll.js +0 -301
  208. package/lib/Input.js +0 -999
  209. package/lib/InputNumber.js +0 -1552
  210. package/lib/Link.js +0 -332
  211. package/lib/Loading.js +0 -631
  212. package/lib/Main.js +0 -264
  213. package/lib/Menu.js +0 -865
  214. package/lib/MenuItem.js +0 -818
  215. package/lib/MenuItemGroup.js +0 -308
  216. package/lib/Message.js +0 -548
  217. package/lib/MessageBox.js +0 -2134
  218. package/lib/Notification.js +0 -615
  219. package/lib/Option.js +0 -474
  220. package/lib/OptionGroup.js +0 -344
  221. package/lib/PageHeader.js +0 -319
  222. package/lib/Pagination.js +0 -4123
  223. package/lib/Popconfirm.js +0 -1025
  224. package/lib/Popover.js +0 -617
  225. package/lib/Progress.js +0 -595
  226. package/lib/Radio.js +0 -497
  227. package/lib/RadioButton.js +0 -463
  228. package/lib/RadioGroup.js +0 -391
  229. package/lib/Rate.js +0 -670
  230. package/lib/Result.js +0 -578
  231. package/lib/Row.js +0 -149
  232. package/lib/Scrollbar.js +0 -423
  233. package/lib/Select.js +0 -3368
  234. package/lib/Skeleton.js +0 -372
  235. package/lib/SkeletonItem.js +0 -342
  236. package/lib/Slider.js +0 -2854
  237. package/lib/Spinner.js +0 -301
  238. package/lib/Statistic.js +0 -533
  239. package/lib/Step.js +0 -522
  240. package/lib/Steps.js +0 -342
  241. package/lib/Submenu.js +0 -700
  242. package/lib/Switch.js +0 -554
  243. package/lib/TabPane.js +0 -332
  244. package/lib/Table.js +0 -6125
  245. package/lib/TableColumn.js +0 -1481
  246. package/lib/Tabs.js +0 -920
  247. package/lib/Tag.js +0 -304
  248. package/lib/TimePicker.js +0 -4059
  249. package/lib/TimeSelect.js +0 -2871
  250. package/lib/Timeline.js +0 -275
  251. package/lib/TimelineItem.js +0 -371
  252. package/lib/Tooltip.js +0 -425
  253. package/lib/Transfer.js +0 -2557
  254. package/lib/Tree.js +0 -2680
  255. package/lib/Upload.js +0 -1782
package/lib/FormItem.js DELETED
@@ -1,826 +0,0 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "/dist/";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 68);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
-
93
- "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
96
-
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
100
-
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
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
114
-
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
121
-
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
126
-
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
131
-
132
- var hook
133
- if (moduleIdentifier) {
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
- }
167
-
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
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
- }
185
-
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
191
-
192
-
193
- /***/ }),
194
-
195
- /***/ 3:
196
- /***/ (function(module, exports) {
197
-
198
- module.exports = require("element-ui/lib/utils/util");
199
-
200
- /***/ }),
201
-
202
- /***/ 4:
203
- /***/ (function(module, exports) {
204
-
205
- module.exports = require("element-ui/lib/mixins/emitter");
206
-
207
- /***/ }),
208
-
209
- /***/ 55:
210
- /***/ (function(module, exports) {
211
-
212
- module.exports = require("async-validator");
213
-
214
- /***/ }),
215
-
216
- /***/ 6:
217
- /***/ (function(module, exports) {
218
-
219
- module.exports = require("element-ui/lib/utils/merge");
220
-
221
- /***/ }),
222
-
223
- /***/ 68:
224
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
225
-
226
- "use strict";
227
- // ESM COMPAT FLAG
228
- __webpack_require__.r(__webpack_exports__);
229
-
230
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=template&id=a193e2c8
231
- var render = function () {
232
- var _vm = this
233
- var _h = _vm.$createElement
234
- var _c = _vm._self._c || _h
235
- return _c(
236
- "div",
237
- {
238
- staticClass: "el-form-item",
239
- class: [
240
- {
241
- "el-form-item--feedback": _vm.elForm && _vm.elForm.statusIcon,
242
- "is-error": _vm.validateState === "error",
243
- "is-validating": _vm.validateState === "validating",
244
- "is-success": _vm.validateState === "success",
245
- "is-required": _vm.isRequired || _vm.required,
246
- "is-no-asterisk": _vm.elForm && _vm.elForm.hideRequiredAsterisk,
247
- },
248
- _vm.sizeClass ? "el-form-item--" + _vm.sizeClass : "",
249
- ],
250
- },
251
- [
252
- _c(
253
- "label-wrap",
254
- {
255
- attrs: {
256
- "is-auto-width": _vm.labelStyle && _vm.labelStyle.width === "auto",
257
- "update-all": _vm.form.labelWidth === "auto",
258
- },
259
- },
260
- [
261
- _vm.label || _vm.$slots.label
262
- ? _c(
263
- "label",
264
- {
265
- staticClass: "el-form-item__label",
266
- style: _vm.labelStyle,
267
- attrs: { for: _vm.labelFor },
268
- },
269
- [
270
- _vm._t("label", [
271
- _vm._v(_vm._s(_vm.label + _vm.form.labelSuffix)),
272
- ]),
273
- ],
274
- 2
275
- )
276
- : _vm._e(),
277
- ]
278
- ),
279
- _c(
280
- "div",
281
- { staticClass: "el-form-item__content", style: _vm.contentStyle },
282
- [
283
- _vm._t("default"),
284
- _c(
285
- "transition",
286
- { attrs: { name: "el-zoom-in-top" } },
287
- [
288
- _vm.validateState === "error" &&
289
- _vm.showMessage &&
290
- _vm.form.showMessage
291
- ? _vm._t(
292
- "error",
293
- [
294
- _c(
295
- "div",
296
- {
297
- staticClass: "el-form-item__error",
298
- class: {
299
- "el-form-item__error--inline":
300
- typeof _vm.inlineMessage === "boolean"
301
- ? _vm.inlineMessage
302
- : (_vm.elForm && _vm.elForm.inlineMessage) ||
303
- false,
304
- },
305
- },
306
- [
307
- _vm._v(
308
- "\n\t\t\t\t\t" +
309
- _vm._s(_vm.validateMessage) +
310
- "\n\t\t\t\t"
311
- ),
312
- ]
313
- ),
314
- ],
315
- { error: _vm.validateMessage }
316
- )
317
- : _vm._e(),
318
- ],
319
- 2
320
- ),
321
- ],
322
- 2
323
- ),
324
- ],
325
- 1
326
- )
327
- }
328
- var staticRenderFns = []
329
- render._withStripped = true
330
-
331
-
332
- // CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=template&id=a193e2c8
333
-
334
- // EXTERNAL MODULE: external "async-validator"
335
- var external_async_validator_ = __webpack_require__(55);
336
- var external_async_validator_default = /*#__PURE__*/__webpack_require__.n(external_async_validator_);
337
-
338
- // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
339
- var emitter_ = __webpack_require__(4);
340
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
341
-
342
- // EXTERNAL MODULE: external "element-ui/lib/utils/merge"
343
- var merge_ = __webpack_require__(6);
344
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
345
-
346
- // EXTERNAL MODULE: external "element-ui/lib/utils/util"
347
- var util_ = __webpack_require__(3);
348
-
349
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/label-wrap.vue?vue&type=script&lang=js
350
-
351
-
352
- /* harmony default export */ var label_wrapvue_type_script_lang_js = ({
353
- props: {
354
- isAutoWidth: Boolean,
355
- updateAll: Boolean
356
- },
357
-
358
- inject: ['elForm', 'elFormItem'],
359
-
360
- render: function render() {
361
- var h = arguments[0];
362
-
363
- var slots = this.$slots.default;
364
- if (!slots) return null;
365
- if (this.isAutoWidth) {
366
- var autoLabelWidth = this.elForm.autoLabelWidth;
367
- var style = {};
368
- if (autoLabelWidth && autoLabelWidth !== 'auto') {
369
- var marginLeft = parseInt(autoLabelWidth, 10) - this.computedWidth;
370
- if (marginLeft) {
371
- style.marginLeft = marginLeft + 'px';
372
- }
373
- }
374
- return h(
375
- 'div',
376
- { 'class': 'el-form-item__label-wrap', style: style },
377
- [slots]
378
- );
379
- } else {
380
- return slots[0];
381
- }
382
- },
383
-
384
-
385
- methods: {
386
- getLabelWidth: function getLabelWidth() {
387
- if (this.$el && this.$el.firstElementChild) {
388
- var computedWidth = window.getComputedStyle(this.$el.firstElementChild).width;
389
- return Math.ceil(parseFloat(computedWidth));
390
- } else {
391
- return 0;
392
- }
393
- },
394
- updateLabelWidth: function updateLabelWidth() {
395
- var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'update';
396
-
397
- if (this.$slots.default && this.isAutoWidth && this.$el.firstElementChild) {
398
- if (action === 'update') {
399
- this.computedWidth = this.getLabelWidth();
400
- } else if (action === 'remove') {
401
- this.elForm.deregisterLabelWidth(this.computedWidth);
402
- }
403
- }
404
- }
405
- },
406
-
407
- watch: {
408
- computedWidth: function computedWidth(val, oldVal) {
409
- if (this.updateAll) {
410
- this.elForm.registerLabelWidth(val, oldVal);
411
- this.elFormItem.updateComputedLabelWidth(val);
412
- }
413
- }
414
- },
415
-
416
- data: function data() {
417
- return {
418
- computedWidth: 0
419
- };
420
- },
421
- mounted: function mounted() {
422
- this.updateLabelWidth('update');
423
- },
424
- updated: function updated() {
425
- this.updateLabelWidth('update');
426
- },
427
- beforeDestroy: function beforeDestroy() {
428
- this.updateLabelWidth('remove');
429
- }
430
- });
431
- // CONCATENATED MODULE: ./packages/form/src/label-wrap.vue?vue&type=script&lang=js
432
- /* harmony default export */ var src_label_wrapvue_type_script_lang_js = (label_wrapvue_type_script_lang_js);
433
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
434
- var componentNormalizer = __webpack_require__(0);
435
-
436
- // CONCATENATED MODULE: ./packages/form/src/label-wrap.vue
437
- var label_wrap_render, label_wrap_staticRenderFns
438
-
439
-
440
-
441
-
442
- /* normalize component */
443
-
444
- var component = Object(componentNormalizer["a" /* default */])(
445
- src_label_wrapvue_type_script_lang_js,
446
- label_wrap_render,
447
- label_wrap_staticRenderFns,
448
- false,
449
- null,
450
- null,
451
- null
452
-
453
- )
454
-
455
- /* harmony default export */ var label_wrap = (component.exports);
456
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/form-item.vue?vue&type=script&lang=js
457
- //
458
- //
459
- //
460
- //
461
- //
462
- //
463
- //
464
- //
465
- //
466
- //
467
- //
468
- //
469
- //
470
- //
471
- //
472
- //
473
- //
474
- //
475
- //
476
- //
477
- //
478
- //
479
- //
480
- //
481
- //
482
- //
483
- //
484
- //
485
- //
486
- //
487
- //
488
- //
489
- //
490
- //
491
- //
492
- //
493
- //
494
- //
495
- //
496
- //
497
-
498
-
499
-
500
-
501
-
502
-
503
- /* harmony default export */ var form_itemvue_type_script_lang_js = ({
504
- name: 'ElFormItem',
505
-
506
- componentName: 'ElFormItem',
507
-
508
- mixins: [emitter_default.a],
509
-
510
- provide: function provide() {
511
- return {
512
- elFormItem: this
513
- };
514
- },
515
-
516
-
517
- inject: ['elForm'],
518
-
519
- props: {
520
- label: String,
521
- labelWidth: String,
522
- prop: String,
523
- required: {
524
- type: Boolean,
525
- default: undefined
526
- },
527
- rules: [Object, Array],
528
- error: String,
529
- validateStatus: String,
530
- for: String,
531
- inlineMessage: {
532
- type: [String, Boolean],
533
- default: ''
534
- },
535
- showMessage: {
536
- type: Boolean,
537
- default: true
538
- },
539
- size: String
540
- },
541
- components: {
542
- // use this component to calculate auto width
543
- LabelWrap: label_wrap
544
- },
545
- watch: {
546
- error: {
547
- immediate: true,
548
- handler: function handler(value) {
549
- this.validateMessage = value;
550
- this.validateState = value ? 'error' : '';
551
- }
552
- },
553
- validateStatus: function validateStatus(value) {
554
- this.validateState = value;
555
- },
556
- rules: function rules(value) {
557
- if ((!value || value.length === 0) && this.required === undefined) {
558
- this.clearValidate();
559
- }
560
- }
561
- },
562
- computed: {
563
- labelFor: function labelFor() {
564
- return this.for || this.prop;
565
- },
566
- labelStyle: function labelStyle() {
567
- var ret = {};
568
- if (this.form.labelPosition === 'top') return ret;
569
- var labelWidth = this.labelWidth || this.form.labelWidth;
570
- if (labelWidth) {
571
- ret.width = labelWidth;
572
- }
573
- return ret;
574
- },
575
- contentStyle: function contentStyle() {
576
- var ret = {};
577
- var label = this.label;
578
- if (this.form.labelPosition === 'top' || this.form.inline) return ret;
579
- if (!label && !this.labelWidth && this.isNested) return ret;
580
- var labelWidth = this.labelWidth || this.form.labelWidth;
581
- if (labelWidth === 'auto') {
582
- if (this.labelWidth === 'auto') {
583
- ret.marginLeft = this.computedLabelWidth;
584
- } else if (this.form.labelWidth === 'auto') {
585
- ret.marginLeft = this.elForm.autoLabelWidth;
586
- }
587
- } else {
588
- ret.marginLeft = labelWidth;
589
- }
590
- return ret;
591
- },
592
- form: function form() {
593
- var parent = this.$parent;
594
- var parentName = parent.$options.componentName;
595
- while (parentName !== 'ElForm') {
596
- if (parentName === 'ElFormItem') {
597
- this.isNested = true;
598
- }
599
- parent = parent.$parent;
600
- parentName = parent.$options.componentName;
601
- }
602
- return parent;
603
- },
604
- fieldValue: function fieldValue() {
605
- var model = this.form.model;
606
- if (!model || !this.prop) {
607
- return;
608
- }
609
-
610
- var path = this.prop;
611
- if (path.indexOf(':') !== -1) {
612
- path = path.replace(/:/, '.');
613
- }
614
-
615
- return Object(util_["getPropByPath"])(model, path, true).v;
616
- },
617
- isRequired: function isRequired() {
618
- var rules = this.getRules();
619
- var isRequired = false;
620
-
621
- if (rules && rules.length) {
622
- rules.every(function (rule) {
623
- if (rule.required) {
624
- isRequired = true;
625
- return false;
626
- }
627
- return true;
628
- });
629
- }
630
- return isRequired;
631
- },
632
- _formSize: function _formSize() {
633
- return this.elForm.size;
634
- },
635
- elFormItemSize: function elFormItemSize() {
636
- return this.size || this._formSize;
637
- },
638
- sizeClass: function sizeClass() {
639
- return this.elFormItemSize || (this.$ELEMENT || {}).size;
640
- }
641
- },
642
- data: function data() {
643
- return {
644
- validateState: '',
645
- validateMessage: '',
646
- validateDisabled: false,
647
- validator: {},
648
- isNested: false,
649
- computedLabelWidth: ''
650
- };
651
- },
652
-
653
- methods: {
654
- validate: function validate(trigger) {
655
- var _this = this;
656
-
657
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : util_["noop"];
658
-
659
- this.validateDisabled = false;
660
- var rules = this.getFilteredRule(trigger);
661
- if ((!rules || rules.length === 0) && this.required === undefined) {
662
- callback();
663
- return true;
664
- }
665
-
666
- this.validateState = 'validating';
667
-
668
- var descriptor = {};
669
- if (rules && rules.length > 0) {
670
- rules.forEach(function (rule) {
671
- delete rule.trigger;
672
- });
673
- }
674
- descriptor[this.prop] = rules;
675
-
676
- var validator = new external_async_validator_default.a(descriptor);
677
- var model = {};
678
-
679
- model[this.prop] = this.fieldValue;
680
-
681
- validator.validate(model, { firstFields: true }, function (errors, invalidFields) {
682
- _this.validateState = !errors ? 'success' : 'error';
683
- _this.validateMessage = errors ? errors[0].message : '';
684
-
685
- callback(_this.validateMessage, invalidFields);
686
- _this.elForm && _this.elForm.$emit('validate', _this.prop, !errors, _this.validateMessage || null);
687
- });
688
- },
689
- clearValidate: function clearValidate() {
690
- this.validateState = '';
691
- this.validateMessage = '';
692
- this.validateDisabled = false;
693
- },
694
- resetField: function resetField() {
695
- var _this2 = this;
696
-
697
- this.validateState = '';
698
- this.validateMessage = '';
699
-
700
- var model = this.form.model;
701
- var value = this.fieldValue;
702
- var path = this.prop;
703
- if (path.indexOf(':') !== -1) {
704
- path = path.replace(/:/, '.');
705
- }
706
-
707
- var prop = Object(util_["getPropByPath"])(model, path, true);
708
-
709
- this.validateDisabled = true;
710
- if (Array.isArray(value)) {
711
- prop.o[prop.k] = [].concat(this.initialValue);
712
- } else {
713
- prop.o[prop.k] = this.initialValue;
714
- }
715
-
716
- // reset validateDisabled after onFieldChange triggered
717
- this.$nextTick(function () {
718
- _this2.validateDisabled = false;
719
- });
720
-
721
- this.broadcast('ElTimeSelect', 'fieldReset', this.initialValue);
722
- },
723
- getRules: function getRules() {
724
- var formRules = this.form.rules;
725
- var selfRules = this.rules;
726
- var requiredRule = this.required !== undefined ? { required: !!this.required } : [];
727
-
728
- var prop = Object(util_["getPropByPath"])(formRules, this.prop || '');
729
- formRules = formRules ? prop.o[this.prop || ''] || prop.v : [];
730
-
731
- return [].concat(selfRules || formRules || []).concat(requiredRule);
732
- },
733
- getFilteredRule: function getFilteredRule(trigger) {
734
- var rules = this.getRules();
735
-
736
- return rules.filter(function (rule) {
737
- if (!rule.trigger || trigger === '') return true;
738
- if (Array.isArray(rule.trigger)) {
739
- return rule.trigger.indexOf(trigger) > -1;
740
- } else {
741
- return rule.trigger === trigger;
742
- }
743
- }).map(function (rule) {
744
- return merge_default()({}, rule);
745
- });
746
- },
747
- onFieldBlur: function onFieldBlur() {
748
- this.validate('blur');
749
- },
750
- onFieldChange: function onFieldChange() {
751
- if (this.validateDisabled) {
752
- this.validateDisabled = false;
753
- return;
754
- }
755
-
756
- this.validate('change');
757
- },
758
- updateComputedLabelWidth: function updateComputedLabelWidth(width) {
759
- this.computedLabelWidth = width ? width + 'px' : '';
760
- },
761
- addValidateEvents: function addValidateEvents() {
762
- var rules = this.getRules();
763
-
764
- if (rules.length || this.required !== undefined) {
765
- this.$on('el.form.blur', this.onFieldBlur);
766
- this.$on('el.form.change', this.onFieldChange);
767
- }
768
- },
769
- removeValidateEvents: function removeValidateEvents() {
770
- this.$off();
771
- }
772
- },
773
- mounted: function mounted() {
774
- if (this.prop) {
775
- this.dispatch('ElForm', 'el.form.addField', [this]);
776
-
777
- var initialValue = this.fieldValue;
778
- if (Array.isArray(initialValue)) {
779
- initialValue = [].concat(initialValue);
780
- }
781
- Object.defineProperty(this, 'initialValue', {
782
- value: initialValue
783
- });
784
-
785
- this.addValidateEvents();
786
- }
787
- },
788
- beforeDestroy: function beforeDestroy() {
789
- this.dispatch('ElForm', 'el.form.removeField', [this]);
790
- }
791
- });
792
- // CONCATENATED MODULE: ./packages/form/src/form-item.vue?vue&type=script&lang=js
793
- /* harmony default export */ var src_form_itemvue_type_script_lang_js = (form_itemvue_type_script_lang_js);
794
- // CONCATENATED MODULE: ./packages/form/src/form-item.vue
795
-
796
-
797
-
798
-
799
-
800
- /* normalize component */
801
-
802
- var form_item_component = Object(componentNormalizer["a" /* default */])(
803
- src_form_itemvue_type_script_lang_js,
804
- render,
805
- staticRenderFns,
806
- false,
807
- null,
808
- null,
809
- null
810
-
811
- )
812
-
813
- /* harmony default export */ var form_item = (form_item_component.exports);
814
- // CONCATENATED MODULE: ./packages/form-item/index.js
815
-
816
-
817
- /* istanbul ignore next */
818
- form_item.install = function (Vue) {
819
- Vue.component(form_item.name, form_item);
820
- };
821
-
822
- /* harmony default export */ var packages_form_item = __webpack_exports__["default"] = (form_item);
823
-
824
- /***/ })
825
-
826
- /******/ });