u-badge.js.map
14.6 KB
{"version":3,"sources":["webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?68fa","webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?97eb","webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?c862","webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?a3b9","uni-app:///node_modules/uview-ui/components/u-badge/u-badge.vue","webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?5adb","webpack:///D:/vue/kaoshi3-fangweishangcheng/node_modules/uview-ui/components/u-badge/u-badge.vue?a6ac"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgI;AAChI;AAC2D;AACL;AACsC;;;AAG5F;AACgL;AAChL,gBAAgB,6KAAU;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,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACtBA;AAAA;AAAA;AAAA;AAAqqB,CAAgB,inBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;ACUzrB,gF;;;;;;;;;AACA;;;;;;;;;;;;;;;;;;;;kBAqBA,EACA,eADA,EAEA,sDAFA,EAGA,YACA;AACA,YAFA,sBAEA,CACA,eACA,aACA,CALA;AAMA;AACA,cAPA,wBAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA3BA;AA4BA,aA5BA,uBA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDADA,GACA;AACA,aADA,GACA,GADA,IACA,GADA,GACA,GAFA,GAEA,UAFA;AAGA;AACA;AACA,oCAbA;;AAeA,KA5CA,EAHA,E;;;;;;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAA4xC,CAAgB,wnCAAG,EAAC,C;;;;;;;;;;;ACAhzC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"node-modules/uview-ui/components/u-badge/u-badge.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-badge.vue?vue&type=template&id=662d25bf&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=662d25bf&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../高级前台制作/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 \"662d25bf\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"node_modules/uview-ui/components/u-badge/u-badge.vue\"\nexport default component.exports","export * from \"-!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=template&id=662d25bf&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 m0 = (Number(_vm.value) === 0 ? _vm.showZero : true) || _vm.isDot\n var s0 =\n _vm.show && m0\n ? _vm.__get_style([_vm.$u.addStyle(_vm.customStyle), _vm.badgeStyle])\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n m0: m0,\n s0: s0\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../高级前台制作/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 \"-!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../高级前台制作/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<text\n\t\tv-if=\"show && ((Number(value) === 0 ? showZero : true) || isDot)\"\n\t\t:class=\"[isDot ? 'u-badge--dot' : 'u-badge--not-dot', inverted && 'u-badge--inverted', shape === 'horn' && 'u-badge--horn', `u-badge--${type}${inverted ? '--inverted' : ''}`]\"\n\t\t:style=\"[$u.addStyle(customStyle), badgeStyle]\"\n\t\tclass=\"u-badge\"\n\t>{{ isDot ? '' :showValue }}</text>\n</template>\n\n<script>\n\timport props from './props.js';\n\t/**\n\t * badge 徽标数\n\t * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。\n\t * @tutorial https://uviewui.com/components/badge.html\n\t * \n\t * @property {Boolean} \t\t\tisDot \t\t是否显示圆点 (默认 false )\n\t * @property {String | Number} \tvalue \t\t显示的内容\n\t * @property {Boolean} \t\t\tshow \t\t是否显示 (默认 true )\n\t * @property {String | Number} \tmax \t\t最大值,超过最大值会显示 '{max}+' (默认999)\n\t * @property {String} \t\t\ttype \t\t主题类型,error|warning|success|primary (默认 'error' )\n\t * @property {Boolean} \t\t\tshowZero\t当数值为 0 时,是否展示 Badge (默认 false )\n\t * @property {String} \t\t\tbgColor \t背景颜色,优先级比type高,如设置,type参数会失效\n\t * @property {String} \t\t\tcolor \t\t字体颜色 (默认 '#ffffff' )\n\t * @property {String} \t\t\tshape \t\t徽标形状,circle-四角均为圆角,horn-左下角为直角 (默认 'circle' )\n\t * @property {String} \t\t\tnumberType\t设置数字的显示方式,overflow|ellipsis|limit (默认 'overflow' )\n\t * @property {Array}} \t\t\toffset\t\t设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效\n\t * @property {Boolean} \t\t\tinverted\t是否反转背景和字体颜色(默认 false )\n\t * @property {Boolean} \t\t\tabsolute\t是否绝对定位(默认 false )\n\t * @property {Object}\t\t\tcustomStyle\t定义需要用到的外部样式\n\t * @example <u-badge :type=\"type\" :count=\"count\"></u-badge>\n\t */\n\texport default {\n\t\tname: 'u-badge',\n\t\tmixins: [uni.$u.mpMixin, props, uni.$u.mixin],\n\t\tcomputed: {\n\t\t\t// 是否将badge中心与父组件右上角重合\n\t\t\tboxStyle() {\n\t\t\t\tlet style = {};\n\t\t\t\treturn style;\n\t\t\t},\n\t\t\t// 整个组件的样式\n\t\t\tbadgeStyle() {\n\t\t\t\tconst style = {}\n\t\t\t\tif(this.color) {\n\t\t\t\t\tstyle.color = this.color\n\t\t\t\t}\n\t\t\t\tif (this.bgColor && !this.inverted) {\n\t\t\t\t\tstyle.backgroundColor = this.bgColor\n\t\t\t\t}\n\t\t\t\tif (this.absolute) {\n\t\t\t\t\tstyle.position = 'absolute'\n\t\t\t\t\t// 如果有设置offset参数\n\t\t\t\t\tif(this.offset.length) {\n\t\t\t\t\t\t// top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top\n\t\t\t\t\t\tconst top = this.offset[0]\n\t\t\t\t\t\tconst right = this.offset[1] || top\n\t\t\t\t\t\tstyle.top = uni.$u.addUnit(top)\n\t\t\t\t\t\tstyle.right = uni.$u.addUnit(right)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn style\n\t\t\t},\n\t\t\tshowValue() {\n\t\t\t\tswitch (this.numberType) {\n\t\t\t\t\tcase \"overflow\":\n\t\t\t\t\t\treturn Number(this.value) > Number(this.max) ? this.max + \"+\" : this.value\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ellipsis\":\n\t\t\t\t\t\treturn Number(this.value) > Number(this.max) ? \"...\" : this.value\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"limit\":\n\t\t\t\t\t\treturn Number(this.value) > 999 ? Number(this.value) >= 9999 ?\n\t\t\t\t\t\t\tMath.floor(this.value / 1e4 * 100) / 100 + \"w\" : Math.floor(this.value /\n\t\t\t\t\t\t\t\t1e3 * 100) / 100 + \"k\" : this.value\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn Number(this.value)\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\" scoped>\n\t@import \"../../libs/css/components.scss\";\n\n\t$u-badge-primary: $u-primary !default;\n\t$u-badge-error: $u-error !default;\n\t$u-badge-success: $u-success !default;\n\t$u-badge-info: $u-info !default;\n\t$u-badge-warning: $u-warning !default;\n\t$u-badge-dot-radius: 100px !default;\n\t$u-badge-dot-size: 8px !default;\n\t$u-badge-dot-right: 4px !default;\n\t$u-badge-dot-top: 0 !default;\n\t$u-badge-text-font-size: 11px !default;\n\t$u-badge-text-right: 10px !default;\n\t$u-badge-text-padding: 2px 5px !default;\n\t$u-badge-text-align: center !default;\n\t$u-badge-text-color: #FFFFFF !default;\n\n\t.u-badge {\n\t\tborder-top-right-radius: $u-badge-dot-radius;\n\t\tborder-top-left-radius: $u-badge-dot-radius;\n\t\tborder-bottom-left-radius: $u-badge-dot-radius;\n\t\tborder-bottom-right-radius: $u-badge-dot-radius;\n\t\t@include flex;\n\t\tline-height: $u-badge-text-font-size;\n\t\ttext-align: $u-badge-text-align;\n\t\tfont-size: $u-badge-text-font-size;\n\t\tcolor: $u-badge-text-color;\n\n\t\t&--dot {\n\t\t\theight: $u-badge-dot-size;\n\t\t\twidth: $u-badge-dot-size;\n\t\t}\n\t\t\n\t\t&--inverted {\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t\n\t\t&--not-dot {\n\t\t\tpadding: $u-badge-text-padding;\n\t\t}\n\n\t\t&--horn {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t&--primary {\n\t\t\tbackground-color: $u-badge-primary;\n\t\t}\n\t\t\n\t\t&--primary--inverted {\n\t\t\tcolor: $u-badge-primary;\n\t\t}\n\n\t\t&--error {\n\t\t\tbackground-color: $u-badge-error;\n\t\t}\n\t\t\n\t\t&--error--inverted {\n\t\t\tcolor: $u-badge-error;\n\t\t}\n\n\t\t&--success {\n\t\t\tbackground-color: $u-badge-success;\n\t\t}\n\t\t\n\t\t&--success--inverted {\n\t\t\tcolor: $u-badge-success;\n\t\t}\n\n\t\t&--info {\n\t\t\tbackground-color: $u-badge-info;\n\t\t}\n\t\t\n\t\t&--info--inverted {\n\t\t\tcolor: $u-badge-info;\n\t\t}\n\n\t\t&--warning {\n\t\t\tbackground-color: $u-badge-warning;\n\t\t}\n\t\t\n\t\t&--warning--inverted {\n\t\t\tcolor: $u-badge-warning;\n\t\t}\n\t}\n</style>\n","import mod from \"-!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=style&index=0&id=662d25bf&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../高级前台制作/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-badge.vue?vue&type=style&index=0&id=662d25bf&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1670378477824\n var cssReload = require(\"D:/高级前台制作/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":""}