neo-cmp-cli 1.12.11 → 1.13.0
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 +28 -13
- package/dist/index2.js +1 -1
- package/dist/module/neoInitByCopy.js +1 -1
- package/dist/package.json.js +1 -1
- package/docs/H5/347/253/257 NeoEntityList /344/275/277/347/224/250/350/257/264/346/230/216.md" +293 -0
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +3 -3
- package/template/asset-manage-template/package.json +1 -1
- package/template/echarts-custom-cmp-template/package.json +3 -3
- package/template/empty-custom-cmp-template/package.json +1 -1
- package/template/map-custom-cmp-template/.prettierrc.js +12 -0
- package/template/map-custom-cmp-template/README.md +99 -0
- package/template/map-custom-cmp-template/commitlint.config.js +59 -0
- package/template/map-custom-cmp-template/neo.config.js +115 -0
- package/template/map-custom-cmp-template/package.json +59 -0
- package/template/map-custom-cmp-template/public/css/base.css +283 -0
- package/template/map-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/map-custom-cmp-template/public/template.html +13 -0
- package/template/map-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/map-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/map-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/map-custom-cmp-template/src/assets/img/chart.svg +1 -0
- package/template/map-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/map-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/map-custom-cmp-template/src/utils/url.ts +82 -0
- package/template/map-custom-cmp-template/tsconfig.json +68 -0
- package/template/neo-bi-cmps/.prettierrc.js +12 -0
- package/template/neo-bi-cmps/@types/neo-ui-common.d.ts +36 -0
- package/template/neo-bi-cmps/README.md +99 -0
- package/template/neo-bi-cmps/commitlint.config.js +59 -0
- package/template/neo-bi-cmps/neo.config.js +124 -0
- package/template/neo-bi-cmps/package.json +62 -0
- package/template/neo-bi-cmps/public/css/base.css +283 -0
- package/template/neo-bi-cmps/public/scripts/app/bluebird.js +6679 -0
- package/template/neo-bi-cmps/public/template.html +13 -0
- package/template/neo-bi-cmps/src/assets/css/common.scss +127 -0
- package/template/neo-bi-cmps/src/assets/css/mixin.scss +47 -0
- package/template/neo-bi-cmps/src/assets/img/AIBtn.gif +0 -0
- package/template/neo-bi-cmps/src/assets/img/NeoCRM.jpg +0 -0
- package/template/neo-bi-cmps/src/assets/img/aiLogo.png +0 -0
- package/template/neo-bi-cmps/src/assets/img/card-list.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/contact-form.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/custom-form.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/custom-widget.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/data-list.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/detail.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/favicon.png +0 -0
- package/template/neo-bi-cmps/src/assets/img/map.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/search.svg +1 -0
- package/template/neo-bi-cmps/src/assets/img/table.svg +1 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/README.md +100 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/configSchema.ts +253 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.scss +76 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +148 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +440 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +128 -0
- package/template/neo-bi-cmps/src/components/targetNumber__c/style.scss +173 -0
- package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +37 -0
- package/template/neo-bi-cmps/src/utils/queryObjectData.ts +76 -0
- package/template/neo-bi-cmps/src/utils/xobjects.ts +162 -0
- package/template/neo-bi-cmps/tsconfig.json +40 -0
- package/template/neo-custom-cmp-template/package.json +3 -3
- package/template/neo-h5-cmps/package.json +2 -2
- package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +2 -2
- package/template/neo-order-cmps/package.json +1 -1
- package/template/neo-web-cmps/package.json +3 -3
- package/template/neo-web-cmps/src/components/entityGrid2__c/index.tsx +16 -4
- package/template/neo-web-cmps/src/components/entityGrid2__c/style.scss +1 -3
- package/template/neo-web-cmps/src/components/entityGrid3__c/index.tsx +1 -1
- package/template/neo-web-cmps/src/components/entityGrid3__c/style.scss +2 -4
- package/template/neo-web-cmps/src/components/entityGrid4__c/index.tsx +8 -6
- package/template/neo-web-cmps/src/components/entityGrid__c/model.ts +2 -1
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +3 -3
- package/template/echarts-custom-cmp-template/src/components/mapWidget__c/README.md +0 -125
- /package/docs/{NeoEntityGrid → Web/347/253/257 NeoEntityGrid }/344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -0
- /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/index.tsx +0 -0
- /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/model.ts +0 -0
- /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/style.scss +0 -0
- /package/template/{echarts-custom-cmp-template/src/components/mapWidget__c/USAGE.md → map-custom-cmp-template/src/components/mapWidget__c//345/234/260/345/233/276/347/273/204/344/273/266/345/277/253/351/200/237/344/275/277/347/224/250/346/214/207/345/215/227.md"} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo-web-cmps",
|
|
3
3
|
"version": "1.1.0",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Web端列表组件模板: 含基础大列表、Picker 列表等示例组件。",
|
|
5
5
|
"framework": "react-ts",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react&ts技术栈",
|
|
8
|
-
"
|
|
8
|
+
"Web端列表组件模板"
|
|
9
9
|
],
|
|
10
10
|
"author": "wibetter",
|
|
11
11
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/react-dom": "^16.9.15",
|
|
53
53
|
"husky": "^4.2.5",
|
|
54
54
|
"lint-staged": "^10.2.9",
|
|
55
|
-
"neo-cmp-cli": "^1.
|
|
55
|
+
"neo-cmp-cli": "^1.13.0",
|
|
56
56
|
"prettier": "^2.0.5"
|
|
57
57
|
},
|
|
58
58
|
"overrides": {
|
|
@@ -96,14 +96,26 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
96
96
|
const tip = ok ? '已同步' : '同步失败';
|
|
97
97
|
const Icon = ok ? CheckCircleOutlined : CloseCircleOutlined;
|
|
98
98
|
return (
|
|
99
|
-
<li
|
|
100
|
-
|
|
99
|
+
<li
|
|
100
|
+
key={button.id}
|
|
101
|
+
className="entityGrid2__c-status-indicator"
|
|
102
|
+
>
|
|
103
|
+
<Tooltip
|
|
104
|
+
title={tip}
|
|
105
|
+
placement="top"
|
|
106
|
+
mouseEnterDelay={0.1}
|
|
107
|
+
>
|
|
101
108
|
<button
|
|
102
109
|
type="button"
|
|
103
|
-
className={`entityGrid2__c-status-indicator__btn entityGrid2__c-status-indicator__btn--${
|
|
110
|
+
className={`entityGrid2__c-status-indicator__btn entityGrid2__c-status-indicator__btn--${
|
|
111
|
+
ok ? 'ok' : 'error'
|
|
112
|
+
}`}
|
|
104
113
|
aria-label={`同步状态:${tip}`}
|
|
105
114
|
>
|
|
106
|
-
<Icon
|
|
115
|
+
<Icon
|
|
116
|
+
className="entityGrid2__c-status-indicator__icon"
|
|
117
|
+
aria-hidden
|
|
118
|
+
/>
|
|
107
119
|
</button>
|
|
108
120
|
</Tooltip>
|
|
109
121
|
</li>
|
|
@@ -51,7 +51,7 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
51
51
|
pattern={'pickView'} // Picker 列表(选择器)
|
|
52
52
|
referData={{
|
|
53
53
|
referObjectApiKey: 'opportunity', // 关联表
|
|
54
|
-
referItemApiKey: 'accountId' // 关联表对应的外键字段
|
|
54
|
+
referItemApiKey: 'accountId', // 关联表对应的外键字段
|
|
55
55
|
}}
|
|
56
56
|
selectionMode="multiple" // 多选模式
|
|
57
57
|
shouldCloseDialog={true}
|
|
@@ -43,15 +43,13 @@
|
|
|
43
43
|
|
|
44
44
|
.entityGrid3__c .entityGrid3__c-status-indicator__dot--ok {
|
|
45
45
|
background: #22c55e;
|
|
46
|
-
box-shadow:
|
|
47
|
-
0 0 0 2px rgba(255, 255, 255, 0.9),
|
|
46
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9),
|
|
48
47
|
0 0 0 3px rgba(34, 197, 94, 0.25);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
.entityGrid3__c .entityGrid3__c-status-indicator__dot--error {
|
|
52
51
|
background: #ef4444;
|
|
53
|
-
box-shadow:
|
|
54
|
-
0 0 0 2px rgba(255, 255, 255, 0.9),
|
|
52
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9),
|
|
55
53
|
0 0 0 3px rgba(239, 68, 68, 0.28);
|
|
56
54
|
}
|
|
57
55
|
|
|
@@ -67,12 +67,14 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
67
67
|
autoHeight={autoHeight ?? false}
|
|
68
68
|
height={height ?? '500px'}
|
|
69
69
|
customEmptyMsg="暂无数据,请点击「新建」按钮创建"
|
|
70
|
-
additionalConditions={[
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
additionalConditions={[
|
|
71
|
+
{
|
|
72
|
+
apiKey: 'accountName',
|
|
73
|
+
value: '测试客户',
|
|
74
|
+
type: 3, // 筛选条件/操作类型(3: 包含,1: 等于)
|
|
75
|
+
// item: -11100000100014, // 筛选条件ID
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
76
78
|
/>
|
|
77
79
|
</div>
|
|
78
80
|
);
|
|
@@ -12,7 +12,8 @@ export class NeoEntityGridModel {
|
|
|
12
12
|
label: string = '基础大列表';
|
|
13
13
|
|
|
14
14
|
// 组件描述,用于设置在编辑器左侧组件面板中展示的描述
|
|
15
|
-
description: string =
|
|
15
|
+
description: string =
|
|
16
|
+
'数据列表示例: 基础大列表,支持搜索、排序、导出、分页等操作';
|
|
16
17
|
|
|
17
18
|
// 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
|
|
18
19
|
// tags: string[] = ['自定义组件'];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue2-custom-cmp-template",
|
|
3
3
|
"version": "1.0.1",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "vue2 组件模板: 含基于 Vue2 实现的示例组件。",
|
|
5
5
|
"framework": "vue2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"自定义组件模板",
|
|
8
8
|
"vue2.0技术栈",
|
|
9
|
-
"
|
|
9
|
+
"vue2 组件模板"
|
|
10
10
|
],
|
|
11
11
|
"author": "wibetter",
|
|
12
12
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/cli": "^18.0.0",
|
|
47
47
|
"@commitlint/config-conventional": "^18.0.0",
|
|
48
|
-
"neo-cmp-cli": "^1.
|
|
48
|
+
"neo-cmp-cli": "^1.13.0",
|
|
49
49
|
"husky": "^4.2.5",
|
|
50
50
|
"lint-staged": "^10.2.9",
|
|
51
51
|
"prettier": "^2.0.5",
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
# 地图展示组件
|
|
2
|
-
|
|
3
|
-
地图展示组件,支持传入地理坐标或位置名称来展示地图区域,并标注当前位置。
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- ✅ 支持通过经纬度坐标定位
|
|
8
|
-
- ✅ 支持通过地址名称定位(自动地理编码)
|
|
9
|
-
- ✅ 支持自定义缩放级别
|
|
10
|
-
- ✅ 支持自定义标记点标题
|
|
11
|
-
- ✅ 支持点击标记查看详细地址
|
|
12
|
-
- ✅ 支持自定义地图高度
|
|
13
|
-
- ✅ 响应式设计,适配移动端
|
|
14
|
-
- ✅ 优雅的加载和错误状态提示
|
|
15
|
-
|
|
16
|
-
## 使用方式
|
|
17
|
-
|
|
18
|
-
### 1. 通过经纬度定位
|
|
19
|
-
|
|
20
|
-
```tsx
|
|
21
|
-
<MapWidget
|
|
22
|
-
longitude={116.397428}
|
|
23
|
-
latitude={39.90923}
|
|
24
|
-
markerTitle="北京天安门"
|
|
25
|
-
zoom={15}
|
|
26
|
-
height={400}
|
|
27
|
-
/>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 2. 通过地址名称定位
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
<MapWidget
|
|
34
|
-
locationName="北京市天安门广场"
|
|
35
|
-
markerTitle="天安门广场"
|
|
36
|
-
zoom={15}
|
|
37
|
-
height={400}
|
|
38
|
-
/>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## 属性说明
|
|
42
|
-
|
|
43
|
-
| 属性名 | 类型 | 默认值 | 说明 |
|
|
44
|
-
|--------|------|--------|------|
|
|
45
|
-
| longitude | number | 116.397428 | 经度(-180 到 180)|
|
|
46
|
-
| latitude | number | 39.90923 | 纬度(-90 到 90)|
|
|
47
|
-
| locationName | string | - | 位置名称(优先级高于经纬度)|
|
|
48
|
-
| zoom | number | 14 | 地图缩放级别(3-18)|
|
|
49
|
-
| markerTitle | string | '当前位置' | 标记点标题 |
|
|
50
|
-
| height | number | 400 | 地图容器高度(像素)|
|
|
51
|
-
|
|
52
|
-
## 注意事项
|
|
53
|
-
|
|
54
|
-
1. **地图脚本配置**:
|
|
55
|
-
- 当前使用的是企业内部部署的高德地图脚本:`https://neors.ingageapp.com/base/js/amap_2.0.5.21.js`
|
|
56
|
-
- 参考了 `neo-ui-component-web` 项目的实现方式
|
|
57
|
-
- 如需使用高德官方 API,可以:
|
|
58
|
-
- 前往[高德开放平台](https://lbs.amap.com/)申请 Web 端 API Key
|
|
59
|
-
- 在 `index.tsx` 的 `loadAMapScript` 方法中取消注释备用方案代码
|
|
60
|
-
- 替换 `amapKey` 为你的 API Key
|
|
61
|
-
|
|
62
|
-
2. **定位方式优先级**:
|
|
63
|
-
- 如果同时提供了 `locationName` 和经纬度,优先使用 `locationName`
|
|
64
|
-
- 如果都未提供,默认显示北京天安门位置
|
|
65
|
-
|
|
66
|
-
3. **地理编码说明**:
|
|
67
|
-
- 使用 `locationName` 时,会自动调用高德地图的地理编码服务
|
|
68
|
-
- 建议提供完整的地址信息以提高解析准确度
|
|
69
|
-
- 地理编码仅支持中国大陆地区
|
|
70
|
-
|
|
71
|
-
4. **性能优化**:
|
|
72
|
-
- 地图脚本采用动态加载方式,不会影响页面初始加载速度
|
|
73
|
-
- 地图实例在组件销毁时会自动清理,避免内存泄漏
|
|
74
|
-
- 已加载的脚本会被缓存,重复使用不会重复加载
|
|
75
|
-
|
|
76
|
-
## 示例场景
|
|
77
|
-
|
|
78
|
-
### 场景1:展示公司地址
|
|
79
|
-
```tsx
|
|
80
|
-
<MapWidget
|
|
81
|
-
locationName="上海市浦东新区世纪大道XXX号"
|
|
82
|
-
markerTitle="公司总部"
|
|
83
|
-
zoom={16}
|
|
84
|
-
height={500}
|
|
85
|
-
/>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### 场景2:展示多个城市坐标
|
|
89
|
-
```tsx
|
|
90
|
-
// 北京
|
|
91
|
-
<MapWidget longitude={116.397428} latitude={39.90923} markerTitle="北京" />
|
|
92
|
-
|
|
93
|
-
// 上海
|
|
94
|
-
<MapWidget longitude={121.473701} latitude={31.230416} markerTitle="上海" />
|
|
95
|
-
|
|
96
|
-
// 深圳
|
|
97
|
-
<MapWidget longitude={114.057868} latitude={22.543099} markerTitle="深圳" />
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### 场景3:移动端展示
|
|
101
|
-
组件已自动适配移动端,会根据屏幕尺寸调整样式和布局。
|
|
102
|
-
|
|
103
|
-
## 技术实现
|
|
104
|
-
|
|
105
|
-
- 基于高德地图 Web API 2.0
|
|
106
|
-
- 使用 React Class Component
|
|
107
|
-
- TypeScript 类型支持
|
|
108
|
-
- SCSS 样式预处理
|
|
109
|
-
- 动态脚本加载
|
|
110
|
-
|
|
111
|
-
## 浏览器兼容性
|
|
112
|
-
|
|
113
|
-
- Chrome >= 60
|
|
114
|
-
- Firefox >= 60
|
|
115
|
-
- Safari >= 11
|
|
116
|
-
- Edge >= 79
|
|
117
|
-
|
|
118
|
-
## 更新日志
|
|
119
|
-
|
|
120
|
-
### v1.0.0 (2025-10-17)
|
|
121
|
-
- ✨ 初始版本发布
|
|
122
|
-
- ✨ 支持经纬度和地址名称定位
|
|
123
|
-
- ✨ 支持标记点和信息窗体
|
|
124
|
-
- ✨ 响应式设计
|
|
125
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|