UNPKG

wx-drag-g

Version:

用于小程序的拖拽排序组件

62 lines (52 loc) 1.03 kB
# 名称 wx-drag-g # 版本 V 1.0.1 # 描述 用于小程序的拖拽排序组件,仅适用于微信小程序。使用场景基于Vue技术栈开发微信小程序,以组件的方式引入,用法与Vue组件方式相似,可以适配uni-app开发机制。 # 使用 - app.json配置 ``` "usingComponenets":{ "wx-drag":"/wxcomponents/wx-drag/index.js", } ``` - 模板 ``` <WxDrag :defaultImgList="collectApp" :style="dragStyle" @change="updateChange" @remove="clearApp"></WxDrag> ``` - 组件引入 ``` import WxDrag from '@/wxcomponents/wx-drag/index.js' export default { ... components: { WxDrag }, data() { return { collectApp: [], ... }; }, //需要设置容器高度比如 computed:{ dragStyle(){ return {'height':'300px'} } }, methods: { updateChange(data){ // TODO }, clearHandler(data) { // TODO }, } ... }) ``` # 使用 ``` npm i wx-drag-g ```