From 0c758ddda8eb5f82a001022d30390b4a34cf975c Mon Sep 17 00:00:00 2001 From: xujiang Date: Thu, 19 Nov 2020 10:59:20 +0800 Subject: [PATCH] =?UTF-8?q?:new:=20=E6=96=B0=E5=A2=9E=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=20:bug:=20=E4=BF=AE=E5=A4=8Dform=E7=BB=84?= =?UTF-8?q?=E4=BB=B6state=E4=B8=BA=E5=BC=95=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 16 ++++++++-------- .../BasicShop/BasicComponents/Form/BaseForm.tsx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index 87c814c..85f4267 100644 --- a/readme.md +++ b/readme.md @@ -38,7 +38,7 @@ Contributions, issues and feature requests are welcome!
Feel free to check Give a ⭐️ if this project helped you! -## 技术栈 +## 技术栈 | The technology stack * **React** 前端主流框架(react,vue,angular)之一,更适合开发灵活度高且复杂的应用 * **dva** 主流的react应用状态管理工具,基于redux * **less** css预编译语言,轻松编写结构化分明的css @@ -62,7 +62,7 @@ Give a ⭐️ if this project helped you! 前面的渲染器原理已经介绍了, 这里就不一一介绍了,感兴趣的可以交流讨论. -### 实现在线下载功能 +### 实现在线下载功能 | Enable online download 在线下载这块我们需要用到一个开源库: **file-saver**, 专门解决前端下载文件困难的窘境. 具体使用举例: ``` js var FileSaver = require('file-saver'); @@ -71,7 +71,7 @@ FileSaver.saveAs(blob, "hello world.txt"); ``` 以上代码可以实现将传入的数据下载为txt文件, 如果是Blob, 是不是还能在线下载图片, html呢? 答案是肯定的, 所以我们的下载任务采用该方案来实现. -### 后端部分 +### 后端部分 | The back-end section 后端部分由于涉及的知识点比较多, 不是本文考虑的重点, 所以这里大致提几个点, 大家可以用完全不同的技术来实现后台服务, 比如说**PHP**, **Java**, **Python**或者**Egg**. 笔者这里采用的是**koa**. 主要实现功能如下: * 保存模板 | Save the template * 真机预览的数据源存储 | The data source store for the real machine preview @@ -114,11 +114,11 @@ FileSaver.saveAs(blob, "hello world.txt"); 20. 表单组件中添加展示型文本,用来对字段说明 21. 支持组件复制, 右键删除 -## 正在完成功能 -* 丰富组件库组件 -* 添加配置交互功能 -* 组件细分和代码优化 -* 单元测试 +## 正在完成功能 | The functionality is being completed +* 丰富组件库组件 Enrich component library components +* 添加配置交互功能 Add configuration interaction +* 组件细分和代码优化 Component segmentation and code optimization +* 单元测试 Unit tests ## Install(安装) 1. 下载代码 | Download the code diff --git a/src/components/BasicShop/BasicComponents/Form/BaseForm.tsx b/src/components/BasicShop/BasicComponents/Form/BaseForm.tsx index 9beeadc..17b950c 100644 --- a/src/components/BasicShop/BasicComponents/Form/BaseForm.tsx +++ b/src/components/BasicShop/BasicComponents/Form/BaseForm.tsx @@ -1,6 +1,6 @@ import { Input, Cell, DateSelect, Radio, Select, Checkbox } from 'zarm'; import styles from './baseForm.less'; -import React, { ReactText } from 'react'; +import React, { ReactText, useState } from 'react'; import { baseFormDateTpl, baseFormMyRadioTpl,