update 0.10.4

This commit is contained in:
hufeixiong
2021-11-26 16:44:05 +08:00
parent 50a71a94fa
commit df2323535e
11 changed files with 27 additions and 7 deletions

View File

@@ -1,4 +1,11 @@
## 0.10.4
config新增custommap传递用于存放不带入json的临时数据。
远程组件配置由url变更为对象用于存放更多配置。
## 0.10.3 ## 0.10.3
修复左侧tab色差问题。 修复左侧tab色差问题。

View File

@@ -5,6 +5,9 @@ nav:
title: change log title: change log
order: 6 order: 6
--- ---
## 0.10.4
Config adds a new custommap transfer to store temporary data that is not brought into JSON.
The remote component configuration is changed from URL to object to store more configurations.
## 0.10.3 ## 0.10.3
Fix the left tab color difference problem. Fix the left tab color difference problem.
## 0.10.2 ## 0.10.2

View File

@@ -6,6 +6,13 @@ nav:
order: 6 order: 6
--- ---
## 0.10.4
config新增custommap传递用于存放不带入json的临时数据。
远程组件配置由url变更为对象用于存放更多配置。
## 0.10.3 ## 0.10.3
修复左侧tab色差问题。 修复左侧tab色差问题。

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.10.3", "version": "0.10.4",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/dooringx-lib.esm.js", "module": "dist/dooringx-lib.esm.js",

View File

@@ -361,6 +361,7 @@ export class UserConfig {
public SCRIPTGLOBALNAME = 'DOORINGXPLUGIN'; public SCRIPTGLOBALNAME = 'DOORINGXPLUGIN';
public scriptLoading = false; public scriptLoading = false;
public leftForceUpdate = () => {}; public leftForceUpdate = () => {};
public customMap: Record<string, any> = {};
constructor(initConfig?: Partial<InitConfig>) { constructor(initConfig?: Partial<InitConfig>) {
const mergeConfig = userConfigMerge(defaultConfig, initConfig); const mergeConfig = userConfigMerge(defaultConfig, initConfig);
this.initConfig = mergeConfig; this.initConfig = mergeConfig;

View File

@@ -18,6 +18,6 @@ export class ComponentItemFactory implements ComponentItem {
public needPosition: ComponentItem['needPosition'] = true, public needPosition: ComponentItem['needPosition'] = true,
public init: ComponentItem['init'] = () => {}, public init: ComponentItem['init'] = () => {},
public destroy: ComponentItem['destroy'] = () => {}, public destroy: ComponentItem['destroy'] = () => {},
public url: ComponentItem['url'] = '' public remoteConfig: ComponentItem['remoteConfig'] = {}
) {} ) {}
} }

View File

@@ -26,7 +26,7 @@ export interface ComponentItem {
props: Record<string, CreateOptionsResAll[]>; // 配置属性 props: Record<string, CreateOptionsResAll[]>; // 配置属性
render: (data: IBlockType, context: any, store: Store, config: UserConfig) => JSX.Element; render: (data: IBlockType, context: any, store: Store, config: UserConfig) => JSX.Element;
destroy: () => void; destroy: () => void;
url: string; remoteConfig: Record<string, any>;
} }
export type ComponentRenderConfigProps = { export type ComponentRenderConfigProps = {
data: IBlockType; data: IBlockType;

View File

@@ -1,6 +1,6 @@
{ {
"name": "dooringx-plugin-template", "name": "dooringx-plugin-template",
"version": "0.10.3", "version": "0.10.4",
"description": "> TODO: description", "description": "> TODO: description",
"author": "yehuozhili <673632758@qq.com>", "author": "yehuozhili <673632758@qq.com>",
"homepage": "https://github.com/H5-Dooring/dooringx#readme", "homepage": "https://github.com/H5-Dooring/dooringx#readme",

View File

@@ -51,7 +51,8 @@ const remoteCo = new ComponentItemFactory(
}, },
true true
); );
remoteCo.url = remoteCo.remoteConfig = {
"https://img.guguzhu.com/d/file/android/ico/2021/09/08/rytzi2w34tm.png"; url: "https://img.guguzhu.com/d/file/android/ico/2021/09/08/rytzi2w34tm.png",
};
export default remoteCo; export default remoteCo;

View File

@@ -40,7 +40,7 @@
"@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-url": "^6.1.0", "@rollup/plugin-url": "^6.1.0",
"@svgr/rollup": "^5.5.0", "@svgr/rollup": "^5.5.0",
"dooringx-lib": "^0.10.3", "dooringx-lib": "^0.10.4",
"postcss": "^8.3.6", "postcss": "^8.3.6",
"rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.1", "rollup-plugin-postcss": "^4.0.1",

View File

@@ -11,6 +11,7 @@ const spawn = require('child_process').spawn;
const execSync = require('child_process').execSync; const execSync = require('child_process').execSync;
const root = process.cwd(); const root = process.cwd();
execSync('npm run changelog'); execSync('npm run changelog');
execSync('npm run translate');
const rootPath = path.resolve(root, 'packages', 'dooringx-lib'); const rootPath = path.resolve(root, 'packages', 'dooringx-lib');
const templatePath = path.resolve(root, 'packages', 'dooringx-plugin-template'); const templatePath = path.resolve(root, 'packages', 'dooringx-plugin-template');
const templateJsonPath = path.resolve(templatePath, 'template', 'template.json'); const templateJsonPath = path.resolve(templatePath, 'template', 'template.json');