neo-cmp-cli 1.8.17 → 1.8.19
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 +2 -2
- package/dist/neo/neoRequire.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/utils/cmpUtils/pushCmp.js +1 -1
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +2 -2
- package/template/antd-custom-cmp-template/src/components/dataDashboard/model.ts +1 -1
- package/template/antd-custom-cmp-template/src/components/infoCard/model.ts +2 -2
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/model.ts +1 -1
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/model.ts +1 -1
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/model.ts +3 -3
- package/template/echarts-custom-cmp-template/package.json +2 -2
- package/template/echarts-custom-cmp-template/src/components/chartWidget/model.ts +1 -1
- package/template/echarts-custom-cmp-template/src/components/mapWidget/model.ts +1 -1
- package/template/empty-cmp/index.tsx +2 -34
- package/template/empty-cmp/model.ts +4 -22
- package/template/empty-cmp/style.scss +0 -51
- package/template/empty-custom-cmp-template/package.json +2 -2
- package/template/neo-custom-cmp-template/package.json +3 -3
- package/template/neo-custom-cmp-template/src/components/entityCardList/model.ts +1 -1
- package/template/neo-custom-cmp-template/src/components/entityDetail/README.md +1 -1
- package/template/neo-custom-cmp-template/src/components/entityDetail/model.ts +1 -1
- package/template/neo-custom-cmp-template/src/components/entityForm/model.ts +1 -1
- package/template/neo-custom-cmp-template/src/components/entityTable/model.ts +1 -1
- package/template/react-custom-cmp-template/package.json +2 -2
- package/template/react-custom-cmp-template/src/components/infoCard/model.js +2 -2
- package/template/react-ts-custom-cmp-template/package.json +2 -2
- package/template/react-ts-custom-cmp-template/src/components/listWidget/model.ts +2 -2
- package/template/vue2-custom-cmp-template/package.json +2 -2
- package/template/vue2-custom-cmp-template/src/components/vueInfoCard/model.js +2 -2
- package/test/deprecate-versions.js +1 -1
package/README.md
CHANGED
|
@@ -259,7 +259,7 @@ module.exports = {
|
|
|
259
259
|
| cmpType | 在构建时根据当前组件目录名称自动生成 | 组件类型标识,用于标识组件的唯一性 |
|
|
260
260
|
| label | - | 组件名称,用于设置在编辑器左侧组件面板中展示的名称 |
|
|
261
261
|
| description | - | 组件描述,用于设置在编辑器左侧组件面板中展示的描述 |
|
|
262
|
-
|
|
|
262
|
+
| iconUrl | - | 组件图标,用于设置在编辑器左侧组件面板中展示的图标 |
|
|
263
263
|
| tags | ['自定义组件'] | 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示 |
|
|
264
264
|
| exposedToDesigner | true | 是否在页面设计器端可见 |
|
|
265
265
|
| enableDuplicate | true | 在设计器中是否允许多次使用 |
|
|
@@ -395,7 +395,7 @@ const result = await customApi.run({
|
|
|
395
395
|
| lodash | ^4.17.21 |
|
|
396
396
|
| neo-ui-component-web | ^1.0.0 |
|
|
397
397
|
| neo-ui-common | ^1.0.0 |
|
|
398
|
-
| neo-open-api | ^1.
|
|
398
|
+
| neo-open-api | ^1.1.6 |
|
|
399
399
|
| amis | ^1.1.5 |
|
|
400
400
|
|
|
401
401
|
> **注意**:自定义组件中请使用依赖包支持的版本,如版本不匹配运行时可能出现异常。
|
package/dist/neo/neoRequire.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var e,n;exports.__require=function(){if(n)return e;n=1;const s=o,d={react:"^16.13.1","react-dom":"^16.13.1",mobx:"^6.3.0","mobx-react":"^7.0.0","mobx-state-tree":"^5.4.0",echarts:"5.4.2",antd:"4.9.4","antd-mobile":"2.3.4","@ant-design/icons":"^4.8.0","video-react":"0.14.1",axios:"^0.27.2",classnames:"^2.3.2",qs:"^6.11.0",lodash:"^4.17.21","neo-ui-component-web":"^1.0.0","neo-ui-common":"^1.0.0","neo-open-api":"^1.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var e,n;exports.__require=function(){if(n)return e;n=1;const s=o,d={react:"^16.13.1","react-dom":"^16.13.1",mobx:"^6.3.0","mobx-react":"^7.0.0","mobx-state-tree":"^5.4.0",echarts:"5.4.2",antd:"4.9.4","antd-mobile":"2.3.4","@ant-design/icons":"^4.8.0","video-react":"0.14.1",axios:"^0.27.2",classnames:"^2.3.2",qs:"^6.11.0",lodash:"^4.17.21","neo-ui-component-web":"^1.0.0","neo-ui-common":"^1.0.0","neo-open-api":"^1.1.6",amis:"^1.1.5"};return e={initNeoRequire:()=>{window.neoRequire||(window.neoRequire=o=>window.__NeoCommonModules[o]||window[o])},addNeoCommonModules:o=>{if(window.__NeoCommonModules||(window.__NeoCommonModules={}),isPlainObject(o)){Object.keys(o).forEach(e=>{const n=o[e],s=window.__NeoCommonModules[e];s&&Object.keys(s).length<3?(window.__NeoCommonModules[e]=Object.assign(window.__NeoCommonModules[e],n),void 0!==n.__esModule&&(window.__NeoCommonModules[e].__esModule=n.__esModule),void 0!==n.default&&(window.__NeoCommonModules[e].default=n.default)):window.__NeoCommonModules[e]=n})}},addNeoRemoteDeps:o=>{window.__NeoCommonModules||(window.__NeoCommonModules={}),window.__NeoCommonModules.__neoRemoteDeps||(window.__NeoCommonModules.__neoRemoteDeps={}),s.isPlainObject(o)&&(window.__NeoCommonModules.__neoRemoteDeps=Object.assign(window.__NeoCommonModules.__neoRemoteDeps,o))},getExternalsByNeoCommonModules:o=>{const e={};return Object.keys(d).forEach(o=>{e[o]=`commonjs ${o}`}),o&&o.length>0&&o.forEach(o=>{e[o]=`commonjs ${o}`}),e}}};
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.8.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.8.18";const o={version:e};exports.default=o,exports.version=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:fs"),t=require("node:path"),s=require("lodash"),o=require("akfun"),r=require("../pathUtils.js"),i=require("ora"),a=require("../../neo/neoService.js"),n=require("../common.js"),c=require("../projectUtils/createCmpProjectZip.js");var l,p;exports.__require=function(){if(p)return l;p=1;const u=e,g=t,d=s,{getConfigObj:m}=o,{catchCurPackageJson:w}=r.__require(),b=i,h=a.__require(),{getFramework:f,errorLog:y,successLog:C}=n.__require(),q=c.__require(),$=m(w()),T=(e=[])=>e.map(e=>({label:e.label,description:e.description,propSchema:JSON.stringify(e)}));return l=async(e,t)=>{const s=b("正在发布组件...").start();try{let o,r=new h(e);await r.ensureValidToken(),s.start("[1/4] 打包源码文件(含单个自定义组件源码)...");try{o=q(t,process.cwd(),e.assetsRoot),o?C(`[1/4] 源码文件打包完成: ${g.basename(o)}。`,s):y("[1/4] 源码文件打包失败,未返回 zip 文件路径。",s)}catch(e){y("[1/4] 源码文件打包失败。",s)}s.start("[2/4] 获取自定义组件构建产物...");const i=await r.getCmpAssets(t);let a;s.start("[3/4] 构建组件数据...");try{a=await(async(e,t)=>{if(!t||!t.cmpType)return y("自定义组件信息或组件名称不能为空"),null;const{cmpType:s}=t;if(!e||!u.existsSync(e))return y(`未找到自定义组件目录: ${e}`),null;const o=d.camelCase(s),r=g.join(e,`${o}Model.js`),i=globalThis.window;globalThis.window||(globalThis.window={console:console,neoRequire:()=>{},postMessage:()=>{}});try{u.existsSync(r)?require(r):(y(`未找到自定义组件模型文件,请检查以下路径是否存在:${r}`),process.exit(1)),globalThis.window&&globalThis.window.NEOEditorCustomModels||(y(`模型文件未导出有效模型方法(CatchCustomCmpModelClass),模型文件地址: ${r} `),process.exit(1));const e=globalThis.window.NEOEditorCustomModels[s];e||(y(`未找到自定义组件模型类(${s}),模型文件地址: ${r} `),process.exit(1));const o=new e;o||(y(`未找到自定义组件模型信息(${s}),模型文件地址: ${r} `),process.exit(1));const i={...t,version:$.version||"1.0.0",framework:$.framework?f($.framework):0,label:o.label||s,description:o.description||"",componentCategory:(o.tags||["自定义组件"]).join(","),targetPage:o.targetPage||["customPage"],targetObject:o.targetObject||["all"],targetApplication:o.targetApplication||["all"],targetDevice:o.targetDevice||"all",iconUrl:o.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("node:fs"),t=require("node:path"),s=require("lodash"),o=require("akfun"),r=require("../pathUtils.js"),i=require("ora"),a=require("../../neo/neoService.js"),n=require("../common.js"),c=require("../projectUtils/createCmpProjectZip.js");var l,p;exports.__require=function(){if(p)return l;p=1;const u=e,g=t,d=s,{getConfigObj:m}=o,{catchCurPackageJson:w}=r.__require(),b=i,h=a.__require(),{getFramework:f,errorLog:y,successLog:C}=n.__require(),q=c.__require(),$=m(w()),T=(e=[])=>e.map(e=>({label:e.label,description:e.description,propSchema:JSON.stringify(e)}));return l=async(e,t)=>{const s=b("正在发布组件...").start();try{let o,r=new h(e);await r.ensureValidToken(),s.start("[1/4] 打包源码文件(含单个自定义组件源码)...");try{o=q(t,process.cwd(),e.assetsRoot),o?C(`[1/4] 源码文件打包完成: ${g.basename(o)}。`,s):y("[1/4] 源码文件打包失败,未返回 zip 文件路径。",s)}catch(e){y("[1/4] 源码文件打包失败。",s)}s.start("[2/4] 获取自定义组件构建产物...");const i=await r.getCmpAssets(t);let a;s.start("[3/4] 构建组件数据...");try{a=await(async(e,t)=>{if(!t||!t.cmpType)return y("自定义组件信息或组件名称不能为空"),null;const{cmpType:s}=t;if(!e||!u.existsSync(e))return y(`未找到自定义组件目录: ${e}`),null;const o=d.camelCase(s),r=g.join(e,`${o}Model.js`),i=globalThis.window;globalThis.window||(globalThis.window={console:console,neoRequire:()=>{},postMessage:()=>{}});try{u.existsSync(r)?require(r):(y(`未找到自定义组件模型文件,请检查以下路径是否存在:${r}`),process.exit(1)),globalThis.window&&globalThis.window.NEOEditorCustomModels||(y(`模型文件未导出有效模型方法(CatchCustomCmpModelClass),模型文件地址: ${r} `),process.exit(1));const e=globalThis.window.NEOEditorCustomModels[s];e||(y(`未找到自定义组件模型类(${s}),模型文件地址: ${r} `),process.exit(1));const o=new e;o||(y(`未找到自定义组件模型信息(${s}),模型文件地址: ${r} `),process.exit(1));const i={...t,version:$.version||"1.0.0",framework:$.framework?f($.framework):0,label:o.label||s,description:o.description||"",componentCategory:(o.tags||["自定义组件"]).join(","),targetPage:o.targetPage||["customPage"],targetObject:o.targetObject||["all"],targetApplication:o.targetApplication||["all"],targetDevice:o.targetDevice||"all",iconUrl:o.iconUrl||o.iconUrl,defaultProps:JSON.stringify(o.defaultComProps||{}),previewProps:JSON.stringify(o.previewComProps||{}),props:T(o.propsSchema||[]),events:o.events||[],functions:o.functions||o.actions||[],exposedToDesigner:void 0===o.exposedToDesigner||o.exposedToDesigner,namespace:o.namespace||"neo-cmp-cli",enableDuplicate:void 0===o.enableDuplicate||o.enableDuplicate};return console.log(`自定义组件模型信息(${s}):`,d.omit(i,["assetFile","modelAssetFile","cssAssetFile","codeLibFile"])),i}catch(e){return y(`自定义组件模型文件解析失败 (${r||"未知路径"}): ${e.message}`),y(e.stack),null}finally{void 0===i?delete globalThis.window:globalThis.window=i}})(e.assetsRoot,i),a?C("[3/4] 组件数据构建完成。",s):y(`[3/4] 未获取到自定义组件模型信息(${t})。`,s)}catch(e){y(`[3/4] 组件数据构建失败: ${e.message}`,s)}s.start("[4/4] 保存组件信息到 NeoCRM 平台...");try{await r.updateCustomComponent(a),C("[4/4] 组件信息保存成功",s)}catch(e){y("[4/4] 组件信息保存失败",s)}console.log("\n✅ 自定义组件发布成功!")}catch(e){try{s&&s.isSpinning&&y(`❌ 自定义组件发布失败: ${e.message}`,s)}catch{y(`\n❌ 自定义组件发布失败: ${e.message}`)}throw e}},l};
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/antd-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0
|
|
41
|
+
"neo-register": "^1.1.0",
|
|
42
42
|
"antd": "4.9.4",
|
|
43
43
|
"react": "^16.9.0",
|
|
44
44
|
"react-dom": "^16.9.0"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@commitlint/config-conventional": "^9.1.1",
|
|
49
49
|
"@types/react": "^16.9.11",
|
|
50
50
|
"@types/react-dom": "^16.9.15",
|
|
51
|
-
"neo-cmp-cli": "^1.8.
|
|
51
|
+
"neo-cmp-cli": "^1.8.18",
|
|
52
52
|
"husky": "^4.2.5",
|
|
53
53
|
"lint-staged": "^10.2.9",
|
|
54
54
|
"prettier": "^2.0.5"
|
|
@@ -32,7 +32,7 @@ export class DataDashboardModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
35
|
+
iconUrl: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
36
36
|
|
|
37
37
|
// 初次插入页面的默认属性数据
|
|
38
38
|
defaultComProps = {
|
|
@@ -32,8 +32,8 @@ export class InfoCardModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
36
|
-
//
|
|
35
|
+
iconUrl: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
36
|
+
// iconUrl = 'https://neo-widgets.bj.bcebos.com/favicon.png';
|
|
37
37
|
|
|
38
38
|
// 初次插入页面的默认属性数据
|
|
39
39
|
defaultComProps = {
|
|
@@ -18,7 +18,7 @@ export class ContactCardListModel {
|
|
|
18
18
|
// tags: string[] = ['自定义组件'];
|
|
19
19
|
|
|
20
20
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
21
|
-
|
|
21
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/card-list.svg';
|
|
22
22
|
|
|
23
23
|
// 初次插入页面的默认属性数据
|
|
24
24
|
defaultComProps = {
|
|
@@ -19,7 +19,7 @@ export class ContactFormModel {
|
|
|
19
19
|
// tags: string[] = ['自定义组件'];
|
|
20
20
|
|
|
21
21
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
22
|
-
|
|
22
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/contact-form.svg';
|
|
23
23
|
|
|
24
24
|
// 初次插入页面的默认属性数据
|
|
25
25
|
defaultComProps = {
|
|
@@ -18,9 +18,9 @@ export class NeoEntityGridModel {
|
|
|
18
18
|
// tags: string[] = ['自定义组件'];
|
|
19
19
|
|
|
20
20
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
//
|
|
21
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
|
|
22
|
+
// iconUrl: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
23
|
+
// iconUrl = 'https://neo-widgets.bj.bcebos.com/favicon.png';
|
|
24
24
|
|
|
25
25
|
// 初次插入页面的默认属性数据
|
|
26
26
|
defaultComProps = {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/echarts-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0
|
|
41
|
+
"neo-register": "^1.1.0",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0",
|
|
44
44
|
"echarts": "^5.5.1"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@commitlint/config-conventional": "^9.1.1",
|
|
49
49
|
"@types/react": "^16.9.11",
|
|
50
50
|
"@types/react-dom": "^16.9.15",
|
|
51
|
-
"neo-cmp-cli": "^1.8.
|
|
51
|
+
"neo-cmp-cli": "^1.8.18",
|
|
52
52
|
"husky": "^4.2.5",
|
|
53
53
|
"lint-staged": "^10.2.9",
|
|
54
54
|
"prettier": "^2.0.5",
|
|
@@ -33,7 +33,7 @@ export class ChartWidgetModel {
|
|
|
33
33
|
// targetPage: string[] = ['customPage'];
|
|
34
34
|
|
|
35
35
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
36
|
-
|
|
36
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/chart.svg';
|
|
37
37
|
|
|
38
38
|
// 初次插入页面的默认属性数据
|
|
39
39
|
defaultComProps = {
|
|
@@ -32,7 +32,7 @@ export class MapWidgetModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
35
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/map.svg';
|
|
36
36
|
|
|
37
37
|
// 初次插入页面的默认属性数据
|
|
38
38
|
defaultComProps = {
|
|
@@ -3,54 +3,22 @@ import './style.scss'; // 组件内容样式
|
|
|
3
3
|
|
|
4
4
|
interface CustomCmpProps {
|
|
5
5
|
title: string;
|
|
6
|
-
backgroundImage: string;
|
|
7
|
-
imgCount: number;
|
|
8
|
-
commentCount: number;
|
|
9
6
|
data?: any;
|
|
10
7
|
}
|
|
11
8
|
|
|
12
9
|
export default class CustomCmp extends React.PureComponent<CustomCmpProps> {
|
|
13
10
|
constructor(props: CustomCmpProps) {
|
|
14
11
|
super(props);
|
|
15
|
-
this.agreeDataFormat = this.agreeDataFormat.bind(this);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
agreeDataFormat(agreeData: number) {
|
|
19
|
-
if (agreeData && agreeData <= 9999) {
|
|
20
|
-
return agreeData;
|
|
21
|
-
}
|
|
22
|
-
if (agreeData && agreeData > 9999) {
|
|
23
|
-
return `${Math.floor(agreeData / 1000) / 10}w`;
|
|
24
|
-
}
|
|
25
|
-
return '';
|
|
26
12
|
}
|
|
27
13
|
|
|
28
14
|
render() {
|
|
29
|
-
const { title
|
|
15
|
+
const { title } = this.props;
|
|
30
16
|
console.log('当前自定义组件:', this.props, this);
|
|
31
17
|
|
|
32
|
-
const curBackgroundImage =
|
|
33
|
-
backgroundImage || 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg';
|
|
34
18
|
return (
|
|
35
19
|
<div className="custom-cmp-container">
|
|
36
20
|
<div className="news-title">
|
|
37
|
-
{title
|
|
38
|
-
'营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
|
|
39
|
-
</div>
|
|
40
|
-
<div className="item-imgbox">
|
|
41
|
-
<div
|
|
42
|
-
className="news-img"
|
|
43
|
-
style={{ backgroundImage: `url(${curBackgroundImage})` }}
|
|
44
|
-
></div>
|
|
45
|
-
{imgCount > 0 && <div className="img-count">{imgCount}</div>}
|
|
46
|
-
</div>
|
|
47
|
-
<div className="news-info">
|
|
48
|
-
<div className="left media-mark">NeoCRM · 低代码平台</div>
|
|
49
|
-
{commentCount && commentCount > 0 && (
|
|
50
|
-
<div className="cmt-num right">
|
|
51
|
-
{this.agreeDataFormat(commentCount)}评
|
|
52
|
-
</div>
|
|
53
|
-
)}
|
|
21
|
+
{title}
|
|
54
22
|
</div>
|
|
55
23
|
</div>
|
|
56
24
|
);
|
|
@@ -29,10 +29,10 @@ export class CmpModel {
|
|
|
29
29
|
* customPage: 6 自定义页面
|
|
30
30
|
* bizPage: 7 业务页面
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
35
|
+
iconUrl: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
36
36
|
|
|
37
37
|
// 初次插入页面的默认属性数据
|
|
38
38
|
defaultComProps = {
|
|
@@ -51,27 +51,9 @@ export class CmpModel {
|
|
|
51
51
|
{
|
|
52
52
|
type: 'textarea',
|
|
53
53
|
name: 'title',
|
|
54
|
-
label: '
|
|
54
|
+
label: '组件内容',
|
|
55
55
|
value:
|
|
56
|
-
'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: 'text',
|
|
60
|
-
name: 'backgroundImage',
|
|
61
|
-
label: '展示图片',
|
|
62
|
-
value: 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: 'number',
|
|
66
|
-
name: 'imgCount',
|
|
67
|
-
label: '图片数量',
|
|
68
|
-
value: 3,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'number',
|
|
72
|
-
name: 'commentCount',
|
|
73
|
-
label: '评论数',
|
|
74
|
-
value: 2025,
|
|
56
|
+
'Hello, NeoCRM!',
|
|
75
57
|
},
|
|
76
58
|
];
|
|
77
59
|
}
|
|
@@ -18,55 +18,4 @@
|
|
|
18
18
|
line-height: 22px;
|
|
19
19
|
color: #5f5e5e;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
.item-imgbox {
|
|
23
|
-
position: relative;
|
|
24
|
-
height: 395px;
|
|
25
|
-
background: #f0f0f0;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
box-sizing: border-box;
|
|
28
|
-
text-align: center;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
|
|
31
|
-
.news-img {
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
background-size: contain;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.img-count {
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 0;
|
|
41
|
-
right: 0;
|
|
42
|
-
padding: 6px 8px;
|
|
43
|
-
color: #fff;
|
|
44
|
-
min-width: 60px;
|
|
45
|
-
text-align: center;
|
|
46
|
-
line-height: 1.2;
|
|
47
|
-
background: rgb(0 0 0 / 40%);
|
|
48
|
-
font-size: 25px;
|
|
49
|
-
box-sizing: border-box;
|
|
50
|
-
overflow: hidden;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.news-info {
|
|
55
|
-
font-family: PingFangSC-Light;
|
|
56
|
-
height: 28px;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
display: flex;
|
|
59
|
-
justify-content: space-between;
|
|
60
|
-
align-items: center;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.media-mark,
|
|
64
|
-
.cmt-num {
|
|
65
|
-
display: inline-block;
|
|
66
|
-
height: 28px;
|
|
67
|
-
line-height: 28px;
|
|
68
|
-
font-family: PingFangSC-Light;
|
|
69
|
-
font-size: 18px;
|
|
70
|
-
color: #828282;
|
|
71
|
-
}
|
|
72
21
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "https://github.com/wibetter/empty-custom-cmp-template/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"neo-register": "^1.0
|
|
40
|
+
"neo-register": "^1.1.0",
|
|
41
41
|
"react": "^16.9.0",
|
|
42
42
|
"react-dom": "^16.9.0"
|
|
43
43
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@commitlint/config-conventional": "^9.1.1",
|
|
47
47
|
"@types/react": "^16.9.11",
|
|
48
48
|
"@types/react-dom": "^16.9.15",
|
|
49
|
-
"neo-cmp-cli": "^1.8.
|
|
49
|
+
"neo-cmp-cli": "^1.8.18",
|
|
50
50
|
"husky": "^4.2.5",
|
|
51
51
|
"lint-staged": "^10.2.9",
|
|
52
52
|
"prettier": "^2.0.5"
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"url": "https://github.com/wibetter/neo-custom-cmp-template/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"neo-register": "^1.0
|
|
43
|
+
"neo-register": "^1.1.0",
|
|
44
44
|
"react": "^16.9.0",
|
|
45
45
|
"react-dom": "^16.9.0",
|
|
46
46
|
"axios": "^0.27.2",
|
|
47
47
|
"antd": "^4.9.4",
|
|
48
48
|
"lodash": "^4.17.21",
|
|
49
|
-
"neo-open-api": "^1.1.
|
|
49
|
+
"neo-open-api": "^1.1.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@commitlint/cli": "^8.3.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/react": "^16.9.11",
|
|
55
55
|
"@types/react-dom": "^16.9.15",
|
|
56
56
|
"@types/axios": "^0.14.0",
|
|
57
|
-
"neo-cmp-cli": "^1.8.
|
|
57
|
+
"neo-cmp-cli": "^1.8.18",
|
|
58
58
|
"husky": "^4.2.5",
|
|
59
59
|
"lint-staged": "^10.2.9",
|
|
60
60
|
"prettier": "^2.0.5"
|
|
@@ -32,7 +32,7 @@ export class EntityCardListModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
35
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/data-list.svg';
|
|
36
36
|
|
|
37
37
|
// 初次插入页面的默认属性数据
|
|
38
38
|
defaultComProps = {
|
|
@@ -34,7 +34,7 @@ export class EntityDetailModel {
|
|
|
34
34
|
// targetPage: string[] = ['customPage'];
|
|
35
35
|
|
|
36
36
|
/** 组件图标,用于设置在编辑器左侧组件面板中展示的图标 */
|
|
37
|
-
|
|
37
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/detail.svg';
|
|
38
38
|
|
|
39
39
|
/** 初次插入页面的默认属性数据 */
|
|
40
40
|
defaultComProps = {
|
|
@@ -36,7 +36,7 @@ export class EntityFormModel {
|
|
|
36
36
|
// targetPage: string[] = ['customPage'];
|
|
37
37
|
|
|
38
38
|
/** 组件图标,用于设置在编辑器左侧组件面板中展示的图标 */
|
|
39
|
-
|
|
39
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/custom-form.svg';
|
|
40
40
|
|
|
41
41
|
/** 初次插入页面的默认属性数据 */
|
|
42
42
|
defaultComProps = {
|
|
@@ -22,7 +22,7 @@ export class EntityTableModel {
|
|
|
22
22
|
// tags: string[] = ['自定义组件'];
|
|
23
23
|
|
|
24
24
|
/** 组件图标,用于设置在编辑器左侧组件面板中展示的图标 */
|
|
25
|
-
|
|
25
|
+
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* 用于设置组件支持的页面类型
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/react-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0
|
|
41
|
+
"neo-register": "^1.1.0",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/cli": "^8.3.5",
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
|
-
"neo-cmp-cli": "^1.8.
|
|
48
|
+
"neo-cmp-cli": "^1.8.18",
|
|
49
49
|
"husky": "^4.2.5",
|
|
50
50
|
"lint-staged": "^10.2.9",
|
|
51
51
|
"prettier": "^2.0.5"
|
|
@@ -32,8 +32,8 @@ export class InfoCardModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
//
|
|
36
|
-
|
|
35
|
+
// iconUrl = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
36
|
+
iconUrl = 'https://neo-widgets.bj.bcebos.com/favicon.png';
|
|
37
37
|
|
|
38
38
|
// 初次插入页面的默认属性数据
|
|
39
39
|
defaultComProps = {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/react-ts-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0
|
|
41
|
+
"neo-register": "^1.1.0",
|
|
42
42
|
"react": "^16.9.0",
|
|
43
43
|
"react-dom": "^16.9.0"
|
|
44
44
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
48
|
"@types/react": "^16.9.11",
|
|
49
49
|
"@types/react-dom": "^16.9.15",
|
|
50
|
-
"neo-cmp-cli": "^1.8.
|
|
50
|
+
"neo-cmp-cli": "^1.8.18",
|
|
51
51
|
"husky": "^4.2.5",
|
|
52
52
|
"lint-staged": "^10.2.9",
|
|
53
53
|
"prettier": "^2.0.5"
|
|
@@ -32,8 +32,8 @@ export class ListWidgetModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
36
|
-
//
|
|
35
|
+
iconUrl: string = 'https://neo-widgets.bj.bcebos.com/favicon.png';
|
|
36
|
+
// iconUrl: string = 'https://custom-widgets.bj.bcebos.com/custom-icon1.svg'; // custom-icon2
|
|
37
37
|
|
|
38
38
|
// 初次插入页面的默认属性数据
|
|
39
39
|
defaultComProps = {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"url": "https://github.com/wibetter/vue2-custom-cmp-template/issues"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"neo-register": "^1.0
|
|
41
|
+
"neo-register": "^1.1.0",
|
|
42
42
|
"vue": "^2.6.14",
|
|
43
43
|
"element-ui": "^2.15.12"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/cli": "^8.3.5",
|
|
47
47
|
"@commitlint/config-conventional": "^9.1.1",
|
|
48
|
-
"neo-cmp-cli": "^1.8.
|
|
48
|
+
"neo-cmp-cli": "^1.8.18",
|
|
49
49
|
"husky": "^4.2.5",
|
|
50
50
|
"lint-staged": "^10.2.9",
|
|
51
51
|
"prettier": "^2.0.5",
|
|
@@ -32,8 +32,8 @@ export class InfoCardModel {
|
|
|
32
32
|
// targetPage: string[] = ['customPage'];
|
|
33
33
|
|
|
34
34
|
// 组件图标,用于设置在编辑器左侧组件面板中展示的图标
|
|
35
|
-
|
|
36
|
-
//
|
|
35
|
+
iconUrl = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
|
|
36
|
+
// iconUrl = 'https://neo-widgets.bj.bcebos.com/favicon.png';
|
|
37
37
|
|
|
38
38
|
// 初次插入页面的默认属性数据
|
|
39
39
|
defaultComProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
|
|
3
3
|
// 所有需要废弃的版本
|
|
4
|
-
const versionsToDeprecate = ["1.8.10", "1.8.11", "1.8.12", "1.8.13"];
|
|
4
|
+
const versionsToDeprecate = ["1.8.10", "1.8.11", "1.8.12", "1.8.13", "1.8.15", "1.8.16", "1.8.17", "1.8.18"];
|
|
5
5
|
|
|
6
6
|
const packageName = 'neo-cmp-cli';
|
|
7
7
|
const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';
|