u-badge.js.map 16 KB

1
  1. {"version":3,"sources":["webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?da7e","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?9bf9","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?e6c4","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?3e9c","uni-app:///uview-ui/components/u-badge/u-badge.vue","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?0f98","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-badge/u-badge.vue?7988"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgI;AAChI;AAC2D;AACL;AACsC;;;AAG5F;AACqK;AACrK,gBAAgB,+KAAU;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;AAAimB,CAAgB,2nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmBrnB;;;;;;;;;;;;;;;;;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;AAA2nC,CAAgB,qmCAAG,EAAC,C;;;;;;;;;;;ACA/oC;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 \"!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-badge.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view v-if=\"show\" class=\"u-badge\" :class=\"[\r\n\t\t\tisDot ? 'u-badge-dot' : '', \r\n\t\t\tsize == 'mini' ? 'u-badge-mini' : '',\r\n\t\t\ttype ? 'u-badge--bg--' + type : ''\r\n\t\t]\" :style=\"[{\r\n\t\t\ttop: offset[0] + 'rpx',\r\n\t\t\tright: offset[1] + 'rpx',\r\n\t\t\tfontSize: fontSize + 'rpx',\r\n\t\t\tposition: absolute ? 'absolute' : 'static',\r\n\t\t\tcolor: color,\r\n\t\t\tbackgroundColor: bgColor\r\n\t\t}, boxStyle]\"\r\n\t>\r\n\t\t{{showText}}\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\t/**\r\n\t * badge 角标\r\n\t * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。\r\n\t * @tutorial https://www.uviewui.com/components/badge.html\r\n\t * @property {String Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏\r\n\t * @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)\r\n\t * @property {Boolean} absolute 组件是否绝对定位,为true时,offset参数才有效(默认true)\r\n\t * @property {String Number} overflow-count 展示封顶的数字值(默认99)\r\n\t * @property {String} type 使用预设的背景颜色(默认error)\r\n\t * @property {Boolean} show-zero 当数值为 0 时,是否展示 Badge(默认false)\r\n\t * @property {String} size Badge的尺寸,设为mini会得到小一号的Badge(默认default)\r\n\t * @property {Array} offset 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,单位rpx。absolute为true时有效(默认[20, 20])\r\n\t * @property {String} color 字体颜色(默认#ffffff)\r\n\t * @property {String} bgColor 背景颜色,优先级比type高,如设置,type参数会失效\r\n\t * @property {Boolean} is-center 组件中心点是否和父组件右上角重合,优先级比offset高,如设置,offset参数会失效(默认false)\r\n\t * @example <u-badge type=\"error\" count=\"7\"></u-badge>\r\n\t */\r\n\texport default {\r\n\t\tname: 'u-badge',\r\n\t\tprops: {\r\n\t\t\t// primary,warning,success,error,info\r\n\t\t\ttype: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: 'error'\r\n\t\t\t},\r\n\t\t\t// default, mini\r\n\t\t\tsize: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: 'default'\r\n\t\t\t},\r\n\t\t\t//是否是圆点\r\n\t\t\tisDot: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\t// 显示的数值内容\r\n\t\t\tcount: {\r\n\t\t\t\ttype: [Number, String],\r\n\t\t\t},\r\n\t\t\t// 展示封顶的数字值\r\n\t\t\toverflowCount: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 99\r\n\t\t\t},\r\n\t\t\t// 当数值为 0 时,是否展示 Badge\r\n\t\t\tshowZero: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\t// 位置偏移\r\n\t\t\toffset: {\r\n\t\t\t\ttype: Array,\r\n\t\t\t\tdefault: () => {\r\n\t\t\t\t\treturn [20, 20]\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 是否开启绝对定位,开启了offset才会起作用\r\n\t\t\tabsolute: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: true\r\n\t\t\t},\r\n\t\t\t// 字体大小\r\n\t\t\tfontSize: {\r\n\t\t\t\ttype: [String, Number],\r\n\t\t\t\tdefault: '24'\r\n\t\t\t},\r\n\t\t\t// 字体演示\r\n\t\t\tcolor: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: '#ffffff'\r\n\t\t\t},\r\n\t\t\t// badge的背景颜色\r\n\t\t\tbgColor: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t},\r\n\t\t\t// 是否让badge组件的中心点和父组件右上角重合,配置的话,offset将会失效\r\n\t\t\tisCenter: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\t// 是否将badge中心与父组件右上角重合\r\n\t\t\tboxStyle() {\r\n\t\t\t\tlet style = {};\r\n\t\t\t\tif(this.isCenter) {\r\n\t\t\t\t\tstyle.top = 0;\r\n\t\t\t\t\tstyle.right = 0;\r\n\t\t\t\t\t// Y轴-50%,意味着badge向上移动了badge自身高度一半,X轴50%,意味着向右移动了自身宽度一半\r\n\t\t\t\t\tstyle.transform = \"translateY(-50%) translateX(50%)\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstyle.top = this.offset[0] + 'rpx';\r\n\t\t\t\t\tstyle.right = this.offset[1] + 'rpx';\r\n\t\t\t\t\tstyle.transform = \"translateY(0) translateX(0)\";\r\n\t\t\t\t}\r\n\t\t\t\t// 如果尺寸为mini,后接上scal()\r\n\t\t\t\tif(this.size == 'mini') {\r\n\t\t\t\t\tstyle.transform = style.transform + \" scale(0.8)\";\r\n\t\t\t\t}\r\n\t\t\t\treturn style;\r\n\t\t\t},\r\n\t\t\t// isDot类型时,不显示文字\r\n\t\t\tshowText() {\r\n\t\t\t\tif(this.isDot) return '';\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(this.count > this.overflowCount) return `${this.overflowCount}+`;\r\n\t\t\t\t\telse return this.count;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 是否显示组件\r\n\t\t\tshow() {\r\n\t\t\t\t// 如果count的值为0,并且showZero设置为false,不显示组件\r\n\t\t\t\tif(this.count == 0 && this.showZero == false) return false;\r\n\t\t\t\telse return true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t@import \"../../libs/css/style.components.scss\";\r\n\t\r\n\t.u-badge {\r\n\t\t/* #ifndef APP-NVUE */\r\n\t\tdisplay: inline-flex;\r\n\t\t/* #endif */\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tline-height: 24rpx;\r\n\t\tpadding: 4rpx 8rpx;\r\n\t\tborder-radius: 100rpx;\r\n\t\tz-index: 9;\r\n\t\t\r\n\t\t&--bg--primary {\r\n\t\t\tbackground-color: $u-type-primary;\r\n\t\t}\r\n\t\t\r\n\t\t&--bg--error {\r\n\t\t\tbackground-color: $u-type-error;\r\n\t\t}\r\n\t\t\r\n\t\t&--bg--success {\r\n\t\t\tbackground-color: $u-type-success;\r\n\t\t}\r\n\t\t\r\n\t\t&--bg--info {\r\n\t\t\tbackground-color: $u-type-info;\r\n\t\t}\r\n\t\t\r\n\t\t&--bg--warning {\r\n\t\t\tbackground-color: $u-type-warning;\r\n\t\t}\r\n\t}\r\n\t\r\n\t.u-badge-dot {\r\n\t\theight: 16rpx;\r\n\t\twidth: 16rpx;\r\n\t\tborder-radius: 100rpx;\r\n\t\tline-height: 1;\r\n\t}\r\n\t\r\n\t.u-badge-mini {\r\n\t\ttransform: scale(0.8);\r\n\t\ttransform-origin: center center;\r\n\t}\r\n\t\r\n\t// .u-primary {\r\n\t// \tbackground: $u-type-primary;\r\n\t// \tcolor: #fff;\r\n\t// }\r\n\t\r\n\t// .u-error {\r\n\t// \tbackground: $u-type-error;\r\n\t// \tcolor: #fff;\r\n\t// }\r\n\t\r\n\t// .u-warning {\r\n\t// \tbackground: $u-type-warning;\r\n\t// \tcolor: #fff;\r\n\t// }\r\n\t\r\n\t// .u-success {\r\n\t// \tbackground: $u-type-success;\r\n\t// \tcolor: #fff;\r\n\t// }\r\n\t\r\n\t// .u-black {\r\n\t// \tbackground: #585858;\r\n\t// \tcolor: #fff;\r\n\t// }\r\n\t\r\n\t.u-info {\r\n\t\tbackground-color: $u-type-info;\r\n\t\tcolor: #fff;\r\n\t}\r\n</style>","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\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 // 1631763038701\n var cssReload = require(\"E:/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":""}