neo-cmp-cli 1.3.7 → 1.3.9

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 (33) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
  3. package/src/module/neoInit.js +2 -0
  4. package/src/module/neoInitByCopy.js +3 -0
  5. package/src/template/antd-custom-cmp-template/package.json +1 -1
  6. package/src/template/echarts-custom-cmp-template/package.json +1 -1
  7. package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/index.tsx +56 -18
  8. package/src/template/echarts-custom-cmp-template/src/utils/url.ts +82 -0
  9. package/src/template/neo-custom-cmp-template/neo.config.js +4 -4
  10. package/src/template/neo-custom-cmp-template/package.json +1 -1
  11. package/src/template/react-custom-cmp-template/package.json +1 -1
  12. package/src/template/react-ts-custom-cmp-template/neo.config.js +4 -4
  13. package/src/template/react-ts-custom-cmp-template/package.json +2 -2
  14. package/src/template/vue2-custom-cmp-template/package.json +1 -1
  15. package/src/utils/resetPackageVersion.js +115 -0
  16. package/src/template/echarts-custom-cmp-template/src/components/info-card/index.tsx +0 -69
  17. package/src/template/echarts-custom-cmp-template/src/components/info-card/model.ts +0 -78
  18. package/src/template/echarts-custom-cmp-template/src/components/info-card/style.scss +0 -105
  19. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/README.md +0 -61
  20. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/index.tsx +0 -191
  21. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/model.ts +0 -56
  22. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/style.scss +0 -260
  23. package/src/template/neo-custom-cmp-template/src/components/contact-form/README.md +0 -94
  24. package/src/template/neo-custom-cmp-template/src/components/contact-form/index.tsx +0 -249
  25. package/src/template/neo-custom-cmp-template/src/components/contact-form/model.ts +0 -63
  26. package/src/template/neo-custom-cmp-template/src/components/contact-form/style.scss +0 -120
  27. package/src/template/react-ts-custom-cmp-template/src/components/info-card/index.tsx +0 -69
  28. package/src/template/react-ts-custom-cmp-template/src/components/info-card/model.ts +0 -78
  29. package/src/template/react-ts-custom-cmp-template/src/components/info-card/style.scss +0 -105
  30. /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/README.md +0 -0
  31. /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/USAGE.md +0 -0
  32. /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/model.ts +0 -0
  33. /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/style.scss +0 -0
