update 0.9.4

This commit is contained in:
yehuozhili
2021-10-10 00:57:02 +08:00
parent 6743918b8f
commit ab67e095b4
7 changed files with 28 additions and 19 deletions

View File

@@ -1,5 +1,9 @@
## changelog ## changelog
## 0.9.4
修复preview组件不能解除loading的bug
## 0.9.3 ## 0.9.3
增加双击置入画布。 增加双击置入画布。

View File

@@ -4,6 +4,10 @@ order: 1
--- ---
## changelog ## changelog
## 0.9.4
修复preview组件不能解除loading的bug
## 0.9.3 ## 0.9.3
增加双击置入画布。 增加双击置入画布。

View File

@@ -34,12 +34,12 @@ dooringx-lib 在运行时维护一套数据流主要分为json数据部分
[阅读文档了解更多信息](https://h5-dooring.github.io/dooringx/). [阅读文档了解更多信息](https://h5-dooring.github.io/dooringx/).
## 安装 | Installation ## 二次开发安装 | Installation
```bash ```bash
npm/yarn install dooringx-lib npm/yarn install dooringx-lib
``` ```
## 快速启动 | Quick Start ## 项目上手 | Quick Start
```bash ```bash
# 克隆项目 # 克隆项目
@@ -56,16 +56,15 @@ cd dooringx
# 安装依赖 # 安装依赖
yarn install yarn install
# 启动基础示例
yarn start:example
# 启动 dooringx-lib # 启动 dooringx-lib
yarn start yarn start
# 启动基础示例
yarn start:example
# 启动 dooringx doc 文档 # 启动 dooringx doc 文档
yarn start:doc yarn start:doc
yarn build
``` ```

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.9.3", "version": "0.9.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

@@ -2,7 +2,7 @@
* @Author: yehuozhili * @Author: yehuozhili
* @Date: 2021-03-14 05:40:37 * @Date: 2021-03-14 05:40:37
* @LastEditors: yehuozhili * @LastEditors: yehuozhili
* @LastEditTime: 2021-09-28 22:26:00 * @LastEditTime: 2021-10-10 00:54:55
* @FilePath: \dooringx\packages\dooringx-lib\src\components\preview.tsx * @FilePath: \dooringx\packages\dooringx-lib\src\components\preview.tsx
*/ */
import Container from './container'; import Container from './container';
@@ -41,17 +41,17 @@ function Preview(props: PreviewProps): ReactElement {
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
useEffect(() => { useEffect(() => {
// 链接数据
props.config
.getDataCenter()
.initAddToDataMap(props.config.getStore().getData(), props.config.getStoreChanger());
// 链接事件
props.config
.getEventCenter()
.syncEventMap(props.config.getStore().getData(), props.config.getStoreChanger());
const finalFn = () => { const finalFn = () => {
setTimeout(() => { setTimeout(() => {
// 链接数据
props.config
.getDataCenter()
.initAddToDataMap(props.config.getStore().getData(), props.config.getStoreChanger());
// 链接事件
props.config
.getEventCenter()
.syncEventMap(props.config.getStore().getData(), props.config.getStoreChanger());
// 设置全局 // 设置全局
const bodyColor = props.config.getStore().getData().globalState?.bodyColor; const bodyColor = props.config.getStore().getData().globalState?.bodyColor;
if (bodyColor) { if (bodyColor) {
@@ -89,6 +89,8 @@ function Preview(props: PreviewProps): ReactElement {
.catch(() => { .catch(() => {
finalFn(); finalFn();
}); });
} else {
finalFn();
} }
}, [props, props.config]); }, [props, props.config]);

View File

@@ -1,6 +1,6 @@
{ {
"name": "dooringx-plugin-template", "name": "dooringx-plugin-template",
"version": "0.9.3", "version": "0.9.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

@@ -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.9.3", "dooringx-lib": "^0.9.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",