毕设
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 line
7.6 KiB

1 year ago
(self["webpackChunkuview2_0_cli"]=self["webpackChunkuview2_0_cli"]||[]).push([[2726],{27770:function(e,t,i){var n=i(25888);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var s=i(56).Z;s("1fee9f53",n,!0,{sourceMap:!1,shadowMode:!1})},6831:function(e,t,i){var n=i(80019);n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals);var s=i(56).Z;s("7c0607c2",n,!0,{sourceMap:!1,shadowMode:!1})},96947:function(e,t,i){"use strict";var n;i.d(t,{Z:function(){return p}});var s,r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-line-progress",style:[e.$u.addStyle(e.customStyle)]},[i("v-uni-view",{ref:"u-line-progress__background",staticClass:"u-line-progress__background",style:[{backgroundColor:e.inactiveColor,height:e.$u.addUnit(e.height)}]}),i("v-uni-view",{staticClass:"u-line-progress__line",style:[e.progressStyle]},[e._t("default",[e.showText&&e.percentage>=10?i("v-uni-text",{staticClass:"u-line-progress__text"},[e._v(e._s(e.innserPercentage+"%"))]):e._e()])],2)],1)},o=[],a=(i(9653),{props:{activeColor:{type:String,default:uni.$u.props.lineProgress.activeColor},inactiveColor:{type:String,default:uni.$u.props.lineProgress.color},percentage:{type:[String,Number],default:uni.$u.props.lineProgress.inactiveColor},showText:{type:Boolean,default:uni.$u.props.lineProgress.showText},height:{type:[String,Number],default:uni.$u.props.lineProgress.height}}}),c={name:"u-line-progress",mixins:[uni.$u.mpMixin,uni.$u.mixin,a],data:function(){return{lineWidth:0}},watch:{percentage:function(e){this.resizeProgressWidth()}},computed:{progressStyle:function(){var e={};return e.width=this.lineWidth,e.backgroundColor=this.activeColor,e.height=uni.$u.addUnit(this.height),e},innserPercentage:function(){return uni.$u.range(0,100,this.percentage)}},mounted:function(){this.init()},methods:{init:function(){var e=this;uni.$u.sleep(20).then((function(){e.resizeProgressWidth()}))},getProgressWidth:function(){return this.$uGetRect(".u-line-progress__background")},resizeProgressWidth:function(){var e=this;this.getProgressWidth().then((function(t){var i=t.width;e.lineWidth=i*e.innserPercentage/100+"px"}))}}},u=c,l=(i(27770),i(69453)),d=(0,l.Z)(u,r,o,!1,null,"5a885ee4",null,!1,n,s),p=d.exports},71761:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return d}});var n,s={uLineProgress:i(96947).Z},r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"u-page"},[i("v-uni-view",{staticClass:"u-demo-block"},[i("v-uni-text",{staticClass:"u-demo-block__title"},[e._v("基础功能")]),i("v-uni-view",{staticClass:"u-demo-block__content"},[i("u-line-progress",{attrs:{percentage:e.percentage1}})],1)],1),i("v-uni-view",{staticClass:"u-demo-block"},[i("v-uni-text",{staticClass:"u-demo-block__title"},[e._v("不显示百分比")]),i("v-uni-view",{staticClass:"u-demo-block__content"},[i("u-line-progress",{attrs:{showText:!1,percentage:e.percentage2}})],1)],1),i("v-uni-view",{staticClass:"u-demo-block"},[i("v-uni-text",{staticClass:"u-demo-block__title"},[e._v("自定义高度")]),i("v-uni-view",{staticClass:"u-demo-block__content"},[i("u-line-progress",{attrs:{height:"8",showText:!1,percentage:e.percentage3}})],1)],1),i("v-uni-view",{staticClass:"u-demo-block"},[i("v-uni-text",{staticClass:"u-demo-block__title"},[e._v("自定义颜色")]),i("v-uni-view",{staticClass:"u-demo-block__content"},[i("u-line-progress",{attrs:{height:"8",showText:!1,percentage:e.percentage4,activeColor:"#3c9cff",inactiveColor:"#f3f4f6"}})],1)],1),e.androidNvue?e._e():i("v-uni-view",{staticClass:"u-demo-block"},[i("v-uni-text",{staticClass:"u-demo-block__title"},[e._v("自定义样式(不支持安卓环境的nvue)")]),i("v-uni-view",{staticClass:"u-demo-block__content"},[i("u-line-progress",{attrs:{height:"8",showText:!1,percentage:e.percentage5,activeColor:"#3c9cff",inactiveColor:"#f3f4f6"}},[i("v-uni-text",{staticClass:"u-percentage-slot"},[e._v(e._s(e.percentage4)+"%")])],1)],1)],1),i("v-uni-view",{staticClass:"u-demo