第一次提交
This commit is contained in:
10
unpackage/dist/build/mp-weixin/components/navBar/navBar.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/components/navBar/navBar.js
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/navBar/navBar"],{"0f96":function(t,n,e){"use strict";e.r(n);var i=e("8b9e"),a=e("224a");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("6ebd");var r=e("828b"),o=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=o.exports},"224a":function(t,n,e){"use strict";e.r(n);var i=e("3423"),a=e.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);n["default"]=a.a},3423:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={props:["currentI","navList"],components:{ssScrollNavbar:function(){e.e("components/navBar/scroll-navbar").then(function(){return resolve(e("b340"))}.bind(null,e)).catch(e.oe)}},data:function(){return{currentIndex:0,isFixed:!1,topHeight:0,listData:[]}},onLoad:function(t){this.calculateTopSectionHeight()},created:function(){},methods:{navbarTapHandler:function(t){this.currentIndex=t,this.$emit("currentIndex",t)},scrollChnage:function(t){var n=t.detail.scrollTop;n>=this.topHeight?this.isFixed=!0:this.isFixed=!1},calculateTopSectionHeight:function(){var n=this,e=t.createSelectorQuery().select(".top-section");e.fields({size:!0},(function(t){n.topHeight=t.height})).exec()}},watch:{currentI:function(t){this.navbarTapHandler(t)}}};n.default=i}).call(this,e("df3c")["default"])},"6ebd":function(t,n,e){"use strict";var i=e("7110"),a=e.n(i);a.a},7110:function(t,n,e){},"8b9e":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/navBar/navBar-create-component',
|
||||
{
|
||||
'components/navBar/navBar-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("0f96"))
|
||||
})
|
||||
},
|
||||
[['components/navBar/navBar-create-component']]
|
||||
]);
|
||||
6
unpackage/dist/build/mp-weixin/components/navBar/navBar.json
vendored
Normal file
6
unpackage/dist/build/mp-weixin/components/navBar/navBar.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"ss-scroll-navbar": "/components/navBar/scroll-navbar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/components/navBar/navBar.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/navBar/navBar.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<view><scroll-view class="scroll" scroll-y="true" data-event-opts="{{[['scroll',[['scrollChnage',['$event']]]]]}}" bindscroll="__e"><view class="{{['navbar-section',(isFixed)?'navbar-fixed-section':'']}}"><ss-scroll-navbar vue-id="7c554742-1" tabCurrentIndex="{{currentIndex}}" scrollChangeIndex="{{currentI}}" navArr="{{navList}}" data-event-opts="{{[['^navbarTap',[['navbarTapHandler']]]]}}" bind:navbarTap="__e" bind:__l="__l"></ss-scroll-navbar></view></scroll-view></view>
|
||||
1
unpackage/dist/build/mp-weixin/components/navBar/navBar.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/navBar/navBar.wxss
vendored
Normal file
@ -0,0 +1 @@
|
||||
.scroll .top-section{height:350rpx;background-color:green}.scroll .bottom-section{height:1500rpx;background-color:#ff0}.scroll .footer-section{height:1500rpx;background-color:#00f}
|
||||
10
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.js
vendored
Normal file
10
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.js
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/navBar/scroll-navbar"],{"25e0":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},a=[]},"63d7":function(t,e,n){"use strict";var i=n("b1c4"),a=n.n(i);a.a},"76ec":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"ss-scroll-navbar",props:{navArr:{type:Array,default:function(){return[{name:"推荐",category_id:"recent"}]}},tabCurrentIndex:{type:Number,default:0},scrollChangeIndex:{type:Number,default:0}},data:function(){return{scrollLeft:0,widthList:[],screenWidth:0}},methods:{tabChange:function(t){this.$emit("navbarTap",t);for(var e=this.widthList,n=0,i=0;i<t+1;i++)n+=e[i];var a=e[t];n-=this.screenWidth/2,n-=a/2,this.scrollLeft=n},calculateItemWidth:function(){var e=this,n=[];this.navArr.forEach((function(i,a){var c=t.createSelectorQuery().in(e).select("#item-"+a);c.fields({size:!0},(function(t){n.push(t.width)})).exec()})),this.widthList=n},calculateWindowWidth:function(){var e=t.getSystemInfoSync();this.screenWidth=e.screenWidth}},created:function(){var t=this;this.calculateWindowWidth(),setTimeout((function(){t.calculateItemWidth()}),1e3)},watch:{scrollChangeIndex:function(t){this.tabChange(t)}}};e.default=n}).call(this,n("df3c")["default"])},"7b40":function(t,e,n){"use strict";n.r(e);var i=n("76ec"),a=n.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=a.a},b1c4:function(t,e,n){},b340:function(t,e,n){"use strict";n.r(e);var i=n("25e0"),a=n("7b40");for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);n("63d7");var r=n("828b"),u=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=u.exports}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/navBar/scroll-navbar-create-component',
|
||||
{
|
||||
'components/navBar/scroll-navbar-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("b340"))
|
||||
})
|
||||
},
|
||||
[['components/navBar/scroll-navbar-create-component']]
|
||||
]);
|
||||
4
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.json
vendored
Normal file
4
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.wxml
vendored
Normal file
@ -0,0 +1 @@
|
||||
<scroll-view class="ss-scroll-navbar" scroll-x="{{true}}" scroll-left="{{scrollLeft}}" scroll-with-animation="true"><block wx:for="{{navArr}}" wx:for-item="item" wx:for-index="index" wx:key="category_id"><view class="{{['nav-item',(index===tabCurrentIndex)?'current':'']}}" id="{{'item-'+index}}" data-event-opts="{{[['tap',[['tabChange',[index]]]]]}}" bindtap="__e"><text class="title">{{item.name}}</text></view></block></scroll-view>
|
||||
1
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/navBar/scroll-navbar.wxss
vendored
Normal file
@ -0,0 +1 @@
|
||||
.ss-scroll-navbar{width:100%;height:80rpx;box-shadow:0 2rpx 8rpx rgba(0,0,0,.06);white-space:nowrap;text-align:start}.ss-scroll-navbar .nav-item{height:80rpx;text-align:center;padding:0rpx 20rpx;color:#fff;display:inline-block;position:relative;font-size:32rpx}.ss-scroll-navbar .nav-item .title{line-height:80rpx}.ss-scroll-navbar .nav-item:after{content:"";width:0;height:0;border-bottom:4rpx solid #fff;position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);transition:.3s}.ss-scroll-navbar .current{color:#fff;font-weight:700}.ss-scroll-navbar .current:after{width:50%}
|
||||
Reference in New Issue
Block a user