cy-element-ui 1.1.11 → 1.1.13

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 (170) hide show
  1. package/README.md +59 -3
  2. package/lib/alert.js +420 -0
  3. package/lib/aside.js +277 -0
  4. package/lib/autocomplete.js +952 -0
  5. package/lib/avatar.js +363 -0
  6. package/lib/backtop.js +404 -0
  7. package/lib/badge.js +334 -0
  8. package/lib/breadcrumb-item.js +322 -0
  9. package/lib/breadcrumb.js +293 -0
  10. package/lib/button-group.js +262 -0
  11. package/lib/button.js +357 -0
  12. package/lib/calendar.js +933 -0
  13. package/lib/card.js +297 -0
  14. package/lib/carousel-item.js +434 -0
  15. package/lib/carousel.js +707 -0
  16. package/lib/cascader-panel.js +1558 -0
  17. package/lib/cascader.js +1439 -0
  18. package/lib/checkbox-button.js +583 -0
  19. package/lib/checkbox-group.js +313 -0
  20. package/lib/checkbox.js +627 -0
  21. package/lib/col.js +177 -0
  22. package/lib/collapse-item.js +497 -0
  23. package/lib/collapse.js +329 -0
  24. package/lib/color-picker.js +1943 -0
  25. package/lib/container.js +288 -0
  26. package/lib/date-picker.js +6340 -0
  27. package/lib/descriptions-item.js +140 -0
  28. package/lib/descriptions.js +457 -0
  29. package/lib/dialog.js +598 -0
  30. package/lib/directives/mousewheel.js +26 -0
  31. package/lib/directives/repeat-click.js +33 -0
  32. package/lib/divider.js +313 -0
  33. package/lib/drawer.js +592 -0
  34. package/lib/dropdown-item.js +316 -0
  35. package/lib/dropdown-menu.js +351 -0
  36. package/lib/dropdown.js +643 -0
  37. package/lib/empty.js +730 -0
  38. package/lib/footer.js +277 -0
  39. package/lib/form-item.js +826 -0
  40. package/lib/form.js +466 -0
  41. package/lib/header.js +277 -0
  42. package/lib/icon.js +265 -0
  43. package/lib/image.js +1138 -0
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +301 -0
  46. package/lib/input-number.js +757 -0
  47. package/lib/input.js +998 -0
  48. package/lib/link.js +332 -0
  49. package/lib/loading.js +631 -0
  50. package/lib/locale/format.js +56 -0
  51. package/lib/locale/index.js +63 -0
  52. package/lib/locale/lang/en.js +126 -0
  53. package/lib/locale/lang/zh-CN.js +126 -0
  54. package/lib/locale/lang/zh-TW.js +126 -0
  55. package/lib/main.js +264 -0
  56. package/lib/menu-item-group.js +308 -0
  57. package/lib/menu-item.js +491 -0
  58. package/lib/menu.js +865 -0
  59. package/lib/message-box.js +1192 -0
  60. package/lib/message.js +548 -0
  61. package/lib/mixins/emitter.js +36 -0
  62. package/lib/mixins/focus.js +15 -0
  63. package/lib/mixins/locale.js +17 -0
  64. package/lib/mixins/migrating.js +69 -0
  65. package/lib/notification.js +615 -0
  66. package/lib/option-group.js +344 -0
  67. package/lib/option.js +474 -0
  68. package/lib/page-header.js +319 -0
  69. package/lib/pagination.js +950 -0
  70. package/lib/popconfirm.js +457 -0
  71. package/lib/popover.js +617 -0
  72. package/lib/progress.js +595 -0
  73. package/lib/radio-button.js +463 -0
  74. package/lib/radio-group.js +391 -0
  75. package/lib/radio.js +497 -0
  76. package/lib/rate.js +670 -0
  77. package/lib/result.js +578 -0
  78. package/lib/row.js +149 -0
  79. package/lib/scrollbar.js +423 -0
  80. package/lib/select.js +2167 -0
  81. package/lib/selectDisplayInput.js +367 -0
  82. package/lib/skeleton-item.js +342 -0
  83. package/lib/skeleton.js +372 -0
  84. package/lib/slider.js +1199 -0
  85. package/lib/spinner.js +301 -0
  86. package/lib/statistic.js +533 -0
  87. package/lib/step.js +522 -0
  88. package/lib/steps.js +342 -0
  89. package/lib/subTitle.js +295 -0
  90. package/lib/submenu.js +701 -0
  91. package/lib/switch.js +554 -0
  92. package/lib/tab-pane.js +332 -0
  93. package/lib/tabDialog.js +1184 -0
  94. package/lib/table-column.js +952 -0
  95. package/lib/table.js +5015 -0
  96. package/lib/tabs.js +920 -0
  97. package/lib/tag.js +304 -0
  98. package/lib/theme-chalk/base.css +1 -1
  99. package/lib/theme-chalk/index.css +1 -2
  100. package/lib/theme-chalk/selectDisplayInput.css +1 -0
  101. package/lib/theme-chalk/subTitle.css +1 -0
  102. package/lib/theme-chalk/tabDialog.css +1 -0
  103. package/lib/theme-chalk/treeSelect.css +1 -0
  104. package/lib/time-picker.js +2967 -0
  105. package/lib/time-select.js +1765 -0
  106. package/lib/timeline-item.js +371 -0
  107. package/lib/timeline.js +275 -0
  108. package/lib/tooltip.js +425 -0
  109. package/lib/transfer.js +1102 -0
  110. package/lib/transitions/collapse-transition.js +91 -0
  111. package/lib/tree.js +2263 -0
  112. package/lib/treeSelect.js +4430 -0
  113. package/lib/umd/locale/en.js +142 -0
  114. package/lib/umd/locale/zh-CN.js +142 -0
  115. package/lib/umd/locale/zh-TW.js +142 -0
  116. package/lib/upload.js +1390 -0
  117. package/lib/utils/after-leave.js +35 -0
  118. package/lib/utils/aria-dialog.js +104 -0
  119. package/lib/utils/aria-utils.js +126 -0
  120. package/lib/utils/clickoutside.js +79 -0
  121. package/lib/utils/date-util.js +310 -0
  122. package/lib/utils/date.js +369 -0
  123. package/lib/utils/dom.js +234 -0
  124. package/lib/utils/lodash.js +9421 -0
  125. package/lib/utils/menu/aria-menubar.js +24 -0
  126. package/lib/utils/menu/aria-menuitem.js +62 -0
  127. package/lib/utils/menu/aria-submenu.js +69 -0
  128. package/lib/utils/merge.js +21 -0
  129. package/lib/utils/popper.js +1261 -0
  130. package/lib/utils/popup/index.js +233 -0
  131. package/lib/utils/popup/popup-manager.js +205 -0
  132. package/lib/utils/resize-event.js +59 -0
  133. package/lib/utils/scroll-into-view.js +38 -0
  134. package/lib/utils/scrollbar-width.js +39 -0
  135. package/lib/utils/shared.js +12 -0
  136. package/lib/utils/types.js +52 -0
  137. package/lib/utils/util.js +272 -0
  138. package/lib/utils/vdom.js +13 -0
  139. package/lib/utils/vue-popper.js +202 -0
  140. package/package.json +3 -3
  141. package/packages/selectDisplayInput/index.js +8 -0
  142. package/packages/selectDisplayInput/src/main.vue +75 -0
  143. package/packages/theme-chalk/gulpfile.js +1 -1
  144. package/packages/{theme-cy/src → theme-chalk/src/cy}/index.scss +1 -0
  145. package/packages/theme-chalk/src/cy/selectDisplayInput.scss +76 -0
  146. package/packages/theme-chalk/src/index.scss +2 -3
  147. package/packages/treeSelect/src/main.vue +7 -3
  148. package/src/index.js +7 -4
  149. package/lib/theme-cy/base.css +0 -1
  150. package/lib/theme-cy/index.css +0 -1
  151. package/lib/theme-cy/subTitle.css +0 -1
  152. package/lib/theme-cy/tabDialog.css +0 -1
  153. package/lib/theme-cy/treeSelect.css +0 -1
  154. package/packages/theme-chalk/src/tabDialog.scss +0 -0
  155. package/packages/theme-chalk/src/treeSelect.scss +0 -0
  156. package/packages/theme-cy/gulpfile.js +0 -19
  157. package/packages/theme-cy/lib/base.css +0 -1
  158. package/packages/theme-cy/lib/element.css +0 -1
  159. package/packages/theme-cy/lib/index.css +0 -1
  160. package/packages/theme-cy/lib/subTitle.css +0 -1
  161. package/packages/theme-cy/lib/tabDialog.css +0 -1
  162. package/packages/theme-cy/lib/treeSelect.css +0 -1
  163. package/packages/theme-cy/package.json +0 -9
  164. /package/lib/{theme-cy → theme-chalk}/element.css +0 -0
  165. /package/packages/{theme-cy/src → theme-chalk/src/cy}/base.scss +0 -0
  166. /package/packages/{theme-cy/src → theme-chalk/src/cy}/element.scss +0 -0
  167. /package/packages/{theme-cy/src → theme-chalk/src/cy}/subTitle.scss +0 -0
  168. /package/packages/{theme-cy/src → theme-chalk/src/cy}/tabDialog.scss +0 -0
  169. /package/packages/{theme-cy/src → theme-chalk/src/cy}/treeSelect.scss +0 -0
  170. /package/packages/theme-chalk/src/{subTitle.scss → selectDisplayInput.scss} +0 -0
