neo-cmp-cli 1.8.3 → 1.8.6
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/package.json +3 -3
- package/src/utils/cmpUtils/createCmpByTemplate.js +1 -1
- package/src/utils/projectUtils/createCmpProjectByTemplate.js +1 -1
- package/template/antd-custom-cmp-template/.prettierrc.js +12 -0
- package/template/antd-custom-cmp-template/README.md +153 -0
- package/template/antd-custom-cmp-template/commitlint.config.js +59 -0
- package/template/antd-custom-cmp-template/neo.config.js +144 -0
- package/template/antd-custom-cmp-template/package.json +60 -0
- package/template/antd-custom-cmp-template/public/css/base.css +283 -0
- package/template/antd-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/antd-custom-cmp-template/public/template.html +13 -0
- package/template/antd-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/antd-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/antd-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/antd-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/antd-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/README.md +39 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/index.tsx +462 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/model.ts +75 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/style.scss +1667 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/index.tsx +87 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/model.ts +80 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/style.scss +105 -0
- package/template/antd-custom-cmp-template/tsconfig.json +68 -0
- package/template/develop/neo-custom-cmp-template/.prettierrc.js +12 -0
- package/template/develop/neo-custom-cmp-template/README.md +48 -0
- package/template/develop/neo-custom-cmp-template/commitlint.config.js +59 -0
- package/template/develop/neo-custom-cmp-template/docs/README.md +13 -0
- package/template/develop/neo-custom-cmp-template/neo.config.js +121 -0
- package/template/develop/neo-custom-cmp-template/package.json +63 -0
- package/template/develop/neo-custom-cmp-template/public/css/base.css +283 -0
- package/template/develop/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/develop/neo-custom-cmp-template/public/template.html +13 -0
- package/template/develop/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/develop/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/README.md +65 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/index.tsx +180 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/model.ts +50 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/style.scss +260 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/README.md +94 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/index.tsx +251 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/model.ts +56 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/style.scss +120 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/README.md +115 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/index.tsx +304 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/model.ts +87 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/style.scss +127 -0
- package/template/develop/neo-custom-cmp-template/src/utils/axiosFetcher.ts +29 -0
- package/template/develop/neo-custom-cmp-template/src/utils/queryObjectData.ts +39 -0
- package/template/develop/neo-custom-cmp-template/src/utils/xobjects.ts +203 -0
- package/template/develop/neo-custom-cmp-template/tsconfig.json +68 -0
- package/template/echarts-custom-cmp-template/.prettierrc.js +12 -0
- package/template/echarts-custom-cmp-template/README.md +198 -0
- package/template/echarts-custom-cmp-template/commitlint.config.js +59 -0
- package/template/echarts-custom-cmp-template/neo.config.js +140 -0
- package/template/echarts-custom-cmp-template/package.json +61 -0
- package/template/echarts-custom-cmp-template/public/css/base.css +283 -0
- package/template/echarts-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/echarts-custom-cmp-template/public/template.html +13 -0
- package/template/echarts-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/echarts-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/echarts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/echarts-custom-cmp-template/src/assets/img/chart.svg +1 -0
- package/template/echarts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/echarts-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/README.md +186 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/index.tsx +724 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/model.ts +151 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/style.scss +209 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/README.md +125 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/USAGE.md +190 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/index.tsx +385 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/model.ts +107 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/style.scss +192 -0
- package/template/echarts-custom-cmp-template/src/utils/url.ts +82 -0
- package/template/echarts-custom-cmp-template/tsconfig.json +68 -0
- package/template/empty-cmp/index.tsx +58 -0
- package/template/empty-cmp/model.ts +79 -0
- package/template/empty-cmp/style.scss +72 -0
- package/template/empty-custom-cmp-template/.prettierrc.js +12 -0
- package/template/empty-custom-cmp-template/README.md +154 -0
- package/template/empty-custom-cmp-template/commitlint.config.js +59 -0
- package/template/empty-custom-cmp-template/neo.config.js +138 -0
- package/template/empty-custom-cmp-template/package.json +58 -0
- package/template/empty-custom-cmp-template/public/css/base.css +283 -0
- package/template/empty-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/empty-custom-cmp-template/public/template.html +13 -0
- package/template/empty-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/empty-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/empty-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/empty-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/empty-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/empty-custom-cmp-template/src/assets/img/map.svg +1 -0
- package/template/empty-custom-cmp-template/src/components/README.md +3 -0
- package/template/empty-custom-cmp-template/tsconfig.json +68 -0
- package/template/neo-custom-cmp-template/.prettierrc.js +12 -0
- package/template/neo-custom-cmp-template/README.md +155 -0
- package/template/neo-custom-cmp-template/commitlint.config.js +59 -0
- package/template/neo-custom-cmp-template/docs/README.md +244 -0
- package/template/neo-custom-cmp-template/neo.config.js +140 -0
- package/template/neo-custom-cmp-template/package.json +66 -0
- package/template/neo-custom-cmp-template/public/css/base.css +283 -0
- package/template/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/neo-custom-cmp-template/public/template.html +13 -0
- package/template/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/neo-custom-cmp-template/src/assets/img/card-list.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/contact-form.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/custom-form.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/data-list.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/detail.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/README.md +61 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/index.tsx +202 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/model.ts +74 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/style.scss +260 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/README.md +176 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/index.tsx +334 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/model.ts +123 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/style.scss +292 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/README.md +176 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/index.tsx +615 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/model.ts +107 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/style.scss +370 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/README.md +92 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/index.tsx +784 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/model.ts +134 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/style.scss +304 -0
- package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +37 -0
- package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +76 -0
- package/template/neo-custom-cmp-template/src/utils/xobjects.ts +162 -0
- package/template/neo-custom-cmp-template/tsconfig.json +49 -0
- package/template/react-custom-cmp-template/.prettierrc.js +12 -0
- package/template/react-custom-cmp-template/README.md +154 -0
- package/template/react-custom-cmp-template/commitlint.config.js +59 -0
- package/template/react-custom-cmp-template/neo.config.js +137 -0
- package/template/react-custom-cmp-template/package.json +57 -0
- package/template/react-custom-cmp-template/public/css/base.css +283 -0
- package/template/react-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/react-custom-cmp-template/public/template.html +13 -0
- package/template/react-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/react-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/react-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/react-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/react-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/react-custom-cmp-template/src/components/infoCard/index.jsx +45 -0
- package/template/react-custom-cmp-template/src/components/infoCard/model.js +81 -0
- package/template/react-custom-cmp-template/src/components/infoCard/style.scss +67 -0
- package/template/react-ts-custom-cmp-template/.prettierrc.js +12 -0
- package/template/react-ts-custom-cmp-template/README.md +154 -0
- package/template/react-ts-custom-cmp-template/commitlint.config.js +59 -0
- package/template/react-ts-custom-cmp-template/neo.config.js +138 -0
- package/template/react-ts-custom-cmp-template/package.json +59 -0
- package/template/react-ts-custom-cmp-template/public/css/base.css +283 -0
- package/template/react-ts-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/react-ts-custom-cmp-template/public/template.html +13 -0
- package/template/react-ts-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/react-ts-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/map.svg +1 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/README.md +2 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/index.tsx +208 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/model.ts +92 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/style.scss +350 -0
- package/template/react-ts-custom-cmp-template/tsconfig.json +68 -0
- package/template/vue2-custom-cmp-template/.prettierrc.js +12 -0
- package/template/vue2-custom-cmp-template/README.md +154 -0
- package/template/vue2-custom-cmp-template/commitlint.config.js +59 -0
- package/template/vue2-custom-cmp-template/neo.config.js +146 -0
- package/template/vue2-custom-cmp-template/package.json +59 -0
- package/template/vue2-custom-cmp-template/public/css/base.css +283 -0
- package/template/vue2-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/vue2-custom-cmp-template/public/template.html +13 -0
- package/template/vue2-custom-cmp-template/src/assets/css/common.scss +126 -0
- package/template/vue2-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/vue2-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/vue2-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/vue2-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/vue2-custom-cmp-template/src/components/vueInfoCard/index.vue +131 -0
- package/template/vue2-custom-cmp-template/src/components/vueInfoCard/model.js +81 -0
- package/test/deprecate-versions.js +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://www.npmjs.com/package/@commitlint/config-conventional\
|
|
3
|
+
*
|
|
4
|
+
* Git提交规范-配置文件
|
|
5
|
+
* Commit message 由Header、Body 和 Footer三个部分组成,其格式如下:
|
|
6
|
+
* <type>(<scope>): <subject>
|
|
7
|
+
* <BLANK LINE>
|
|
8
|
+
* <body>
|
|
9
|
+
* <BLANK LINE>
|
|
10
|
+
* <footer>
|
|
11
|
+
*
|
|
12
|
+
*【备注】
|
|
13
|
+
* type 用于说明 commit 的类别,常用下面 7 个标识:
|
|
14
|
+
* scope 用于说明当前功能点作用于哪个页面或者哪个功能模块;
|
|
15
|
+
* subject 用于简短的描述当前commit,不超过50个字符;
|
|
16
|
+
* body 用于填写对本次 commit 的详细描述,可以分成多行;
|
|
17
|
+
* footer 不兼容变动声明,或者关闭 Issue。
|
|
18
|
+
*
|
|
19
|
+
* 【type类型取值类型】
|
|
20
|
+
* feat:新功能(feature)
|
|
21
|
+
* fix:功能优化
|
|
22
|
+
* bug:修补bug
|
|
23
|
+
* docs:文档(documentation)
|
|
24
|
+
* style:格式(不影响代码运行的变动)
|
|
25
|
+
* refactor:重构(即不是新增功能,也不是修改bug的代码变动)
|
|
26
|
+
* test:增加测试
|
|
27
|
+
* chore:构建过程或辅助工具的变动
|
|
28
|
+
* build:影响构建系统或外部依赖项的更改(示例范围:gulp,broccoli,npm)
|
|
29
|
+
* ci:对 CI 配置文件和脚本的更改(示例范围:Travis,Circle,BrowserStack,SauceLabs)
|
|
30
|
+
* perf:改进性能的代码更改
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
module.exports = {
|
|
35
|
+
extends: ['@commitlint/config-conventional'],
|
|
36
|
+
rules: {
|
|
37
|
+
'type-enum': [
|
|
38
|
+
2,
|
|
39
|
+
'always',
|
|
40
|
+
[
|
|
41
|
+
'feat',
|
|
42
|
+
'fix',
|
|
43
|
+
'bug',
|
|
44
|
+
'docs',
|
|
45
|
+
'style',
|
|
46
|
+
'refactor',
|
|
47
|
+
'test',
|
|
48
|
+
'chore',
|
|
49
|
+
'perf',
|
|
50
|
+
'build',
|
|
51
|
+
'ci',
|
|
52
|
+
],
|
|
53
|
+
],
|
|
54
|
+
'type-empty': [2, 'never'],
|
|
55
|
+
'scope-empty': [1, 'never'],
|
|
56
|
+
'subject-full-stop': [0, 'never'],
|
|
57
|
+
'subject-case': [0, 'never'],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// 统一路径解析
|
|
5
|
+
function resolve(dir) {
|
|
6
|
+
return path.resolve(__dirname, dir);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 包括生产和开发的环境配置信息
|
|
10
|
+
module.exports = {
|
|
11
|
+
settings: {
|
|
12
|
+
enableESLint: false, // 调试模式是否开启ESLint,默认开启ESLint检测代码格式
|
|
13
|
+
enableESLintFix: false, // 是否自动修正代码格式,默认不自动修正
|
|
14
|
+
enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
|
|
15
|
+
enableStyleLintFix: false, // 是否需要StyleLint自动修正代码格式
|
|
16
|
+
},
|
|
17
|
+
webpack: {
|
|
18
|
+
target: ['web', 'es5'], // 指定目标环境为 web 和 es5,确保兼容性
|
|
19
|
+
resolve: {
|
|
20
|
+
// webpack的resolve配置
|
|
21
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx', '.umd.js', '.min.js', '.json'], // 用于配置webpack在尝试过程中用到的后缀列表
|
|
22
|
+
alias: {
|
|
23
|
+
'@': resolve('src'),
|
|
24
|
+
$assets: resolve('src/assets'),
|
|
25
|
+
$public: resolve('public'),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
// sassResources中的sass文件会自动注入每一个sass文件中
|
|
29
|
+
sassResources: [
|
|
30
|
+
resolve('./src/assets/css/common.scss'),
|
|
31
|
+
resolve('./src/assets/css/mixin.scss'),
|
|
32
|
+
],
|
|
33
|
+
// createDeclaration: true, // 打包时是否创建ts声明文件
|
|
34
|
+
ignoreNodeModules: false, // 打包时是否忽略 node_modules
|
|
35
|
+
// allowList: [], // ignoreNodeModules为true时生效
|
|
36
|
+
// projectDir: ['src'],
|
|
37
|
+
// template: resolve('./public/template.html'), // 自定义html模板
|
|
38
|
+
// plugins: [],
|
|
39
|
+
// babelPlugins: [],
|
|
40
|
+
},
|
|
41
|
+
// 用于添加 Neo 共享依赖模块的配置信息
|
|
42
|
+
///*
|
|
43
|
+
neoCommonModule: {
|
|
44
|
+
// exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
|
|
45
|
+
exports: {
|
|
46
|
+
// 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
|
|
47
|
+
// chartWidget: path.resolve('./src/components/chartWidget'), // 导出图表自定义组件(默认会导致当前自定义组件)
|
|
48
|
+
'neo-register': 'neo-register', // 导出 Neo 注册模块
|
|
49
|
+
},
|
|
50
|
+
// remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 externals 配合使用
|
|
51
|
+
// externals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
|
|
52
|
+
},
|
|
53
|
+
//*/
|
|
54
|
+
preview: {
|
|
55
|
+
// 用于开启本地预览模式的相关配置信息
|
|
56
|
+
/*
|
|
57
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
58
|
+
entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
|
|
59
|
+
// 本地预览自定义组件内容
|
|
60
|
+
index: './src/preview.jsx',
|
|
61
|
+
},
|
|
62
|
+
NODE_ENV: 'development',
|
|
63
|
+
port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
|
|
64
|
+
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
|
|
65
|
+
assetsSubDirectory: '',
|
|
66
|
+
hostname: 'localhost',
|
|
67
|
+
proxyTable: {
|
|
68
|
+
'/apiTest': {
|
|
69
|
+
target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
|
|
70
|
+
ws: true,
|
|
71
|
+
changeOrigin: true,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
*/
|
|
75
|
+
},
|
|
76
|
+
linkDebug: {
|
|
77
|
+
// 用于开启本地调试模式的相关配置信息
|
|
78
|
+
/*
|
|
79
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
80
|
+
entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
|
|
81
|
+
// 外链调试(在线上页面设计器端预览自定义组件)
|
|
82
|
+
index: [
|
|
83
|
+
'./src/components/xxCmp/register.ts',
|
|
84
|
+
'./src/components/xxCmp/model.ts',
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
NODE_ENV: 'development',
|
|
88
|
+
port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
|
|
89
|
+
closeHotReload: true, // 是否关闭热更新
|
|
90
|
+
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
|
|
91
|
+
assetsSubDirectory: '',
|
|
92
|
+
hostname: 'localhost',
|
|
93
|
+
proxyTable: {
|
|
94
|
+
'/apiTest': {
|
|
95
|
+
target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
|
|
96
|
+
ws: true,
|
|
97
|
+
changeOrigin: true,
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
*/
|
|
101
|
+
},
|
|
102
|
+
// 授权码授权模式下的 NeoCRM 平台配置
|
|
103
|
+
neoConfig: {
|
|
104
|
+
authType: 'oauth2', // 授权类型,可选值:oauth2(默认)、password
|
|
105
|
+
neoBaseURL: 'https://crm-cd.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
|
|
106
|
+
// 当 authType 为 oauth2 时,loginURL 配置项必填
|
|
107
|
+
loginURL: 'https://login-cd.xiaoshouyi.com/auc/oauth2/auth', // 登录授权 URL(默认:https://login.xiaoshouyi.com/auc/oauth2/auth)
|
|
108
|
+
tokenAPI: 'https://login-cd.xiaoshouyi.com/auc/oauth2/token', // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
|
|
109
|
+
},
|
|
110
|
+
/*
|
|
111
|
+
// 密码授权模式下的 NeoCRM 平台配置
|
|
112
|
+
neoConfig: {
|
|
113
|
+
authType: 'password', // 授权类型,可选值:oauth2(默认)、password
|
|
114
|
+
neoBaseURL: 'https://crm-cd.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
|
|
115
|
+
tokenAPI: 'https://login-cd.xiaoshouyi.com/auc/oauth2/token', // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
|
|
116
|
+
// 当 authType 为 password 时,auth 配置项必填
|
|
117
|
+
auth: {
|
|
118
|
+
client_id: auth.client_id || 'xx', // 客户端 ID,从创建连接器的客户端信息中获取(Client_Id)
|
|
119
|
+
client_secret: auth.client_secret || 'xxx', // 客户端秘钥,从创建连接器的客户端信息中获取(Client_Secret)
|
|
120
|
+
username: auth.username || 'xx', // 用户在销售易系统中的用户名
|
|
121
|
+
// password 为 用户在销售易系统中的账号密码加上 8 位安全令牌。
|
|
122
|
+
// 例如,用户密码为 123456,安全令牌为 ABCDEFGH,则 password 的值应为 123456ABCDEFGH。
|
|
123
|
+
password: auth.password || 'xx xx', // 用户账户密码 + 8 位安全令牌
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
*/
|
|
127
|
+
pushCmp: {
|
|
128
|
+
// 用于构建并发布至 NeoCRM 的相关配置
|
|
129
|
+
/*
|
|
130
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
131
|
+
NODE_ENV: 'production',
|
|
132
|
+
entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
|
|
133
|
+
InfoCardModel: './src/components/xxCmp/model.ts',
|
|
134
|
+
infoCard: './src/components/xxCmp/register.ts'
|
|
135
|
+
},
|
|
136
|
+
cssExtract: false, // 不额外提取css文件
|
|
137
|
+
assetsRoot: resolve('dist') // 上传指定目录下的脚本文件
|
|
138
|
+
*/
|
|
139
|
+
},
|
|
140
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "echarts-custom-cmp-template",
|
|
3
|
+
"version": "1.1.19",
|
|
4
|
+
"description": "neo自定义组件模板(react&ts技术栈)",
|
|
5
|
+
"framework": "react-ts",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"自定义组件模板",
|
|
8
|
+
"react&ts技术栈",
|
|
9
|
+
"neo自定义组件"
|
|
10
|
+
],
|
|
11
|
+
"author": "wibetter",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"preview": "neo preview",
|
|
15
|
+
"linkDebug": "neo linkDebug",
|
|
16
|
+
"pushCmp": "neo push cmp",
|
|
17
|
+
"format": "prettier --write \"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}\""
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/*"
|
|
21
|
+
],
|
|
22
|
+
"husky": {
|
|
23
|
+
"hooks": {
|
|
24
|
+
"pre-commit": "lint-staged",
|
|
25
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"lint-staged": {
|
|
29
|
+
"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}": [
|
|
30
|
+
"prettier --write"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://git@github.com:wibetter/echarts-custom-cmp-template.git"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/wibetter/echarts-custom-cmp-template/issues"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"neo-register": "^1.0.7",
|
|
42
|
+
"react": "^16.9.0",
|
|
43
|
+
"react-dom": "^16.9.0",
|
|
44
|
+
"echarts": "^5.5.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@commitlint/cli": "^8.3.5",
|
|
48
|
+
"@commitlint/config-conventional": "^9.1.1",
|
|
49
|
+
"@types/react": "^16.9.11",
|
|
50
|
+
"@types/react-dom": "^16.9.15",
|
|
51
|
+
"neo-cmp-cli": "^1.8.0",
|
|
52
|
+
"husky": "^4.2.5",
|
|
53
|
+
"lint-staged": "^10.2.9",
|
|
54
|
+
"prettier": "^2.0.5",
|
|
55
|
+
"@types/echarts": "^4.9.0"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">= 10.13.0",
|
|
59
|
+
"npm": ">= 6.4.1"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
margin: 0;
|
|
5
|
+
border-width: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
font-family: PingFangSC-Regular;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
div,
|
|
11
|
+
dl,
|
|
12
|
+
dt,
|
|
13
|
+
dd,
|
|
14
|
+
ul,
|
|
15
|
+
ol,
|
|
16
|
+
li,
|
|
17
|
+
h1,
|
|
18
|
+
h2,
|
|
19
|
+
h3,
|
|
20
|
+
h4,
|
|
21
|
+
h5,
|
|
22
|
+
h6,
|
|
23
|
+
pre,
|
|
24
|
+
code,
|
|
25
|
+
form,
|
|
26
|
+
fieldset,
|
|
27
|
+
legend,
|
|
28
|
+
input,
|
|
29
|
+
textarea,
|
|
30
|
+
p,
|
|
31
|
+
blockquote,
|
|
32
|
+
th,
|
|
33
|
+
td,
|
|
34
|
+
hr,
|
|
35
|
+
i,
|
|
36
|
+
button,
|
|
37
|
+
article,
|
|
38
|
+
aside,
|
|
39
|
+
details,
|
|
40
|
+
figcaption,
|
|
41
|
+
figure,
|
|
42
|
+
footer,
|
|
43
|
+
header,
|
|
44
|
+
hgroup,
|
|
45
|
+
menu,
|
|
46
|
+
nav,
|
|
47
|
+
section {
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border-width: 0;
|
|
51
|
+
font-family: PingFangSC-Regular;
|
|
52
|
+
box-sizing: padding-box;
|
|
53
|
+
-webkit-box-sizing: padding-box;
|
|
54
|
+
-moz-box-sizing: padding-box;
|
|
55
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body,
|
|
59
|
+
button,
|
|
60
|
+
input,
|
|
61
|
+
select,
|
|
62
|
+
textarea {
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
line-height: 1.125;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[v-cloak] {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
li,
|
|
72
|
+
ul,
|
|
73
|
+
ol {
|
|
74
|
+
list-style: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
a {
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
a:active {
|
|
82
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
sub,
|
|
86
|
+
sup {
|
|
87
|
+
line-height: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
table {
|
|
91
|
+
border-collapse: collapse;
|
|
92
|
+
border-spacing: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
li {
|
|
96
|
+
list-style: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
fieldset,
|
|
100
|
+
img {
|
|
101
|
+
border: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
input,
|
|
105
|
+
textarea {
|
|
106
|
+
outline-style: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
input[type='text'],
|
|
110
|
+
input[type='search'],
|
|
111
|
+
input[type='password'] {
|
|
112
|
+
-webkit-border-radius: 0;
|
|
113
|
+
-moz-border-radius: 0;
|
|
114
|
+
-o-border-radius: 0;
|
|
115
|
+
border-radius: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
textarea {
|
|
119
|
+
resize: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
address,
|
|
123
|
+
caption,
|
|
124
|
+
cite,
|
|
125
|
+
code,
|
|
126
|
+
dfn,
|
|
127
|
+
em,
|
|
128
|
+
i,
|
|
129
|
+
th,
|
|
130
|
+
var {
|
|
131
|
+
font-style: normal;
|
|
132
|
+
font-weight: normal;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
legend {
|
|
136
|
+
color: #000;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
abbr,
|
|
140
|
+
acronym {
|
|
141
|
+
border: 0;
|
|
142
|
+
font-variant: normal;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
a {
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
a:hover {
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.clearit {
|
|
155
|
+
clear: both;
|
|
156
|
+
height: 0;
|
|
157
|
+
font-size: 0;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* surface下viewport不生效的解决办法 */
|
|
162
|
+
@media screen and (min-width: 767px) and (device-aspect-ratio: 16/9) {
|
|
163
|
+
@-ms-viewport {
|
|
164
|
+
zoom: 1;
|
|
165
|
+
max-zoom: 1;
|
|
166
|
+
min-zoom: 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* surface下IE10 点击链接,背景变色 */
|
|
171
|
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
172
|
+
a {
|
|
173
|
+
background-color: transparent;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
img {
|
|
178
|
+
-ms-interpolation-mode: bicubic;
|
|
179
|
+
image-rendering: optimizeQuality;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* portrait:指定输出设备中的页面可见区域高度大于或等于宽度, landscape:横屏*/
|
|
183
|
+
@media not screen and (orientation: landscape),
|
|
184
|
+
not screen and (orientation: portrait) {
|
|
185
|
+
body,
|
|
186
|
+
button,
|
|
187
|
+
input,
|
|
188
|
+
select,
|
|
189
|
+
textarea {
|
|
190
|
+
font-family: 'Microsoft Yahei', 'Simsun';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
::-moz-placeholder {
|
|
195
|
+
color: #767676;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
::-webkit-input-placeholder {
|
|
199
|
+
color: #767676;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:-ms-input-placeholder {
|
|
203
|
+
color: #767676;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.cont-selected {
|
|
207
|
+
display: block !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.hidden {
|
|
211
|
+
visibility: hidden;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.ellipsis {
|
|
215
|
+
overflow: hidden;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
text-overflow: ellipsis;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.clearfix:after {
|
|
221
|
+
content: '.';
|
|
222
|
+
display: block;
|
|
223
|
+
height: 0;
|
|
224
|
+
visibility: hidden;
|
|
225
|
+
clear: both;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.left {
|
|
229
|
+
float: left;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.right {
|
|
233
|
+
float: right;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.center {
|
|
237
|
+
margin: 0 auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.text-center {
|
|
241
|
+
text-align: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.text-right {
|
|
245
|
+
text-align: right;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.text-left {
|
|
249
|
+
text-align: left;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.no-border {
|
|
253
|
+
border: none !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.click-event {
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* 增加iphoneX适配 */
|
|
261
|
+
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
|
|
262
|
+
.ipx-fixed-bottom {
|
|
263
|
+
bottom: 34px !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ipx-fixed-top {
|
|
267
|
+
top: 20px !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ipx-margin-top {
|
|
271
|
+
margin-top: 20px !important;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ipx-margin-bottom {
|
|
275
|
+
margin-bottom: 20px !important;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ipx-height {
|
|
279
|
+
height: 34px !important;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* 业务级公用代码 */
|