名医精彩
This commit is contained in:
91
pages/component/commonComponents/sticky.vue
Normal file
91
pages/component/commonComponents/sticky.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-tabs
|
||||
lineWidth="30"
|
||||
lineColor="#294a97"
|
||||
:activeStyle="{
|
||||
color: '#294a97',
|
||||
transform: 'scale(1.05)',
|
||||
}"
|
||||
:inactiveStyle="{
|
||||
color: '#606266',
|
||||
transform: 'scale(1)',
|
||||
}"
|
||||
:itemStyle="itemStyle"
|
||||
:keyName="label"
|
||||
:list="dataList"
|
||||
:is-scroll="false"
|
||||
:current="currentCateIndex"
|
||||
@change="handleselectCate"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<slot name="labelSlot" :data="slotProps.data"></slot>
|
||||
</template>
|
||||
</u-tabs>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
props: ["list", "currentCateIndex", "label", "itemStyle"],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
detailInfo: {},
|
||||
playData: {},
|
||||
searchValue: "",
|
||||
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [{}, {}], // 方剂标题
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: "提示",
|
||||
limitContent: "",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
watch: {
|
||||
list: {
|
||||
immediate: true,
|
||||
handler(newRoute) {
|
||||
this.dataList=[...this.list]
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
async handleselectCate(e) {
|
||||
this.$emit("handleselectCate", e, e.index);
|
||||
var that = this;
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.key.hideSoftKeybord();
|
||||
// #endif
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.u-tabs .u-tabs__wrapper__nav__item__text{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user