package/README.md CHANGED
@@ -100,6 +100,36 @@ touch packages/theme-chalk/src/cy-test.scss
100
100
  @import "./cy-test.scss";
101
101
  ```
102
102
 
103
+ ### 3. 产研组件样式组织(cy 模块)
104
+
105
+ 产研自定义组件(treeSelect、tabDialog、subTitle)的样式统一存放在 `packages/theme-chalk/src/cy/` 目录下:
106
+
107
+ **目录结构:**
108
+ ```
109
+ packages/theme-chalk/src/
110
+ └── cy/
111
+ ├── index.scss # cy 模块入口
112
+ ├── base.scss # 基础样式
113
+ ├── treeSelect.scss # 树形选择器样式
114
+ ├── tabDialog.scss # 标签对话框样式
115
+ └── subTitle.scss # 副标题样式
116
+ ```
117
+
118
+ **`packages/theme-chalk/src/cy/index.scss` 内容:**
119
+ ```scss
120
+ @import "./base.scss";
121
+ @import "./treeSelect.scss";
122
+ @import "./tabDialog.scss";
123
+ @import "./subTitle.scss";
124
+ ```
125
+
126
+ **主入口引入:**
127
+
128
+ 修改 `packages/theme-chalk/src/index.scss`,添加:
129
+ ```scss
130
+ @import "./cy/index.scss";
131
+ ```
132
+
103
133
  ---
104
134
 
105
135
  ## 三、注册组件到组件库
@@ -278,15 +308,21 @@ Vue.use(CyElementUI)
278
308
  | `packages/cy-test/index.js` | 组件导出文件 |
279
309
  | `packages/cy-test/src/main.vue` | 组件实现文件 |
280
310
  | `packages/theme-chalk/src/cy-test.scss` | 组件样式文件 |
311
+ | `packages/theme-chalk/src/cy/` | 产研组件样式目录 |
312
+ | `packages/theme-chalk/src/cy/index.scss` | cy 模块样式入口 |
313
+ | `packages/theme-chalk/src/cy/base.scss` | cy 基础样式 |
314
+ | `packages/theme-chalk/src/cy/treeSelect.scss` | 树形选择器样式 |
315
+ | `packages/theme-chalk/src/cy/tabDialog.scss` | 标签对话框样式 |
316
+ | `packages/theme-chalk/src/cy/subTitle.scss` | 副标题样式 |
281
317
 
282
318
  ### 修改的文件
283
319
 
284
320
  | 文件路径 | 修改内容 |
285
321
  |---------|---------|
286
322
  | `components.json` | 添加组件配置 |
287
- | `packages/theme-chalk/src/index.scss` | 导入组件样式 |
323
+ | `packages/theme-chalk/src/index.scss` | 导入组件样式和 cy 模块 |
288
324
  | `src/index.js` | 自动生成组件注册 |
289
- | `package.json` | 更新版本号 |
325
+ | `package.json` | 更新版本号和构建脚本 |
290
326
 
291
327
  ### 生成的文件(构建后)
292
328
 
@@ -295,6 +331,9 @@ Vue.use(CyElementUI)
295
331
  | `lib/index.js` | 打包后的主入口 |
296
332
  | `lib/theme-chalk/cy-test.css` | 组件样式 |
297
333
  | `lib/theme-chalk/index.css` | 完整主题样式 |
334
+ | `lib/treeSelect.js` | 树形选择器组件 |
335
+ | `lib/tabDialog.js` | 标签对话框组件 |
336
+ | `lib/subTitle.js` | 副标题组件 |
298
337
 
299
338
  ---
300
339
 
@@ -337,7 +376,7 @@ npm login
337
376
 
338
377
  ### Q5: 打包过程卡住或时间过长
339
378
 
340
- **原因:** `components.json` 中缺少组件注册,导致 webpack 构建时无法找到组件入口
379
+ **原因1:** `components.json` 中缺少组件注册,导致 webpack 构建时无法找到组件入口
341
380
 
342
381
  **解决:**
343
382
  ```bash
