From a0c996ec4688d0a8c2b37c7c499320fea6bc5eae Mon Sep 17 00:00:00 2001 From: RickCole21 Date: Fri, 31 Jul 2020 12:40:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/form/chain-select.md | 2 -- docs/components/form/index.md | 12 ++---------- docs/concepts/data-mapping.md | 4 ---- examples/components/App.tsx | 12 ++++++++++-- examples/style.scss | 23 ++++++++++++++++------- fis-conf.js | 11 ++++++++--- src/renderers/Form/index.tsx | 4 ++-- 7 files changed, 38 insertions(+), 30 deletions(-) diff --git a/docs/components/form/chain-select.md b/docs/components/form/chain-select.md index b342b5b09..8461f6c6d 100755 --- a/docs/components/form/chain-select.md +++ b/docs/components/form/chain-select.md @@ -54,5 +54,3 @@ order: 7 | valueField | `boolean` | `"value"` | [选项值字段](./options#%E9%80%89%E9%A1%B9%E5%80%BC%E5%AD%97%E6%AE%B5-valuefield) | | joinValues | `boolean` | `true` | [拼接值](./options#%E6%8B%BC%E6%8E%A5%E5%80%BC-joinvalues) | | extractValue | `boolean` | `false` | [提取值](./options#%E6%8F%90%E5%8F%96%E5%A4%9A%E9%80%89%E5%80%BC-extractvalue) | - -@todo 可能还支持别的 diff --git a/docs/components/form/index.md b/docs/components/form/index.md index dbdbe3930..30f7fd67f 100755 --- a/docs/components/form/index.md +++ b/docs/components/form/index.md @@ -728,20 +728,12 @@ Form 支持轮训初始化接口,步骤如下: 如果想提交成功后,清空该缓存,则配置`"clearPersistDataAfterSubmit": true` -## 修改表单项变化方式 - -@todo - -- lazyChange -- formLazyChange - -默认表单项变化时,会即时变化,例如你输入文本,每键入一次,就会触发 - ## 属性表 | 属性名 | 类型 | 默认值 | 说明 | | --------------------------- | --------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | type | `string` | | `"form"` 指定为 Form 渲染器 | +| name | `string` | | 设置一个名字后,方便其他组件与其通信 | | mode | `string` | `normal` | 表单展示方式,可以是:`normal`、`horizontal` 或者 `inline` | | horizontal | `Object` | `{"left":"col-sm-2", "right":"col-sm-10", "offset":"col-sm-offset-2"}` | 当 mode 为 `horizontal` 时有用,用来控制 label | | title | `string` | `"表单"` | Form 的标题 | @@ -780,4 +772,4 @@ Form 支持轮训初始化接口,步骤如下: | canAccessSuperData | `boolean` | `true` | 指定是否可以自动获取上层的数据并映射到表单项上 | | persistData | `boolean` | `true` | 指定表单是否开启本地缓存 | | clearPersistDataAfterSubmit | `boolean` | `true` | 指定表单提交成功后是否清除本地缓存 | -| name | `string` | | 设置一个名字后,方便其他组件与其通信 | +| trimValues | `boolean` | `false` | trim 当前表单项的每一个值 | diff --git a/docs/concepts/data-mapping.md b/docs/concepts/data-mapping.md index c20d548f9..08bc4e015 100755 --- a/docs/concepts/data-mapping.md +++ b/docs/concepts/data-mapping.md @@ -951,10 +951,6 @@ ${xxx | pick[:path]} } ``` -### str2date - -@todo - ### duration 秒值格式化成时间格式 diff --git a/examples/components/App.tsx b/examples/components/App.tsx index c7c2d00e2..7ef27a0b3 100644 --- a/examples/components/App.tsx +++ b/examples/components/App.tsx @@ -225,8 +225,10 @@ export class App extends React.PureComponent { */}
- - AMIS + + + AMIS +
@@ -238,6 +240,12 @@ export class App extends React.PureComponent { 示例 + + 可视化编辑器 + + + 爱速搭 +
diff --git a/examples/style.scss b/examples/style.scss index 38b97a399..0b84c83cc 100644 --- a/examples/style.scss +++ b/examples/style.scss @@ -9,6 +9,10 @@ body { } } +a { + text-decoration: none !important; +} + .page-play, .page-edit { &:before { @@ -165,10 +169,13 @@ body { } } - .a-Layout-brand, - .cxd-Layout-brand { + .a-Layout-brand > a, + .cxd-Layout-brand > a { color: #333; } + .dark-Layout-brand > a { + color: #fff; + } } &-headerBar { @@ -185,7 +192,6 @@ body { display: inline-block; color: #333; padding: 0px 22px; - text-decoration: none; font-weight: 500; &.is-active { @@ -250,10 +256,6 @@ body { margin-top: -100px; } - a { - text-decoration: none; - } - &-nav, &-toc { margin-top: 30px; @@ -299,6 +301,8 @@ body { } &-navigation { + user-select: none; + &-item { padding-left: 20px; border-left: 1px solid #e8ebee; @@ -379,6 +383,7 @@ body { font-size: 12px; font-weight: 500; border-left: 1px solid #e8ebee; + user-select: none; &-item { padding-left: 15px; @@ -440,6 +445,10 @@ body { > pre { margin-bottom: 30px; } + + table:not(.table) { + word-break: normal; + } } } diff --git a/fis-conf.js b/fis-conf.js index 3b21ab52d..d2d359ec4 100644 --- a/fis-conf.js +++ b/fis-conf.js @@ -574,8 +574,8 @@ if (fis.project.currentMedia() === 'publish') { 'pkg/charts.js': ['zrender/**', 'echarts/**'], 'pkg/api-mock.js': ['mock/*.ts'], 'pkg/app.js': [ - '/examples/components/App.jsx', - '/examples/components/App.jsx:deps' + '/examples/components/App.tsx', + '/examples/components/App.tsx:deps' ], 'pkg/rest.js': [ @@ -615,9 +615,14 @@ if (fis.project.currentMedia() === 'publish') { const indexHtml = ret.src['/examples/index.html']; const appJs = ret.src['/examples/components/App.tsx']; const DocJs = ret.src['/examples/components/Doc.tsx']; + const ExampleJs = ret.src['/examples/components/Example.tsx']; const pages = []; - const source = [appJs.getContent(), DocJs.getContent()].join('\n'); + const source = [ + appJs.getContent(), + DocJs.getContent(), + ExampleJs.getContent() + ].join('\n'); source.replace(/\bpath\b\s*\:\s*('|")(.*?)\1/g, function ( _, qutoa, diff --git a/src/renderers/Form/index.tsx b/src/renderers/Form/index.tsx index b568563fb..4169c4522 100644 --- a/src/renderers/Form/index.tsx +++ b/src/renderers/Form/index.tsx @@ -106,8 +106,8 @@ export interface FormProps extends RendererProps, FormSchema { saveFailed?: string; validateFailed?: string; }; - lazyChange?: boolean; - formLazyChange?: boolean; + lazyChange?: boolean; // 表单项的 + formLazyChange?: boolean; // 表单的 } export default class Form extends React.Component {