neo-cmp-cli 1.12.11 → 1.12.12
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 +27 -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 +2 -2
- package/template/echarts-custom-cmp-template/package.json +2 -2
- 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-custom-cmp-template/package.json +2 -2
- package/template/neo-h5-cmps/package.json +1 -1
- package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +2 -2
- package/template/neo-web-cmps/package.json +2 -2
- 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/vue2-custom-cmp-template/package.json +2 -2
- 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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<html lang="en">
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="UTF-8">
|
|
4
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
5
|
+
<meta name="format-detection" content="telephone=no"/>
|
|
6
|
+
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,width=device-width,viewport-fit=cover">
|
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
+
<title>自定义组件预览页</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/* 公共的自定义函数 */
|
|
2
|
+
|
|
3
|
+
@function px2vw($px, $screen-width: 750) {
|
|
4
|
+
@return ($px / $screen-width) * 100vw;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@function px2rem($px, $remRate: 100) {
|
|
8
|
+
@return ($px / $remRate) + rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@function px2vmin($px, $screen-width: 750) {
|
|
12
|
+
@return ($px / $screen-width) * 100vmin;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin fillBox {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* 头部细线 */
|
|
21
|
+
@mixin borderTop {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
top: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 1px;
|
|
29
|
+
background: #ddd;
|
|
30
|
+
transform: scaleY(0.5);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* 底部细线 */
|
|
34
|
+
@mixin borderBtm {
|
|
35
|
+
content: '';
|
|
36
|
+
position: absolute;
|
|
37
|
+
left: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 1px;
|
|
42
|
+
background: #ddd;
|
|
43
|
+
transform: scaleY(0.5);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* 统一的内边距 */
|
|
47
|
+
@mixin unifiedPadding($value: 40) {
|
|
48
|
+
padding: 0 px2rem($value) 0 px2rem($value);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 统一的左内边距 */
|
|
52
|
+
@mixin unifiedLeftPadding($value: 40) {
|
|
53
|
+
padding-left: px2rem($value);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* 统一的右内边距 */
|
|
57
|
+
@mixin unifiedRightPadding($value: 40) {
|
|
58
|
+
padding-right: px2rem($value);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 统一的底部边框样式 */
|
|
62
|
+
@mixin unifiedBottomBorder {
|
|
63
|
+
border-bottom: 1px solid #ddd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* 统一的上边框样式 */
|
|
67
|
+
@mixin unifiedTopBorder {
|
|
68
|
+
border-top: 1px solid #ddd;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* 统一的Item高度 */
|
|
72
|
+
@mixin unifiedItemHeight {
|
|
73
|
+
line-height: px2rem(120);
|
|
74
|
+
height: px2rem(120);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* 设置行高样式 */
|
|
78
|
+
@mixin setItemHeight($value: 120) {
|
|
79
|
+
line-height: px2rem($value);
|
|
80
|
+
height: px2rem($value);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* 统一的Item样式 */
|
|
84
|
+
@mixin unifiedItemStyle {
|
|
85
|
+
font-family: PingFangSC-Regular;
|
|
86
|
+
font-size: px2rem(28);
|
|
87
|
+
color: #828282;
|
|
88
|
+
letter-spacing: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* 统一的弹性盒子样式 */
|
|
92
|
+
@mixin unifiedFlexBoxStyle {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-wrap: nowrap;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
align-items: center;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* 统一的Title样式 */
|
|
100
|
+
@mixin unifiedTitleStyle {
|
|
101
|
+
font-family: PingFangSC-Regular;
|
|
102
|
+
font-size: px2rem(40);
|
|
103
|
+
color: #1e1e1e;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* 统一的内容样式 */
|
|
107
|
+
@mixin unifiedContentStyle {
|
|
108
|
+
font-family: PingFangSC-Regular;
|
|
109
|
+
font-size: px2rem(28);
|
|
110
|
+
color: #1e1e1e;
|
|
111
|
+
letter-spacing: 0;
|
|
112
|
+
text-align: right;
|
|
113
|
+
line-height: px2rem(28);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* 底部导航盒子样式 */
|
|
117
|
+
@mixin fixedBottomBox {
|
|
118
|
+
position: fixed;
|
|
119
|
+
left: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// 常用的变量
|
|
125
|
+
$background-color: #fafafa;
|
|
126
|
+
$border-color: #f7f7f7;
|
|
127
|
+
$page-padding-top: px2rem(20);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// 通用mixin
|
|
2
|
+
$borderColor: #ddd;
|
|
3
|
+
|
|
4
|
+
// type 为top 或者 bottom
|
|
5
|
+
@mixin borderTopOrBtm($type) {
|
|
6
|
+
&::after {
|
|
7
|
+
content: '';
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
#{$type}: 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 1px;
|
|
14
|
+
background: $borderColor;
|
|
15
|
+
transform: scaleY(0.5);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// type为 right 或者 left
|
|
20
|
+
@mixin borderRtOrLt($type) {
|
|
21
|
+
&::after {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
#{$type}: 0;
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 1px;
|
|
29
|
+
background: $borderColor;
|
|
30
|
+
transform: scaleX(0.5);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//超出1行显示...
|
|
35
|
+
@mixin ellipsis1 {
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 超出多行显示...
|
|
42
|
+
@mixin ellipsis($num) {
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
display: -webkit-box;
|
|
45
|
+
-webkit-line-clamp: $num;
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1757492173072" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M929.295093 873.474968 119.673029 873.474968 63.904067 873.474968 63.904067 817.603677l0-586.341561c0-15.451584 12.484061-27.935645 27.935645-27.935645 15.451584 0 27.935645 12.484061 27.935645 27.935645l0 586.341561 809.622065 0c15.451584 0 27.935645 12.484061 27.935645 27.935645C957.230738 860.990906 944.746677 873.474968 929.295093 873.474968L929.295093 873.474968zM845.590487 761.732387l-55.87129 0c-30.800839 0-55.87129-24.968122-55.87129-55.87129L733.847906 370.940342c0-30.800839 24.968122-55.87129 55.87129-55.87129l55.87129 0c30.800839 0 55.87129 24.968122 55.87129 55.87129l0 335.023084C901.461777 736.764265 876.391326 761.732387 845.590487 761.732387L845.590487 761.732387zM566.438693 761.732387l-55.87129 0c-30.800839 0-55.87129-24.968122-55.87129-55.87129L454.696113 203.4288c0-30.800839 24.968122-55.87129 55.87129-55.87129l55.87129 0c30.800839 0 55.87129 24.968122 55.87129 55.87129l0 502.534626C622.207655 736.764265 597.239532 761.732387 566.438693 761.732387L566.438693 761.732387zM287.184571 761.732387l-55.87129 0c-30.800839 0-55.87129-24.968122-55.87129-55.87129L175.441991 482.580594c0-30.800839 24.968122-55.87129 55.87129-55.87129l55.87129 0c30.800839 0 55.87129 24.968122 55.87129 55.87129l0 223.382832C343.055861 736.764265 318.087739 761.732387 287.184571 761.732387L287.184571 761.732387z" p-id="2396" fill="#0764f5"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756957113315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 768v115.2c0 25.6 19.2 44.8 44.8 44.8h556.8c25.6 0 44.8-19.2 44.8-44.8v-198.4s0-6.4-6.4-6.4h-83.2c-38.4 0-70.4-32-70.4-70.4 0-38.4 32-70.4 70.4-70.4h83.2s6.4 0 6.4-6.4V332.8c0-25.6-19.2-44.8-44.8-44.8H768C768 198.4 697.6 128 608 128S448 198.4 448 288H332.8c-25.6 0-44.8 19.2-44.8 44.8V448C198.4 448 128 518.4 128 608S198.4 768 288 768z m0-249.6h70.4V358.4h160V288c0-51.2 38.4-89.6 89.6-89.6 51.2 0 89.6 38.4 89.6 89.6v70.4h160v108.8h-19.2c-76.8 0-140.8 64-140.8 140.8 0 76.8 64 140.8 140.8 140.8h19.2v108.8H358.4v-160H288c-51.2 0-89.6-38.4-89.6-89.6 0-51.2 38.4-89.6 89.6-89.6z" p-id="5396" fill="#0764f5"></path></svg>
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取URL参数
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export function getUrlParams() {
|
|
6
|
+
const urlParams: { [key: string]: string } = {};
|
|
7
|
+
let url = window.location.href;
|
|
8
|
+
if (url.indexOf('?') !== -1) {
|
|
9
|
+
url = url.substring(url.indexOf('?') + 1, url.length);
|
|
10
|
+
const urlArr = url.split('&');
|
|
11
|
+
for (let i = 0, size = urlArr.length; i < size; i++) {
|
|
12
|
+
const urlArrItem = urlArr[i].split('=');
|
|
13
|
+
// 对参数值进行 URL 解码,避免中文字符串乱码
|
|
14
|
+
urlParams[urlArrItem[0]] = urlArrItem[1]
|
|
15
|
+
? decodeURIComponent(urlArrItem[1])
|
|
16
|
+
: '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return urlParams;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 从URL参数中提取指定的字段数值
|
|
24
|
+
* @param paramName 参数名称
|
|
25
|
+
* @param defaultValue 默认值
|
|
26
|
+
* @returns 参数值或默认值
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // 从当前页面URL提取debug参数
|
|
30
|
+
* const debug = getUrlParam('debug', false)
|
|
31
|
+
*
|
|
32
|
+
* // 提取数字参数
|
|
33
|
+
* const page = getUrlParam('page', 1)
|
|
34
|
+
*
|
|
35
|
+
* // 提取字符串参数
|
|
36
|
+
* const mode = getUrlParam('mode', 'production')
|
|
37
|
+
*/
|
|
38
|
+
export function getUrlParam(paramName: string, defaultValue: any = null): any {
|
|
39
|
+
const urlParams = getUrlParams();
|
|
40
|
+
const paramValue = urlParams[paramName];
|
|
41
|
+
|
|
42
|
+
// 尝试转换数据类型
|
|
43
|
+
if (paramValue === 'true') return true;
|
|
44
|
+
if (paramValue === 'false') return false;
|
|
45
|
+
if (paramValue === 'null') return null;
|
|
46
|
+
if (paramValue === 'undefined') return undefined;
|
|
47
|
+
|
|
48
|
+
// 尝试转换为数字
|
|
49
|
+
const numValue = Number(paramValue);
|
|
50
|
+
if (!isNaN(numValue) && isFinite(numValue)) {
|
|
51
|
+
return numValue;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return paramValue ?? defaultValue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 从URL参数中提取多个字段数值
|
|
59
|
+
* @param params 参数配置对象,键为参数名,值为默认值
|
|
60
|
+
* @param url 可选的URL字符串,默认使用当前页面URL
|
|
61
|
+
* @returns 包含所有参数值的对象
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* const params = getUrlParams({
|
|
65
|
+
* debug: false,
|
|
66
|
+
* mode: 'production',
|
|
67
|
+
* page: 1,
|
|
68
|
+
* theme: 'light'
|
|
69
|
+
* })
|
|
70
|
+
*/
|
|
71
|
+
export function getUrlParamsByKeys(
|
|
72
|
+
params: Record<string, any>,
|
|
73
|
+
url?: string,
|
|
74
|
+
): Record<string, any> {
|
|
75
|
+
const result: Record<string, any> = {};
|
|
76
|
+
|
|
77
|
+
for (const [paramName, defaultValue] of Object.entries(params)) {
|
|
78
|
+
result[paramName] = getUrlParam(paramName, defaultValue);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"experimentalDecorators": true,
|
|
4
|
+
/* Basic Options */
|
|
5
|
+
"target": "esnext",
|
|
6
|
+
/* 指定编译之后的版本: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
|
7
|
+
"module": "esnext" /* 指定要使用的模板标准: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
8
|
+
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
9
|
+
"allowJs": false /* 指定是否允许编译JS文件,默认false,即不编译JS文件. */,
|
|
10
|
+
// "checkJs": true, /* 指定是否检查和报告JS文件中的错误,默认false */
|
|
11
|
+
"jsx": "preserve" /* 保留 JSX 交由 Babel(含 data-scope 插件)处理,确保作用域属性可注入 */,
|
|
12
|
+
"declaration": false /* 指定是否在编译的时候生成相的d.ts声明文件 */,
|
|
13
|
+
// "declarationMap": true, /* 指定编译时是否生成.map文件 */
|
|
14
|
+
// "sourceMap": true, /* 指定编译时是否生成.map文件 */
|
|
15
|
+
// "outFile": "./", /* 指定输出文件合并为一个文件 */
|
|
16
|
+
// "outDir": "dist", /* 指定输出文件夹,值为一个文件夹路径字符串,输出的文件都将放置在这个文件夹*/
|
|
17
|
+
// "rootDir": "src", /* 指定编译文件的根目录,编译器会在根目录查找入口文件 */
|
|
18
|
+
// "composite": true, /* 是否编译构建引用项目 */
|
|
19
|
+
// "removeComments": true, /* 指定是否将编译后的文件注释删掉,设为true的话即删除注释,默认为false */
|
|
20
|
+
"noEmit": false /* 不生成编译文件 */,
|
|
21
|
+
"importHelpers": true /* 指定是否引入tslib里的复制工具函数,默认为false */,
|
|
22
|
+
// "downlevelIteration": true, /* 当target为"ES5"或"ES3"时,为"for-of" "spread"和"destructuring"中的迭代器提供完全支持 */
|
|
23
|
+
"isolatedModules": false /* 指定是否将每个文件作为单独的模块,默认为true */,
|
|
24
|
+
|
|
25
|
+
/* Strict Type-Checking Options */
|
|
26
|
+
"strict": false /* 指定是否启动所有类型检查 */,
|
|
27
|
+
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
|
28
|
+
"strictNullChecks": true /* Enable strict null checks. */,
|
|
29
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
30
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
31
|
+
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
|
32
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
33
|
+
|
|
34
|
+
/* Additional Checks */
|
|
35
|
+
"noUnusedLocals": false /* Report errors on unused locals. */,
|
|
36
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
37
|
+
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
|
38
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
39
|
+
|
|
40
|
+
/* Module Resolution Options */
|
|
41
|
+
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
42
|
+
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
|
|
43
|
+
"paths": {
|
|
44
|
+
"@": ["./src"]
|
|
45
|
+
} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
|
|
46
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
47
|
+
/* 指定声明文件或文件夹的路径列表,如果指定了此项,则只有在这里列出的声明文件才会被加载 */
|
|
48
|
+
"typeRoots": ["./@types", "./node_modules/@types"],
|
|
49
|
+
// "types": [], /* 指定需要包含的模块,只有在这里列出的模块的声明文件才会被加载 */
|
|
50
|
+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
|
51
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
52
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
53
|
+
|
|
54
|
+
/* Source Map Options */
|
|
55
|
+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
56
|
+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
57
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
58
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
59
|
+
|
|
60
|
+
/* Experimental Options */
|
|
61
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
62
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
63
|
+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
64
|
+
// "suppressImplicitAnyIndexErrors": true /* Suppress --noImplicitAny errors for indexing objects lacking index signatures. See issue #1232 for more details. */
|
|
65
|
+
},
|
|
66
|
+
"include": ["src", "test"],
|
|
67
|
+
"exclude": ["node_modules"]
|
|
68
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo-custom-cmp-template",
|
|
3
3
|
"version": "1.1.10",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "自定义业务组件模板: 含实体表单、实体数据详情、实体数据表格等示例组件。",
|
|
5
5
|
"framework": "react-ts",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"自定义组件模板",
|
|
8
8
|
"react&ts技术栈",
|
|
9
|
-
"
|
|
9
|
+
"自定义业务组件模板"
|
|
10
10
|
],
|
|
11
11
|
"author": "wibetter",
|
|
12
12
|
"license": "MIT",
|
|
@@ -25,7 +25,9 @@ export default class EntityListCmp extends React.PureComponent<EntityListProps>
|
|
|
25
25
|
return (
|
|
26
26
|
<div className={`entityList__c ${className}`}>
|
|
27
27
|
<NeoEntityList
|
|
28
|
+
{...restProps}
|
|
28
29
|
name="entityList"
|
|
30
|
+
entityApiKey={'customContact__c'}
|
|
29
31
|
onItemClickIntercept={(data: any, entity: any) => {
|
|
30
32
|
// 自定义点击处理
|
|
31
33
|
console.log('点击了列表项', data, entity);
|
|
@@ -38,8 +40,6 @@ export default class EntityListCmp extends React.PureComponent<EntityListProps>
|
|
|
38
40
|
getCardFooterSchema={() => {
|
|
39
41
|
return {};
|
|
40
42
|
}}
|
|
41
|
-
{...restProps}
|
|
42
|
-
entityApiKey={'customContact__c'}
|
|
43
43
|
/>
|
|
44
44
|
</div>
|
|
45
45
|
);
|
|
@@ -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",
|
|
@@ -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",
|
|
@@ -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
|