@@ -351,6 +390,23 @@ cat components.json
351
390
  npm run build:file
352
391
  ```
353
392
 
393
+ **原因2:** webpack 批量打包组件时内存不足
394
+
395
+ **解决:**
396
+ ```bash
397
+ # 增加 Node.js 内存限制
398
+ node --max-old-space-size=8192 node_modules/webpack/bin/webpack.js --config build/webpack.component.js
399
+ ```
400
+
401
+ **或者修改 package.json 中的构建脚本:**
402
+ ```json
403
+ {
404
+ "scripts": {
405
+ "dist": "npm run clean && npm run build:file && npm run lint && webpack --config build/webpack.conf.js && node --max-old-space-size=8192 node_modules/webpack/bin/webpack.js --config build/webpack.component.js && npm run build:utils && npm run build:umd && npm run build:theme"
406
+ }
407
+ }
408
+ ```
409
+
354
410
  ### Q6: 自定义指令未注册
355
411
 
356
412
  **原因:** 组件使用了自定义指令(如 `v-dialog-drag`),但未在主入口文件中注册
package/lib/alert.js ADDED
@@ -0,0 +1,420 @@
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 = 103);
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
+ /***/ 103:
196
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
+
198
+ "use strict";
199
+ // ESM COMPAT FLAG
200
+ __webpack_require__.r(__webpack_exports__);
201
+
202
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=template&id=bc1a9058
203
+ var render = function () {
204
+ var _vm = this
205
+ var _h = _vm.$createElement
206
+ var _c = _vm._self._c || _h
207
+ return _c("transition", { attrs: { name: "el-alert-fade" } }, [
208
+ _c(
209
+ "div",
210
+ {
211
+ directives: [
212
+ {
213
+ name: "show",
214
+ rawName: "v-show",
215
+ value: _vm.visible,
216
+ expression: "visible",
217
+ },
218
+ ],
219
+ staticClass: "el-alert",
220
+ class: [
221
+ _vm.typeClass,
222
+ _vm.center ? "is-center" : "",
223
+ "is-" + _vm.effect,
224
+ ],
225
+ attrs: { role: "alert" },
226
+ },
227
+ [
228
+ _vm.showIcon
229
+ ? _c("i", {
230
+ staticClass: "el-alert__icon",
231
+ class: [_vm.iconClass, _vm.isBigIcon],
232
+ })
233
+ : _vm._e(),
234
+ _c("div", { staticClass: "el-alert__content" }, [
235
+ _vm.title || _vm.$slots.title
236
+ ? _c(
237
+ "span",
238
+ { staticClass: "el-alert__title", class: [_vm.isBoldTitle] },
239
+ [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
240
+ 2
241
+ )
242
+ : _vm._e(),
243
+ _vm.$slots.default && !_vm.description
244
+ ? _c(
245
+ "p",
246
+ { staticClass: "el-alert__description" },
247
+ [_vm._t("default")],
248
+ 2
249
+ )
250
+ : _vm._e(),
251
+ _vm.description && !_vm.$slots.default
252
+ ? _c("p", { staticClass: "el-alert__description" }, [
253
+ _vm._v(_vm._s(_vm.description)),
254
+ ])
255
+ : _vm._e(),
256
+ _c(
257
+ "i",
258
+ {
259
+ directives: [
260
+ {
261
+ name: "show",
262
+ rawName: "v-show",
263
+ value: _vm.closable,
264
+ expression: "closable",
265
+ },
266
+ ],
267
+ staticClass: "el-alert__closebtn",
268
+ class: {
269
+ "is-customed": _vm.closeText !== "",
270
+ "el-icon-close": _vm.closeText === "",
271
+ },
272
+ on: {
273
+ click: function ($event) {
274
+ _vm.close()
275
+ },
276
+ },
277
+ },
278
+ [_vm._v(_vm._s(_vm.closeText))]
279
+ ),
280
+ ]),
281
+ ]
282
+ ),
283
+ ])
284
+ }
285
+ var staticRenderFns = []
286
+ render._withStripped = true
287
+
288
+
289
+ // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=template&id=bc1a9058
290
+
291
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=script&lang=js
292
+ //
293
+ //
294
+ //
295
+ //
296
+ //
297
+ //
298
+ //
299
+ //
300
+ //
301
+ //
302
+ //
303
+ //
304
+ //
305
+ //
306
+ //
307
+ //
308
+ //
309
+ //
310
+ //
311
+ //
312
+ //
313
+
314
+ var TYPE_CLASSES_MAP = {
315
+ 'success': 'el-icon-success',
316
+ 'warning': 'el-icon-warning',
317
+ 'error': 'el-icon-error'
318
+ };
319
+ /* harmony default export */ var mainvue_type_script_lang_js = ({
320
+ name: 'ElAlert',
321
+
322
+ props: {
323
+ title: {
324
+ type: String,
325
+ default: ''
326
+ },
327
+ description: {
328
+ type: String,
329
+ default: ''
330
+ },
331
+ type: {
332
+ type: String,
333
+ default: 'info'
334
+ },
335
+ closable: {
336
+ type: Boolean,
337
+ default: true
338
+ },
339
+ closeText: {
340
+ type: String,
341
+ default: ''
342
+ },
343
+ showIcon: Boolean,
344
+ center: Boolean,
345
+ effect: {
346
+ type: String,
347
+ default: 'light',
348
+ validator: function validator(value) {
349
+ return ['light', 'dark'].indexOf(value) !== -1;
350
+ }
351
+ }
352
+ },
353
+
354
+ data: function data() {
355
+ return {
356
+ visible: true
357
+ };
358
+ },
359
+
360
+
361
+ methods: {
362
+ close: function close() {
363
+ this.visible = false;
364
+ this.$emit('close');
365
+ }
366
+ },
367
+
368
+ computed: {
369
+ typeClass: function typeClass() {
370
+ return 'el-alert--' + this.type;
371
+ },
372
+ iconClass: function iconClass() {
373
+ return TYPE_CLASSES_MAP[this.type] || 'el-icon-info';
374
+ },
375
+ isBigIcon: function isBigIcon() {
376
+ return this.description || this.$slots.default ? 'is-big' : '';
377
+ },
378
+ isBoldTitle: function isBoldTitle() {
379
+ return this.description || this.$slots.default ? 'is-bold' : '';
380
+ }
381
+ }
382
+ });
383
+ // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=script&lang=js
384
+ /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
385
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
386
+ var componentNormalizer = __webpack_require__(0);
387
+
388
+ // CONCATENATED MODULE: ./packages/alert/src/main.vue
389
+
390
+
391
+
392
+
393
+
394
+ /* normalize component */
395
+
396
+ var component = Object(componentNormalizer["a" /* default */])(
397
+ src_mainvue_type_script_lang_js,
398
+ render,
399
+ staticRenderFns,
400
+ false,
401
+ null,
402
+ null,
403
+ null
404
+
405
+ )
406
+
407
+ /* harmony default export */ var main = (component.exports);
408
+ // CONCATENATED MODULE: ./packages/alert/index.js
409
+
410
+
411
+ /* istanbul ignore next */
412
+ main.install = function (Vue) {
413
+ Vue.component(main.name, main);
414
+ };
415
+
416
+ /* harmony default export */ var packages_alert = __webpack_exports__["default"] = (main);
417
+
418
+ /***/ })
419
+
420
+ /******/ });