Merge pull request #747 from vuematerial/issue-744

Issue 744 - Added readonly attr on mdInput and mdTextarea
This commit is contained in:
Pablo Henrique 2017-05-21 18:31:11 -03:00 committed by GitHub
commit 1450ea7f86
4 changed files with 21 additions and 1 deletions

View file

@ -100,6 +100,12 @@
<md-table-cell><code>Number</code></md-table-cell>
<md-table-cell>Sets the maxlength and enable the text counter.</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>readonly</md-table-cell>
<md-table-cell><code>Boolean</code></md-table-cell>
<md-table-cell>Sets the component to read only mode.</md-table-cell>
</md-table-row>
</md-table-body>
</md-table>
</api-table>
@ -150,6 +156,12 @@
<md-table-cell><code>Number</code></md-table-cell>
<md-table-cell>Sets the maxlength and enable the text counter.</md-table-cell>
</md-table-row>
<md-table-row>
<md-table-cell>readonly</md-table-cell>
<md-table-cell><code>Boolean</code></md-table-cell>
<md-table-cell>Sets the component to read only mode.</md-table-cell>
</md-table-row>
</md-table-body>
</md-table>
</api-table>
@ -163,6 +175,11 @@
<label>Initial value</label>
<md-input v-model="initialValue"></md-input>
</md-input-container>
<md-input-container>
<label>Initial value (read only)</label>
<md-input v-model="initialValue" readonly></md-input>
</md-input-container>
<md-input-container>
<label>With label</label>

View file

@ -9,7 +9,8 @@ export default {
required: Boolean,
maxlength: [Number, String],
name: String,
placeholder: String
placeholder: String,
readonly: Boolean
},
data() {
return {

View file

@ -7,6 +7,7 @@
:required="required"
:placeholder="placeholder"
:maxlength="maxlength"
:readonly="readonly"
@focus="onFocus"
@blur="onBlur"
@input="onInput"

View file

@ -6,6 +6,7 @@
:required="required"
:placeholder="placeholder"
:maxlength="maxlength"
:readonly="readonly"
@focus="onFocus"
@blur="onBlur"
@input="onInput"></textarea>