This repository was archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathTextField.vue
57 lines (56 loc) · 2.54 KB
/
TextField.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template>
<docs-content title='TextField'>
<div slot='Overview' v-html='overviewContent'></div>
<div slot='Variants'>
<docs-code-block title='Default TextField' :code='defaultCode'>
<ou-text-field label='Name' />
</docs-code-block>
<docs-code-block title='Multiline TextField' :code='multipleCode'>
<ou-text-field type='multiline' label='Name' />
</docs-code-block>
<docs-code-block title='Placeholder TextField' :code='placeholderCode'>
<ou-text-field placeholder='Given name' />
</docs-code-block>
<docs-code-block title='Underlined TextField' :code='underlinedCode'>
<ou-text-field type='underlined' label='Name' />
</docs-code-block>
<docs-code-block title='Disabled TextField' :code='disabledCode'>
<ou-text-field label='Name' disabled />
</docs-code-block>
</div>
<div slot='Implementation'>
<docs-table type='props' :data='textFieldProps' name='TextField' />
<docs-table type='events' :data='textFieldEvents' name='TextField' />
</div>
</docs-content>
</template>
<script>
import overviewContent from '../markdown/text_field/overview.md';
import defaultCode from '../markdown/text_field/defaultCode.md';
import multipleCode from '../markdown/text_field/multipleCode.md';
import placeholderCode from '../markdown/text_field/placeholderCode.md';
import underlinedCode from '../markdown/text_field/underlinedCode.md';
import disabledCode from '../markdown/text_field/disabledCode.md';
export default {
data() {
return {
overviewContent,
defaultCode,
multipleCode,
placeholderCode,
underlinedCode,
disabledCode,
textFieldProps: [
{ name: 'v-model', type: 'String', required: 'false', description: 'bind value to the textField' },
{ name: 'type', type: 'String', required: 'false', acceptedValue: 'multiline, placeholder, underlined', description: 'the type of the textField' },
{ name: 'input-type', type: 'String', defaultValue: 'text', required: 'false', acceptedValue: 'text, password, file', description: 'the input type of the textField' },
{ name: 'label', type: 'String', required: 'false', description: 'the label of the textField' },
{ name: 'disabled', type: 'Boolean', required: 'false', defaultValue: 'false', description: 'if the textField is disabled' }
],
textFieldEvents: [
{ name: 'change', description: 'the callback function when value changed' }
]
};
}
};
</script>