From 40504aac05636233133c2ba9696d662ac5aab50b Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Tue, 4 Feb 2020 20:32:03 +0800 Subject: [PATCH] doc(select): zh-cn --- demo/demo.vue | 8 +- .../components/customInput/zhCN/index.md | 2 + .../components/select/enUS/clearable.md | 4 - .../components/select/enUS/index.md | 2 +- .../components/select/enUS/scrollEvent.md | 1 - .../components/select/zhCN/action.md | 47 +++++ .../components/select/zhCN/basic.md | 3 +- .../components/select/zhCN/clearable.md | 94 ++++++++++ .../components/select/zhCN/customOption.md | 172 ++++++++++++++++++ .../components/select/zhCN/events.md | 88 +++++++++ .../components/select/zhCN/filterable.md | 83 +++++++++ .../components/select/zhCN/group.md | 141 ++++++++++++++ .../components/select/zhCN/index.md | 67 ++++++- .../components/select/zhCN/manyOptions.md | 33 ++++ .../components/select/zhCN/multiple.md | 87 +++++++++ .../components/select/zhCN/remote.md | 96 ++++++++++ .../components/select/zhCN/remoteMultiple.md | 97 ++++++++++ .../components/select/zhCN/scrollEvent.md | 92 ++++++++++ .../components/select/zhCN/size.md | 93 ++++++++++ demo/documentation/intro/intro/zhCN/index.md | 3 + demo/documentation/intro/start/zhCN/index.md | 8 +- 21 files changed, 1202 insertions(+), 19 deletions(-) create mode 100644 demo/documentation/components/select/zhCN/action.md create mode 100644 demo/documentation/components/select/zhCN/clearable.md create mode 100644 demo/documentation/components/select/zhCN/customOption.md create mode 100644 demo/documentation/components/select/zhCN/events.md create mode 100644 demo/documentation/components/select/zhCN/filterable.md create mode 100644 demo/documentation/components/select/zhCN/group.md create mode 100644 demo/documentation/components/select/zhCN/manyOptions.md create mode 100644 demo/documentation/components/select/zhCN/multiple.md create mode 100644 demo/documentation/components/select/zhCN/remote.md create mode 100644 demo/documentation/components/select/zhCN/remoteMultiple.md create mode 100644 demo/documentation/components/select/zhCN/scrollEvent.md create mode 100644 demo/documentation/components/select/zhCN/size.md diff --git a/demo/demo.vue b/demo/demo.vue index 2e4b56f64..d27ea11a1 100644 --- a/demo/demo.vue +++ b/demo/demo.vue @@ -80,10 +80,10 @@ export default { name: 'Getting Started', path: `/${this.lang}/${this.theme}` + '/start' }, - { - name: 'Develop Guidelines', - path: `/${this.lang}/${this.theme}` + '/dev-guildlines' - }, + // { + // name: 'Develop Guidelines', + // path: `/${this.lang}/${this.theme}` + '/dev-guildlines' + // }, { name: 'Create Themed Component', path: `/${this.lang}/${this.theme}` + '/n-theme' diff --git a/demo/documentation/components/customInput/zhCN/index.md b/demo/documentation/components/customInput/zhCN/index.md index e69de29bb..937d68c02 100644 --- a/demo/documentation/components/customInput/zhCN/index.md +++ b/demo/documentation/components/customInput/zhCN/index.md @@ -0,0 +1,2 @@ +# 自定义输入 Custom Input +还没写呢。wanli 你早点把这个整理了吧 = =。 \ No newline at end of file diff --git a/demo/documentation/components/select/enUS/clearable.md b/demo/documentation/components/select/enUS/clearable.md index 1b53a2b14..b3a382411 100644 --- a/demo/documentation/components/select/enUS/clearable.md +++ b/demo/documentation/components/select/enUS/clearable.md @@ -3,20 +3,17 @@ Remember you can only clear the select which has value. (Select it firstly) ```html diff --git a/demo/documentation/components/select/zhCN/action.md b/demo/documentation/components/select/zhCN/action.md new file mode 100644 index 000000000..275fb63d9 --- /dev/null +++ b/demo/documentation/components/select/zhCN/action.md @@ -0,0 +1,47 @@ +# 操作插槽 +有人要在选择菜单里用这个插槽吗? +```html + + + +``` +```js +export default { + data () { + return { + value: null, + options: [ + { + label: "Everybody's Got Something to Hide Except Me and My Monkey", + value: 'song0', + disabled: true + }, + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3', + disabled: true + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/basic.md b/demo/documentation/components/select/zhCN/basic.md index 65175e465..32943fe46 100644 --- a/demo/documentation/components/select/zhCN/basic.md +++ b/demo/documentation/components/select/zhCN/basic.md @@ -1,4 +1,5 @@ -# Basic +# 基础用法 +选择器的基本用法。 ```html + + + +``` +```js +export default { + data () { + return { + selectedValue: null, + selectedArray: null, + options: [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/customOption.md b/demo/documentation/components/select/zhCN/customOption.md new file mode 100644 index 000000000..4f804511d --- /dev/null +++ b/demo/documentation/components/select/zhCN/customOption.md @@ -0,0 +1,172 @@ +# 自定义选项渲染 +经过了很久的思考,我决定放弃支持 Slot API。当然,还是提供自定义渲染选项的方式。 +```html + +``` +```js +import mdMusicalNote from 'naive-ui/lib/icons/md-musical-note' + +function render (h, option, selected) { + return [ + h('n-config-consumer', { + props: { + transparent: true + }, + scopedSlots: { + default ({ styleScheme }) { + return h('n-icon', { + style: { + fill: selected ? styleScheme.primaryColor : styleScheme.tertiaryTextColor, + verticalAlign: 'middle', + marginRight: '4px', + } + }, [h(mdMusicalNote)]) + } + } + }), + option.label + ] +} + +export default { + data () { + return { + value: null, + options: [ + { + type: 'group', + name: 'Rubber Soul', + render: (h, data) => h('span', [ data.name, '(Cool!)']), + children: [ + { + label: 'Everybody\'s Got Something to Hide Except Me and My Monkey', + value: 'song0', + disabled: true + }, + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3', + disabled: true + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7', + disabled: true + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ].map(v => { + v.render = render + return v + }) + }, + { + type: 'group', + name: 'Let It Be', + render: (h, data) => h('span', [ data.name, '(Cool!)']), + children: [ + { + label: 'Two Of Us', + value: 'Two Of Us' + }, + { + label: 'Dig A Pony', + value: 'Dig A Pony' + }, + { + label: 'Across The Universe', + value: 'Across The Universe' + }, + { + label: 'I Me Mine', + value: 'I Me Mine' + }, + { + label: 'Dig It', + value: 'Dig It' + }, + { + label: 'Let It Be', + value: 'Let It Be' + }, + { + label: 'Maggie Mae', + value: 'Maggie Mae' + }, + { + label: 'I\'ve Got A Feeling', + value: 'I\'ve Got A Feeling' + }, + { + label: 'One After 909', + value: 'One After 909' + }, + { + label: 'The Long And Winding Road', + value: 'The Long And Winding Road' + }, + { + label: 'For You Blue', + value: 'For You Blue' + }, + { + label: 'Get Back', + value: 'Get Back' + } + ].map(v => { + v.render = render + return v + }) + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/events.md b/demo/documentation/components/select/zhCN/events.md new file mode 100644 index 000000000..4ab7bec44 --- /dev/null +++ b/demo/documentation/components/select/zhCN/events.md @@ -0,0 +1,88 @@ +# Change 事件 +为什么 change 事件还是个例子?因为一开始的时候没什么可写的。 +```html + + +``` +```js +export default { + data () { + return { + selectedValue: 'song1', + selectedArray: ['song1'], + options: [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + }, + methods: { + handleChange (item) { + this.$NMessage.info('value: ' + JSON.stringify(item)) + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/filterable.md b/demo/documentation/components/select/zhCN/filterable.md new file mode 100644 index 000000000..d81fbfcb3 --- /dev/null +++ b/demo/documentation/components/select/zhCN/filterable.md @@ -0,0 +1,83 @@ +# 可过滤 +上吧!过滤器。 +```html + + +``` +```js +export default { + data () { + return { + selectedValue: null, + selectedValues: null, + options: [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/group.md b/demo/documentation/components/select/zhCN/group.md new file mode 100644 index 000000000..441eb81f4 --- /dev/null +++ b/demo/documentation/components/select/zhCN/group.md @@ -0,0 +1,141 @@ +# 选项组 +把选项集合成组。 +```html + +``` +```js +export default { + data () { + return { + value: null, + options: [ + { + type: 'group', + name: 'Rubber Soul', + children: [ + { + label: 'Everybody\'s Got Something to Hide Except Me and My Monkey', + value: 'song0', + disabled: true + }, + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3', + disabled: true + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7', + disabled: true + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + }, + { + type: 'group', + name: 'Let It Be', + children: [ + { + label: 'Two Of Us', + value: 'Two Of Us' + }, + { + label: 'Dig A Pony', + value: 'Dig A Pony' + }, + { + label: 'Across The Universe', + value: 'Across The Universe' + }, + { + label: 'I Me Mine', + value: 'I Me Mine' + }, + { + label: 'Dig It', + value: 'Dig It' + }, + { + label: 'Let It Be', + value: 'Let It Be' + }, + { + label: 'Maggie Mae', + value: 'Maggie Mae' + }, + { + label: 'I\'ve Got A Feeling', + value: 'I\'ve Got A Feeling' + }, + { + label: 'One After 909', + value: 'One After 909' + }, + { + label: 'The Long And Winding Road', + value: 'The Long And Winding Road' + }, + { + label: 'For You Blue', + value: 'For You Blue' + }, + { + label: 'Get Back', + value: 'Get Back' + } + ] + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/index.md b/demo/documentation/components/select/zhCN/index.md index 15a9eccf2..5bb6cc15d 100644 --- a/demo/documentation/components/select/zhCN/index.md +++ b/demo/documentation/components/select/zhCN/index.md @@ -1,7 +1,66 @@ -# Select -Select -## Demo +# 选择器 Select +选点啥! +## 演示 ```demo basic +size +multiple +events +filterable +remote +remote-multiple +clearable +scroll-event +group +many-options +custom-option +action ``` -## API \ No newline at end of file +## V-model +|prop|event| +|-|-| +|value|change| + +## Props +|名称|类型|默认值|介绍| +|-|-|-|-| +|loading|`boolean`|`false`|| +|clearable|`boolean`|`false`|| +|value|`Array \| string \| number`|`false`|| +|placeholder|||| +|multiple|`boolean`|`false`|| +|size|`'small' \| 'medium' \| 'large'`|`'medium'`|| +|disabled|`boolean`|`false`|| +|options|`Array`|`[]`|| +|remote|`boolearn`|`false`|是否要异步获取选项| +|filter|`(pattern: string, option: Object) => boolean`|`null`|| + +## API +### SelectOption Type +|属性|类型|介绍| +|-|-|-| +|label|`string`|| +|value|`string \| number`|在选项中应该是唯一的| +|disabled|`boolean`|| +|render|`function`|| + +### SelectOptionGroup Type +|属性|类型|介绍| +|-|-|-| +|type|`'group'`|| +|name|`string`|| +|children|`Array`|| + +## Slots +|名称|介绍| +|-|-| +|action|| + +## Event +|名称|类型|介绍| +|-|-|-| +|change|`(value: Array \| string \| number \| null)`|| +|search|`(value: string)`|| +|blur|`()`|选择器 Blur 时发出| +|scroll|`(e: Event)`|选择菜单在滚动| + diff --git a/demo/documentation/components/select/zhCN/manyOptions.md b/demo/documentation/components/select/zhCN/manyOptions.md new file mode 100644 index 000000000..61af9fd81 --- /dev/null +++ b/demo/documentation/components/select/zhCN/manyOptions.md @@ -0,0 +1,33 @@ +# 许多选项 +1000 倍宇宙的终极答案个数的选项。 +```html + + +``` +```js +export default { + data () { + return { + value: null, + values: null, + options: Array.apply(null, { length: 42000 }).map((_, i) => ({ + label: String(i), + value: i + })) + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/multiple.md b/demo/documentation/components/select/zhCN/multiple.md new file mode 100644 index 000000000..2384da07a --- /dev/null +++ b/demo/documentation/components/select/zhCN/multiple.md @@ -0,0 +1,87 @@ +# 多选 +多选值。 +```html + + +``` +```js +export default { + data () { + return { + value: null, + options: [ + { + label: "Everybody's Got Something to Hide Except Me and My Monkey", + value: 'song0', + disabled: true + }, + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3', + disabled: true + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7', + disabled: true + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/remote.md b/demo/documentation/components/select/zhCN/remote.md new file mode 100644 index 000000000..fd4db2f72 --- /dev/null +++ b/demo/documentation/components/select/zhCN/remote.md @@ -0,0 +1,96 @@ +# 异步加载(单选) +异步单选的例子。 +```html + +``` +```js +const options = [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } +] + +export default { + data () { + return { + value: null, + loading: false, + options: [], + noDataContent: 'please search', + handleSearch: (query) => { + if (!query.length) { + this.options = [] + this.noDataContent = 'please search' + return + } + this.loading = true + window.setTimeout(() => { + this.options = options.filter(item => ~item.label.indexOf(query)) + if (!this.options.length) this.noDataContent = 'no result found' + this.loading = false + }, 1000) + } + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/remoteMultiple.md b/demo/documentation/components/select/zhCN/remoteMultiple.md new file mode 100644 index 000000000..7f1321648 --- /dev/null +++ b/demo/documentation/components/select/zhCN/remoteMultiple.md @@ -0,0 +1,97 @@ +# 异步加载(多选) +异步多选的例子。 +```html + +``` +```js +const options = [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } +] + +export default { + data () { + return { + selectedValues: null, + loading: false, + options: [], + noDataContent: 'please search', + handleSearch: (query) => { + if (!query.length) { + this.options = [] + this.noDataContent = 'please search' + return + } + this.loading = true + window.setTimeout(() => { + this.options = options.filter(item => ~item.label.indexOf(query)) + if (!this.options.length) this.noDataContent = 'no result found' + this.loading = false + }, 1000) + } + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/scrollEvent.md b/demo/documentation/components/select/zhCN/scrollEvent.md new file mode 100644 index 000000000..7b52f7cca --- /dev/null +++ b/demo/documentation/components/select/zhCN/scrollEvent.md @@ -0,0 +1,92 @@ +# 滚动事件 +同事说要用这个来触发做异步加载。 +```html + +
{{ 
+  JSON.stringify({
+    scrollContentHeight,
+    scrollContainerScrollTop,
+    scrollContainerHeight
+  }, 0, 2)
+}}
+``` +```js +export default { + data () { + return { + value: null, + array: null, + scrollContentHeight: null, + scrollContainerHeight: null, + scrollContainerScrollTop: null, + options: [ + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3' + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourseld', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7' + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + }, + methods: { + handleScroll (e, scrollContainer, scrollContent) { + this.scrollContentHeight = scrollContent.offsetHeight + this.scrollContainerScrollTop = scrollContainer.scrollTop + this.scrollContainerHeight = scrollContainer.offsetHeight + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/components/select/zhCN/size.md b/demo/documentation/components/select/zhCN/size.md new file mode 100644 index 000000000..7da9a76cb --- /dev/null +++ b/demo/documentation/components/select/zhCN/size.md @@ -0,0 +1,93 @@ +# 尺寸 +选择器有不同的尺寸。 + +```html + + + +``` + +```js +export default { + data () { + return { + value: null, + options: [ + { + label: "Everybody's Got Something to Hide Except Me and My Monkey", + value: 'song0', + disabled: true + }, + { + label: 'Drive My Car', + value: 'song1' + }, + { + label: 'Norwegian Wood', + value: 'song2' + }, + { + label: 'You Won\'t See', + value: 'song3', + disabled: true + }, + { + label: 'Nowhere Man', + value: 'song4' + }, + { + label: 'Think For Yourself', + value: 'song5' + }, + { + label: 'The Word', + value: 'song6' + }, + { + label: 'Michelle', + value: 'song7', + disabled: true + }, + { + label: 'What goes on', + value: 'song8' + }, + { + label: 'Girl', + value: 'song9' + }, + { + label: 'I\'m looking through you', + value: 'song10' + }, + { + label: 'In My Life', + value: 'song11' + }, + { + label: 'Wait', + value: 'song12' + } + ] + } + } +} +``` +```css +.n-select { + width: 180px; + margin: 0 12px 8px 0; +} +``` \ No newline at end of file diff --git a/demo/documentation/intro/intro/zhCN/index.md b/demo/documentation/intro/intro/zhCN/index.md index e69de29bb..6c03f3bb5 100644 --- a/demo/documentation/intro/intro/zhCN/index.md +++ b/demo/documentation/intro/intro/zhCN/index.md @@ -0,0 +1,3 @@ + +# Naive UI +Naive UI 是图森未来前端的 Vue 组件库。 \ No newline at end of file diff --git a/demo/documentation/intro/start/zhCN/index.md b/demo/documentation/intro/start/zhCN/index.md index 39fa04ad7..bf9336a65 100644 --- a/demo/documentation/intro/start/zhCN/index.md +++ b/demo/documentation/intro/start/zhCN/index.md @@ -1,15 +1,15 @@ # 起步 -## Installation -First install it. +## 安装 +使用 npm 安装。 ```bash npm install --save-dev naive-ui ``` -## Usage -Add the following lines in you entry point js file. +## 使用方式 +在你项目的 javascript 入口文件添加下列代码。 ```js import naive from 'naive-ui' import 'naive-ui/dist/lib/index.css'