neo-cmp-cli 1.1.6 → 1.1.8
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 +1 -1
- package/src/module/index.js +5 -0
- package/src/module/main.js +3 -3
- package/src/module/neoInitByCopy.js +4 -0
- package/src/template/antd-custom-cmp-template/.prettierrc.js +12 -0
- package/src/template/antd-custom-cmp-template/README.md +47 -0
- package/src/template/antd-custom-cmp-template/commitlint.config.js +59 -0
- package/src/template/antd-custom-cmp-template/neo.config.js +109 -0
- package/src/template/antd-custom-cmp-template/package.json +59 -0
- package/src/template/antd-custom-cmp-template/public/css/base.css +283 -0
- package/src/template/antd-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/src/template/antd-custom-cmp-template/public/template.html +13 -0
- package/src/template/antd-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/src/template/antd-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/src/template/antd-custom-cmp-template/src/components/data-dashboard/README.md +39 -0
- package/src/template/antd-custom-cmp-template/src/components/data-dashboard/index.tsx +462 -0
- package/src/template/antd-custom-cmp-template/src/components/data-dashboard/model.ts +76 -0
- package/src/template/antd-custom-cmp-template/src/components/data-dashboard/style.scss +1409 -0
- package/src/template/antd-custom-cmp-template/src/components/info-card/index.tsx +72 -0
- package/src/template/antd-custom-cmp-template/src/components/info-card/model.ts +78 -0
- package/src/template/antd-custom-cmp-template/src/components/info-card/style.scss +105 -0
- package/src/template/antd-custom-cmp-template/tsconfig.json +68 -0
- package/src/template/echart-custom-cmp-template/.prettierrc.js +12 -0
- package/src/template/echart-custom-cmp-template/README.md +47 -0
- package/src/template/echart-custom-cmp-template/commitlint.config.js +59 -0
- package/src/template/echart-custom-cmp-template/neo.config.js +109 -0
- package/src/template/echart-custom-cmp-template/package.json +58 -0
- package/src/template/echart-custom-cmp-template/public/css/base.css +283 -0
- package/src/template/echart-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/src/template/echart-custom-cmp-template/public/template.html +13 -0
- package/src/template/echart-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/src/template/echart-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/src/template/echart-custom-cmp-template/src/components/info-card/index.tsx +69 -0
- package/src/template/echart-custom-cmp-template/src/components/info-card/model.ts +78 -0
- package/src/template/echart-custom-cmp-template/src/components/info-card/style.scss +105 -0
- package/src/template/echart-custom-cmp-template/src/components/list-widget/README.md +2 -0
- package/src/template/echart-custom-cmp-template/src/components/list-widget/index.tsx +208 -0
- package/src/template/echart-custom-cmp-template/src/components/list-widget/model.ts +90 -0
- package/src/template/echart-custom-cmp-template/src/components/list-widget/style.scss +350 -0
- package/src/template/echart-custom-cmp-template/tsconfig.json +68 -0
- package/src/template/react-custom-cmp-template/package.json +2 -2
- package/src/template/react-ts-custom-cmp-template/package.json +2 -3
- package/src/template/react-ts-custom-cmp-template/src/components/info-card/index.tsx +0 -3
- package/src/template/vue2-custom-cmp-template/package.json +2 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 数据仪表板组件对接编辑器的描述文件
|
|
3
|
+
*/
|
|
4
|
+
export class DataDashboardModel {
|
|
5
|
+
/**
|
|
6
|
+
* cmpType 为自定义组件名称,用于标识组件的唯一性
|
|
7
|
+
* 在构建时根据当前组件目录名称自动生成
|
|
8
|
+
*/
|
|
9
|
+
// cmpType: string = 'data-dashboard';
|
|
10
|
+
|
|
11
|
+
// 组件名称,用于设置在编辑器左侧组件面板中展示的名称
|
|
12
|
+
label: string = '数据仪表板';
|
|
13
|
+
|
|
14
|
+
// 组件描述,用于设置在编辑器左侧组件面板中展示的描述
|
|
15
|
+
description: string = '酷炫的数据展示仪表板,支持动态数据更新和动画效果';
|
|
16
|
+
|
|
17
|
+
// 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
|
|
18
|
+
tags: string[] = ['仪表板'];
|
|
19
|
+
|
|
20
|
+
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
21
|
+
iconSrc: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
22
|
+
|
|
23
|
+
// 初次插入页面的默认属性数据
|
|
24
|
+
defaultComProps = {
|
|
25
|
+
title: '数据仪表板',
|
|
26
|
+
theme: 'gradient',
|
|
27
|
+
showAnimations: true,
|
|
28
|
+
label: '数据仪表板',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// 设计器端预览时展示的默认数据
|
|
32
|
+
previewComProps = {
|
|
33
|
+
label: '数据仪表板',
|
|
34
|
+
title: '数据仪表板预览',
|
|
35
|
+
theme: 'light',
|
|
36
|
+
showAnimations: false,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 组件面板配置,用于生成编辑器右侧属性配置面板内容
|
|
41
|
+
*/
|
|
42
|
+
propsSchema = [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
name: 'title',
|
|
46
|
+
label: '仪表板标题',
|
|
47
|
+
value: '数据仪表板',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'select',
|
|
51
|
+
name: 'theme',
|
|
52
|
+
label: '主题样式',
|
|
53
|
+
value: 'gradient',
|
|
54
|
+
options: [
|
|
55
|
+
{ label: '渐变主题', value: 'gradient' },
|
|
56
|
+
{ label: '深色主题', value: 'dark' },
|
|
57
|
+
{ label: '浅色主题', value: 'light' }
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'switch',
|
|
62
|
+
name: 'showAnimations',
|
|
63
|
+
label: '启用动画效果',
|
|
64
|
+
value: true,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
|
|
69
|
+
/*
|
|
70
|
+
propsSchemaCreator = (com: any) => {
|
|
71
|
+
return [];
|
|
72
|
+
};
|
|
73
|
+
*/
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default DataDashboardModel;
|