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.
- package/README.md +5 -5
- package/package.json +1 -1
- package/src/module/neoInit.js +2 -0
- package/src/module/neoInitByCopy.js +3 -0
- package/src/template/antd-custom-cmp-template/package.json +1 -1
- package/src/template/echarts-custom-cmp-template/package.json +1 -1
- package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/index.tsx +56 -18
- package/src/template/echarts-custom-cmp-template/src/utils/url.ts +82 -0
- package/src/template/neo-custom-cmp-template/neo.config.js +4 -4
- package/src/template/neo-custom-cmp-template/package.json +1 -1
- package/src/template/react-custom-cmp-template/package.json +1 -1
- package/src/template/react-ts-custom-cmp-template/neo.config.js +4 -4
- package/src/template/react-ts-custom-cmp-template/package.json +2 -2
- package/src/template/vue2-custom-cmp-template/package.json +1 -1
- package/src/utils/resetPackageVersion.js +115 -0
- package/src/template/echarts-custom-cmp-template/src/components/info-card/index.tsx +0 -69
- package/src/template/echarts-custom-cmp-template/src/components/info-card/model.ts +0 -78
- package/src/template/echarts-custom-cmp-template/src/components/info-card/style.scss +0 -105
- package/src/template/neo-custom-cmp-template/src/components/contact-card-list/README.md +0 -61
- package/src/template/neo-custom-cmp-template/src/components/contact-card-list/index.tsx +0 -191
- package/src/template/neo-custom-cmp-template/src/components/contact-card-list/model.ts +0 -56
- package/src/template/neo-custom-cmp-template/src/components/contact-card-list/style.scss +0 -260
- package/src/template/neo-custom-cmp-template/src/components/contact-form/README.md +0 -94
- package/src/template/neo-custom-cmp-template/src/components/contact-form/index.tsx +0 -249
- package/src/template/neo-custom-cmp-template/src/components/contact-form/model.ts +0 -63
- package/src/template/neo-custom-cmp-template/src/components/contact-form/style.scss +0 -120
- package/src/template/react-ts-custom-cmp-template/src/components/info-card/index.tsx +0 -69
- package/src/template/react-ts-custom-cmp-template/src/components/info-card/model.ts +0 -78
- package/src/template/react-ts-custom-cmp-template/src/components/info-card/style.scss +0 -105
- /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/README.md +0 -0
- /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/USAGE.md +0 -0
- /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/model.ts +0 -0
- /package/src/template/{react-ts-custom-cmp-template → echarts-custom-cmp-template}/src/components/map-widget/style.scss +0 -0
|
@@ -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
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# ContactCardList 联系人卡片列表组件
|
|
2
|
-
联系人卡片列表组件用于展示联系人信息,以卡片形式展示每个联系人的姓名和手机号。组件使用 Ant Design 的 Card 组件,具有良好的视觉效果和交互体验。
|
|
3
|
-
|
|
4
|
-
## 功能特性
|
|
5
|
-
|
|
6
|
-
- 📱 响应式设计,支持多种屏幕尺寸
|
|
7
|
-
- 🎨 美观的卡片布局,支持悬停效果
|
|
8
|
-
- 🔄 自动加载数据,支持错误重试
|
|
9
|
-
- 📊 使用 neo-open-api 获取 customContact__c 数据
|
|
10
|
-
- 🎯 展示联系人姓名和手机号信息
|
|
11
|
-
- 💫 加载状态和空状态处理
|
|
12
|
-
|
|
13
|
-
## 组件属性
|
|
14
|
-
|
|
15
|
-
| 属性名 | 类型 | 默认值 | 描述 |
|
|
16
|
-
|--------|------|--------|------|
|
|
17
|
-
| title | string | '联系人卡片列表' | 组件标题 |
|
|
18
|
-
| data | any | - | 组件数据,包含用户信息和系统信息 |
|
|
19
|
-
|
|
20
|
-
## 数据源
|
|
21
|
-
|
|
22
|
-
组件通过 `neo-open-api` 工具函数获取数据:
|
|
23
|
-
|
|
24
|
-
- **数据表**: `customContact__c`
|
|
25
|
-
- **字段**: `id`, `name`, `phone__c`
|
|
26
|
-
|
|
27
|
-
## 样式特性
|
|
28
|
-
|
|
29
|
-
- 使用 Flexbox 布局,支持响应式设计
|
|
30
|
-
- 卡片悬停效果,提升用户体验
|
|
31
|
-
- 渐变色头像,美观大方
|
|
32
|
-
- 支持移动端适配
|
|
33
|
-
|
|
34
|
-
## 使用示例
|
|
35
|
-
|
|
36
|
-
```tsx
|
|
37
|
-
import ContactCardList from './components/contact-card-list';
|
|
38
|
-
|
|
39
|
-
// 在页面中使用
|
|
40
|
-
<ContactCardList
|
|
41
|
-
title="我的联系人"
|
|
42
|
-
data={amisData}
|
|
43
|
-
/>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## 技术栈
|
|
47
|
-
|
|
48
|
-
- React 16.9+
|
|
49
|
-
- TypeScript
|
|
50
|
-
- Ant Design 4.9+
|
|
51
|
-
- SCSS
|
|
52
|
-
|
|
53
|
-
## 文件结构
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
contact-card-list/
|
|
57
|
-
├── index.tsx # 主组件文件
|
|
58
|
-
├── model.ts # 组件配置和编辑器属性定义
|
|
59
|
-
├── style.scss # 组件样式文件
|
|
60
|
-
└── README.md # 组件说明文档
|
|
61
|
-
```
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Card, Row, Col, Spin, Empty, Avatar, Button } from 'antd';
|
|
3
|
-
import { UserOutlined, PhoneOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
import { xObject } from 'neo-open-api'; // Neo Open API
|
|
6
|
-
import './style.scss';
|
|
7
|
-
|
|
8
|
-
interface ContactCardListProps {
|
|
9
|
-
title: string;
|
|
10
|
-
data?: any;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ContactData {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
phone__c: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface ContactCardListState {
|
|
20
|
-
contactList: ContactData[];
|
|
21
|
-
totalSize: number;
|
|
22
|
-
loading: boolean;
|
|
23
|
-
error: string | null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default class ContactCardList extends React.PureComponent<
|
|
27
|
-
ContactCardListProps,
|
|
28
|
-
ContactCardListState
|
|
29
|
-
> {
|
|
30
|
-
constructor(props: ContactCardListProps) {
|
|
31
|
-
super(props);
|
|
32
|
-
|
|
33
|
-
this.state = {
|
|
34
|
-
contactList: [],
|
|
35
|
-
totalSize: 0,
|
|
36
|
-
loading: false,
|
|
37
|
-
error: null,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
this.loadContactData = this.loadContactData.bind(this);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
componentDidMount() {
|
|
44
|
-
this.loadContactData();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async loadContactData() {
|
|
48
|
-
this.setState({ loading: true, error: null });
|
|
49
|
-
|
|
50
|
-
try {
|
|
51
|
-
// 使用 Neo Open API 获取 customContact__c 数据
|
|
52
|
-
const result = await xObject.query({
|
|
53
|
-
xObjectApiKey: 'customContact__c',
|
|
54
|
-
fields: ['id', 'name', 'phone__c'],
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
if (result?.status) {
|
|
58
|
-
const records = result.data || [];
|
|
59
|
-
const totalSize = result.totalSize || 0;
|
|
60
|
-
this.setState({
|
|
61
|
-
contactList: records,
|
|
62
|
-
totalSize,
|
|
63
|
-
loading: false,
|
|
64
|
-
});
|
|
65
|
-
} else {
|
|
66
|
-
this.setState({
|
|
67
|
-
error: result?.msg || '获取联系人数据失败',
|
|
68
|
-
loading: false,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
} catch (error: any) {
|
|
72
|
-
this.setState({
|
|
73
|
-
error: error.message || '获取联系人数据失败',
|
|
74
|
-
loading: false,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
getDataName = (data: any) => {
|
|
80
|
-
let dataNameKey = 'name';
|
|
81
|
-
Object.keys(data).forEach((nameKey: string) => {
|
|
82
|
-
if (nameKey && /Name$/.test(nameKey)) {
|
|
83
|
-
dataNameKey = nameKey;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
return data[dataNameKey];
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
renderContactCard(contact: ContactData, index: number) {
|
|
90
|
-
return (
|
|
91
|
-
<Col xs={24} sm={12} md={8} lg={6} xl={6} key={contact.id || index}>
|
|
92
|
-
<Card
|
|
93
|
-
className="contact-card"
|
|
94
|
-
hoverable
|
|
95
|
-
size="small"
|
|
96
|
-
style={{ marginBottom: 16 }}
|
|
97
|
-
>
|
|
98
|
-
<div className="contact-card-content">
|
|
99
|
-
<div className="contact-avatar">
|
|
100
|
-
<Avatar
|
|
101
|
-
size={48}
|
|
102
|
-
icon={<UserOutlined />}
|
|
103
|
-
className="avatar-icon"
|
|
104
|
-
/>
|
|
105
|
-
</div>
|
|
106
|
-
<div className="contact-info">
|
|
107
|
-
<div className="contact-name">
|
|
108
|
-
<UserOutlined className="info-icon" />
|
|
109
|
-
<span className="name-text">
|
|
110
|
-
{contact.name || this.getDataName(contact) || '未知姓名'}
|
|
111
|
-
</span>
|
|
112
|
-
</div>
|
|
113
|
-
<div className="contact-phone">
|
|
114
|
-
<PhoneOutlined className="info-icon" />
|
|
115
|
-
<span className="phone-text">
|
|
116
|
-
{contact.phone__c || '未填写手机号'}
|
|
117
|
-
</span>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</Card>
|
|
122
|
-
</Col>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
render() {
|
|
127
|
-
const { title } = this.props;
|
|
128
|
-
const { contactList, loading, error } = this.state;
|
|
129
|
-
const curAmisData = this.props.data || {};
|
|
130
|
-
const systemInfo = curAmisData.__NeoSystemInfo || {};
|
|
131
|
-
|
|
132
|
-
return (
|
|
133
|
-
<div className="contact-card-list-container">
|
|
134
|
-
<div className="card-list-header">
|
|
135
|
-
<div className="header-content">
|
|
136
|
-
<h3 className="header-title">
|
|
137
|
-
{title || '联系人卡片列表'}
|
|
138
|
-
{systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
|
|
139
|
-
</h3>
|
|
140
|
-
<Button
|
|
141
|
-
type="primary"
|
|
142
|
-
icon={<ReloadOutlined />}
|
|
143
|
-
onClick={this.loadContactData}
|
|
144
|
-
loading={loading}
|
|
145
|
-
className="refresh-button"
|
|
146
|
-
size="small"
|
|
147
|
-
>
|
|
148
|
-
刷新
|
|
149
|
-
</Button>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
<div className="card-list-content">
|
|
154
|
-
<Spin spinning={loading} tip="加载联系人数据中...">
|
|
155
|
-
{error ? (
|
|
156
|
-
<div className="error-container">
|
|
157
|
-
<Empty
|
|
158
|
-
image={Empty.PRESENTED_IMAGE_SIMPLE}
|
|
159
|
-
description={
|
|
160
|
-
<div>
|
|
161
|
-
<div style={{ color: '#ff4d4f', marginBottom: 8 }}>
|
|
162
|
-
{error}
|
|
163
|
-
</div>
|
|
164
|
-
<button
|
|
165
|
-
className="retry-button"
|
|
166
|
-
onClick={this.loadContactData}
|
|
167
|
-
>
|
|
168
|
-
重新加载
|
|
169
|
-
</button>
|
|
170
|
-
</div>
|
|
171
|
-
}
|
|
172
|
-
/>
|
|
173
|
-
</div>
|
|
174
|
-
) : contactList.length === 0 ? (
|
|
175
|
-
<Empty
|
|
176
|
-
image={Empty.PRESENTED_IMAGE_SIMPLE}
|
|
177
|
-
description="暂无联系人数据"
|
|
178
|
-
/>
|
|
179
|
-
) : (
|
|
180
|
-
<Row gutter={[16, 16]}>
|
|
181
|
-
{contactList.map((contact, index) =>
|
|
182
|
-
this.renderContactCard(contact, index),
|
|
183
|
-
)}
|
|
184
|
-
</Row>
|
|
185
|
-
)}
|
|
186
|
-
</Spin>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file 联系人卡片列表组件对接编辑器的描述文件
|
|
3
|
-
*/
|
|
4
|
-
export class ContactCardListModel {
|
|
5
|
-
/**
|
|
6
|
-
* cmpType 为自定义组件名称,用于标识组件的唯一性
|
|
7
|
-
* 在构建时根据当前组件目录名称自动生成
|
|
8
|
-
*/
|
|
9
|
-
// cmpType: string = 'contact-card-list';
|
|
10
|
-
|
|
11
|
-
// 组件名称,用于设置在编辑器左侧组件面板中展示的名称
|
|
12
|
-
label: string = '联系人卡片列表';
|
|
13
|
-
|
|
14
|
-
// 组件描述,用于设置在编辑器左侧组件面板中展示的描述
|
|
15
|
-
description: string = '展示联系人信息的卡片列表组件,支持姓名和手机号展示';
|
|
16
|
-
|
|
17
|
-
// 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
|
|
18
|
-
tags: string[] = ['自定义组件'];
|
|
19
|
-
|
|
20
|
-
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
21
|
-
iconSrc: string = 'https://custom-widgets.bj.bcebos.com/card-list.svg';
|
|
22
|
-
|
|
23
|
-
// 初次插入页面的默认属性数据
|
|
24
|
-
defaultComProps = {
|
|
25
|
-
title: '联系人卡片列表',
|
|
26
|
-
label: '联系人卡片列表',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// 设计器端预览时展示的默认数据
|
|
30
|
-
previewComProps = {
|
|
31
|
-
label: '联系人卡片列表',
|
|
32
|
-
title: '联系人卡片列表',
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 组件面板配置,用于生成编辑器右侧属性配置面板内容
|
|
37
|
-
*/
|
|
38
|
-
propsSchema = [
|
|
39
|
-
{
|
|
40
|
-
type: 'textarea',
|
|
41
|
-
name: 'title',
|
|
42
|
-
label: '组件标题',
|
|
43
|
-
value: '联系人卡片列表',
|
|
44
|
-
placeholder: '请输入组件标题',
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
// 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
|
|
49
|
-
/*
|
|
50
|
-
propsSchemaCreator = (com: any) => {
|
|
51
|
-
return [];
|
|
52
|
-
};
|
|
53
|
-
*/
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default ContactCardListModel;
|