info
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/uni-badge/components/uni-badge/uni-badge"],{"0408":function(t,e,i){"use strict";i.r(e);var n=i("cb2b"),u=i("7f58");for(var o in u)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return u[t]}))}(o);i("24a9");var r=i("828b"),a=Object(r["a"])(u["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=a.exports},"24a9":function(t,e,i){"use strict";var n=i("46fe"),u=i.n(n);u.a},"412f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"UniBadge",emits:["click"],props:{type:{type:String,default:"error"},inverted:{type:Boolean,default:!1},isDot:{type:Boolean,default:!1},maxNum:{type:Number,default:99},absolute:{type:String,default:""},offset:{type:Array,default:function(){return[0,0]}},text:{type:[String,Number],default:""},size:{type:String,default:"small"},customStyle:{type:Object,default:function(){return{}}}},data:function(){return{}},computed:{width:function(){return 8*String(this.text).length+12},classNames:function(){var t=this.inverted,e=this.type,i=this.size,n=this.absolute;return[t?"uni-badge--"+e+"-inverted":"","uni-badge--"+e,"uni-badge--"+i,n?"uni-badge--absolute":""].join(" ")},positionStyle:function(){if(!this.absolute)return{};var t=this.width/2,e=10;this.isDot&&(t=5,e=5);var i="".concat(-t+this.offset[0],"px"),n="".concat(-e+this.offset[1],"px"),u={rightTop:{right:i,top:n},rightBottom:{right:i,bottom:n},leftBottom:{left:i,bottom:n},leftTop:{left:i,top:n}},o=u[this.absolute];return o||u["rightTop"]},dotStyle:function(){return this.isDot?{width:"10px",minWidth:"0",height:"10px",padding:"0",borderRadius:"10px"}:{}},displayValue:function(){var t=this.isDot,e=this.text,i=this.maxNum;return t?"":Number(e)>i?"".concat(i,"+"):e}},methods:{onClick:function(){this.$emit("click")}}};e.default=n},"46fe":function(t,e,i){},"7f58":function(t,e,i){"use strict";i.r(e);var n=i("412f"),u=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=u.a},cb2b:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return u})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=(this._self._c,this.text?this.__get_style([this.positionStyle,this.customStyle,this.dotStyle]):null);this.$mp.data=Object.assign({},{$root:{s0:e}})},u=[]}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'uni_modules/uni-badge/components/uni-badge/uni-badge-create-component',
|
||||
{
|
||||
'uni_modules/uni-badge/components/uni-badge/uni-badge-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("0408"))
|
||||
})
|
||||
},
|
||||
[['uni_modules/uni-badge/components/uni-badge/uni-badge-create-component']]
|
||||
]);
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="uni-badge--x"><slot></slot><block wx:if="{{text}}"><text data-event-opts="{{[['tap',[['onClick']]]]}}" class="{{['uni-badge',classNames]}}" style="{{$root.s0}}" bindtap="__e">{{displayValue}}</text></block></view>
|
||||
+1
@@ -0,0 +1 @@
|
||||
.uni-badge--x{display:inline-block;position:relative}.uni-badge--absolute{position:absolute}.uni-badge--small{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:center center;transform-origin:center center}.uni-badge{display:flex;overflow:hidden;box-sizing:border-box;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";min-width:20px;justify-content:center;flex-direction:row;height:20px;padding:0 4px;line-height:18px;color:#fff;border-radius:100px;background-color:#909399;background-color:initial;border:1px solid #fff;text-align:center;font-family:Helvetica Neue,Helvetica,sans-serif;font-size:12px}.uni-badge--info{color:#fff;background-color:#909399}.uni-badge--primary{background-color:#2979ff}.uni-badge--success{background-color:#4cd964}.uni-badge--warning{background-color:#f0ad4e}.uni-badge--error{background-color:#dd524d}.uni-badge--inverted{padding:0 5px 0 0;color:#909399}.uni-badge--info-inverted{color:#909399;background-color:initial}.uni-badge--primary-inverted{color:#2979ff;background-color:initial}.uni-badge--success-inverted{color:#4cd964;background-color:initial}.uni-badge--warning-inverted{color:#f0ad4e;background-color:initial}.uni-badge--error-inverted{color:#dd524d;background-color:initial}
|
||||
Reference in New Issue
Block a user