u-toast.js.map
17.4 KB
{"version":3,"sources":["webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?287a","webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?7f92","webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?ec00","webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?bc7a","uni-app:///uview-ui/components/u-toast/u-toast.vue","webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?56d9","webpack:////Users/linon/work/workai/job-sharing/uview-ui/components/u-toast/u-toast.vue?e2f7"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgI;AAChI;AAC2D;AACL;AACsC;;;AAG5F;AACmN;AACnN,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,aAAa,uMAEN;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAo1B,CAAgB,qyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;ACYx2B;;;;;;;;AAQA;AACA,iBADA;AAEA;AACA;AACA;AACA,4BADA;AAEA,iBAFA,EAFA,EAFA;;;AASA,MATA,kBASA;AACA;AACA,mBADA;AAEA,iBAFA,EAEA;AACA;AACA,kBADA,EACA;AACA,iBAFA,EAEA;AACA,gBAHA,EAGA;AACA,sBAJA,EAIA;AACA,oBALA,EAKA;AACA,eANA,EAMA;AACA,kBAPA,EAOA;AACA,0BARA,EAQA;AACA,sBATA,EASA;AACA,mBAVA,CAUA;AAVA,OAHA;AAeA,mBAfA,CAeA;AAfA;AAiBA,GA3BA;AA4BA;AACA,YADA,sBACA;AACA;AACA;AACA;AACA;AACA;AACA,KAPA;AAQA,WARA,qBAQA;AACA;AACA;AACA,KAXA,EA5BA;;AAyCA;AACA;AACA,QAFA,gBAEA,OAFA,EAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OARA,EAQA,uBARA;AASA,KApBA;AAqBA;AACA,QAtBA,kBAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA7BA;AA8BA;AACA,WA/BA,qBA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAJA,MAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCADA;;AAGA,SAJA,MAIA;AACA;AACA,mCADA;;AAGA;AACA,OA5BA,MA4BA;AACA;AACA;AACA,sBADA;;AAGA;AACA,KAnEA,EAzCA,E;;;;;;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAulD,CAAgB,47CAAG,EAAC,C;;;;;;;;;;;ACA3mD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"uview-ui/components/u-toast/u-toast.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-toast.vue?vue&type=template&id=413e7fe0&scoped=true&\"\nvar renderjs\nimport script from \"./u-toast.vue?vue&type=script&lang=js&\"\nexport * from \"./u-toast.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-toast.vue?vue&type=style&index=0&id=413e7fe0&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 \"413e7fe0\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-toast/u-toast.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-toast.vue?vue&type=template&id=413e7fe0&scoped=true&\"","var components\ntry {\n components = {\n uIcon: function() {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-icon/u-icon\" */ \"@/uview-ui/components/u-icon/u-icon.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}\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-toast.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-toast.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"u-toast\" :class=\"[isShow ? 'u-show' : '', 'u-type-' + tmpConfig.type, 'u-position-' + tmpConfig.position]\" :style=\"{\n\t\tzIndex: uZIndex\n\t}\">\n\t\t<view class=\"u-icon-wrap\">\n\t\t\t<u-icon v-if=\"tmpConfig.icon\" class=\"u-icon\" :name=\"iconName\" :size=\"30\" :color=\"tmpConfig.type\"></u-icon>\n\t\t</view>\n\t\t<text class=\"u-text\">{{tmpConfig.title}}</text>\n\t</view>\n</template>\n\n<script>\n\t/**\n\t * toast 消息提示\n\t * @description 此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。\n\t * @tutorial https://www.uviewui.com/components/toast.html\n\t * @property {String} z-index toast展示时的z-index值\n\t * @event {Function} show 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用\n\t * @example <u-toast ref=\"uToast\" />\n\t */\n\texport default {\n\t\tname: \"u-toast\",\n\t\tprops: {\n\t\t\t// z-index值\n\t\t\tzIndex: {\n\t\t\t\ttype: [Number, String],\n\t\t\t\tdefault: ''\n\t\t\t},\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tisShow: false,\n\t\t\t\ttimer: null, // 定时器\n\t\t\t\tconfig: {\n\t\t\t\t\tparams: {}, // URL跳转的参数,对象\n\t\t\t\t\ttitle: '', // 显示文本\n\t\t\t\t\ttype: '', // 主题类型,primary,success,error,warning,black\n\t\t\t\t\tduration: 2000, // 显示的时间,毫秒\n\t\t\t\t\tisTab: false, // 是否跳转tab页面\n\t\t\t\t\turl: '', // toast消失后是否跳转页面,有则跳转,优先级高于back参数\n\t\t\t\t\ticon: true, // 显示的图标\n\t\t\t\t\tposition: 'center', // toast出现的位置\n\t\t\t\t\tcallback: null, // 执行完后的回调函数\n\t\t\t\t\tback: false, // 结束toast是否自动返回上一页\n\t\t\t\t},\n\t\t\t\ttmpConfig: {}, // 将用户配置和内置配置合并后的临时配置变量\n\t\t\t};\n\t\t},\n\t\tcomputed: {\n\t\t\ticonName() {\n\t\t\t\t// 只有不为none,并且type为error|warning|succes|info时候,才显示图标\n\t\t\t\tif (['error', 'warning', 'success', 'info'].indexOf(this.tmpConfig.type) >= 0 && this.tmpConfig.icon) {\n\t\t\t\t\tlet icon = this.$u.type2icon(this.tmpConfig.type);\n\t\t\t\t\treturn icon;\n\t\t\t\t}\n\t\t\t},\n\t\t\tuZIndex() {\n\t\t\t\t// 显示toast时候,如果用户有传递z-index值,有限使用\n\t\t\t\treturn this.isShow ? (this.zIndex ? this.zIndex : this.$u.zIndex.toast) : '999999';\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t// 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用\n\t\t\tshow(options) {\n\t\t\t\t// 不降结果合并到this.config变量,避免多次条用u-toast,前后的配置造成混论\n\t\t\t\tthis.tmpConfig = this.$u.deepMerge(this.config, options);\n\t\t\t\tif (this.timer) {\n\t\t\t\t\t// 清除定时器\n\t\t\t\t\tclearTimeout(this.timer);\n\t\t\t\t\tthis.timer = null;\n\t\t\t\t}\n\t\t\t\tthis.isShow = true;\n\t\t\t\tthis.timer = setTimeout(() => {\n\t\t\t\t\t// 倒计时结束,清除定时器,隐藏toast组件\n\t\t\t\t\tthis.isShow = false;\n\t\t\t\t\tclearTimeout(this.timer);\n\t\t\t\t\tthis.timer = null;\n\t\t\t\t\t// 判断是否存在callback方法,如果存在就执行\n\t\t\t\t\ttypeof(this.tmpConfig.callback) === 'function' && this.tmpConfig.callback();\n\t\t\t\t\tthis.timeEnd();\n\t\t\t\t}, this.tmpConfig.duration);\n\t\t\t},\n\t\t\t// 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用\n\t\t\thide() {\n\t\t\t\tthis.isShow = false;\n\t\t\t\tif (this.timer) {\n\t\t\t\t\t// 清除定时器\n\t\t\t\t\tclearTimeout(this.timer);\n\t\t\t\t\tthis.timer = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 倒计时结束之后,进行的一些操作\n\t\t\ttimeEnd() {\n\t\t\t\t// 如果带有url值,根据isTab为true或者false进行跳转\n\t\t\t\tif (this.tmpConfig.url) {\n\t\t\t\t\t// 如果url没有\"/\"开头,添加上,因为uni的路由跳转需要\"/\"开头\n\t\t\t\t\tif (this.tmpConfig.url[0] != '/') this.tmpConfig.url = '/' + this.tmpConfig.url;\n\t\t\t\t\t// 判断是否有传递显式的参数\n\t\t\t\t\tif (Object.keys(this.tmpConfig.params).length) {\n\t\t\t\t\t\t// 判断用户传递的url中,是否带有参数\n\t\t\t\t\t\t// 使用正则匹配,主要依据是判断是否有\"/\",\"?\",\"=\"等,如“/page/index/index?name=mary\"\n\t\t\t\t\t\t// 如果有params参数,转换后无需带上\"?\"\n\t\t\t\t\t\tlet query = '';\n\t\t\t\t\t\tif (/.*\\/.*\\?.*=.*/.test(this.tmpConfig.url)) {\n\t\t\t\t\t\t\t// object对象转为get类型的参数\n\t\t\t\t\t\t\tquery = this.$u.queryParams(this.tmpConfig.params, false);\n\t\t\t\t\t\t\tthis.tmpConfig.url = this.tmpConfig.url + \"&\" + query;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tquery = this.$u.queryParams(this.tmpConfig.params);\n\t\t\t\t\t\t\tthis.tmpConfig.url += query;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// 如果是跳转tab页面,就使用uni.switchTab\n\t\t\t\t\tif (this.tmpConfig.isTab) {\n\t\t\t\t\t\tuni.switchTab({\n\t\t\t\t\t\t\turl: this.tmpConfig.url\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuni.navigateTo({\n\t\t\t\t\t\t\turl: this.tmpConfig.url\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else if(this.tmpConfig.back) {\n\t\t\t\t\t// 回退到上一页\n\t\t\t\t\tthis.$u.route({\n\t\t\t\t\t\ttype: 'back'\n\t\t\t\t\t})\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/style.components.scss\";\n\t\n\t.u-toast {\n\t\tposition: fixed;\n\t\tz-index: -1;\n\t\ttransition: opacity 0.3s;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 8rpx;\n\t\tbackground: #585858;\n\t\t@include vue-flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tfont-size: 28rpx;\n\t\topacity: 0;\n\t\tpointer-events: none;\n\t\tpadding: 18rpx 40rpx;\n\t}\n\n\t.u-toast.u-show {\n\t\topacity: 1;\n\t}\n\n\t.u-icon {\n\t\tmargin-right: 10rpx;\n\t\t@include vue-flex;\n\t\talign-items: center;\n\t\tline-height: normal;\n\t}\n\n\t.u-position-center {\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%,-50%);\n\t\t/* #ifndef APP-NVUE */\n\t\tmax-width: 70%;\n\t\t/* #endif */\n\t}\n\n\t.u-position-top {\n\t\tleft: 50%;\n\t\ttop: 20%;\n\t\ttransform: translate(-50%,-50%);\n\t}\n\n\t.u-position-bottom {\n\t\tleft: 50%;\n\t\tbottom: 20%;\n\t\ttransform: translate(-50%,-50%);\n\t}\n\n\t.u-type-primary {\n\t\tcolor: $u-type-primary;\n\t\tbackground-color: $u-type-primary-light;\n\t\tborder: 1px solid rgb(215, 234, 254);\n\t}\n\n\t.u-type-success {\n\t\tcolor: $u-type-success;\n\t\tbackground-color: $u-type-success-light;\n\t\tborder: 1px solid #BEF5C8;\n\t}\n\n\t.u-type-error {\n\t\tcolor: $u-type-error;\n\t\tbackground-color: $u-type-error-light;\n\t\tborder: 1px solid #fde2e2;\n\t}\n\n\t.u-type-warning {\n\t\tcolor: $u-type-warning;\n\t\tbackground-color: $u-type-warning-light;\n\t\tborder: 1px solid #faecd8;\n\t}\n\n\t.u-type-info {\n\t\tcolor: $u-type-info;\n\t\tbackground-color: $u-type-info-light;\n\t\tborder: 1px solid #ebeef5;\n\t}\n\n\t.u-type-default {\n\t\tcolor: #fff;\n\t\tbackground-color: #585858;\n\t}\n</style>\n","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/@dcloudio/vue-cli-plugin-uni/packages/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-toast.vue?vue&type=style&index=0&id=413e7fe0&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/@dcloudio/vue-cli-plugin-uni/packages/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-toast.vue?vue&type=style&index=0&id=413e7fe0&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1657536258280\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":""}