u-steps-item.js 4.9 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-steps-item/u-steps-item"],{1577:function(t,e,n){"use strict";n.r(e);var r=n(1578),i=n(1580);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n(1583);var o,s=n(37),u=Object(s["default"])(i["default"],r["render"],r["staticRenderFns"],!1,null,"73722340",null,!1,r["components"],o);u.options.__file="uview-ui/components/u-steps-item/u-steps-item.vue",e["default"]=u.exports},1578:function(t,e,n){"use strict";n.r(e);var r=n(1579);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"]}))},1579:function(t,e,n){"use strict";var r;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return o})),n.d(e,"recyclableRender",(function(){return a})),n.d(e,"components",(function(){return r}));try{r={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-icon/u-icon")]).then(n.bind(null,860))},"u-Text":function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u--text/u--text")]).then(n.bind(null,1585))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.index+1<t.childLength?t.__get_style([t.lineStyle]):null),r=t.__get_style([t.contentStyle]);t.$mp.data=Object.assign({},{$root:{s0:n,s1:r}})},a=!1,o=[];i._withStripped=!0},1580:function(t,e,n){"use strict";n.r(e);var r=n(1581),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},1581: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(1582)),a={name:"u-steps-item",mixins:[t.$u.mpMixin,t.$u.mixin,i.default],data:function(){return{index:0,childLength:0,showLine:!1,size:{height:50,width:50},parentData:{direction:"row",current:0,activeColor:"",inactiveColor:"",activeIcon:"",inactiveIcon:"",dot:!1}}},watch:{parentData:function(t,e){}},created:function(){this.init()},computed:{lineStyle:function(){var e,n,r={};return"row"===this.parentData.direction?(r.width=this.size.width+"px",r.left=this.size.width/2+"px"):(r.height="50px",r.top="25px"),r.backgroundColor=null!==(e=this.parent.children)&&void 0!==e&&null!==(n=e[this.index+1])&&void 0!==n&&n.error?t.$u.color.error:this.index<this.parentData.current?this.parentData.activeColor:this.parentData.inactiveColor,r},statusClass:function(){var t=this.index,e=this.error,n=this.parentData.current;return n==t?!0===e?"error":"process":e?"error":n>t?"finish":"wait"},statusColor:function(){var e="";switch(this.statusClass){case"finish":e=this.parentData.activeColor;break;case"error":e=t.$u.color.error;break;case"process":e=this.parentData.dot?this.parentData.activeColor:"transparent";break;default:e=this.parentData.inactiveColor;break}return e},contentStyle:function(){var t={};return"column"===this.parentData.direction?(t.marginLeft=this.parentData.dot?"2px":"6px",t.marginTop=this.parentData.dot?"0px":"6px"):(t.marginTop=this.parentData.dot?"2px":"6px",t.marginLeft=this.parentData.dot?"2px":"6px"),t}},mounted:function(){var e=this;this.parent&&this.parent.updateFromChild(),t.$u.sleep().then((function(){e.getStepsItemRect()}))},methods:{init:function(){if(this.updateParentData(),!this.parent)return t.$u.error("u-steps-item必须要搭配u-steps组件使用");this.index=this.parent.children.indexOf(this),this.childLength=this.parent.children.length},updateParentData:function(){this.getParentData("u-steps")},updateFromParent:function(){this.init()},getStepsItemRect:function(){var t=this;this.$uGetRect(".u-steps-item").then((function(e){t.size=e}))}}};e.default=a}).call(this,n(2)["default"])},1583:function(t,e,n){"use strict";n.r(e);var r=n(1584),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);e["default"]=i.a},1584:function(t,e,n){}}]);
  2. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-steps-item/u-steps-item.js.map
  3. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  4. 'uview-ui/components/u-steps-item/u-steps-item-create-component',
  5. {
  6. 'uview-ui/components/u-steps-item/u-steps-item-create-component':(function(module, exports, __webpack_require__){
  7. __webpack_require__('2')['createComponent'](__webpack_require__(1577))
  8. })
  9. },
  10. [['uview-ui/components/u-steps-item/u-steps-item-create-component']]
  11. ]);