mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
Tag: update document
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user