当前位置: 首页 > news >正文

女人和男人做爰网站/营销方案网站

女人和男人做爰网站,营销方案网站,对营销网站建设评估及分析,高端网络推广目录 一、基本用法 二、使用变量控制SwipeAction的开启状态 三、swipe-action 列表 官方示例:https://ext.dcloud.net.cn/plugin?id181 禁止左右滑动,只需要在uni-swipe-action-item组件的属性上添加 :disabled"true"即可 一、基本用法…

目录

一、基本用法

二、使用变量控制SwipeAction的开启状态

三、swipe-action 列表


 官方示例:https://ext.dcloud.net.cn/plugin?id=181 

禁止左右滑动,只需要在uni-swipe-action-item组件的属性上添加 :disabled="true"即可

一、基本用法

1、直接使用组件

<template><view><uni-swipe-action><uni-swipe-action-item :left-options="options2" :right-options="options1" @click="bindClick"><view class="content-box"><text>使用数据填充</text></view></uni-swipe-action-item></uni-swipe-action></view>
</template><script>
export default {components: {},data() {return {options1: [{text: '取消置顶'}],options2: [{text: '取消',style: {backgroundColor: '#007aff'}},{text: '确认',style: {backgroundColor: '#dd524d'}}]};},methods: {bindClick(e) {uni.showToast({title: `点击了${e.position === 'left' ? '左侧' : '右侧'} ${e.content.text}按钮`,icon: 'none'});}}
};
</script>
<style>
.content-box {flex: 1;height: 44px;line-height: 44px;padding: 0 15px;position: relative;background-color: #fff;border: 1px solid #f5f5f5;
}
</style>

2、使用插槽自定义样式

<template><view><uni-swipe-action><uni-swipe-action-item @click="bindClick"><template v-slot:left><view class="slot-button"><text @click="bindClick({position:'left',content:{text:'置顶'}})">置顶</text></view></template><view style="padding: 10px;background-color: white;">使用插槽</view><template v-slot:right><view class="slot-button">删除</view></template></uni-swipe-action-item></uni-swipe-action></view>
</template><script>export default {components: {},data() {return {};},methods:{bindClick(e) {uni.showToast({title: `点击了${e.position === 'left' ? '左侧' : '右侧'} ${e.content.text}按钮`,icon: 'none'});}}};
</script>
<style>.slot-button {display: flex;flex-direction: row;justify-content: center;align-items: center;padding: 0 20px;background-color: #ff5a5f;}
</style>

二、使用变量控制SwipeAction的开启状态

<template><view><button @click="setOpened">当前状态:{{isOpened}}</button><uni-swipe-action><uni-swipe-action-item :left-options="options" :right-options="options" :show="isOpened" :auto-close="false"><view class="content-box"><text>使用变量控制SwipeAction的开启状态</text></view></uni-swipe-action-item></uni-swipe-action></view>
</template><script>export default {components: {},data() {return {show: false,isOpened: 'none',options: [{text: 'haha'}]};},methods: {setOpened() {if (this.isOpened === 'none') {this.isOpened = 'left';return;}if (this.isOpened === 'left') {this.isOpened = 'right';return;}if (this.isOpened === 'right') {this.isOpened = 'none';return;}}}};
</script>
<style>
.content-box {flex: 1;height: 44px;line-height: 44px;padding: 0 15px;position: relative;background-color: #fff;border: 1px solid #f5f5f5;
}
</style>

三、swipe-action 列表

<template><view><uni-swipe-action><uni-swipe-action-item v-for="(item, index) in swipeList" :right-options="item.options" :key="item.id" @click="swipeClick($event, index)"><view class="content-box"><text>{{ item.content }}</text></view></uni-swipe-action-item></uni-swipe-action></view>
</template><script>
export default {components: {},data() {return {swipeList: [{id: 0,options: [{text: '添加',style: {backgroundColor: 'rgb(255,58,49)'}}],content: 'item1'},{id: 1,options: [{text: '置顶'},{text: '删除',style: {backgroundColor: 'rgb(255,58,49)'}}],content: 'item2'},{id: 2,options: [{text: '置顶'},{text: '标记为已读',style: {backgroundColor: 'rgb(254,156,1)'}},{text: '删除',style: {backgroundColor: 'rgb(255,58,49)'}}],content: 'item3'}]};},methods: {swipeClick(e, index) {let { content } = e;if (content.text === '删除') {uni.showModal({title: '提示',content: '是否删除',success: res => {if (res.confirm) {this.swipeList.splice(index, 1);} else if (res.cancel) {console.log('用户点击取消');}}});} else if (content.text === '添加') {if (this.swipeList.length < 6) {this.swipeList.push({id: new Date().getTime(),options: [{text: '置顶'},{text: '标记为已读',style: {backgroundColor: 'rgb(254,156,1)'}},{text: '删除',style: {backgroundColor: 'rgb(255,58,49)'}}],content: '新增' + new Date().getTime()});uni.showToast({title: `添加了一条数据`,icon: 'none'});} else {uni.showToast({title: `最多有六条数据`,icon: 'none'});}} else {uni.showToast({title: `点击了${e.content.text}按钮`,icon: 'none'});}}}
};
</script>
<style>
.content-box {flex: 1;height: 44px;line-height: 44px;padding: 0 15px;position: relative;background-color: #fff;border: 1px solid #f5f5f5;
}
</style>

 

 

http://www.lbrq.cn/news/746101.html

相关文章:

  • 网站建设加微信/守游网络推广平台
  • 网站建设整体方案/搜狗网站seo
  • 郑州新密网站建设/今天的新闻 联播最新消息
  • 做出网站/网页制作公司哪家好
  • 北京上地做网站/重庆网站关键词排名优化
  • 单页网站怎么做排名/google推广费用
  • 如何做贷款网站/营销软文小短文
  • 永久免费的网站地址/旺道优化软件
  • 电台网站建设要求/网络营销策划书
  • 网站公司策划书/交换链接营销
  • 手机网站建设团队/头条新闻今日头条官方版本
  • php源码分享网/网站标题优化排名
  • centos怎么做网站/西安专业网络推广平台
  • 荆州做网站/营销培训视频课程免费
  • 做购物网站哪种服务器好/软件开发培训中心
  • 做网站服务器多大的好/百度经验官网
  • 哪类网站流量大/十大销售管理软件排行榜
  • 如何做充值网站/网站制作公司排名
  • 诚信通国际网站怎么做/淘宝seo
  • 即墨做网站的/他达那非片能延时多久
  • 门户网站建设的步骤/查询网官网
  • 更改网站名称/企业员工培训课程有哪些
  • 通化网站建设公司/神马搜索推广
  • 外包类设计网站/百度指数分析案例
  • 黑彩网站建设需要什么东西/网络销售是什么工作内容
  • 那个网站做租赁好/磁力蜘蛛种子搜索
  • 产品seo怎么优化/网站seo优化
  • wordpress 用户接口/北京网站优化推广公司
  • 邢台地区网站建设/常用的网络推广方式有哪些
  • 网站建设与网页制作案例/aso优化运营
  • 点大餐饮独立版系统源码v1.0.3+uniapp前端+搭建教程
  • 数据迁移:如何从MySQL数据库高效迁移到Neo4j图形数据库
  • 华清远见25072班C语言学习day11
  • Python入门第7课:异常处理机制:让你的程序更健壮(try-except详解)
  • C语言网络编程TCP通信实战:客户端↔服务器双向键盘互动全流程解析
  • Gradle快速入门学习