mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
directory adjust: delete entry index.js
This commit is contained in:
47
packages/cell/index.vue
Normal file
47
packages/cell/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<a :class="['van-cell', { 'van-cell--required': required }]" :href="url" @click="$emit('click')">
|
||||
<div
|
||||
class="van-cell__title"
|
||||
v-if="this.$slots.title || title"
|
||||
>
|
||||
<slot name="icon">
|
||||
<i v-if="icon" class="van-icon" :class="'van-icon-' + icon"></i>
|
||||
</slot>
|
||||
<slot name="title">
|
||||
<span class="van-cell__text" v-text="title"></span>
|
||||
<span class="van-cell__label" v-if="label" v-text="label"></span>
|
||||
</slot>
|
||||
</div>
|
||||
<div
|
||||
class="van-cell__value"
|
||||
v-if="value || this.$slots.default"
|
||||
:class="{
|
||||
'van-cell__value--link': isLink,
|
||||
'van-cell__value--alone': !this.$slots.title && !title && !label
|
||||
}"
|
||||
>
|
||||
<slot>
|
||||
<span v-text="value"></span>
|
||||
</slot>
|
||||
</div>
|
||||
<slot name="right-icon">
|
||||
<i class="van-cell__right-icon van-icon van-icon-arrow" v-if="isLink"></i>
|
||||
</slot>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'van-cell',
|
||||
|
||||
props: {
|
||||
icon: String,
|
||||
title: String,
|
||||
value: [String, Number],
|
||||
url: String,
|
||||
label: String,
|
||||
isLink: Boolean,
|
||||
required: Boolean
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user