当前位置:网站首页>Uni app ceiling fixed style
Uni app ceiling fixed style
2022-06-26 05:22:00 【Black and white】
<template>
<view class="full">
<view class="sticky-box">
<!-- Search for -->
<uni-search-bar class="unisearchbar" radius="5" placeholder=" Please enter search keywords " clearButton="auto" bgColor="#EEEEEE" cancelButton="none" @input="input" />
<!-- Search for -->
<view class="doctor">
<!-- All departments -->
<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;"> All departments </text>
<uni-icons type="bottom" size="15"></uni-icons>
</picker>
</view>
</view>
<!-- All professional titles -->
<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;"> All professional titles </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 {
// Select switch form: {
id: '', infoCode: '' }, // Initial value datesize: {
pageNum: 1, pageSize: 10, params: {
userName: "", deptId: "", ysZc: "" } }, deptLists: [], findByTypeCodeList: [], doctorList: [], }; }, watch: {
// All functions '$store.state.findByTypeCode'(newVal, oldVal) {
this.findByTypeCodeList = this.$store.state.findByTypeCode }, // All departments '$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": "" } }) }, // Select all departments bindPickerChange(e) {
this.form.id = this.deptLists[e.detail.value].id this.fetchSwiperList({
"pageNum": 1, "pageSize": 9999, "params": {
"userName": "", "deptId": this.form.id, "ysZc": "" } }) }, // Select all professional titles 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>
边栏推荐
猜你喜欢
LeetCode 19. Delete the penultimate node of the linked list
Introduction to alluxio
cartographer_ fast_ correlative_ scan_ matcher_ 2D branch and bound rough matching
PHP 2D / multidimensional arrays are sorted in ascending and descending order according to the specified key values
Wechat team sharing: technical decryption behind wechat's 100 million daily real-time audio and video chats
[unity3d] human computer interaction input
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 (,,,,,)
cartographer_ backend_ constraint
【ARM】讯为rk3568开发板buildroot添加桌面应用
Why does the mobile IM based on TCP still need to keep the heartbeat alive?
随机推荐
apktool 工具使用文档
cartographer_ fast_ correlative_ scan_ matcher_ 2D branch and bound rough matching
【活动推荐】云原生、产业互联网、低代码、Web3、元宇宙……哪个是 2022 年架构热点?...
cartographer_ pose_ graph_ 2d
[greedy college] Figure neural network advanced training camp
Could not get unknown property ‘*‘ for SigningConfig container of type org. gradle. api. internal
Ai+ remote sensing: releasing the value of each pixel
Anaconda creates tensorflow environment
vscode config
百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!
Henkel database custom operator '~~‘
First day of deep learning and tensorflow learning
Sentimentin tensorflow_ analysis_ cell
Create SSH key pair configuration steps
Use jedis to monitor redis stream to realize message queue function
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 (,,,,,)
两步处理字符串正则匹配得到JSON列表
GD32F3x0 官方PWM驱动正频宽偏小(定时不准)的问题
zencart新建的URL怎么重写伪静态
Apktool tool usage document