mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-18 12:11:07 +00:00
Improve documentation
This commit is contained in:
parent
dff915d350
commit
181762807f
3 changed files with 14 additions and 11 deletions
|
|
@ -4,9 +4,9 @@ import mdTextarea from './mdTextarea.vue';
|
|||
import mdInputContainerTheme from './mdInputContainer.theme';
|
||||
|
||||
export default function install(Vue) {
|
||||
Vue.component('md-input-container', Vue.extend(mdInputContainer));
|
||||
Vue.component('md-input', Vue.extend(mdInput));
|
||||
Vue.component('md-textarea', Vue.extend(mdTextarea));
|
||||
Vue.component('md-input-container', mdInputContainer);
|
||||
Vue.component('md-input', mdInput);
|
||||
Vue.component('md-textarea', mdTextarea);
|
||||
|
||||
window.VueMaterial.styles.push(mdInputContainerTheme);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<form novalidate @submit.stop.prevent="submit">
|
||||
<md-input-container>
|
||||
<label>Initial value</label>
|
||||
<md-input value="My initial value"></md-input>
|
||||
<md-input v-model="initialValue"></md-input>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
|
|
@ -19,6 +19,11 @@
|
|||
<md-input-container>
|
||||
<label>Required</label>
|
||||
<md-input required></md-input>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container class="md-input-invalid">
|
||||
<label>Error</label>
|
||||
<md-input required></md-input>
|
||||
|
||||
<span class="md-error">Validation message</span>
|
||||
</md-input-container>
|
||||
|
|
@ -41,18 +46,14 @@
|
|||
<md-input-container>
|
||||
<label>Character counter - Textarea</label>
|
||||
<md-textarea maxlength="70"></md-textarea>
|
||||
|
||||
<span class="md-error">Max length reached</span>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
<label>Character counter - Input</label>
|
||||
<md-input maxlength="20"></md-input>
|
||||
|
||||
<span class="md-error">Max length reached</span>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container v-md-theme="'blue'">
|
||||
<md-input-container v-md-theme="'green'">
|
||||
<label>Themable - Input</label>
|
||||
<md-input></md-input>
|
||||
</md-input-container>
|
||||
|
|
@ -73,8 +74,10 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
|
||||
data() {
|
||||
return {
|
||||
initialValue: 'My initial value'
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue