引入 cell swipe

示例
    <template>  
      <div class="page-cell">  
        <div class="page-title">Cell Swipe</div>  
        <mt-cell-swipe
          :key="index" v-for="(n,index) in 10"
          :right="[
                {
                    content: '删除',
                    style: { background: '#ff7900', color: '#fff'},
                    handler: () => deleteSection(index)
                }
            ]"
          title="11111">
        </mt-cell-swipe>  
      </div>  
    </template>  
      
   
<script>
  export default {
    methods: {
      deleteSection(index) {
        console.log(index);
      },

    }
  };
</script>
显示

左滑出现删除

击删除按钮,显示索引



Logo

前往低代码交流专区

更多推荐