Skip to content

Swipeable List ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

  • Design review
    Studio inbox
  • Release notes
    Studio inbox
  • Project brief
    Studio inbox

用法 ​

vue
<script setup lang="ts">
import { ref } from 'vue'
import { SwipeableList } from 'beui-vue'
const result = ref('')
const rows = ['Design review','Release notes','Project brief'].map((title,index) => ({
  id:String(index),title,description:'Studio inbox',leftActions:[{id:'save',label:'Save'}],rightActions:[{id:'archive',label:'Archive'}],
}))
</script>
<template><div><SwipeableList :items="rows" @action="result=`${$event.action.label} · ${$event.item.title}`" /><output>{{ result }}</output></div></template>

API ​

items 的 leftActions 与 rightActions 定义两侧操作。支持滑动与键盘按钮,@action 返回行、操作及方向。

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。