docs(input): update input code docs (#774)

* docs(input): update input code docs

* fix: remove v-model

Co-authored-by: yugang.cao <yugang.cao@tusimple.ai>
This commit is contained in:
Yugang Cao 2021-08-06 00:04:05 +08:00 committed by GitHub
parent af7fc160cd
commit 76793a389c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 38 deletions

View File

@ -10,11 +10,13 @@ Basic usage of input.
```
```js
export default {
data () {
import { defineComponent, ref } from 'vue'
export default defineComponent({
setup () {
return {
value: null
value: ref(null)
}
}
}
})
```

View File

@ -26,10 +26,11 @@ Fill content in prefix or suffix of the input.
```js
import { FlashOutline as FlashIcon } from '@vicons/ionicons5'
import { defineComponent } from 'vue'
export default {
export default defineComponent({
components: {
FlashIcon
}
}
})
```

View File

@ -30,16 +30,18 @@
```
```js
export default {
data () {
import { defineComponent, ref } from 'vue'
export default defineComponent({
setup () {
return {
selectOptions: [
selectOptions: ref([
{
label: 'option',
value: 'option'
}
],
cascaderOptions: [
]),
cascaderOptions: ref([
{
label: 'option-1',
value: 'option-1',
@ -50,8 +52,8 @@ export default {
}
]
}
]
])
}
}
}
})
```

View File

@ -14,11 +14,13 @@
```
```js
export default {
data () {
import { defineComponent, ref } from 'vue'
export default defineComponent({
setup () {
return {
value: null
value: ref(null)
}
}
}
})
```

View File

@ -96,12 +96,13 @@
```js
import { MdSearch } from '@vicons/ionicons4'
import { defineComponent } from 'vue'
export default {
export default defineComponent({
components: {
MdSearch
}
}
})
```
```css

View File

@ -26,10 +26,11 @@
```js
import { FlashOutline as FlashIcon } from '@vicons/ionicons5'
import { defineComponent } from 'vue'
export default {
export default defineComponent({
components: {
FlashIcon
}
}
})
```

View File

@ -30,26 +30,18 @@
```
```js
export default {
data () {
import { defineComponent, ref } from 'vue'
export default defineComponent({
setup () {
return {
value1: null,
value2: null,
value3: null,
value4: null,
value5: 'option',
value6: null,
value7: ['option'],
value8: null,
value9: null,
value10: null,
selectOptions: [
selectOptions: ref([
{
label: 'option',
value: 'option'
}
],
cascaderOptions: [
]),
cascaderOptions: ref([
{
label: 'option-1',
value: 'option-1',
@ -60,8 +52,8 @@ export default {
}
]
}
]
])
}
}
}
})
```