cy-element-ui 1.1.12 → 1.1.14

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 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/avatar.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 138);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 139);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 138:
195
+ /***/ 139:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
package/lib/col.js CHANGED
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 143);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 144);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 143:
90
+ /***/ 144:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 145);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 146);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 145:
90
+ /***/ 146:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 140);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 141);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 140:
90
+ /***/ 141:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
package/lib/dropdown.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 133);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 134);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -206,7 +206,7 @@ module.exports = require("element-ui/lib/utils/clickoutside");
206
206
 
207
207
  /***/ }),
208
208
 
209
- /***/ 133:
209
+ /***/ 134:
210
210
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
211
211
 
212
212
  "use strict";