u-badge.js.map
16.0 KB
{"version":3,"sources":["webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?42b7","webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?f629","webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?67d2","webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?c0e8","uni-app:///node_modules/uview-ui/components/u-badge/u-badge.vue","webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?a70a","webpack:///C:/Users/zhuo/Documents/WeChat Files/wxid_g8pfss2de72222/FileStorage/File/2022-11/beijingTheatre/node_modules/uview-ui/components/u-badge/u-badge.vue?bf18"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgI;AAChI;AAC2D;AACL;AACsC;;;AAG5F;AAC+L;AAC/L,gBAAgB,wMAAU;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;AAAmuB,CAAgB,wvBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;ACUvvB,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;AAA84C,CAAgB,22CAAG,EAAC,C;;;;;;;;;;;ACAl6C;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 \"!D:\\\\HBuilderX.3.4.7.20220422\\\\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 \"-!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\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 =\n _vm.show && ((Number(_vm.value) === 0 ? _vm.showZero : true) || _vm.isDot)\n var s0 = 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 \"-!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\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 \"-!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\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<text\r\n\t\tv-if=\"show && ((Number(value) === 0 ? showZero : true) || isDot)\"\r\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' : ''}`]\"\r\n\t\t:style=\"[$u.addStyle(customStyle), badgeStyle]\"\r\n\t\tclass=\"u-badge\"\r\n\t>{{ isDot ? '' :showValue }}</text>\r\n</template>\r\n\r\n<script>\r\n\timport props from './props.js';\r\n\t/**\r\n\t * badge 徽标数\r\n\t * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。\r\n\t * @tutorial https://uviewui.com/components/badge.html\r\n\t * \r\n\t * @property {Boolean} \t\t\tisDot \t\t是否显示圆点 (默认 false )\r\n\t * @property {String | Number} \tvalue \t\t显示的内容\r\n\t * @property {Boolean} \t\t\tshow \t\t是否显示 (默认 true )\r\n\t * @property {String | Number} \tmax \t\t最大值,超过最大值会显示 '{max}+' (默认999)\r\n\t * @property {String} \t\t\ttype \t\t主题类型,error|warning|success|primary (默认 'error' )\r\n\t * @property {Boolean} \t\t\tshowZero\t当数值为 0 时,是否展示 Badge (默认 false )\r\n\t * @property {String} \t\t\tbgColor \t背景颜色,优先级比type高,如设置,type参数会失效\r\n\t * @property {String} \t\t\tcolor \t\t字体颜色 (默认 '#ffffff' )\r\n\t * @property {String} \t\t\tshape \t\t徽标形状,circle-四角均为圆角,horn-左下角为直角 (默认 'circle' )\r\n\t * @property {String} \t\t\tnumberType\t设置数字的显示方式,overflow|ellipsis|limit (默认 'overflow' )\r\n\t * @property {Array}} \t\t\toffset\t\t设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效\r\n\t * @property {Boolean} \t\t\tinverted\t是否反转背景和字体颜色(默认 false )\r\n\t * @property {Boolean} \t\t\tabsolute\t是否绝对定位(默认 false )\r\n\t * @property {Object}\t\t\tcustomStyle\t定义需要用到的外部样式\r\n\t * @example <u-badge :type=\"type\" :count=\"count\"></u-badge>\r\n\t */\r\n\texport default {\r\n\t\tname: 'u-badge',\r\n\t\tmixins: [uni.$u.mpMixin, props, uni.$u.mixin],\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\treturn style;\r\n\t\t\t},\r\n\t\t\t// 整个组件的样式\r\n\t\t\tbadgeStyle() {\r\n\t\t\t\tconst style = {}\r\n\t\t\t\tif(this.color) {\r\n\t\t\t\t\tstyle.color = this.color\r\n\t\t\t\t}\r\n\t\t\t\tif (this.bgColor && !this.inverted) {\r\n\t\t\t\t\tstyle.backgroundColor = this.bgColor\r\n\t\t\t\t}\r\n\t\t\t\tif (this.absolute) {\r\n\t\t\t\t\tstyle.position = 'absolute'\r\n\t\t\t\t\t// 如果有设置offset参数\r\n\t\t\t\t\tif(this.offset.length) {\r\n\t\t\t\t\t\t// top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top\r\n\t\t\t\t\t\tconst top = this.offset[0]\r\n\t\t\t\t\t\tconst right = this.offset[1] || top\r\n\t\t\t\t\t\tstyle.top = uni.$u.addUnit(top)\r\n\t\t\t\t\t\tstyle.right = uni.$u.addUnit(right)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn style\r\n\t\t\t},\r\n\t\t\tshowValue() {\r\n\t\t\t\tswitch (this.numberType) {\r\n\t\t\t\t\tcase \"overflow\":\r\n\t\t\t\t\t\treturn Number(this.value) > Number(this.max) ? this.max + \"+\" : this.value\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ellipsis\":\r\n\t\t\t\t\t\treturn Number(this.value) > Number(this.max) ? \"...\" : this.value\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"limit\":\r\n\t\t\t\t\t\treturn Number(this.value) > 999 ? Number(this.value) >= 9999 ?\r\n\t\t\t\t\t\t\tMath.floor(this.value / 1e4 * 100) / 100 + \"w\" : Math.floor(this.value /\r\n\t\t\t\t\t\t\t\t1e3 * 100) / 100 + \"k\" : this.value\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn Number(this.value)\r\n\t\t\t\t}\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/components.scss\";\r\n\r\n\t$u-badge-primary: $u-primary !default;\r\n\t$u-badge-error: $u-error !default;\r\n\t$u-badge-success: $u-success !default;\r\n\t$u-badge-info: $u-info !default;\r\n\t$u-badge-warning: $u-warning !default;\r\n\t$u-badge-dot-radius: 100px !default;\r\n\t$u-badge-dot-size: 8px !default;\r\n\t$u-badge-dot-right: 4px !default;\r\n\t$u-badge-dot-top: 0 !default;\r\n\t$u-badge-text-font-size: 11px !default;\r\n\t$u-badge-text-right: 10px !default;\r\n\t$u-badge-text-padding: 2px 5px !default;\r\n\t$u-badge-text-align: center !default;\r\n\t$u-badge-text-color: #FFFFFF !default;\r\n\r\n\t.u-badge {\r\n\t\tborder-top-right-radius: $u-badge-dot-radius;\r\n\t\tborder-top-left-radius: $u-badge-dot-radius;\r\n\t\tborder-bottom-left-radius: $u-badge-dot-radius;\r\n\t\tborder-bottom-right-radius: $u-badge-dot-radius;\r\n\t\t@include flex;\r\n\t\tline-height: $u-badge-text-font-size;\r\n\t\ttext-align: $u-badge-text-align;\r\n\t\tfont-size: $u-badge-text-font-size;\r\n\t\tcolor: $u-badge-text-color;\r\n\r\n\t\t&--dot {\r\n\t\t\theight: $u-badge-dot-size;\r\n\t\t\twidth: $u-badge-dot-size;\r\n\t\t}\r\n\t\t\r\n\t\t&--inverted {\r\n\t\t\tfont-size: 13px;\r\n\t\t}\r\n\t\t\r\n\t\t&--not-dot {\r\n\t\t\tpadding: $u-badge-text-padding;\r\n\t\t}\r\n\r\n\t\t&--horn {\r\n\t\t\tborder-bottom-left-radius: 0;\r\n\t\t}\r\n\r\n\t\t&--primary {\r\n\t\t\tbackground-color: $u-badge-primary;\r\n\t\t}\r\n\t\t\r\n\t\t&--primary--inverted {\r\n\t\t\tcolor: $u-badge-primary;\r\n\t\t}\r\n\r\n\t\t&--error {\r\n\t\t\tbackground-color: $u-badge-error;\r\n\t\t}\r\n\t\t\r\n\t\t&--error--inverted {\r\n\t\t\tcolor: $u-badge-error;\r\n\t\t}\r\n\r\n\t\t&--success {\r\n\t\t\tbackground-color: $u-badge-success;\r\n\t\t}\r\n\t\t\r\n\t\t&--success--inverted {\r\n\t\t\tcolor: $u-badge-success;\r\n\t\t}\r\n\r\n\t\t&--info {\r\n\t\t\tbackground-color: $u-badge-info;\r\n\t\t}\r\n\t\t\r\n\t\t&--info--inverted {\r\n\t\t\tcolor: $u-badge-info;\r\n\t\t}\r\n\r\n\t\t&--warning {\r\n\t\t\tbackground-color: $u-badge-warning;\r\n\t\t}\r\n\t\t\r\n\t\t&--warning--inverted {\r\n\t\t\tcolor: $u-badge-warning;\r\n\t\t}\r\n\t}\r\n</style>\r\n","import mod from \"-!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\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 \"-!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\HBuilderX.3.4.7.20220422\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX.3.4.7.20220422\\\\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 // 1668837497615\n var cssReload = require(\"D:/HBuilderX.3.4.7.20220422/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":""}