You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
16 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-componentsB-steps-index"],{"03ff":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uIcon:i("b1e3").default,uLine:i("dc66").default},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{},[i("v-uni-view",{staticClass:"u-steps",style:{flexDirection:t.direction}},t._l(t.list,(function(e,n){return i("v-uni-view",{key:n,staticClass:"u-steps__item",class:["u-steps__item--"+t.direction]},["number"==t.mode?i("v-uni-view",{staticClass:"u-steps__item__num",style:{backgroundColor:t.current<n?"transparent":t.activeColor,borderColor:t.current<n?t.unActiveColor:t.activeColor}},[t.current<n?i("v-uni-text",{style:{color:t.current<n?t.unActiveColor:t.activeColor}},[t._v(t._s(n+1))]):i("u-icon",{attrs:{size:"22",color:"#ffffff",name:t.icon}})],1):t._e(),"dot"==t.mode?i("v-uni-view",{staticClass:"u-steps__item__dot",style:{backgroundColor:n<=t.current?t.activeColor:t.unActiveColor}}):t._e(),i("v-uni-text",{staticClass:"u-line-1",class:["u-steps__item__text--"+t.direction],style:{color:n<=t.current?t.activeColor:t.unActiveColor}},[t._v(t._s(e.name))]),n<t.list.length-1?i("v-uni-view",{staticClass:"u-steps__item__line",class:["u-steps__item__line--"+t.mode]},[i("u-line",{attrs:{direction:t.direction,length:"100%","hair-line":!1,color:t.unActiveColor}})],1):t._e()],1)})),1)],1)},o=[]},12594:function(t,e,i){var n=i("1f2f");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("6ef4039c",n,!0,{sourceMap:!1,shadowMode:!1})},"1f2f":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.wrap[data-v-d823c340]{padding:%?24?%}.box[data-v-d823c340]{margin:%?50?% 0}',""]),t.exports=e},2860:function(t,e,i){"use strict";i.r(e);var n=i("34c1"),r=i("9c25");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("aae0");var s,u=i("f0c5"),a=Object(u["a"])(r["default"],n["b"],n["c"],!1,null,"d823c340",null,!1,n["a"],s);e["default"]=a.exports},"34c1":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uSteps:i("3604").default,uSubsection:i("e97e").default},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"u-demo"},[i("v-uni-view",{staticClass:"u-demo-wrap"},[i("v-uni-view",{staticClass:"u-demo-title"},[t._v("演示效果")]),i("v-uni-view",{staticClass:"u-demo-area"},[i("u-steps",{attrs:{direction:t.direction,current:t.current,list:t.steps,mode:t.mode,icon:t.icon}})],1)],1),i("v-uni-view",{staticClass:"u-config-wrap"},[i("v-uni-view",{staticClass:"u-config-title u-border-bottom"},[t._v("参数配置")]),i("v-uni-view",{staticClass:"u-config-item"},[i("v-uni-view",{staticClass:"u-item-title"},[t._v("模式")]),i("u-subsection",{attrs:{list:["number","dot"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.modeChange.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"u-config-item"},[i("v-uni-view",{staticClass:"u-item-title"},[t._v("方向")]),i("u-subsection",{attrs:{list:["横向","竖向"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.directionChange.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"u-config-item"},[i("v-uni-view",{staticClass:"u-item-title"},[t._v("自定义图标")]),i("u-subsection",{attrs:{list:["否","是"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.iconChange.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"u-config-item"},[i("v-uni-view",{staticClass:"u-item-title"},[t._v("当前步值")]),i("u-subsection",{attrs:{list:["1","2","3","4"]},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.stepChange.apply(void 0,arguments)}}})],1)],1)],1)},o=[]},3604:function(t,e,i){"use strict";i.r(e);var n=i("03ff"),r=i("ec98");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("ae43");var s,u=i("f0c5"),a=Object(u["a"])(r["default"],n["b"],n["c"],!1,null,"30870cfc",null,!1,n["a"],s);e["default"]=a.exports},3806:function(t,e,i){var n=i("e221");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("4a946268",n,!0,{sourceMap:!1,shadowMode:!1})},"3fbc":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-steps[data-v-30870cfc]{\ndisplay:flex;flex-direction:row\n}.u-steps .u-steps__item[data-v-30870cfc]{flex:1;text-align:center;position:relative;min-width:%?100?%;font-size:%?26?%;color:#8799a3;\ndisplay:flex;flex-direction:row;\njustify-content:center;flex-direction:column;align-items:center}.u-steps .u-steps__item--row[data-v-30870cfc]{\ndisplay:flex;flex-direction:row;\nflex-direction:column}.u-steps .u-steps__item--row .u-steps__item__line[data-v-30870cfc]{position:absolute;z-index:0;left:75%;width:50%}.u-steps .u-steps__item--row .u-steps__item__line--dot[data-v-30870cfc]{top:calc(%?20?% / 2)}.u-steps .u-steps__item--row .u-steps__item__line--number[data-v-30870cfc]{top:calc(%?44?% / 2)}.u-steps .u-steps__item--column[data-v-30870cfc]{\ndisplay:flex;flex-direction:row;\nflex-direction:row;justify-content:flex-start;min-height:%?120?%}.u-steps .u-steps__item--column .u-steps__item__line[data-v-30870cfc]{position:absolute;z-index:0;height:50%;top:75%}.u-steps .u-steps__item--column .u-steps__item__line--dot[data-v-30870cfc]{left:calc(%?20?% / 2)}.u-steps .u-steps__item--column .u-steps__item__line--number[data-v-30870cfc]{left:calc(%?44?% / 2)}.u-steps .u-steps__item__num[data-v-30870cfc]{\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;width:%?44?%;height:%?44?%;border:1px solid #8799a3;border-radius:50%;overflow:hidden}.u-steps .u-steps__item__dot[data-v-30870cfc]{width:%?20?%;height:%?20?%;\ndisplay:flex;flex-direction:row;\nborder-radius:50%}.u-steps .u-steps__item__text--row[data-v-30870cfc]{margin-top:%?14?%}.u-steps .u-steps__item__text--column[data-v-30870cfc]{margin-left:%?14?%}',""]),t.exports=e},5214:function(t,e,i){var n=i("a2e2");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("63e8d19e",n,!0,{sourceMap:!1,shadowMode:!1})},5953:function(t,e,i){var n=i("3fbc");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("435d128c",n,!0,{sourceMap:!1,shadowMode:!1})},"629f":function(t,e,i){"use strict";var n=i("5214"),r=i.n(n);r.a},"6fce":function(t,e,i){"use strict";i.r(e);var n=i("a1ab"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},"95ef":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{steps:[{name:"下单"},{name:"出库"},{name:"运输"},{name:"签收"}],current:0,icon:"checkmark",mode:"number",direction:"row"}},methods:{modeChange:function(t){this.mode=0==t?"number":"dot"},stepChange:function(t){this.current=[0,1,2,3][t]},iconChange:function(t){this.icon=0==t?"checkmark":"map-fill"},directionChange:function(t){this.direction=0==t?"row":"column"}}};e.default=n},"9c25":function(t,e,i){"use strict";i.r(e);var n=i("95ef"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},a1ab:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-line",props:{color:{type:String,default:"#e4e7ed"},length:{type:String,default:"100%"},direction:{type:String,default:"row"},hairLine:{type:Boolean,default:!0},margin:{type:String,default:"0"},borderStyle:{type:String,default:"solid"}},computed:{lineStyle:function(){var t={};return t.margin=this.margin,"row"==this.direction?(t.borderBottomWidth="1px",t.borderBottomStyle=this.borderStyle,t.width=this.$u.addUnit(this.length),this.hairLine&&(t.transform="scaleY(0.5)")):(t.borderLeftWidth="1px",t.borderLeftStyle=this.borderStyle,t.height=this.$u.addUnit(this.length),this.hairLine&&(t.transform="scaleX(0.5)")),t.borderColor=this.color,t}}};e.default=n},a2e2:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-subsection[data-v-05edd86e]{\ndisplay:flex;flex-direction:row;\nalign-items:center;overflow:hidden;position:relative}.u-item[data-v-05edd86e]{flex:1;text-align:center;font-size:%?26?%;height:100%;\ndisplay:flex;flex-direction:row;\nalign-items:center;justify-content:center;color:#303133;padding:0 %?6?%}.u-item-bg[data-v-05edd86e]{background-color:#2979ff;position:absolute;z-index:-1}.u-none-border-right[data-v-05edd86e]{border-right:none!important}.u-item-first[data-v-05edd86e]{border-top-left-radius:%?8?%;border-bottom-left-radius:%?8?%}.u-item-last[data-v-05edd86e]{border-top-right-radius:%?8?%;border-bottom-right-radius:%?8?%}.u-item-text[data-v-05edd86e]{transition:all .35s;color:#303133;\ndisplay:flex;flex-direction:row;\nalign-items:center;position:relative;z-index:3}',""]),t.exports=e},aae0:function(t,e,i){"use strict";var n=i("12594"),r=i.n(n);r.a},ae43:function(t,e,i){"use strict";var n=i("5953"),r=i.n(n);r.a},b7a0:function(t,e,i){"use strict";i("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-steps",props:{mode:{type:String,default:"dot"},list:{type:Array,default:function(){return[]}},type:{type:String,default:"primary"},current:{type:[Number,String],default:0},activeColor:{type:String,default:"#2979ff"},unActiveColor:{type:String,default:"#909399"},icon:{type:String,default:"checkmark"},direction:{type:String,default:"row"}},data:function(){return{}}};e.default=n},c268:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"u-line",style:[t.lineStyle]})},o=[]},dc66:function(t,e,i){"use strict";i.r(e);var n=i("c268"),r=i("6fce");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("f5fe");var s,u=i("f0c5"),a=Object(u["a"])(r["default"],n["b"],n["c"],!1,null,"21fb694c",null,!1,n["a"],s);e["default"]=a.exports},e221:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 \n */.u-line[data-v-21fb694c]{vertical-align:middle}',""]),t.exports=e},e29c:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"u-subsection",style:[t.subsectionStyle]},[t._l(t.listInfo,(function(e,n){return i("v-uni-view",{key:n,staticClass:"u-item u-line-1",class:[t.noBorderRight(n),"u-item-"+n],style:[t.itemStyle(n)],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click(n)}}},[i("v-uni-view",{staticClass:"u-item-text u-line-1",style:[t.textStyle(n)]},[t._v(t._s(e.name))])],1)})),i("v-uni-view",{staticClass:"u-item-bg",style:[t.itemBarStyle]})],2)},o=[]},e2aa:function(t,e,i){"use strict";i("99af"),i("d81d"),i("a9e3"),i("ac1f"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-subsection",props:{list:{type:Array,default:function(){return[]}},current:{type:[Number,String],default:0},activeColor:{type:String,default:"#303133"},inactiveColor:{type:String,default:"#606266"},mode:{type:String,default:"button"},fontSize:{type:[Number,String],default:28},animation:{type:Boolean,default:!0},height:{type:[Number,String],default:70},bold:{type:Boolean,default:!0},bgColor:{type:String,default:"#eeeeef"},buttonColor:{type:String,default:"#ffffff"},vibrateShort:{type:Boolean,default:!1}},data:function(){return{listInfo:[],itemBgStyle:{width:0,left:0,backgroundColor:"#ffffff",height:"100%",transition:""},currentIndex:this.current,buttonPadding:3,borderRadius:5,firstTimeVibrateShort:!0}},watch:{current:{immediate:!0,handler:function(t){this.currentIndex=t,this.changeSectionStatus(t)}}},created:function(){this.listInfo=this.list.map((function(t,e){if("object"!=typeof t){var i={width:0,name:t};return i}return t.width=0,t}))},computed:{noBorderRight:function(){var t=this;return function(e){if("subsection"==t.mode){var i="";return e<t.list.length-1&&(i+=" u-none-border-right"),0==e&&(i+=" u-item-first"),e==t.list.length-1&&(i+=" u-item-last"),i}}},textStyle:function(){var t=this;return function(e){var i={};return"subsection"==t.mode?e==t.currentIndex?i.color="#ffffff":i.color=t.activeColor:e==t.currentIndex?i.color=t.activeColor:i.color=t.inactiveColor,e==t.currentIndex&&t.bold&&(i.fontWeight="bold"),i.fontSize=t.fontSize+"rpx",i}},itemStyle:function(){var t=this;return function(e){var i={};return"subsection"==t.mode&&(i.borderColor=t.activeColor,i.borderWidth="1px",i.borderStyle="solid"),i}},subsectionStyle:function(){var t={};return t.height=uni.upx2px(this.height)+"px","button"==this.mode&&(t.backgroundColor=this.bgColor,t.padding="".concat(this.buttonPadding,"px"),t.borderRadius="".concat(this.borderRadius,"px")),t},itemBarStyle:function(){var t={};return t.backgroundColor=this.activeColor,t.zIndex=1,"button"==this.mode&&(t.backgroundColor=this.buttonColor,t.borderRadius="".concat(this.borderRadius,"px"),t.bottom="".concat(this.buttonPadding,"px"),t.height=uni.upx2px(this.height)-2*this.buttonPadding+"px",t.zIndex=0),Object.assign(this.itemBgStyle,t)}},mounted:function(){var t=this;setTimeout((function(){t.getTabsInfo()}),10)},methods:{changeSectionStatus:function(t){var e=this;"subsection"==this.mode&&(t==this.list.length-1&&(this.itemBgStyle.borderRadius="0 ".concat(this.buttonPadding,"px ").concat(this.buttonPadding,"px 0")),0==t&&(this.itemBgStyle.borderRadius="".concat(this.buttonPadding,"px 0 0 ").concat(this.buttonPadding,"px")),t>0&&t<this.list.length-1&&(this.itemBgStyle.borderRadius="0")),setTimeout((function(){e.itemBgLeft()}),10),this.vibrateShort&&this.firstTimeVibrateShort,this.firstTimeVibrateShort=!1},click:function(t){t!=this.currentIndex&&(this.currentIndex=t,this.changeSectionStatus(t),this.$emit("change",Number(t)))},getTabsInfo:function(){for(var t=this,e=uni.createSelectorQuery().in(this),i=0;i<this.list.length;i++)e.select(".u-item-"+i).boundingClientRect();e.exec((function(e){e.length||setTimeout((function(){t.getTabsInfo()}),10),e.map((function(e,i){t.listInfo[i].width=e.width})),("subsection"==t.mode||"button"==t.mode)&&(t.itemBgStyle.width=t.listInfo[0].width+"px"),t.itemBgLeft()}))},itemBgLeft:function(){var t=this;this.animation?this.itemBgStyle.transition="all 0.35s":this.itemBgStyle.transition="all 0s";var e=0;this.listInfo.map((function(i,n){n<t.currentIndex&&(e+=i.width)})),"subsection"==this.mode?this.itemBgStyle.left=e+"px":"button"==this.mode&&(this.itemBgStyle.left=e+this.buttonPadding+"px")}}};e.default=n},e97e:function(t,e,i){"use strict";i.r(e);var n=i("e29c"),r=i("fb96");for(var o in r)"default"!==o&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("629f");var s,u=i("f0c5"),a=Object(u["a"])(r["default"],n["b"],n["c"],!1,null,"05edd86e",null,!1,n["a"],s);e["default"]=a.exports},ec98:function(t,e,i){"use strict";i.r(e);var n=i("b7a0"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},f5fe:function(t,e,i){"use strict";var n=i("3806"),r=i.n(n);r.a},fb96:function(t,e,i){"use strict";i.r(e);var n=i("e2aa"),r=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a}}]);