neo-cmp-cli 1.1.10 → 1.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -28,8 +28,8 @@ const getExternalsByNeoCommonModules = (cmpNeoExternals) => {
28
28
  });
29
29
 
30
30
  // 如果自定义组件有共享的依赖模块,则合并到 neoExternals 中
31
- if (cmpNeoExternals && _.isPlainObject(cmpNeoExternals) && Object.keys(cmpNeoExternals).length > 0) {
32
- Object.keys(cmpNeoExternals).forEach(moduleName => {
31
+ if (cmpNeoExternals && cmpNeoExternals.length > 0) {
32
+ cmpNeoExternals.forEach(moduleName => {
33
33
  neoExternals[moduleName] = `commonjs ${moduleName}`;
34
34
  });
35
35
  }
@@ -41,8 +41,8 @@ module.exports = {
41
41
  // Neo 共享依赖模块
42
42
  neoCommonModule: {
43
43
  // neoExports: ['echarts'], // 自定义组件 共享出来的模块,支持数组和对象
44
- // neoExports: {},
45
- neoExternals: ['neo-register'], // 自定义组件 需要剔除的模块,仅支持数组写法
44
+ // neoExports: {}, // 对象写法
45
+ // neoExternals: ['neo-register', 'chart-widget'], // 自定义组件 需要剔除的模块,仅支持数组写法
46
46
  },
47
47
  preview: {
48
48
  // 用于开启本地预览模式的相关配置信息
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-custom-cmp-template",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "neo自定义组件模板(react&ts技术栈)",
5
5
  "keywords": [
6
6
  "自定义组件模板",
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.1.8",
50
+ "neo-cmp-cli": "^1.1.11",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -254,11 +254,11 @@
254
254
  border: 1px solid rgba(51, 65, 85, 0.5);
255
255
  backdrop-filter: blur(20px);
256
256
  color: var(--text-inverse);
257
-
257
+
258
258
  .dashboard-title {
259
259
  color: var(--text-inverse);
260
260
  }
261
-
261
+
262
262
  .user-info {
263
263
  .user-name {
264
264
  color: var(--text-inverse);
@@ -275,86 +275,86 @@
275
275
  border: 1px solid rgba(51, 65, 85, 0.5);
276
276
  color: var(--text-inverse);
277
277
  backdrop-filter: blur(20px);
278
-
278
+
279
279
  .ant-card-head-title {
280
280
  color: var(--text-inverse);
281
281
  }
282
-
282
+
283
283
  .ant-statistic-title {
284
284
  color: var(--text-inverse);
285
285
  }
286
-
286
+
287
287
  .ant-statistic-content-value {
288
288
  color: var(--text-inverse);
289
289
  }
290
-
290
+
291
291
  .metric-trend {
292
292
  .trend-text {
293
293
  color: var(--text-inverse);
294
294
  }
295
295
  }
296
-
296
+
297
297
  .product-name {
298
298
  color: var(--text-inverse);
299
299
  }
300
-
300
+
301
301
  .product-sales {
302
302
  color: rgba(255, 255, 255, 0.7);
303
303
  }
304
-
304
+
305
305
  .activity-text {
306
306
  .user-name {
307
307
  color: var(--primary-light);
308
308
  }
309
-
309
+
310
310
  .action {
311
311
  color: var(--text-inverse);
312
312
  }
313
313
  }
314
-
314
+
315
315
  .activity-time {
316
316
  color: rgba(255, 255, 255, 0.7);
317
317
  }
318
-
318
+
319
319
  .performance-header {
320
320
  .metric-name {
321
321
  color: var(--text-inverse);
322
322
  }
323
-
323
+
324
324
  .metric-value {
325
325
  color: var(--primary-light);
326
326
  }
327
327
  }
328
-
328
+
329
329
  .performance-target {
330
330
  color: rgba(255, 255, 255, 0.7);
331
331
  }
332
-
332
+
333
333
  .active-users-description {
334
334
  color: rgba(255, 255, 255, 0.7);
335
335
  }
336
-
336
+
337
337
  .active-users-number {
338
338
  .unit {
339
339
  color: rgba(255, 255, 255, 0.7);
340
340
  }
341
341
  }
342
-
342
+
343
343
  .ant-btn {
344
344
  color: var(--text-inverse);
345
345
  border-color: rgba(255, 255, 255, 0.3);
346
-
346
+
347
347
  &:hover {
348
348
  color: var(--text-inverse);
349
349
  border-color: var(--primary-light);
350
350
  }
351
351
  }
352
-
352
+
353
353
  .ant-tag {
354
354
  color: var(--text-inverse);
355
355
  border-color: rgba(255, 255, 255, 0.3);
356
356
  }
357
-
357
+
358
358
  .ant-progress-text {
359
359
  color: var(--text-inverse);
360
360
  }
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  import { Avatar } from 'antd';
3
3
  import { UserOutlined } from '@ant-design/icons';
4
4
  import './style.scss'; // 组件内容样式
5
+ // @ts-ignore
6
+ // import ChartWidget from 'chart-widget'; // 另一个自定义组件导出的模块
5
7
 
6
8
  interface InfoCardProps {
7
9
  title: string;
@@ -66,6 +68,24 @@ export default class InfoCard extends React.PureComponent<InfoCardProps> {
66
68
  </div>
67
69
  )}
68
70
  </div>
71
+ {/*
72
+ <ChartWidget
73
+ chartType="line"
74
+ title="销售趋势"
75
+ subtitle="2025年数据"
76
+ width={800}
77
+ height={400}
78
+ mockData={{
79
+ xAxis: ['1月', '2月', '3月', '4月', '5月', '6月'],
80
+ series: [
81
+ {
82
+ name: '销售额',
83
+ data: [120, 200, 150, 80, 70, 110],
84
+ },
85
+ ],
86
+ }}
87
+ />
88
+ */}
69
89
  </div>
70
90
  );
71
91
  }
@@ -9,7 +9,7 @@ export class InfoCardModel {
9
9
  // cmpType: string = 'info-card';
10
10
 
11
11
  // 组件名称,用于设置在编辑器左侧组件面板中展示的名称
12
- label: string = '信息卡片';
12
+ label: string = '信息卡片2';
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
15
  description: string = '信息展示卡片';
@@ -39,12 +39,12 @@ module.exports = {
39
39
  // babelPlugins: [],
40
40
  },
41
41
  neoCommonModule: {
42
- // neoExports: ['echarts'], // 自定义组件 共享出来的模块,支持数组和对象
42
+ // neoExports: [], // 自定义组件 共享出来的模块,支持数组和对象
43
43
  neoExports: {
44
- // 'neo/chart-widget': './src/components/chart-widget',
45
- 'neo-register': 'neo-register',
44
+ 'chart-widget': path.resolve('./src/components/chart-widget'), // 导出图表自定义组件
45
+ 'neo-register': 'neo-register', // 导出 Neo 注册模块
46
46
  },
47
- neoExternals: ['echarts'], // 自定义组件 需要剔除的模块,仅支持数组写法
47
+ // neoExternals: [], // 自定义组件 需要剔除的模块,仅支持数组写法
48
48
  },
49
49
  preview: {
50
50
  // 用于开启本地预览模式的相关配置信息
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echarts-custom-cmp-template",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "neo自定义组件模板(react&ts技术栈)",
5
5
  "keywords": [
6
6
  "自定义组件模板",
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.1.8",
50
+ "neo-cmp-cli": "^1.1.11",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5",
@@ -48,7 +48,7 @@
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
50
  "@types/axios": "^0.14.0",
51
- "neo-cmp-cli": "^1.1.8",
51
+ "neo-cmp-cli": "^1.1.11",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.1.8",
47
+ "neo-cmp-cli": "^1.1.11",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5"
@@ -46,7 +46,7 @@
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
47
  "@types/react": "^16.9.11",
48
48
  "@types/react-dom": "^16.9.15",
49
- "neo-cmp-cli": "^1.1.8",
49
+ "neo-cmp-cli": "^1.1.11",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.1.8",
47
+ "neo-cmp-cli": "^1.1.11",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",