[Improvement] ContactCard add 'editable' prop (#435)

This commit is contained in:
neverland
2017-12-14 14:44:27 +08:00
committed by GitHub
parent e008aa124d
commit 5a96838326
6 changed files with 53 additions and 2 deletions
+2
View File
@@ -47,6 +47,7 @@ Locale.add({
custom: '自定义',
loading: '加载状态',
disabled: '禁用状态',
uneditable: '不可编辑',
basicUsage: '基础用法',
advancedUsage: '高级用法'
},
@@ -67,6 +68,7 @@ Locale.add({
custom: 'Custom',
loading: 'Loading',
disabled: 'Disabled',
uneditable: 'Uneditable',
basicUsage: 'Basic Usage',
advancedUsage: 'Advanced Usage'
}
+9
View File
@@ -27,6 +27,15 @@
/>
</van-popup>
</demo-block>
<demo-block :title="$t('uneditable')">
<van-contact-card
type="edit"
:name="list[0].name"
:tel="list[0].tel"
:editable="false"
/>
</demo-block>
</demo-section>
</template>
+11
View File
@@ -119,6 +119,17 @@ export default {
};
```
#### Uneditable
```html
<van-contact-card
type="edit"
name="张三"
tel="13000000000"
:editable="false"
/>
```
### ContactCard API
| Attribute | Description | Type | Default | Accepted Values |
+11
View File
@@ -118,6 +118,17 @@ export default {
};
```
#### 不可编辑
```html
<van-contact-card
type="edit"
name="张三"
tel="13000000000"
:editable="false"
/>
```
### ContactCard API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |