Skip to content

Commit 37c0ab2

Browse files
committed
feat: update form demo
1 parent 787d51f commit 37c0ab2

File tree

4 files changed

+79
-68
lines changed

4 files changed

+79
-68
lines changed

components/form/demo/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
3-
import AdvancedSearch from './advanced-search'
3+
// import AdvancedSearch from './advanced-search'
44
// import Coordinated from './coordinated'
55
// import CustomizedFormControls from './customized-form-controls'
66
// import DynamicFormItem from './dynamic-form-item'
@@ -15,6 +15,8 @@ import AdvancedSearch from './advanced-search'
1515
// import ValidateOther from './validate-other'
1616
// import ValidateStatic from './validate-static'
1717
// import WithoutFormCreate from './without-form-create'
18+
import Test from './test'
19+
import TestString from '!raw-loader!./test'
1820
1921
import CN from './../index.zh-CN'
2022
import US from './../index.en-US'
@@ -68,11 +70,13 @@ export default {
6870
cols: 1,
6971
title: 'Form',
7072
render () {
73+
console.log(TestString)
7174
return (
7275
<div>
7376
<md cn={md.cn} us={md.us} />
74-
<AdvancedSearch />
75-
{/* <Coordinated />
77+
<Test />
78+
{/* <AdvancedSearch />
79+
<Coordinated />
7680
<CustomizedFormControls />
7781
<DynamicFormItem />
7882
<DynamicRule />

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"postcss-loader": "^2.1.2",
120120
"pre-commit": "^1.2.2",
121121
"querystring": "^0.2.0",
122+
"raw-loader": "^1.0.0-beta.0",
122123
"reqwest": "^2.0.5",
123124
"rimraf": "^2.6.2",
124125
"rucksack-css": "^1.0.2",

site/routes.js

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
import Layout from './components/layout.vue'
2-
import Iframe from './components/iframe.vue'
1+
// import Layout from './components/layout.vue'
2+
// import Iframe from './components/iframe.vue'
33

44
const AsyncTestComp = () => {
55
const d = window.location.hash.replace('#', '')
66
return {
7-
component: import(`../components/form/demo/test.vue`),
7+
component: import(`../components/form/demo/index.vue`),
88
}
99
}
1010

1111
export default [
12-
{ path: '/ant-design/components/:name/', component: Layout, props: true },
13-
{ path: '/ant-design/iframe/:name/', component: Iframe, props: true },
14-
{
15-
path: '/ant-design',
16-
component: Layout,
17-
props: (route) => {
18-
const name = route.path.split('/docs/vue/')[1].split('/')[0]
19-
return { name }
20-
},
21-
children: [
22-
{
23-
path: 'docs/vue/customize-theme',
24-
component: () => import('../docs/vue/customize-theme.en-US.md'),
25-
},
26-
{
27-
path: 'docs/vue/customize-theme-cn',
28-
component: () => import('../docs/vue/customize-theme.zh-CN.md'),
29-
},
30-
{
31-
path: 'docs/vue/getting-started',
32-
component: () => import('../docs/vue/getting-started.en-US.md'),
33-
},
34-
{
35-
path: 'docs/vue/getting-started-cn',
36-
component: () => import('../docs/vue/getting-started.zh-CN.md'),
37-
},
38-
{
39-
path: 'docs/vue/i18n',
40-
component: () => import('../docs/vue/i18n.en-US.md'),
41-
},
42-
{
43-
path: 'docs/vue/i18n-cn',
44-
component: () => import('../docs/vue/i18n.zh-CN.md'),
45-
},
46-
{
47-
path: 'docs/vue/introduce',
48-
component: () => import('../docs/vue/introduce.en-US.md'),
49-
},
50-
{
51-
path: 'docs/vue/introduce-cn',
52-
component: () => import('../docs/vue/introduce.zh-CN.md'),
53-
},
54-
{
55-
path: 'docs/vue/use-with-vue-cli',
56-
component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
57-
},
58-
{
59-
path: 'docs/vue/use-with-vue-cli-cn',
60-
component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
61-
},
62-
{
63-
path: 'docs/vue/changelog',
64-
component: () => import('../CHANGELOG.en-US.md'),
65-
},
66-
{
67-
path: 'docs/vue/changelog-cn',
68-
component: () => import('../CHANGELOG.zh-CN.md'),
69-
},
70-
{ path: '', redirect: '/ant-design/vue/docs/introduce/' },
71-
],
72-
},
12+
// { path: '/ant-design/components/:name/', component: Layout, props: true },
13+
// { path: '/ant-design/iframe/:name/', component: Iframe, props: true },
14+
// {
15+
// path: '/ant-design',
16+
// component: Layout,
17+
// props: (route) => {
18+
// const name = route.path.split('/docs/vue/')[1].split('/')[0]
19+
// return { name }
20+
// },
21+
// children: [
22+
// {
23+
// path: 'docs/vue/customize-theme',
24+
// component: () => import('../docs/vue/customize-theme.en-US.md'),
25+
// },
26+
// {
27+
// path: 'docs/vue/customize-theme-cn',
28+
// component: () => import('../docs/vue/customize-theme.zh-CN.md'),
29+
// },
30+
// {
31+
// path: 'docs/vue/getting-started',
32+
// component: () => import('../docs/vue/getting-started.en-US.md'),
33+
// },
34+
// {
35+
// path: 'docs/vue/getting-started-cn',
36+
// component: () => import('../docs/vue/getting-started.zh-CN.md'),
37+
// },
38+
// {
39+
// path: 'docs/vue/i18n',
40+
// component: () => import('../docs/vue/i18n.en-US.md'),
41+
// },
42+
// {
43+
// path: 'docs/vue/i18n-cn',
44+
// component: () => import('../docs/vue/i18n.zh-CN.md'),
45+
// },
46+
// {
47+
// path: 'docs/vue/introduce',
48+
// component: () => import('../docs/vue/introduce.en-US.md'),
49+
// },
50+
// {
51+
// path: 'docs/vue/introduce-cn',
52+
// component: () => import('../docs/vue/introduce.zh-CN.md'),
53+
// },
54+
// {
55+
// path: 'docs/vue/use-with-vue-cli',
56+
// component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
57+
// },
58+
// {
59+
// path: 'docs/vue/use-with-vue-cli-cn',
60+
// component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
61+
// },
62+
// {
63+
// path: 'docs/vue/changelog',
64+
// component: () => import('../CHANGELOG.en-US.md'),
65+
// },
66+
// {
67+
// path: 'docs/vue/changelog-cn',
68+
// component: () => import('../CHANGELOG.zh-CN.md'),
69+
// },
70+
// { path: '', redirect: '/ant-design/vue/docs/introduce/' },
71+
// ],
72+
// },
7373

7474
{ path: '/:prefix?/test/:demo?/', component: AsyncTestComp },
75-
{ path: '/*', redirect: '/ant-design/docs/vue/introduce/' },
75+
// { path: '/*', redirect: '/ant-design/docs/vue/introduce/' },
7676
]

0 commit comments

Comments
 (0)