mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[improvement] use component name (#2450)
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import createSfc from '../utils/create';
|
||||
import createBem from '../utils/bem';
|
||||
import { use, isDef } from '../utils';
|
||||
import Tag from '../tag';
|
||||
|
||||
const bem = createBem('van-card');
|
||||
|
||||
export default createSfc({
|
||||
name: 'card',
|
||||
const [sfc, bem] = use('card');
|
||||
|
||||
export default sfc({
|
||||
props: {
|
||||
tag: String,
|
||||
desc: String,
|
||||
@@ -25,7 +22,7 @@ export default createSfc({
|
||||
},
|
||||
|
||||
render(h) {
|
||||
const { thumb, isDef, $slots: slots } = this;
|
||||
const { thumb, $slots: slots } = this;
|
||||
|
||||
const Thumb = (slots.thumb || thumb) && (
|
||||
<a href={this.thumbLink} class={bem('thumb')}>
|
||||
|
Reference in New Issue
Block a user