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

深圳cms建站系统无锡网站建设优化公司

深圳cms建站系统,无锡网站建设优化公司,店面设计说明,千锋教育培训多少钱采用 uniapp 实现的一款步进指示器组件,展示业务步骤进度等内容,对外提供“前进”、“后退”方法,让用户可高度自定义所需交互,适配 web、H5、微信小程序(其他平台小程序未测试过,可自行尝试) 可…

采用 uniapp 实现的一款步进指示器组件,展示业务步骤进度等内容,对外提供“前进”、“后退”方法,让用户可高度自定义所需交互,适配 web、H5、微信小程序(其他平台小程序未测试过,可自行尝试)

可到插件市场下载尝试: https://ext.dcloud.net.cn/plugin?id=22603

  • 使用示例

请添加图片描述

使用示例

分别演示vue2、vue3 setup示例

vue2 写法

<template><view><view class="font-class">示例一:</view><view><view style="background-color: #272822; padding: 10px; margin: 10px; border-radius: 6px; color: #fff;"><wo-step-indicator :default-step="1" :options="steps" ref="stepIndicator1" @change="onChangeStep"></wo-step-indicator></view><view style="padding: 10px 0; margin: 0 10px;"><view v-show="step === 1"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #299B48; color: #fff; display: flex; justify-content: center; align-items: center;">步骤一</view></view><view v-show="step === 2"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color:#FF5739; color: #fff; display: flex; justify-content: center; align-items: center;">步骤二</view></view><view v-show="step === 3"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #41A5E1; color: #fff; display: flex; justify-content: center; align-items: center;">步骤三</view></view><view v-show="step === 4"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #272822; color: #fff; display: flex; justify-content: center; align-items: center;">步骤四</view></view></view></view><view class="font-class">示例二:</view><view style="display: flex; gap: 10px;"><view class="step-class" style="margin-right: 0px;"><wo-step-indicator   ref="stepIndicator2" @change="onChangeStep"></wo-step-indicator></view><view style="margin: 10px 10px 10px 0; flex: 1;"><view v-show="step === 1"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #299B48; color: #fff; display: flex; justify-content: center; align-items: center;">步骤一</view></view><view v-show="step === 2"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color:#FF5739; color: #fff; display: flex; justify-content: center; align-items: center;">步骤二</view></view><view v-show="step === 3"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #41A5E1; color: #fff; display: flex; justify-content: center; align-items: center;">步骤三</view></view><view v-show="step === 4"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #272822; color: #fff; display: flex; justify-content: center; align-items: center;">步骤四</view></view></view></view><view class="font-class">自定义操作:</view><view style="display: flex; gap: 10px; padding-top: 10px;"><button @click="prevStep" :disabled="step <= 1">上一步</button><button @click="nextStep" :disabled="step >= steps.length">下一步</button><button v-show="step >= steps.length">完成</button></view></view>
</template><script>
export default {data() {return {steps: [{index: '1',name: 'Step 1',},{index: '2',name: 'Step 2',},{index: '3',name: 'Step 3',},{index: '4',name: 'Step 4',},],step: 1,stepIndicator1: null,stepIndicator2: null};},methods: {prevStep() {this.$refs.stepIndicator1.prev();this.$refs.stepIndicator2.prev();},nextStep() {this.$refs.stepIndicator1.next();this.$refs.stepIndicator2.next();},onChangeStep(data) {this.step = data.step;console.log('Current step:', data);}}
};
</script><style>
.font-class {font-size: 12px;padding: 10px 10px 0 10px;
}
.step-class {background-color: #272822;color: #fff;padding: 15px;margin: 10px;border-radius: 6px;
}
</style>

vue3 setup写法

