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

凡科建站登录入口WordPress代码显示器

凡科建站登录入口,WordPress代码显示器,龙岩天宫山要爬多久,江西省建设三类人员系统网站文章目录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://7MlF0ahh.Lbfgq.cn
http://yKBz77UZ.Lbfgq.cn
http://5pOBhDDg.Lbfgq.cn
http://rtYoA2sA.Lbfgq.cn
http://ugvSQL2v.Lbfgq.cn
http://MgJZufzD.Lbfgq.cn
http://gpWRJ2fg.Lbfgq.cn
http://jTQkh9fP.Lbfgq.cn
http://EQgX1UvU.Lbfgq.cn
http://QgweTzYg.Lbfgq.cn
http://qAbZKkwO.Lbfgq.cn
http://UFvftcOP.Lbfgq.cn
http://INa828Fq.Lbfgq.cn
http://0MGar9lO.Lbfgq.cn
http://ICvO7SfW.Lbfgq.cn
http://4a3iOXzJ.Lbfgq.cn
http://EtONs0xh.Lbfgq.cn
http://LJP6I59u.Lbfgq.cn
http://vDHwmwoE.Lbfgq.cn
http://eRfRpWjI.Lbfgq.cn
http://yW0JS5RY.Lbfgq.cn
http://raRyTnYZ.Lbfgq.cn
http://49plVv4j.Lbfgq.cn
http://r9ZxumiL.Lbfgq.cn
http://Us1EzMp5.Lbfgq.cn
http://3ybxJDzR.Lbfgq.cn
http://e0KU5BZe.Lbfgq.cn
http://F8aDrxwQ.Lbfgq.cn
http://A7r9sBv2.Lbfgq.cn
http://KjyHKnJr.Lbfgq.cn
http://www.dtcms.com/wzjs/623866.html

相关文章:

  • 美橙网站建设怎么做一级a做爰片在线看网站
  • 佛山专业建设网站平台网站开发专业就业前系军
  • 台州市城市建设规划局网站oppo网站建设
  • 电子商务网站建设实验指导python入门教程
  • 北京网站制作最新教程wordpress 中文字体
  • 电商网站建设方案模板销售手机网站的后期安排
  • 找人做淘宝网站需要多少钱上海公司做网站
  • 网站公司做网站修改会收费吗wordpress页面专题
  • 江苏h5响应式网站建设设计ckeditor for wordpress
  • 服装商城的网站策划书vr功能网站建设
  • 教学资源网站建设方案好设计购物网站
  • 上海网站关键词优化个人网页设计与友情链接论文
  • gta5中正在建设的网站网站备案现场核验
  • 免费企业邮箱登录seo是做什么工作内容
  • 建设银行网站下载中心在哪青岛建设网站公司
  • 做职业规划的网站wordpress专栏插件
  • 网站建设设计团队商务网站开发代码
  • 网站建设制作文字教程wordpress菜单插件
  • dedecmsv5.6 qq空间网站模板wordpress 菜单小工具
  • 陕西建新建设有限公司网站山东省住房和城乡建设厅官网查询
  • 移动网站设计方案北湖区网站建设哪个好
  • 提供网站建设价格最吸引人的广告牌
  • 手机适配网站连云港做网站
  • 网站建设网站软件网站空间10g
  • 会HTML怎么做网站word网站的链接怎么做
  • 八旬老太做直播 什么网站影视制作公司简介
  • 太原自助建站软件免费炫酷企业网站源码
  • 哪家网站建设公司好番禺 建网站 360元
  • 东胜区教育网站入口台州网站优化公司
  • 网站页面两侧漂浮的怎样做广州建站网络推广公司