Skip to content

Commit

Permalink
docs(all): add inject global styles
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed May 26, 2021
1 parent ddd8fc9 commit 70852e9
Show file tree
Hide file tree
Showing 33 changed files with 133 additions and 193 deletions.
19 changes: 9 additions & 10 deletions .umirc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export default {
mode: 'site',
logo:
'//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
logo: '//img.alicdn.com/imgextra/i2/O1CN01Kq3OHU1fph6LGqjIz_!!6000000004056-55-tps-1141-150.svg',
title: 'Formily',
hash: true,
favicon:
Expand Down Expand Up @@ -64,8 +63,7 @@ export default {
},
{
title: 'Chrome Extension',
path:
'https://chrome.google.com/webstore/detail/formily-devtools/kkocalmbfnplecdmbadaapgapdioecfm?hl=zh-CN',
path: 'https://chrome.google.com/webstore/detail/formily-devtools/kkocalmbfnplecdmbadaapgapdioecfm?hl=zh-CN',
},
],
},
Expand Down Expand Up @@ -140,8 +138,7 @@ export default {
},
{
title: 'Chrome扩展',
path:
'https://chrome.google.com/webstore/detail/formily-devtools/kkocalmbfnplecdmbadaapgapdioecfm?hl=zh-CN',
path: 'https://chrome.google.com/webstore/detail/formily-devtools/kkocalmbfnplecdmbadaapgapdioecfm?hl=zh-CN',
},
],
},
Expand All @@ -165,6 +162,12 @@ export default {
},
],
},
links: [
{
rel: 'stylesheet',
href: 'https://unpkg.com/antd/dist/antd.css',
},
],
styles: [
`.__dumi-default-navbar-logo{
height: 60px !important;
Expand Down Expand Up @@ -289,8 +292,6 @@ export default {
},
],
},


],

'/zh-CN/guide': [
Expand Down Expand Up @@ -396,8 +397,6 @@ export default {
},
],
},


],
},
}
3 changes: 0 additions & 3 deletions docs/guide/advanced/calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -174,7 +173,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -363,4 +361,3 @@ export default () => {
)
}
```

2 changes: 0 additions & 2 deletions docs/guide/advanced/calculator.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -174,7 +173,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down
7 changes: 2 additions & 5 deletions docs/guide/advanced/destructor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compatible solution for front-end and back-end data differences

Many times, we always encounter scenarios where the front-end data structure does not match the back-end data structure. The seemingly simple problem is actually very uncomfortable to solve. The most common problems are:
Many times, we always encounter scenarios where the front-end data structure does not match the back-end data structure. The seemingly simple problem is actually very uncomfortable to solve. The most common problems are:

The output of the front-end date range component is an array structure, but the format required by the back-end is to split a flat data structure. This problem is largely limited by the back-end domain model. Because from the perspective of back-end model design, splitting the flat structure is the best solution;

Expand All @@ -22,7 +22,6 @@ import {
} from '@formily/antd'
import { createForm, onFieldValueChange } from '@formily/core'
import { createSchemaField, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -100,7 +99,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -183,7 +181,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { Field, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const form = createForm()

Expand Down Expand Up @@ -213,7 +210,7 @@ export default () => {
initialValue={['2020-11-20', '2021-12-30']}
decorator={[FormItem]}
component={[DatePicker.RangePicker]}
reactions={(field)=>{
reactions={(field) => {
field.visible = !!field.query('visible_destructor').value()
}}
/>
Expand Down
5 changes: 1 addition & 4 deletions docs/guide/advanced/destructor.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
} from '@formily/antd'
import { createForm, onFieldValueChange } from '@formily/core'
import { createSchemaField, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -100,7 +99,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { createSchemaField, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const SchemaField = createSchemaField({
components: {
Expand Down Expand Up @@ -183,7 +181,6 @@ import {
} from '@formily/antd'
import { createForm } from '@formily/core'
import { Field, FormConsumer } from '@formily/react'
import 'antd/lib/alert/style'

const form = createForm()

Expand Down Expand Up @@ -213,7 +210,7 @@ export default () => {
initialValue={['2020-11-20', '2021-12-30']}
decorator={[FormItem]}
component={[DatePicker.RangePicker]}
reactions={(field)=>{
reactions={(field) => {
field.visible = !!field.query('visible_destructor').value()
}}
/>
Expand Down
Loading

0 comments on commit 70852e9

Please sign in to comment.