u-badge.js.map 16.3 KB
{"version":3,"sources":["webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?16ea","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?04d9","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?5818","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?6d96","uni-app:///uview-ui/components/u-badge/u-badge.vue","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?42ce","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-badge/u-badge.vue?d1eb"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgI;AAChI;AAC2D;AACL;AACsC;;;AAG5F;AACsN;AACtN,gBAAgB,iNAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,8FAAM;AACR,EAAE,uGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,kGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC7BA;AAAA;AAAA;AAAA;AAAm2B,CAAgB,qyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmBv3B;;;;;;;;;;;;;;;;;AAiBA;AACA,iBADA;AAEA;AACA;AACA;AACA,kBADA;AAEA,sBAFA,EAFA;;AAMA;AACA;AACA,kBADA;AAEA,wBAFA,EAPA;;AAWA;AACA;AACA,mBADA;AAEA,oBAFA,EAZA;;AAgBA;AACA;AACA,4BADA,EAjBA;;AAoBA;AACA;AACA,kBADA;AAEA,iBAFA,EArBA;;AAyBA;AACA;AACA,mBADA;AAEA,oBAFA,EA1BA;;AA8BA;AACA;AACA,iBADA;AAEA;AACA;AACA,OAJA,EA/BA;;AAqCA;AACA;AACA,mBADA;AAEA,mBAFA,EAtCA;;AA0CA;AACA;AACA,4BADA;AAEA,mBAFA,EA3CA;;AA+CA;AACA;AACA,kBADA;AAEA,wBAFA,EAhDA;;AAoDA;AACA;AACA,kBADA;AAEA,iBAFA,EArDA;;AAyDA;AACA;AACA,mBADA;AAEA,oBAFA,EA1DA,EAFA;;;AAiEA;AACA;AACA,YAFA,sBAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OALA,MAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAnBA;AAoBA;AACA,YArBA,sBAqBA;AACA;AACA;AACA;AACA;AACA;AACA,KA3BA;AA4BA;AACA,QA7BA,kBA6BA;AACA;AACA;AACA;AACA,KAjCA,EAjEA,E;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AAA4kD,CAAgB,u5CAAG,EAAC,C;;;;;;;;;;;ACAhmD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"uview-ui/components/u-badge/u-badge.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-badge.vue?vue&type=template&id=2b1712d8&scoped=true&\"\nvar renderjs\nimport script from \"./u-badge.vue?vue&type=script&lang=js&\"\nexport * from \"./u-badge.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-badge.vue?vue&type=style&index=0&id=2b1712d8&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"2b1712d8\",\n  null,\n  false,\n  components,\n  renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-badge/u-badge.vue\"\nexport default component.exports","export * from \"-!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=template&id=2b1712d8&scoped=true&\"","var components\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  var s0 = _vm.show\n    ? _vm.__get_style([\n        {\n          top: _vm.offset[0] + \"rpx\",\n          right: _vm.offset[1] + \"rpx\",\n          fontSize: _vm.fontSize + \"rpx\",\n          position: _vm.absolute ? \"absolute\" : \"static\",\n          color: _vm.color,\n          backgroundColor: _vm.bgColor\n        },\n        _vm.boxStyle\n      ])\n    : null\n  _vm.$mp.data = Object.assign(\n    {},\n    {\n      $root: {\n        s0: s0\n      }\n    }\n  )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=script&lang=js&\"","<template>\n\t<view v-if=\"show\" class=\"u-badge\" :class=\"[\n\t\t\tisDot ? 'u-badge-dot' : '', \n\t\t\tsize == 'mini' ? 'u-badge-mini' : '',\n\t\t\ttype ? 'u-badge--bg--' + type : ''\n\t\t]\" :style=\"[{\n\t\t\ttop: offset[0] + 'rpx',\n\t\t\tright: offset[1] + 'rpx',\n\t\t\tfontSize: fontSize + 'rpx',\n\t\t\tposition: absolute ? 'absolute' : 'static',\n\t\t\tcolor: color,\n\t\t\tbackgroundColor: bgColor\n\t\t}, boxStyle]\"\n\t>\n\t\t{{showText}}\n\t</view>\n</template>\n\n<script>\n\t/**\n\t * badge 角标\n\t * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。\n\t * @tutorial https://www.uviewui.com/components/badge.html\n\t * @property {String Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏\n\t * @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)\n\t * @property {Boolean} absolute 组件是否绝对定位,为true时,offset参数才有效(默认true)\n\t * @property {String Number} overflow-count 展示封顶的数字值(默认99)\n\t * @property {String} type 使用预设的背景颜色(默认error)\n\t * @property {Boolean} show-zero 当数值为 0 时,是否展示 Badge(默认false)\n\t * @property {String} size Badge的尺寸,设为mini会得到小一号的Badge(默认default)\n\t * @property {Array} offset 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,单位rpx。absolute为true时有效(默认[20, 20])\n\t * @property {String} color 字体颜色(默认#ffffff)\n\t * @property {String} bgColor 背景颜色,优先级比type高,如设置,type参数会失效\n\t * @property {Boolean} is-center 组件中心点是否和父组件右上角重合,优先级比offset高,如设置,offset参数会失效(默认false)\n\t * @example <u-badge type=\"error\" count=\"7\"></u-badge>\n\t */\n\texport default {\n\t\tname: 'u-badge',\n\t\tprops: {\n\t\t\t// primary,warning,success,error,info\n\t\t\ttype: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'error'\n\t\t\t},\n\t\t\t// default, mini\n\t\t\tsize: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'default'\n\t\t\t},\n\t\t\t//是否是圆点\n\t\t\tisDot: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\t// 显示的数值内容\n\t\t\tcount: {\n\t\t\t\ttype: [Number, String],\n\t\t\t},\n\t\t\t// 展示封顶的数字值\n\t\t\toverflowCount: {\n\t\t\t\ttype: Number,\n\t\t\t\tdefault: 99\n\t\t\t},\n\t\t\t// 当数值为 0 时,是否展示 Badge\n\t\t\tshowZero: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\t// 位置偏移\n\t\t\toffset: {\n\t\t\t\ttype: Array,\n\t\t\t\tdefault: () => {\n\t\t\t\t\treturn [20, 20]\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 是否开启绝对定位,开启了offset才会起作用\n\t\t\tabsolute: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: true\n\t\t\t},\n\t\t\t// 字体大小\n\t\t\tfontSize: {\n\t\t\t\ttype: [String, Number],\n\t\t\t\tdefault: '24'\n\t\t\t},\n\t\t\t// 字体演示\n\t\t\tcolor: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: '#ffffff'\n\t\t\t},\n\t\t\t// badge的背景颜色\n\t\t\tbgColor: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: ''\n\t\t\t},\n\t\t\t// 是否让badge组件的中心点和父组件右上角重合,配置的话,offset将会失效\n\t\t\tisCenter: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\t// 是否将badge中心与父组件右上角重合\n\t\t\tboxStyle() {\n\t\t\t\tlet style = {};\n\t\t\t\tif(this.isCenter) {\n\t\t\t\t\tstyle.top = 0;\n\t\t\t\t\tstyle.right = 0;\n\t\t\t\t\t// Y轴-50%,意味着badge向上移动了badge自身高度一半,X轴50%,意味着向右移动了自身宽度一半\n\t\t\t\t\tstyle.transform = \"translateY(-50%) translateX(50%)\";\n\t\t\t\t} else {\n\t\t\t\t\tstyle.top = this.offset[0] + 'rpx';\n\t\t\t\t\tstyle.right = this.offset[1] + 'rpx';\n\t\t\t\t\tstyle.transform = \"translateY(0) translateX(0)\";\n\t\t\t\t}\n\t\t\t\t// 如果尺寸为mini,后接上scal()\n\t\t\t\tif(this.size == 'mini') {\n\t\t\t\t\tstyle.transform = style.transform + \" scale(0.8)\";\n\t\t\t\t}\n\t\t\t\treturn style;\n\t\t\t},\n\t\t\t// isDot类型时,不显示文字\n\t\t\tshowText() {\n\t\t\t\tif(this.isDot) return '';\n\t\t\t\telse {\n\t\t\t\t\tif(this.count > this.overflowCount) return `${this.overflowCount}+`;\n\t\t\t\t\telse return this.count;\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 是否显示组件\n\t\t\tshow() {\n\t\t\t\t// 如果count的值为0,并且showZero设置为false,不显示组件\n\t\t\t\tif(this.count == 0 && this.showZero == false) return false;\n\t\t\t\telse return true;\n\t\t\t}\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\" scoped>\n\t@import \"../../libs/css/style.components.scss\";\n\t\n\t.u-badge {\n\t\t/* #ifndef APP-NVUE */\n\t\tdisplay: inline-flex;\n\t\t/* #endif */\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tline-height: 24rpx;\n\t\tpadding: 4rpx 8rpx;\n\t\tborder-radius: 100rpx;\n\t\tz-index: 9;\n\t\t\n\t\t&--bg--primary {\n\t\t\tbackground-color: $u-type-primary;\n\t\t}\n\t\t\n\t\t&--bg--error {\n\t\t\tbackground-color: $u-type-error;\n\t\t}\n\t\t\n\t\t&--bg--success {\n\t\t\tbackground-color: $u-type-success;\n\t\t}\n\t\t\n\t\t&--bg--info {\n\t\t\tbackground-color: $u-type-info;\n\t\t}\n\t\t\n\t\t&--bg--warning {\n\t\t\tbackground-color: $u-type-warning;\n\t\t}\n\t}\n\t\n\t.u-badge-dot {\n\t\theight: 16rpx;\n\t\twidth: 16rpx;\n\t\tborder-radius: 100rpx;\n\t\tline-height: 1;\n\t}\n\t\n\t.u-badge-mini {\n\t\ttransform: scale(0.8);\n\t\ttransform-origin: center center;\n\t}\n\t\n\t// .u-primary {\n\t// \tbackground: $u-type-primary;\n\t// \tcolor: #fff;\n\t// }\n\t\n\t// .u-error {\n\t// \tbackground: $u-type-error;\n\t// \tcolor: #fff;\n\t// }\n\t\n\t// .u-warning {\n\t// \tbackground: $u-type-warning;\n\t// \tcolor: #fff;\n\t// }\n\t\n\t// .u-success {\n\t// \tbackground: $u-type-success;\n\t// \tcolor: #fff;\n\t// }\n\t\n\t// .u-black {\n\t// \tbackground: #585858;\n\t// \tcolor: #fff;\n\t// }\n\t\n\t.u-info {\n\t\tbackground-color: $u-type-info;\n\t\tcolor: #fff;\n\t}\n</style>","import mod from \"-!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=style&index=0&id=2b1712d8&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=style&index=0&id=2b1712d8&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n    if(module.hot) {\n      // 1700461804555\n      var cssReload = require(\"/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n      module.hot.dispose(cssReload);\n      module.hot.accept(undefined, cssReload);\n    }\n  "],"sourceRoot":""}