mirror of
https://github.com/youzan/vant.git
synced 2026-05-05 01:00:55 +08:00
directory adjust: delete entry index.js
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
import SwipeItem from '../swipe/src/swipe-item';
|
||||
|
||||
export default SwipeItem;
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="van-swipe-item">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'van-swipe-item',
|
||||
|
||||
beforeCreate() {
|
||||
this.$parent.swipes.push(this);
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
const index = this.$parent.swipes.indexOf(this)
|
||||
if (index > -1) {
|
||||
this.$parent.swipes.splice(index, 1)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user