[Improvement] more component use bem mixin (#932)

This commit is contained in:
neverland
2018-04-24 23:33:51 +08:00
committed by GitHub
parent 91163b2f14
commit c012a65ba3
23 changed files with 110 additions and 119 deletions

View File

@@ -1,6 +1,6 @@
<template>
<transition :name="currentTransition">
<div v-show="value" class="van-popup" :class="{ [`van-popup--${position}`]: position }">
<div v-show="value" :class="b({ [position]: position })">
<slot />
</div>
</transition>
@@ -31,12 +31,10 @@ export default create({
}
},
data() {
const transition = this.transition || (this.position === '' ? 'van-fade' : `popup-slide-${this.position}`);
return {
currentValue: false,
currentTransition: transition
};
computed: {
currentTransition() {
return this.transition || (this.position === '' ? 'van-fade' : `popup-slide-${this.position}`);
}
}
});
</script>