活动按钮状态流转
This commit is contained in:
10
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/component/title-bar/title-bar"],{"12ae":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("7ca3")),i=n("8f59");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var u={name:"titleBar",props:{title:{type:String,default:""},backgroundColor:{type:String,default:"#fff"},frontColor:{type:String,default:"black"},showBack:{type:Boolean,default:!1},positionMode:{type:String,default:"sticky"}},data:function(){return{statusBarHeight:0,titleBarHeight:0,titleFontSize:16}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,i.mapState)({isHideBtn:function(t){var e=t.app.tabBarList,n=getCurrentPages(),r=!1;if(n&&n.length){var a="/"+n[n.length-1].route;if(e.length)for(var i in e)a==e[i].path&&(r=!0)}return r}})),mounted:function(){var e=t.getSystemInfoSync();this.titleFontSize=e.fontSizeSetting||16,this.statusBarHeight=e.statusBarHeight;var n=t.getMenuButtonBoundingClientRect();this.titleBarHeight=2*(n.top-this.statusBarHeight)+n.height},watch:{title:{handler:function(t){},immediate:!0,deep:!0}},methods:{goBack:function(){1==getCurrentPages().length?t.switchTab({url:"/pages/index/index"}):t.navigateBack()}}};e.default=u}).call(this,n("df3c")["default"])},"36d9":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var r=function(){var t=this.$createElement;this._self._c},a=[]},"66a2":function(t,e,n){"use strict";n.r(e);var r=n("12ae"),a=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"69c7":function(t,e,n){"use strict";n.r(e);var r=n("36d9"),a=n("66a2");for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("e4d6");var o=n("828b"),u=Object(o["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=u.exports},e4d6:function(t,e,n){"use strict";var r=n("fb7b"),a=n.n(r);a.a},fb7b:function(t,e,n){}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'pages/component/title-bar/title-bar-create-component',
|
||||
{
|
||||
'pages/component/title-bar/title-bar-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("69c7"))
|
||||
})
|
||||
},
|
||||
[['pages/component/title-bar/title-bar-create-component']]
|
||||
]);
|
||||
4
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.json
vendored
Normal file
4
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="component-title-bar" style="{{'background:'+(backgroundColor)+';'+('position:'+(positionMode)+';')}}"><view class="title-bar-status" style="{{'height:'+(statusBarHeight+'px')+';'}}"></view><view class="title-bar-main" style="{{'height:'+(titleBarHeight+'px')+';'}}"><block wx:if="{{showBack||!isHideBtn}}"><view data-event-opts="{{[['tap',[['goBack']]]]}}" class="main-back" bindtap="__e"><block wx:if="{{frontColor=='white'}}"><image class="icon" src="/static/back.png" mode="aspectFit"></image></block><block wx:else><image class="icon" src="/static/back_b.png" mode="aspectFit"></image></block></view></block><view class="main-title"><view class="title text-ellipsis" style="{{'color:'+(frontColor)+';'+('font-size:'+(titleFontSize+'px')+';')}}">{{title}}</view></view></view><block wx:if="{{backgroundColor=='#fff'}}"><view class="title-bar-border"></view></block></view>
|
||||
1
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages/component/title-bar/title-bar.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.component-title-bar{position:-webkit-sticky;position:sticky;top:0;z-index:998;background:#fff;width:100%}.component-title-bar .title-bar-status{width:100%}.component-title-bar .title-bar-main{display:flex;align-items:center;height:0;overflow:hidden;padding:0 25%}.component-title-bar .title-bar-main .main-back{width:32rpx;height:32rpx;position:absolute;left:32rpx}.component-title-bar .title-bar-main .main-back .icon{position:absolute;top:0;left:0}.component-title-bar .title-bar-main .main-title{position:relative;width:100%;flex:1}.component-title-bar .title-bar-main .main-title .title{color:#000;text-align:center;font-size:32rpx;line-height:44rpx}.component-title-bar .title-bar-border{width:100%;height:1rpx;background:#f6f7fb;margin-top:-1rpx}
|
||||
Reference in New Issue
Block a user