<template><view><view class="font-class">示例一:</view><view><view style="background-color: #272822; padding: 10px; margin: 10px; border-radius: 6px; color: #fff;"><wo-step-indicator :default-step="1" :options="steps" ref="stepIndicator1"@change="onChangeStep"></wo-step-indicator></view><view style="padding: 10px 0; margin: 0 10px;"><view v-show="step === 1"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #299B48; color: #fff; display: flex; justify-content: center; align-items: center;">步骤一</view></view><view v-show="step === 2"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color:#FF5739; color: #fff; display: flex; justify-content: center; align-items: center;">步骤二</view></view><view v-show="step === 3"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #41A5E1; color: #fff; display: flex; justify-content: center; align-items: center;">步骤三</view></view><view v-show="step === 4"><viewstyle="height: 100px; width: 100%; border-radius: 6px; background-color: #272822; color: #fff; display: flex; justify-content: center; align-items: center;">步骤四</view></view></view></view><view class="font-class">示例二:</view><view style="display: flex; gap: 10px;"><view class="step-class" style="margin-right: 0px;"><wo-step-indicator ref="stepIndicator2" @change="onChangeStep"></wo-step-indicator></view><view style="margin: 10px 10px 10px 0; flex: 1;"><view v-show="step === 1"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #299B48; color: #fff; display: flex; justify-content: center; align-items: center;">步骤一</view></view><view v-show="step === 2"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color:#FF5739; color: #fff; display: flex; justify-content: center; align-items: center;">步骤二</view></view><view v-show="step === 3"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #41A5E1; color: #fff; display: flex; justify-content: center; align-items: center;">步骤三</view></view><view v-show="step === 4"><viewstyle="height: 200px; width: 100%; border-radius: 6px; background-color: #272822; color: #fff; display: flex; justify-content: center; align-items: center;">步骤四</view></view></view></view><view class="font-class">自定义操作:</view><view style="display: flex; gap: 10px; padding-top: 10px;"><button @click="prevStep" :disabled="step <= 1">上一步</button><button @click="nextStep" :disabled="step >= steps.length">下一步</button><button v-show="step >= steps.length">完成</button></view></view>
</template><script setup>
import { ref } from 'vue';const steps = ref([{ index: '1', name: 'Step 1' },{ index: '2', name: 'Step 2' },{ index: '3', name: 'Step 3' },{ index: '4', name: 'Step 4' },
]);const step = ref(1);
const stepIndicator1 = ref(null);
const stepIndicator2 = ref(null);const prevStep = () => {stepIndicator1.value.prev();stepIndicator2.value.prev();
};const nextStep = () => {stepIndicator1.value.next();stepIndicator2.value.next();
};const onChangeStep = (data) => {step.value = data.step;console.log('Current step:', data);
};
</script><style>
.font-class {font-size: 12px;padding: 10px 10px 0 10px;
}.step-class {background-color: #272822;color: #fff;padding: 15px;margin: 10px;border-radius: 6px;
}
</style>
http://www.dtcms.com/wzjs/315834.html

相关文章:

  • mvc网站开发 案例视频参考消息今天新闻
  • 建站新体验做网络推广为什么会被抓
  • 设计做网站免费搭建网站的软件
  • 常州做网站哪家便宜北京网站优化价格
  • 随州网站建设价格网站优化怎么操作
  • 手机做网站视频微信软文广告经典案例
  • 大连做网站仟亿科技新型实体企业100强
  • 页网站设计上海搜索引擎推广公司
  • 做门户网站的意义在哪网络营销业务流程
  • 设计的商城网站建设seo搜索引擎优化工程师招聘
  • 阿里云 全国网站建设优化设计电子版在哪找
  • 浙江省建设信息港网站搜索引擎seo关键词优化效果
  • 郑州一凡网站建设做网站用什么软件
  • 在自己的网站做外链北京seo优化多少钱
  • 免费企业黄页网站网址超级优化
  • 携程网站建设的基本特点百度推广没有一点效果
  • 自己做优惠劵网站杭州互联网公司排名榜
  • 南京计算机培训机构哪个最好长沙seo管理
  • 优惠券的网站制作seo工资服务
  • 石家庄医院网站建设北京seo收费
  • 电商网站如何提高转化率微信小程序开发文档
  • 汕头站扩建进展宣传推广方案范文
  • 天津网站建设推广个人网页模板
  • 做兼职什么网站靠谱小广告清理
  • 怎么做室内设计公司网站佛山市seo推广联系方式
  • 龙岩网站建设亿网行百度之家
  • 济南优化网站厂家友情链接检测
  • 徐州市网站互联网项目推广平台有哪些
  • 网站收藏以后怎样做桌面快捷键关键词优化公司靠谱推荐
  • 郑州网站优化公司排名苏州seo网站管理