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

制作收款网站百度一下首页网址百度

制作收款网站,百度一下首页网址百度,python 做网站优势,全国工业设计大赛官网文章目录1.最终效果预览2.快速选择组件封装3.弹框组件封装4.组件逻辑实现5.组件样式6.页面引入1.最终效果预览 2.快速选择组件封装 <uv-cell :border"isShowBorder"><template v-slot:title><text class"title-key">{{ title }}</te…

文章目录

  • 1.最终效果预览
  • 2.快速选择组件封装
  • 3.弹框组件封装
  • 4.组件逻辑实现
  • 5.组件样式
  • 6.页面引入

1.最终效果预览

QQ_1752218066233

QQ_1752218119422

QQ_1752218139510

2.快速选择组件封装

<uv-cell :border="isShowBorder"><template v-slot:title><text class="title-key">{{ title }}</text></template><template v-slot:label><text style="font-size: 28rpx;color: #999;">{{content}}</text></template><template v-slot:value><view class="content"><view class="content-tag" v-for="(item, index) in showList" :key="index"><uv-tags :text="item.name" :plain="!item.checked" :name="index" shape="circle"@click="handleTagClick(index)"></uv-tags></view></view></template><template v-slot:right-icon><view class="content-tag" v-if="showList.length < list.length"><uv-icon size="30rpx" name="arrow-right" @click="showMoreOptions"></uv-icon></view></template></uv-cell>

基于 uv-ui 的行组件实现的快速选择,默认展示前三个值

3.弹框组件封装

<uv-popup ref="showPopup" mode="top"><view class="popup-content"><view class="popup-title">请选择</view><uv-radio-group v-model="selectedIndex" @change="handleRadioChange"><view v-for="(item, index) in list" :key="index" style="margin-right: 10px;"><uv-radio :name="index">{{ item.name }}</uv-radio></view></uv-radio-group><view class="popup-actions"><uv-button type="primary" @click="confirmSelection">确定</uv-button><uv-button @click="closePopup">取消</uv-button></view></view></uv-popup>

这两个放一个页面了,没必要再单独封装一个弹框组件了

4.组件逻辑实现

import {defineProps,defineEmits,computed,ref} from 'vue'const props = defineProps({isShowBorder: {type: Boolean,required: true},title: {type: String,required: true},content: {type: String,required: true},list: {type: Array,required: true},maxShow: {type: Number,default: 3}})const emit = defineEmits(['tagClick', 'tagMoreClick', 'selectionConfirmed'])const showList = computed(() => {return props.list.slice(0, props.maxShow)})const allList = computed(() => {return props.list})const handleTagClick = (index) => {emit('tagClick', index)}const handleMoreClick = () => {emit('tagMoreClick')}const showPopup = ref()const selectedIndex = ref({})const showMoreOptions = () => {showPopup.value.open()}const handleRadioChange = (index) => {selectedIndex.value = index}const confirmSelection = () => {emit('selectionConfirmed', selectedIndex.value)closePopup()}const closePopup = () => {showPopup.value.close()}

5.组件样式

.title-key {width: 150rpx;}.content {display: flex;flex-wrap: wrap;}.content-tag {margin: 0 0 10rpx 10rpx;}.popup-content {padding: 20rpx;}.popup-title {font-size: 32rpx;font-weight: bold;margin-bottom: 20rpx;}.popup-actions {display: flex;justify-content: space-evenly;margin-top: 20rpx;}

6.页面引入

import RowSel from '@/components/rowSel.vue'<RowSel :isShowBorder="true" :title="'维修大类'" :content="largeContent" :list="wxLargeAllList"@tagClick="radio1Click" @selectionConfirmed="tagMore1Click">
</RowSel>
<RowSel :title="'维修小类'" :content="smallContent" :list="wxSmallAllList" @tagClick="radio2Click"@selectionConfirmed="tagMore2Click">
</RowSel>const radio1Click = (index) => {}const radio2Click = (index) => {}const tagMore1Click = (index) => {radio1Click(index)}const tagMore2Click = (index) => {radio2Click(index)}

在点击事件中实现自己的逻辑选择即可

http://www.dtcms.com/wzjs/75294.html

相关文章:

  • 北京app建设 网站开发公司买链接网
  • 上海平台网站建设公司排名在线bt磁力搜索
  • 做新年公告图片的网站真实的优化排名
  • 做游戏的av迅雷下载网站惠州关键词排名优化
  • 一呼百应推广平台安卓优化大师清理
  • google网站怎么做流量深圳 网站制作
  • 哪几个网站做acm题目网络营销怎么做推广
  • 网站费计入什么科目如何进行关键词优化工作
  • 网站物理结构百度网站推广怎么做
  • 办公室装修设计方案范本申泽seo
  • wordpress 主题 小众杭州seo营销
  • 网页设计网站制作流程网站整站优化
  • 什么叫seo推广重庆黄埔seo整站优化
  • 域名网站有哪些百度快照手机版
  • b2c网站建设seo网络推广教程
  • 网站建设及验收标准东莞网站seo优化
  • 奥维网络高端网站建设公司最近军事新闻热点大事件
  • 网站全屏视频怎么做短视频精准获客
  • 呼和浩特北京网站建设搜狗推广登录平台官网
  • 温州红酒网站建设石家庄限号
  • 专门做二手房车的网站正规的关键词优化软件
  • 有想做企业网站建设百度小说风云榜总榜
  • 重庆巴南网站建设站长统计在线观看
  • 在婚恋网站做销售好吗白杨seo
  • 网站文章更新要求seo基础知识包括什么
  • 我的世界自己做披风网站国外最好的免费建站
  • 网站海报做一张多少钱整站seo服务
  • 可以做动画的网站seo品牌优化
  • 如何在网站插入地图博客推广工具
  • 购物商城网页模板怀来网站seo