UNPKG

eeeeeeuuuu-ui

Version:

uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水

12 lines (11 loc) 3.16 kB
require('../../../app.js'); (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-tabbar/u-tabbar"],{6587:function(t,e,i){"use strict";var n=i("ecdf"),a=i.n(n);a.a},6889:function(t,e,i){"use strict";(function(t){e["a"]={props:{show:{type:Boolean,default:!0},value:{type:[String,Number],default:0},bgColor:{type:String,default:"#ffffff"},height:{type:[String,Number],default:"50px"},iconSize:{type:[String,Number],default:40},midButtonSize:{type:[String,Number],default:90},activeColor:{type:String,default:"#303133"},inactiveColor:{type:String,default:"#606266"},midButton:{type:Boolean,default:!1},list:{type:Array,default(){return[]}},beforeSwitch:{type:Function,default:null},borderTop:{type:Boolean,default:!0},hideTabBar:{type:Boolean,default:!0}},data(){return{midButtonLeft:"50%",pageUrl:""}},created(){this.hideTabBar&&t.hideTabBar();let e=getCurrentPages();this.pageUrl=e[e.length-1].route},computed:{elIconPath(){return t=>{let e=this.list[t].pagePath;return e?e==this.pageUrl||e=="/"+this.pageUrl?this.list[t].selectedIconPath:this.list[t].iconPath:t==this.value?this.list[t].selectedIconPath:this.list[t].iconPath}},elColor(){return t=>{let e=this.list[t].pagePath;return e?e==this.pageUrl||e=="/"+this.pageUrl?this.activeColor:this.inactiveColor:t==this.value?this.activeColor:this.inactiveColor}}},mounted(){this.midButton&&this.getMidButtonLeft()},methods:{async clickHandler(t){if(this.beforeSwitch&&"function"===typeof this.beforeSwitch){let e=this.beforeSwitch.bind(this.$u.$parent.call(this))(t);e&&"function"===typeof e.then?await e.then(e=>{this.switchTab(t)}).catch(t=>{}):!0===e&&this.switchTab(t)}else this.switchTab(t)},switchTab(e){this.$emit("change",e),this.list[e].pagePath?t.switchTab({url:this.list[e].pagePath}):this.$emit("input",e)},getOffsetRight(t,e){return e?-20:t>9?-40:-30},getMidButtonLeft(){let t=this.$u.sys.windowWidth;this.midButtonLeft=t/2+"px"}}}}).call(this,i("543d")["default"])},"7af3":function(t,e,i){"use strict";i.r(e);var n,a={uIcon:function(){return i.e("uview-ui/components/u-icon/u-icon").then(i.bind(null,"ece6"))},uBadge:function(){return i.e("uview-ui/components/u-badge/u-badge").then(i.bind(null,"2b69"))}},l=function(){var t=this,e=t.$createElement,i=(t._self._c,t.show?t.$u.addUnit(t.height):null),n=t.show?t.__map(t.list,(function(e,i){var n=t.__get_orig(e),a=t.elIconPath(i),l=t.elColor(i),o=e.count?t.getOffsetRight(e.count,e.isDot):null,u=t.elColor(i);return{$orig:n,m0:a,m1:l,m2:o,m3:u}})):null,a=t.show?t.$u.addUnit(t.height):null;t.$mp.data=Object.assign({},{$root:{g0:i,l0:n,g1:a}})},o=[],u=i("6889"),s=u["a"],r=(i("6587"),i("f0c5")),h=Object(r["a"])(s,l,o,!1,null,"90a89360",null,!1,a,n);e["default"]=h.exports},ecdf:function(t,e,i){}}]); ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'uview-ui/components/u-tabbar/u-tabbar-create-component', { 'uview-ui/components/u-tabbar/u-tabbar-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('543d')['createComponent'](__webpack_require__("7af3")) }) }, [['uview-ui/components/u-tabbar/u-tabbar-create-component']] ]);