题外话:
我另一篇文章写了VantUI 的公共样式选择组件,比这个组件完善一些,个人比较喜欢VantUI
组件地址:https://blog.csdn.net/qq_38832375/article/details/103161145
正题:
组件是我自己在项目中用到时封装的,适用于列表单选,选中值回传给父组件。其他用途,大家自行发挥,哈哈
有不足处,大家有好的建议可以在评论区留言。
先贴上源代码
<template>
<mu-container>
<!--选择弹窗-->
<mu-dialog transition="slide-right" fullscreen :open.sync="openDialog">
<mu-paper class="demo-paper gn-dep-serch" :z-depth="0">
<!--<button class="gn-dep-search-but"/>-->
<div class="gn-but-div">
<input class="gn-dep-input" placeholder="输入名称或编码搜索"/>
</div>
</mu-paper>
<div class="gn-dialog-body">
<div v-for="data,index in dataList" style="position: relative;">
<span class="gn-radio-number" >{
{data.number}}</span>