Skip to content

Commit

Permalink
docs(ui/input): 完善input文档
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Mar 28, 2021
1 parent 87d3291 commit fd50ec4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/varlet-ui/src/input/example/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Input from '..'
import Button from '../../button'
import Icon from '../../icon'
import AppType from '@varlet/cli/site/mobile/components/AppType'
import { ref } from 'vue'
import { ref, watch } from 'vue'
import { use, pack } from './locale'
import { watchLang } from '../../utils/components'
Expand All @@ -57,14 +57,18 @@ export default {
const value = ref('')
const value2 = ref('')
const value3 = ref('')
const value4 = ref('这段话无法被用户修改')
const value5 = ref('这段话可以被直接清除')
const value4 = ref('')
const value5 = ref('')
const value6 = ref('')
const value7 = ref('')
const value8 = ref('')
const value9 = ref('')
watchLang(use)
watchLang((lang) => {
use(lang)
value4.value = pack.value.readonlyText
value5.value = pack.value.clearableText
})
return {
pack,
Expand Down
2 changes: 2 additions & 0 deletions packages/varlet-ui/src/input/example/locale/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export default {
validate: 'Validate',
placeholder: 'Please enter text',
maxMessage: 'Text length must be greater than 6',
readonlyText: 'Readonly Text',
clearableText: 'Clearable Text',
}
2 changes: 2 additions & 0 deletions packages/varlet-ui/src/input/example/locale/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ export default {
validate: '字段校验',
placeholder: '请输入文本',
maxMessage: '文本长度必须大于6',
readonlyText: '只读文本',
clearableText: '可清除文本',
}

0 comments on commit fd50ec4

Please sign in to comment.