@@ -1,120 +0,0 @@
1
- .contact-form-container {
2
- .contact-form-card {
3
- .ant-card-head {
4
- border-bottom: 1px solid #f0f0f0;
5
-
6
- .ant-card-head-title {
7
- font-size: 18px;
8
- font-weight: 600;
9
- color: #262626;
10
- }
11
- }
12
-
13
- .contact-form {
14
- .ant-form-item {
15
- margin-bottom: 20px;
16
-
17
- .ant-form-item-label {
18
- padding-bottom: 4px;
19
-
20
- label {
21
- font-weight: 500;
22
- color: #262626;
23
-
24
- &.ant-form-item-required::before {
25
- color: #ff4d4f;
26
- }
27
- }
28
- }
29
-
30
- .ant-input,
31
- .ant-select-selector {
32
- border-radius: 6px;
33
- border-color: #d9d9d9;
34
-
35
- &:hover {
36
- border-color: #40a9ff;
37
- }
38
-
39
- &:focus,
40
- &.ant-select-focused .ant-select-selector {
41
- border-color: #1890ff;
42
- box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
43
- }
44
- }
45
-
46
- .ant-select {
47
- .ant-select-selector {
48
- height: 40px;
49
-
50
- .ant-select-selection-item {
51
- line-height: 38px;
52
- }
53
- }
54
- }
55
-
56
- .ant-input {
57
- height: 40px;
58
- }
59
- }
60
-
61
- .form-actions {
62
- margin-bottom: 0;
63
- padding-top: 16px;
64
- border-top: 1px solid #f0f0f0;
65
- text-align: right;
66
-
67
- .ant-btn {
68
- height: 40px;
69
- padding: 8px 24px;
70
- border-radius: 6px;
71
- font-weight: 500;
72
-
73
- &.ant-btn-primary {
74
- background-color: #1890ff;
75
- border-color: #1890ff;
76
-
77
- &:hover {
78
- background-color: #40a9ff;
79
- border-color: #40a9ff;
80
- }
81
-
82
- &:active {
83
- background-color: #096dd9;
84
- border-color: #096dd9;
85
- }
86
- }
87
-
88
- &:not(.ant-btn-primary) {
89
- color: #262626;
90
- background-color: #fff;
91
- border-color: #d9d9d9;
92
-
93
- &:hover {
94
- color: #1890ff;
95
- border-color: #1890ff;
96
- }
97
- }
98
- }
99
- }
100
- }
101
- }
102
- }
103
-
104
- // 响应式设计
105
- @media (max-width: 768px) {
106
- .contact-form-container {
107
- .contact-form-card {
108
- .contact-form {
109
- .form-actions {
110
- text-align: center;
111
-
112
- .ant-btn {
113
- width: 100%;
114
- margin: 4px 0;
115
- }
116
- }
117
- }
118
- }
119
- }
120
- }
@@ -1,69 +0,0 @@
1
- import * as React from 'react';
2
- import './style.scss'; // 组件内容样式
3
-
4
- interface InfoCardProps {
5
- title: string;
6
- backgroundImage: string;
7
- imgCount: number;
8
- commentCount: number;
9
- data?: any;
10
- }
11
-
12
- export default class InfoCard extends React.PureComponent<InfoCardProps> {
13
- constructor(props: InfoCardProps) {
14
- super(props);
15
- this.agreeDataFormat = this.agreeDataFormat.bind(this);
16
- }
17
-
18
- agreeDataFormat(agreeData: number) {
19
- if (agreeData && agreeData <= 9999) {
20
- return agreeData;
21
- }
22
- if (agreeData && agreeData > 9999) {
23
- return `${Math.floor(agreeData / 1000) / 10}w`;
24
- }
25
- return '';
26
- }
27
-
28
- render() {
29
- const { title, backgroundImage, imgCount, commentCount } = this.props;
30
- console.log('当前自定义组件:', this.props, this);
31
- const curAmisData = this.props.data || {};
32
-
33
- const userInfo = curAmisData.__NeoCurrentUser;
34
- const systemInfo = curAmisData.__NeoSystemInfo || {};
35
-
36
- const curBackgroundImage =
37
- backgroundImage || 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg';
38
- return (
39
- <div className="info-card-container">
40
- <div className="news-title">
41
- {title ||
42
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
43
- {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
44
- </div>
45
- <div className="item-imgbox">
46
- {userInfo && userInfo.icon && (
47
- <div className="user-info-box">
48
- <img src={userInfo.icon} className="user-icon" />
49
- <span className="user-name">{userInfo.name}</span>
50
- </div>
51
- )}
52
- <div
53
- className="news-img"
54
- style={{ backgroundImage: `url(${curBackgroundImage})` }}
55
- ></div>
56
- {imgCount > 0 && <div className="img-count">{imgCount}</div>}
57
- </div>
58
- <div className="news-info">
59
- <div className="left media-mark">NeoCRM · 低代码平台</div>
60
- {commentCount && commentCount > 0 && (
61
- <div className="cmt-num right">
62
- {this.agreeDataFormat(commentCount)}评
63
- </div>
64
- )}
65
- </div>
66
- </div>
67
- );
68
- }
69
- }
@@ -1,78 +0,0 @@
1
- /**
2
- * @file 自定义组件对接编辑器的描述文件
3
- */
4
- export class InfoCardModel {
5
- /**
6
- * cmpType 为自定义组件名称,用于标识组件的唯一性
7
- * 在构建时根据当前组件目录名称自动生成
8
- */
9
- // cmpType: string = 'info-card';
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
- // iconSrc = 'https://neo-widgets.bj.bcebos.com/favicon.png';
23
-
24
- // 初次插入页面的默认属性数据
25
- defaultComProps = {
26
- title:
27
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
28
- label: '信息卡片',
29
- backgroundImage: 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg',
30
- imgCount: 3,
31
- commentCount: 2025,
32
- };
33
-
34
- // 设计器端预览时展示的默认数据
35
- previewComProps = {
36
- label: '信息卡片',
37
- };
38
-
39
- /**
40
- * 组件面板配置,用于生成编辑器右侧属性配置面板内容
41
- */
42
- propsSchema = [
43
- {
44
- type: 'textarea',
45
- name: 'title',
46
- label: '卡片title',
47
- value:
48
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
49
- },
50
- {
51
- type: 'text',
52
- name: 'backgroundImage',
53
- label: '展示图片',
54
- value: 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg',
55
- },
56
- {
57
- type: 'number',
58
- name: 'imgCount',
59
- label: '图片数量',
60
- value: 3,
61
- },
62
- {
63
- type: 'number',
64
- name: 'commentCount',
65
- label: '评论数',
66
- value: 2025,
67
- },
68
- ];
69
-
70
- // 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
71
- /*
72
- propsSchemaCreator = (com: any) => {
73
- return [];
74
- };
75
- */
76
- }
77
-
78
- export default InfoCardModel;
@@ -1,105 +0,0 @@
1
- :root {
2
- --padding-bottom: 12px;
3
- }
4
-
5
- .info-card-container {
6
- position: relative;
7
- box-sizing: border-box;
8
-
9
- /* border-bottom: 1px solid #ececec; */
10
- margin: 6px 12px;
11
- padding: 6px var(--padding-bottom);
12
- background-color: #fff;
13
-
14
- .news-title {
15
- padding: 6px 0;
16
- font-family: PingFangSC-Regular;
17
- font-size: 16px;
18
- line-height: 22px;
19
- color: #5f5e5e;
20
- }
21
-
22
- .item-imgbox {
23
- position: relative;
24
- height: 395px;
25
- background: #f0f0f0;
26
- cursor: pointer;
27
- box-sizing: border-box;
28
- text-align: center;
29
- overflow: hidden;
30
-
31
- .news-img {
32
- width: 100%;
33
- height: 100%;
34
- box-sizing: border-box;
35
- background-size: contain;
36
- }
37
-
38
- .img-count {
39
- position: absolute;
40
- top: 0;
41
- right: 0;
42
- padding: 6px 8px;
43
- color: #fff;
44
- min-width: 60px;
45
- text-align: center;
46
- line-height: 1.2;
47
- background: rgb(0 0 0 / 40%);
48
- font-size: 25px;
49
- box-sizing: border-box;
50
- overflow: hidden;
51
- }
52
-
53
- .user-info-box {
54
- position: absolute;
55
- top: 10px;
56
- left: 10px;
57
- width: 100px;
58
- min-height: 100px;
59
- padding: 6px 8px;
60
- color: #fff;
61
- min-width: 60px;
62
- text-align: center;
63
- line-height: 1.2;
64
- background: rgb(0 0 0 / 40%);
65
- font-size: 25px;
66
- box-sizing: border-box;
67
- overflow: hidden;
68
- display: flex;
69
- flex-direction: column;
70
- align-items: center;
71
- justify-content: center;
72
-
73
- .user-icon {
74
- width: 64px;
75
- height: 64px;
76
- border-radius: 50%;
77
- }
78
-
79
- .user-name {
80
- font-size: 16px;
81
- font-weight: 600;
82
- margin-top: 10px;
83
- }
84
- }
85
- }
86
-
87
- .news-info {
88
- font-family: PingFangSC-Light;
89
- height: 28px;
90
- box-sizing: border-box;
91
- display: flex;
92
- justify-content: space-between;
93
- align-items: center;
94
- }
95
-
96
- .media-mark,
97
- .cmt-num {
98
- display: inline-block;
99
- height: 28px;
100
- line-height: 28px;
101
- font-family: PingFangSC-Light;
102
- font-size: 18px;
103
- color: #828282;
104
- }
105
- }