You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
16 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["webpack:///D:/WebstormProjects/uni-Identify-quality/uview-ui/components/u-tabbar/u-tabbar.vue?67a6","webpack:///D:/WebstormProjects/uni-Identify-quality/uview-ui/components/u-tabbar/u-tabbar.vue?2c44","webpack:///D:/WebstormProjects/uni-Identify-quality/uview-ui/components/u-tabbar/u-tabbar.vue?baf7","webpack:///D:/WebstormProjects/uni-Identify-quality/uview-ui/components/u-tabbar/u-tabbar.vue?c6b5","uni-app:///uview-ui/components/u-tabbar/u-tabbar.vue","webpack:///D:/WebstormProjects/uni-Identify-quality/uview-ui/components/u-tabbar/u-tabbar.vue?dc1d"],"names":["renderjs","component","options","__file","components","uSafeBottom","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","s0","_self","_c","__get_style","tabbarStyle","$mp","data","Object","assign","$root","recyclableRender","staticRenderFns","_withStripped","name","mixins","placeholderHeight","computed","zIndex","updateChild","updatePlaceholder","watch","created","mounted","methods","updateChildren","setPlaceholderHeight","uni","height"],"mappings":"sIAAA,oIACIA,EADJ,QASIC,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,WACA,MACA,EACA,gBACAD,GAGFC,EAAUC,QAAQC,OAAS,4CACZ,aAAAF,E,0CCvBf,uQ,iCCAA,IAAIG,EAAJ,0LACA,IACEA,EAAa,CACXC,YAAa,WACX,OAAO,oHAKX,MAAOC,GACP,IAC+C,IAA7CA,EAAEC,QAAQC,QAAQ,wBACa,IAA/BF,EAAEC,QAAQC,QAAQ,QAWlB,MAAMF,EATNG,QAAQC,MAAMJ,EAAEC,SAChBE,QAAQC,MAAM,mBACdD,QAAQC,MACN,uFAEFD,QAAQC,MACN,mDAMN,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eAETC,GADKJ,EAAIK,MAAMC,GACVN,EAAIO,YAAY,CAACP,EAAIQ,eAC9BR,EAAIS,IAAIC,KAAOC,OAAOC,OACpB,GACA,CACEC,MAAO,CACLT,GAAIA,MAKRU,GAAmB,EACnBC,EAAkB,GACtBhB,EAAOiB,eAAgB,G,iCC1CvB,yHAAi3B,eAAG,G,qJCyBp3B,YAIA,EAgBA,CACAC,gBACAC,2CACAR,gBACA,OACAS,sBAGAC,UACAZ,uBACA,OACAa,oBAGA,0DAGAC,uBACA,wDAEAC,6BACA,sCAGAC,OACAF,uBAEA,uBAEAC,6BAEA,8BAGAE,mBACA,kBAEAC,mBACA,6BAEAC,SACAC,0BAEA,qFAGAC,gCAAA,uIACA,wFAEAC,eAAA,OAEA,mEAAAC,kBAEA,yBACA,0CARA,MAqBA,c,6DChHA,yHAAgoD,eAAG,G","file":"uview-ui/components/u-tabbar/u-tabbar.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-tabbar.vue?vue&type=template&id=180fb800&scoped=true&\"\nvar renderjs\nimport script from \"./u-tabbar.vue?vue&type=script&lang=js&\"\nexport * from \"./u-tabbar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-tabbar.vue?vue&type=style&index=0&id=180fb800&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\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 \"180fb800\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-tabbar/u-tabbar.vue\"\nexport default component.exports","export * from \"-!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-tabbar.vue?vue&type=template&id=180fb800&scoped=true&\"","var components\ntry {\n components = {\n uSafeBottom: function () {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-safe-bottom/u-safe-bottom\" */ \"@/uview-ui/components/u-safe-bottom/u-safe-bottom.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var s0 = _vm.__get_style([_vm.tabbarStyle])\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 \"-!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-tabbar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-tabbar.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"u-tabbar\">\r\n\t\t<view\r\n\t\t class=\"u-tabbar__content\"\r\n\t\t ref=\"u-tabbar__content\"\r\n\t\t @touchmove.stop.prevent=\"noop\"\r\n\t\t :class=\"[border && 'u-border-top', fixed && 'u-tabbar--fixed']\"\r\n\t\t :style=\"[tabbarStyle]\"\r\n\t\t>\r\n\t\t\t<view class=\"u-tabbar__content__item-wrapper\">\r\n\t\t\t\t<slot />\r\n\t\t\t</view>\r\n\t\t\t<u-safe-bottom v-if=\"safeAreaInsetBottom\"></u-safe-bottom>\r\n\t\t</view>\r\n\t\t<view\r\n\t\t class=\"u-tabbar__placeholder\"\r\n\t\t\tv-if=\"placeholder\"\r\n\t\t :style=\"{\r\n\t\t\t\theight: placeholderHeight + 'px',\r\n\t\t\t}\"\r\n\t\t></view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport props from './props.js';\r\n\t// #ifdef APP-NVUE\r\n\tconst dom = uni.requireNativePlugin('dom')\r\n\t// #endif\r\n\t/**\r\n\t * Tabbar 底部导航栏\r\n\t * @description 此组件提供了自定义tabbar的能力。\r\n\t * @tutorial https://www.uviewui.com/components/tabbar.html\r\n\t * @property {String | Number}\tvalue\t\t\t\t当前匹配项的name\r\n\t * @property {Boolean}\t\t\tsafeAreaInsetBottom\t是否为iPhoneX留出底部安全距离默认 true \r\n\t * @property {Boolean}\t\t\tborder\t\t\t\t是否显示上方边框默认 true \r\n\t * @property {String | Number}\tzIndex\t\t\t\t元素层级z-index默认 1 \r\n\t * @property {String}\t\t\tactiveColor\t\t\t选中标签的颜色默认 '#1989fa' \r\n\t * @property {String}\t\t\tinactiveColor\t\t未选中标签的颜色默认 '#7d7e80' \r\n\t * @property {Boolean}\t\t\tfixed\t\t\t\t是否固定在底部默认 true \r\n\t * @property {Boolean}\t\t\tplaceholder\t\t\tfixed定位固定在底部时是否生成一个等高元素防止塌陷默认 true \r\n\t * @property {Object}\t\t\tcustomStyle\t\t\t定义需要用到的外部样式\r\n\t *\r\n\t * @example <u-tabbar :value=\"value2\" :placeholder=\"false\" @change=\"name => value2 = name\" :fixed=\"false\" :safeAreaInsetBottom=\"false\"><u-tabbar-item text=\"首页\" icon=\"home\" dot ></u-tabbar-item></u-tabbar>\r\n\t */\r\n\texport default {\r\n\t\tname: 'u-tabbar',\r\n\t\tmixins: [uni.$u.mpMixin, uni.$u.mixin,props],\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tplaceholderHeight: 0\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\ttabbarStyle() {\r\n\t\t\t\tconst style = {\r\n\t\t\t\t\tzIndex: this.zIndex\r\n\t\t\t\t}\r\n\t\t\t\t// 合并来自父组件的customStyle样式\r\n\t\t\t\treturn uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))\r\n\t\t\t},\r\n\t\t\t// 监听多个参数的变化通过在computed执行对应的操作\r\n\t\t\tupdateChild() {\r\n\t\t\t\treturn [this.value, this.activeColor, this.inactiveColor]\r\n\t\t\t},\r\n\t\t\tupdatePlaceholder() {\r\n\t\t\t\treturn [this.fixed, this.placeholder]\r\n\t\t\t}\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\tupdateChild() {\r\n\t\t\t\t// 如果updateChildren中的元素发生了变化则执行子元素初始化操作\r\n\t\t\t\tthis.updateChildren()\r\n\t\t\t},\r\n\t\t\tupdatePlaceholder() {\r\n\t\t\t\t// 如果fixedplaceholder等参数发生变化重新计算占位元素的高度\r\n\t\t\t\tthis.setPlaceholderHeight()\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreated() {\r\n\t\t\tthis.children = []\r\n\t\t},\r\n\t\tmounted() {\r\n\t\t\tthis.setPlaceholderHeight()\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tupdateChildren() {\r\n\t\t\t\t// 如果存在子元素则执行子元素的updateFromParent进行更新数据\r\n\t\t\t\tthis.children.length && this.children.map(child => child.updateFromParent())\r\n\t\t\t},\r\n\t\t\t// 设置用于防止塌陷元素的高度\r\n\t\t\tasync setPlaceholderHeight() {\r\n\t\t\t\tif (!this.fixed || !this.placeholder) return\r\n\t\t\t\t// 延时一定时间\r\n\t\t\t\tawait uni.$u.sleep(20)\r\n\t\t\t\t// #ifndef APP-NVUE\r\n\t\t\t\tthis.$uGetRect('.u-tabbar__content').then(({height = 50}) => {\r\n\t\t\t\t\t// 修复IOS safearea bottom 未填充高度\r\n\t\t\t\t\tthis.placeholderHeight = height\r\n\t\t\t\t})\r\n\t\t\t\t// #endif\r\n\r\n\t\t\t\t// #ifdef APP-NVUE\r\n\t\t\t\tdom.getComponentRect(this.$refs['u-tabbar__content'], (res) => {\r\n\t\t\t\t\tconst {\r\n\t\t\t\t\t\tsize\r\n\t\t\t\t\t} = res\r\n\t\t\t\t\tthis.placeholderHeight = size.height\r\n\t\t\t\t})\r\n\t\t\t\t// #endif\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n\t@import \"../../libs/css/components.scss\";\r\n\r\n\t.u-tabbar {\r\n\t\t@include flex(column);\r\n\t\tflex: 1;\r\n\t\tjustify-content: center;\r\n\r\n\t\t&__content {\r\n\t\t\t@include flex(column);\r\n\t\t\tbackground-color: #fff;\r\n\r\n\t\t\t&__item-wrapper {\r\n\t\t\t\theight: 50px;\r\n\t\t\t\t@include flex(row);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&--fixed {\r\n\t\t\tposition: fixed;\r\n\t\t\tbottom: 0;\r\n\t\t\tleft: 0;\r\n\t\t\tright: 0;\r\n\t\t}\r\n\t}\r\n</style>\r\n","import mod from \"-!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-tabbar.vue?vue&type=style&index=0&id=180fb800&lang=scss&scoped=true&\"; export default mod; export * from \"-!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\37363\\\\Downloads\\\\HBuilderX.3.8.7.20230703\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-tabbar.vue?vue&type=style&index=0&id=180fb800&lang=scss&scoped=true&\""],"sourceRoot":""}