You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
3.0 KiB
2 lines
3.0 KiB
"use strict";const t=require("../../../common/vendor.js"),u=require("../../helper/index.js"),d=require("../../index.js");require("../../helper/test.js");require("../../helper/digit.js");require("../../url/index.js");require("../../store/index.js");require("../../store/app.js");require("../../platform/index.js");require("../../platform/provider/wechat/index.js");require("../../platform/provider/wechat/miniProgram.js");require("../../api/member/auth.js");require("../../request/index.js");require("../../config/index.js");require("../../api/member/social.js");require("../../api/member/user.js");require("../../platform/provider/apple/index.js");require("../../platform/share.js");require("../../router/index.js");require("../../hooks/useModal.js");require("../../helper/throttle.js");require("../../platform/pay.js");require("../../api/pay/order.js");require("../../store/user.js");require("../../store/cart.js");require("../../api/trade/cart.js");require("../../api/pay/wallet.js");require("../../api/trade/order.js");require("../../store/sys.js");require("../../store/modal.js");require("../../config/zIndex.js");const o={name:"su-tabbar",props:{customStyle:{type:[Object,String],default:()=>({})},customClass:{type:String,default:""},url:{type:String,default:""},linkType:{type:String,default:"navigateTo"},value:{type:[String,Number,null],default:""},safeAreaInsetBottom:{type:Boolean,default:!0},border:{type:Boolean,default:!0},zIndex:{type:[String,Number],default:10},activeColor:{type:String,default:"#1989fa"},inactiveColor:{type:String,default:"#7d7e80"},fixed:{type:Boolean,default:!0},placeholder:{type:Boolean,default:!0},midTabBar:{type:Boolean,default:!1}},data(){return{placeholderHeight:0,safeBottomHeight:d.sheep.$platform.device.safeAreaInsets.bottom}},computed:{tabbarStyle(){const r={zIndex:this.zIndex};return u.deepMerge(r,u.addStyle(this.customStyle))},updateChild(){return[this.value,this.activeColor,this.inactiveColor]},updatePlaceholder(){return[this.fixed,this.placeholder]}},watch:{updateChild(){this.updateChildren()},updatePlaceholder(){this.setPlaceholderHeight()}},created(){this.children=[]},mounted(){this.setPlaceholderHeight()},methods:{updateChildren(){this.children.length&&this.children.map(r=>r.updateFromParent())},getRect(r,a){return new Promise(e=>{t.index.createSelectorQuery().in(this)[a?"selectAll":"select"](r).boundingClientRect(i=>{a&&Array.isArray(i)&&i.length&&e(i),!a&&i&&e(i)}).exec()})},async setPlaceholderHeight(){!this.fixed||!this.placeholder||(await u.sleep(20),this.getRect(".u-tabbar__content").then(({height:r=50})=>{this.placeholderHeight=r}))}}};function s(r,a,e,i,l,n){return t.e({a:e.safeAreaInsetBottom},e.safeAreaInsetBottom?{b:t.s({height:l.safeBottomHeight+"px"})}:{},{c:t.o(()=>{}),d:t.n(e.border&&"u-border-top"),e:t.n(e.fixed&&"u-tabbar--fixed"),f:t.n({"mid-tabbar":e.midTabBar}),g:t.s(n.tabbarStyle),h:e.placeholder},e.placeholder?{i:l.placeholderHeight+"px"}:{})}const h=t._export_sfc(o,[["render",s],["__scopeId","data-v-b5af0eb7"],["__file","D:/xiangmu/佰安出行/app/s-applet/sheep/ui/su-tabbar/su-tabbar.vue"]]);wx.createComponent(h);
|