directory adjust: delete entry index.js

This commit is contained in:
陈嘉涵
2017-08-22 17:52:16 +08:00
parent 707b48aa61
commit c494292e3f
88 changed files with 587 additions and 713 deletions

70
packages/popup/index.vue Normal file
View File

@@ -0,0 +1,70 @@
<template>
<transition :name="currentTransition">
<div v-show="currentValue" class="van-popup" :class="[position ? 'van-popup--' + position : '']">
<slot></slot>
</div>
</transition>
</template>
<script>
import Popup from '../mixins/popup';
export default {
name: 'van-popup',
mixins: [Popup],
props: {
overlay: {
default: true
},
lockOnScroll: {
default: false
},
closeOnClickOverlay: {
default: true
},
transition: {
type: String,
default: 'popup-slide'
},
position: {
type: String,
default: ''
}
},
data() {
return {
currentValue: false,
currentTransition: this.transition
};
},
watch: {
currentValue(val) {
this.$emit('input', val);
},
value(val) {
this.currentValue = val;
}
},
beforeMount() {
if (this.transition !== 'popup-fade') {
this.currentTransition = `popup-slide-${this.position}`;
}
},
mounted() {
if (this.value) {
this.currentValue = true;
this.open();
}
}
};
</script>