当前位置:网站首页>uni-app吸顶固定样式
uni-app吸顶固定样式
2022-06-26 05:13:00 【黑白两客】
<template>
<view class="full">
<view class="sticky-box">
<!-- 搜索 -->
<uni-search-bar class="unisearchbar" radius="5" placeholder="请输入搜索关键词" clearButton="auto" bgColor="#EEEEEE" cancelButton="none" @input="input" />
<!-- 搜索 -->
<view class="doctor">
<!-- 全部科室 -->
<view class="doctor_l">
<view class="uni-list-cell-db">
<picker @change="bindPickerChange" :value="form.id" :range-key="'name'" :range="deptLists">
<text v-if="form.id" class="uni-input">{
{deptLists.find(item => item.id == form.id).name}}</text>
<text v-else style="color: #000;">全部科室</text>
<uni-icons type="bottom" size="15"></uni-icons>
</picker>
</view>
</view>
<!-- 全部职称 -->
<view class="doctor_r">
<view class="uni-list-cell-db">
<picker @change="bindPickerChangeone" :value="form.infoCode" :range-key="'infoName'" :range="findByTypeCodeList">
<text v-if="form.infoCode" class="uni-input">{
{findByTypeCodeList.find(item => item.infoCode == form.infoCode).infoName}}</text>
<text v-else style="color: #000;">全部职称</text>
<uni-icons type="bottom" size="15"></uni-icons>
</picker>
</view>
</view>
</view>
</view>
<view>
<doctorList :doctorList="doctorList"></doctorList>
</view>
</view>
</template>
<script> import doctorList from '../../components/doctorList/index.vue' import {
tranfrom } from '@/utils/util.js' import {
selectUserList, selectDeptList } from '@/api/home' export default {
components: {
doctorList }, data() {
return {
//选择切换 form: {
id: '', infoCode: '' }, // 初始值 datesize: {
pageNum: 1, pageSize: 10, params: {
userName: "", deptId: "", ysZc: "" } }, deptLists: [], findByTypeCodeList: [], doctorList: [], }; }, watch: {
// 全部职能 '$store.state.findByTypeCode'(newVal, oldVal) {
this.findByTypeCodeList = this.$store.state.findByTypeCode }, // 全部科室 '$store.state.selectDeptList'(newVal, oldVal) {
this.deptLists = this.$store.state.selectDeptList } }, created() {
this.$store.commit('findByTypeCode') this.$store.commit('selectDeptList') this.fetchSwiperList(this.datesize) }, onPullDownRefresh() {
this.form.id = "" this.form.infoCode = "" this.datesize.pageSize = 10 this.fetchSwiperList(this.datesize) }, onReachBottom() {
this.datesize.pageSize = this.datesize.pageSize + 5 this.fetchSwiperList(this.datesize) }, methods: {
async fetchSwiperList(date) {
await selectUserList(date).then(res => {
res.data.rows.map(it => {
it.ysZc = tranfrom(this.findByTypeCodeList,it.ysZc) }) this.doctorList = res.data.rows }) }, input(res) {
this.fetchSwiperList({
"pageNum": 1, "pageSize": 9999, "params": {
"userName": res, "deptId": "", "ysZc": "" } }) }, // 选择全部科室 bindPickerChange(e) {
this.form.id = this.deptLists[e.detail.value].id this.fetchSwiperList({
"pageNum": 1, "pageSize": 9999, "params": {
"userName": "", "deptId": this.form.id, "ysZc": "" } }) }, // 选择全部职称 bindPickerChangeone(e) {
this.form.infoCode = this.findByTypeCodeList[e.detail.value].infoCode this.fetchSwiperList({
"pageNum": 1, "pageSize": 999, "params": {
"userName": "", "deptId": "", "ysZc": this.form.infoCode } }) }, } } </script>
<style lang="scss" scoped> .full {
width: 750upx; margin: 0; padding: 0; } .sticky-box {
/* #ifndef APP-PLUS-NVUE */ // display: flex; position: -webkit-sticky; /* #endif */ position: sticky; top: var(--window-top); z-index: 99; flex-direction: row; margin: 0px; // padding: 15px 0 15px 0; background-color: #F4F5F6; // border-bottom-style: solid; // border-bottom-color: #E2E2E2; } .unisearchbar {
width: 100%; } .doctor {
height: 100rpx; display: flex; justify-content: space-around; align-items: center; border-top: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; .doctor_l {
width: 50%; height: 100rpx; line-height: 100rpx; text-align: center; border-right: 1px solid #e1e1e1; } .doctor_r {
width: 50%; height: 100rpx; line-height: 100rpx; text-align: center; } } .textcenter {
text-align: center; font-size: 18px; } </style>
边栏推荐
- As promised: Mars, the mobile terminal IM network layer cross platform component library used by wechat, has been officially open source
- Beidou navigation technology and industrial application of "chasing dreams in space and feeling for Beidou"
- Tp5.0 framework PDO connection MySQL error: too many connections solution
- pycharm 导包错误没有警告
- Resample
- Protocol selection of mobile IM system: UDP or TCP?
- Baidu API map is not displayed in the middle, but in the upper left corner. What's the matter? Resolved!
- 2.< tag-动态规划和常规问题>lt.343. 整数拆分
- Briefly describe the pitfalls of mobile IM development: architecture design, communication protocol and client
- 百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!
猜你喜欢
Why do many Shopify independent station sellers use chat robots? Read industry secrets in one minute!
AD教程系列 | 4 - 创建集成库文件
The parameter field of the callback address of the payment interface is "notify_url", and an error occurs after encoding and decoding the signed special character URL (,,,,,)
Briefly describe the pitfalls of mobile IM development: architecture design, communication protocol and client
Transport layer TCP protocol and UDP protocol
PHP二维/多维数组按照指定的键值来进行升序和降序
Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
The best Chinese open source class of vision transformer, ten hours of on-site coding to play with the popular model of Vit!
5. <tag-栈和常规问题>补充: lt.946. 验证栈序列(同剑指 Offer 31. 栈的压入、弹出序列)
cartographer_pose_graph_2d
随机推荐
6.1 - 6.2 公钥密码学简介
百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!
Codeforces Round #800 (Div. 2)
Zhongshanshan: engineers after being blasted will take off | ONEFLOW u
RESNET in tensorflow_ Train actual combat
6.1 - 6.2 Introduction à la cryptographie à clé publique
Experience of reading the road to wealth and freedom
What is UWB in ultra-high precision positioning system
Tp5.0框架 PDO连接mysql 报错:Too many connections 解决方法
关于支付接口回调地址参数字段是“notify_url”,签名过后的特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
Baidu API map is not displayed in the middle, but in the upper left corner. What's the matter? Resolved!
Muke.com actual combat course
Thoughts triggered by the fact that app applications are installed on mobile phones and do not display icons
[greedy college] Figure neural network advanced training camp
PHP二维/多维数组按照指定的键值来进行升序和降序
Two step processing of string regular matching to get JSON list
86.(cesium篇)cesium叠加面接收阴影效果(gltf模型)
AD教程系列 | 4 - 创建集成库文件
[unity3d] collider assembly
瀚高数据库自定义操作符‘!~~‘