u-subsection.js 4.1 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-subsection/u-subsection"],{852:function(t,e,n){"use strict";n.r(e);var r=n(853),i=n(855);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n(858);var u,c=n(37),s=Object(c["default"])(i["default"],r["render"],r["staticRenderFns"],!1,null,"b14d3440",null,!1,r["components"],u);s.options.__file="uview-ui/components/u-subsection/u-subsection.vue",e["default"]=s.exports},853:function(t,e,n){"use strict";n.r(e);var r=n(854);n.d(e,"render",(function(){return r["render"]})),n.d(e,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(e,"components",(function(){return r["components"]}))},854:function(t,e,n){"use strict";var r;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return u})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__get_style([t.$u.addStyle(t.customStyle),t.wrapperStyle])),r=t.__get_style([t.barStyle]),i=t.current>0&&t.current<t.list.length-1&&"subsection"===t.mode&&"u-subsection__bar--center",o=t.current===t.list.length-1&&"subsection"===t.mode&&"u-subsection__bar--last",u=t.__map(t.list,(function(e,n){var r=t.__get_orig(e),i=t.__get_style([t.itemStyle(n)]),o=n<t.list.length-1&&"u-subsection__item--no-border-right",u=n===t.list.length-1&&"u-subsection__item--last",c=t.__get_style([t.textStyle(n)]),s=t.getText(e);return{$orig:r,s2:i,g2:o,g3:u,s3:c,m0:s}}));t.$mp.data=Object.assign({},{$root:{s0:n,s1:r,g0:i,g1:o,l0:u}})},o=!1,u=[];i._withStripped=!0},855:function(t,e,n){"use strict";n.r(e);var r=n(856),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},856:function(t,e,n){"use strict";(function(t){var r=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(13)),o=r(n(857)),u={name:"u-subsection",mixins:[t.$u.mpMixin,t.$u.mixin,o.default],data:function(){return{itemRect:{width:0,height:0}}},watch:{list:function(t,e){this.init()},current:{immediate:!0,handler:function(t){}}},computed:{wrapperStyle:function(){var t={};return"button"===this.mode&&(t.backgroundColor=this.bgColor),t},barStyle:function(){var t={};return t.width="".concat(this.itemRect.width,"px"),t.height="".concat(this.itemRect.height,"px"),t.transform="translateX(".concat(this.current*this.itemRect.width,"px)"),"subsection"===this.mode&&(t.backgroundColor=this.activeColor),t},itemStyle:function(t){var e=this;return function(t){var n={};return"subsection"===e.mode&&(n.borderColor=e.activeColor,n.borderWidth="1px",n.borderStyle="solid"),n}},textStyle:function(e){var n=this;return function(e){var r={};return r.fontWeight=n.bold&&n.current===e?"bold":"normal",r.fontSize=t.$u.addUnit(n.fontSize),"subsection"===n.mode?r.color=n.current===e?"#fff":n.inactiveColor:r.color=n.current===e?n.activeColor:n.inactiveColor,r}}},mounted:function(){this.init()},methods:{init:function(){var e=this;t.$u.sleep().then((function(){return e.getRect()}))},getText:function(t){return"object"===(0,i.default)(t)?t[this.keyName]:t},getRect:function(){var t=this;this.$uGetRect(".u-subsection__item--0").then((function(e){t.itemRect=e}))},clickHandler:function(t){this.$emit("change",t)}}};e.default=u}).call(this,n(2)["default"])},858:function(t,e,n){"use strict";n.r(e);var r=n(859),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},859:function(t,e,n){}}]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-subsection/u-subsection.js.map
  3. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  4. 'uview-ui/components/u-subsection/u-subsection-create-component',
  5. {
  6. 'uview-ui/components/u-subsection/u-subsection-create-component':(function(module, exports, __webpack_require__){
  7. __webpack_require__('2')['createComponent'](__webpack_require__(852))
  8. })
  9. },
  10. [['uview-ui/components/u-subsection/u-subsection-create-component']]
  11. ]);