Tag: update document

This commit is contained in:
陈嘉涵
2017-08-31 10:50:14 +08:00
parent a2a8523da1
commit 1f645422ca
2 changed files with 48 additions and 51 deletions

View File

@@ -1,21 +1,21 @@
<template>
<span class="van-tag" :class="[type ? `van-tag--${type}`: '', { 'is-plain': plain, 'is-mark': mark }]">
<span :class="['van-tag', { [`van-tag--${type}`]: type, 'is-plain': plain, 'is-mark': mark }]">
<slot></slot>
</span>
</template>
<script>
const ALLOW_TYPE = ['danger', 'success', 'primary'];
const ALLOW_TYPE = ['danger', 'success', 'primary'];
export default {
name: 'van-tag',
props: {
type: {
type: String,
validator: val => ~ALLOW_TYPE.indexOf(val)
},
mark: Boolean,
plain: Boolean
}
};
export default {
name: 'van-tag',
props: {
type: {
type: String,
validator: val => ~ALLOW_TYPE.indexOf(val)
},
mark: Boolean,
plain: Boolean
}
};
</script>