neo-cmp-cli 1.12.10 → 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/dist/utils/projectUtils/createCmpProjectByTemplate.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/docs/Web/347/253/257 NeoEntityGrid /344/275/277/347/224/250/350/257/264/346/230/216.md" +1202 -0
- package/docs//345/217/257/347/224/250/345/261/236/346/200/247/351/205/215/347/275/256/351/241/271.md +801 -0
- package/package.json +2 -1
- package/template/antd-custom-cmp-template/package.json +3 -3
- package/template/asset-manage-template/package.json +1 -2
- 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-custom-cmp-template/package.json +3 -3
- package/template/neo-h5-cmps/package.json +2 -3
- 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 +9 -9
- package/template/neo-web-cmps/src/components/entityGrid2__c/index.tsx +70 -11
- package/template/neo-web-cmps/src/components/entityGrid2__c/model.ts +2 -17
- package/template/neo-web-cmps/src/components/entityGrid2__c/style.scss +55 -1
- package/template/neo-web-cmps/src/components/entityGrid3__c/index.tsx +79 -0
- package/template/neo-web-cmps/src/components/entityGrid3__c/model.ts +121 -0
- package/template/neo-web-cmps/src/components/entityGrid3__c/style.scss +58 -0
- package/template/neo-web-cmps/src/components/entityGrid4__c/index.tsx +82 -0
- package/template/neo-web-cmps/src/components/entityGrid4__c/model.ts +180 -0
- package/template/neo-web-cmps/src/components/entityGrid4__c/style.scss +13 -0
- package/template/neo-web-cmps/src/components/entityGrid__c/index.tsx +30 -5
- package/template/neo-web-cmps/src/components/entityGrid__c/model.ts +3 -17
- 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/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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@types/react": "^16.9.11",
|
|
56
56
|
"@types/react-dom": "^16.9.15",
|
|
57
57
|
"@types/axios": "^0.14.0",
|
|
58
|
-
"neo-cmp-cli": "^1.12.
|
|
58
|
+
"neo-cmp-cli": "^1.12.11",
|
|
59
59
|
"husky": "^4.2.5",
|
|
60
60
|
"lint-staged": "^10.2.9",
|
|
61
61
|
"prettier": "^2.0.5"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo-h5-cmps",
|
|
3
3
|
"version": "1.1.0",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "H5端业务组件模板: 含全局搜索、数据列表、数据Tabs、打开AI对话页等示例组件。",
|
|
5
5
|
"framework": "react-ts",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react&ts技术栈",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"antd-mobile": "^2.3.3",
|
|
41
41
|
"lodash": "^4.17.23",
|
|
42
42
|
"neo-open-api": "^1.2.3",
|
|
43
|
-
"@wibetter/json-editor": "^6.0.5",
|
|
44
43
|
"tslib": "2.3.0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"@types/react": "^16.9.11",
|
|
51
50
|
"@types/react-dom": "^16.9.15",
|
|
52
51
|
"@types/axios": "^0.14.0",
|
|
53
|
-
"neo-cmp-cli": "^1.12.
|
|
52
|
+
"neo-cmp-cli": "^1.12.11",
|
|
54
53
|
"husky": "^4.2.5",
|
|
55
54
|
"lint-staged": "^10.2.9",
|
|
56
55
|
"prettier": "^2.0.5"
|
|
@@ -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",
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"react": "^16.9.0",
|
|
38
|
-
"react-dom": "^16.9.0",
|
|
39
|
-
"axios": "^1.7.0",
|
|
36
|
+
"@ant-design/icons": "^4.8.3",
|
|
40
37
|
"antd": "^4.9.4",
|
|
38
|
+
"axios": "^1.7.0",
|
|
41
39
|
"lodash": "^4.17.23",
|
|
42
40
|
"neo-open-api": "^1.2.3",
|
|
43
|
-
"
|
|
41
|
+
"neo-register": "^1.2.0",
|
|
42
|
+
"react": "^16.9.0",
|
|
43
|
+
"react-dom": "^16.9.0",
|
|
44
44
|
"tslib": "2.3.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@babel/runtime": "^7.26.0",
|
|
48
48
|
"@commitlint/cli": "^18.0.0",
|
|
49
49
|
"@commitlint/config-conventional": "^18.0.0",
|
|
50
|
+
"@types/axios": "^0.14.0",
|
|
50
51
|
"@types/react": "^16.9.11",
|
|
51
52
|
"@types/react-dom": "^16.9.15",
|
|
52
|
-
"@types/axios": "^0.14.0",
|
|
53
|
-
"neo-cmp-cli": "^1.12.10",
|
|
54
53
|
"husky": "^4.2.5",
|
|
55
54
|
"lint-staged": "^10.2.9",
|
|
55
|
+
"neo-cmp-cli": "^1.12.11",
|
|
56
56
|
"prettier": "^2.0.5"
|
|
57
57
|
},
|
|
58
58
|
"overrides": {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Tooltip } from 'antd';
|
|
3
|
+
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
|
|
2
4
|
import './style.scss'; // 组件内容样式
|
|
3
5
|
// @ts-ignore
|
|
4
|
-
import { NeoEntityGrid } from 'neo-ui-component-web'
|
|
6
|
+
import { NeoEntityGrid } from 'neo-ui-component-web';
|
|
5
7
|
|
|
6
8
|
interface NeoEntityGridProps {
|
|
7
9
|
objectApiKey: string;
|
|
@@ -17,15 +19,38 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
render() {
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
+
const {
|
|
23
|
+
className,
|
|
24
|
+
objectApiKey,
|
|
25
|
+
pattern,
|
|
26
|
+
hiddenHeader,
|
|
27
|
+
showView,
|
|
28
|
+
enableChangeView,
|
|
29
|
+
defaultViewId,
|
|
30
|
+
disableSearch,
|
|
31
|
+
canCreate,
|
|
32
|
+
canImport,
|
|
33
|
+
editable,
|
|
34
|
+
withOrder,
|
|
35
|
+
withCheck,
|
|
36
|
+
enableToolbar,
|
|
37
|
+
disableExport,
|
|
38
|
+
disablePagination,
|
|
39
|
+
paginationPageSize,
|
|
40
|
+
autoHeight,
|
|
41
|
+
height,
|
|
42
|
+
additionalConditions,
|
|
43
|
+
onRecordChange,
|
|
44
|
+
...restProps
|
|
45
|
+
} = this.props;
|
|
46
|
+
console.log('entityGrid2__c: ', this.props, this);
|
|
22
47
|
|
|
23
48
|
return (
|
|
24
|
-
<div className={`
|
|
49
|
+
<div className={`entityGrid2__c ${className}`}>
|
|
25
50
|
<NeoEntityGrid
|
|
26
51
|
render={this.props.render}
|
|
27
52
|
objectApiKey={objectApiKey || 'account'}
|
|
28
|
-
pattern={
|
|
53
|
+
pattern={'entityView'}
|
|
29
54
|
// defaultViewId="default_view" // 默认展示的列表视图
|
|
30
55
|
hiddenHeader={hiddenHeader ?? false}
|
|
31
56
|
showView={showView ?? true}
|
|
@@ -43,7 +68,7 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
43
68
|
paginationPageSize={paginationPageSize ?? 20}
|
|
44
69
|
autoHeight={autoHeight ?? false}
|
|
45
70
|
height={height ?? '500px'}
|
|
46
|
-
|
|
71
|
+
customEmptyMsg="暂无数据,请点击「新建」按钮创建"
|
|
47
72
|
customToolbarButtons={{
|
|
48
73
|
header: [
|
|
49
74
|
{
|
|
@@ -53,17 +78,51 @@ export default class NeoEntityGridCmp extends React.PureComponent<NeoEntityGridP
|
|
|
53
78
|
tooltip: '对选中记录批量审批',
|
|
54
79
|
onClick: () => {
|
|
55
80
|
console.log('批量审批');
|
|
56
|
-
}
|
|
57
|
-
}
|
|
81
|
+
},
|
|
82
|
+
},
|
|
58
83
|
],
|
|
59
84
|
footer: [
|
|
60
85
|
{
|
|
61
86
|
id: 'export-pdf-btn',
|
|
62
87
|
label: '导出 PDF',
|
|
63
88
|
icon: 'FilePdf',
|
|
64
|
-
onClick: () => console.log('导出 PDF')
|
|
65
|
-
}
|
|
66
|
-
|
|
89
|
+
onClick: () => console.log('导出 PDF'),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'status-indicator',
|
|
93
|
+
label: '同步状态',
|
|
94
|
+
customRender: (button: any = { syncStatus: 'ok' }) => {
|
|
95
|
+
const ok = button.syncStatus === 'ok';
|
|
96
|
+
const tip = ok ? '已同步' : '同步失败';
|
|
97
|
+
const Icon = ok ? CheckCircleOutlined : CloseCircleOutlined;
|
|
98
|
+
return (
|
|
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
|
+
>
|
|
108
|
+
<button
|
|
109
|
+
type="button"
|
|
110
|
+
className={`entityGrid2__c-status-indicator__btn entityGrid2__c-status-indicator__btn--${
|
|
111
|
+
ok ? 'ok' : 'error'
|
|
112
|
+
}`}
|
|
113
|
+
aria-label={`同步状态:${tip}`}
|
|
114
|
+
>
|
|
115
|
+
<Icon
|
|
116
|
+
className="entityGrid2__c-status-indicator__icon"
|
|
117
|
+
aria-hidden
|
|
118
|
+
/>
|
|
119
|
+
</button>
|
|
120
|
+
</Tooltip>
|
|
121
|
+
</li>
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
],
|
|
67
126
|
}}
|
|
68
127
|
/>
|
|
69
128
|
</div>
|
|
@@ -9,10 +9,10 @@ export class NeoEntityGridModel {
|
|
|
9
9
|
// cmpType: string = 'entityList__c';
|
|
10
10
|
|
|
11
11
|
// 组件名称,用于设置在编辑器左侧组件面板中展示的名称
|
|
12
|
-
label: string = '
|
|
12
|
+
label: string = '大列表/自定义工具栏';
|
|
13
13
|
|
|
14
14
|
// 组件描述,用于设置在编辑器左侧组件面板中展示的描述
|
|
15
|
-
description: string = '
|
|
15
|
+
description: string = '数据列表示例: 自定义工具栏';
|
|
16
16
|
|
|
17
17
|
// 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
|
|
18
18
|
// tags: string[] = ['自定义组件'];
|
|
@@ -44,7 +44,6 @@ export class NeoEntityGridModel {
|
|
|
44
44
|
defaultComProps = {
|
|
45
45
|
objectApiKey: 'account',
|
|
46
46
|
funPermission: true, // 设计器添加时绕过职能权限检查,确保能正常渲染列表
|
|
47
|
-
pattern: 'entityView',
|
|
48
47
|
hiddenHeader: false,
|
|
49
48
|
showView: true,
|
|
50
49
|
enableChangeView: true,
|
|
@@ -77,20 +76,6 @@ export class NeoEntityGridModel {
|
|
|
77
76
|
xObjectApiKey: 'objectApiKey',
|
|
78
77
|
label: '列表视图',
|
|
79
78
|
},
|
|
80
|
-
/*
|
|
81
|
-
// 选择器模式下,需要额外配置 referData
|
|
82
|
-
{
|
|
83
|
-
type: 'panelSelect',
|
|
84
|
-
name: 'pattern',
|
|
85
|
-
label: '列表模式',
|
|
86
|
-
value: 'entityView',
|
|
87
|
-
options: [
|
|
88
|
-
{ label: '标准实体列表', value: 'entityView' },
|
|
89
|
-
{ label: '简单列表模式', value: 'simpleListView' },
|
|
90
|
-
{ label: '选择器模式', value: 'pickView' },
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
|
-
*/
|
|
94
79
|
{
|
|
95
80
|
type: 'panelSwitch',
|
|
96
81
|
name: 'hiddenHeader',
|