mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
directory adjust: delete entry index.js
This commit is contained in:
23
packages/tag/index.vue
Normal file
23
packages/tag/index.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<span class="van-tag" :class="[type ? `van-tag--${type}`: '', { 'is-plain': plain, 'is-mark': mark }]">
|
||||
<slot></slot>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const ALLOW_TYPE = ['danger', 'success', 'primary'];
|
||||
|
||||
export default {
|
||||
name: 'van-tag',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
validator: function (val) {
|
||||
return ~ALLOW_TYPE.indexOf(val);
|
||||
}
|
||||
},
|
||||
mark: Boolean,
|
||||
plain: Boolean
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user