You can not 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 lines
16 KiB
1 lines
16 KiB
{"version":3,"sources":["webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?d880","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?43e8","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?9faa","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?5392","uni-app:///components/uni-transition/uni-transition.vue","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?7d8c","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/uni-transition/uni-transition.vue?a324"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2H;AAC3H;AACkE;AACL;AACa;;;AAG1E;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,oFAAM;AACR,EAAE,yFAAM;AACR,EAAE,kGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,6FAAU;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;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA40B,CAAgB,4yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACWh2B;;;;;;;;;;;;;;;;AAgBA;AACA,uBADA;AAEA;AACA;AACA,mBADA;AAEA,oBAFA,EADA;;AAKA;AACA,iBADA;AAEA,aAFA,sBAEA;AACA;AACA,OAJA,EALA;;AAWA;AACA,kBADA;AAEA,kBAFA,EAXA;;AAeA;AACA,kBADA;AAEA,aAFA,sBAEA;AACA;AACA,OAJA,EAfA,EAFA;;;AAwBA,MAxBA,kBAwBA;AACA;AACA,mBADA;AAEA,mBAFA;AAGA;AACA,kBADA,EAHA;;;AAOA,GAhCA;AAiCA;AACA;AACA,aADA,mBACA,MADA,EACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA,OAPA;AAQA,qBARA,EADA,EAjCA;;;AA6CA;AACA,gBADA,0BACA;AACA;AACA,iBADA;AAEA,yDAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,KAZA,EA7CA;;AA2DA,SA3DA,qBA2DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAlEA;AAmEA;AACA,UADA,oBACA;AACA;AACA,2BADA;;AAGA,KALA;AAMA,QANA,kBAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAFA,EAEA,EAFA;AAGA,OAJA;;AAMA,KAxBA;AAyBA,SAzBA,iBAyBA,IAzBA,EAyBA;AACA;AACA;AACA,KA5BA;AA6BA,cA7BA,sBA6BA,IA7BA,EA6BA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BADA;;;AAIA,OARA,EAQA,aARA;;;AAWA,KApEA;AAqEA,eArEA,uBAqEA,IArEA,EAqEA;AACA;AACA,qBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBArBA;;AAuBA,OAxBA;AAyBA;AACA,KAnGA;AAoGA,iBApGA,yBAoGA,IApGA,EAoGA;AACA;AACA;AACA;AACA;AACA;AACA,SAFA;AAGA;AACA,OANA,MAMA;AACA;AACA;AACA,KA/GA;AAgHA;AACA;AACA;AACA;AACA,UApHA,kBAoHA,IApHA,EAoHA;AACA;AACA,KAtHA,EAnEA,E;;;;;;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAyrC,CAAgB,ymCAAG,EAAC,C;;;;;;;;;;;ACA7sC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/uni-transition/uni-transition.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./uni-transition.vue?vue&type=template&id=cce16df8&\"\nvar renderjs\nimport script from \"./uni-transition.vue?vue&type=script&lang=js&\"\nexport * from \"./uni-transition.vue?vue&type=script&lang=js&\"\nimport style0 from \"./uni-transition.vue?vue&type=style&index=0&lang=css&\"\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 null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/uni-transition/uni-transition.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!./uni-transition.vue?vue&type=template&id=cce16df8&\"","var components\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!./uni-transition.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!./uni-transition.vue?vue&type=script&lang=js&\"","<template>\n\t<view v-if=\"isShow\" ref=\"ani\" class=\"uni-transition\" :class=\"[ani.in]\" :style=\"'transform:' +transform+';'+stylesObject\"\n\t @click=\"change\">\n\t\t <slot></slot>\n\t</view>\n</template>\n\n<script>\n\t// #ifdef APP-NVUE\n\tconst animation = uni.requireNativePlugin('animation');\n\t// #endif\n\t/**\n\t * Transition 过渡动画\n\t * @description 简单过渡动画组件\n\t * @tutorial https://ext.dcloud.net.cn/plugin?id=985\n\t * @property {Boolean} show = [false|true] 控制组件显示或隐藏\n * @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型\n * @value fade 渐隐渐出过渡\n * @value slide-top 由上至下过渡\n * @value slide-right 由右至左过渡\n * @value slide-bottom 由下至上过渡\n * @value slide-left 由左至右过渡\n * @value zoom-in 由小到大过渡\n * @value zoom-out 由大到小过渡\n\t * @property {Number} duration 过渡动画持续时间\n\t * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`\n\t */\n\texport default {\n\t\tname: 'uniTransition',\n\t\tprops: {\n\t\t\tshow: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\tmodeClass: {\n\t\t\t\ttype: Array,\n\t\t\t\tdefault () {\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t},\n\t\t\tduration: {\n\t\t\t\ttype: Number,\n\t\t\t\tdefault: 300\n\t\t\t},\n\t\t\tstyles: {\n\t\t\t\ttype: Object,\n\t\t\t\tdefault () {\n\t\t\t\t\treturn {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tisShow: false,\n\t\t\t\ttransform: '',\n\t\t\t\tani: { in: '',\n\t\t\t\t\tactive: ''\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\twatch: {\n\t\t\tshow: {\n\t\t\t\thandler(newVal) {\n\t\t\t\t\tif (newVal) {\n\t\t\t\t\t\tthis.open()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.close()\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\timmediate: true\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\tstylesObject() {\n\t\t\t\tlet styles = {\n\t\t\t\t\t...this.styles,\n\t\t\t\t\t'transition-duration': this.duration / 1000 + 's'\n\t\t\t\t}\n\t\t\t\tlet transfrom = ''\n\t\t\t\tfor (let i in styles) {\n\t\t\t\t\tlet line = this.toLine(i)\n\t\t\t\t\ttransfrom += line + ':' + styles[i] + ';'\n\t\t\t\t}\n\t\t\t\treturn transfrom\n\t\t\t}\n\t\t},\n\t\tcreated() {\n\t\t\t// this.timer = null\n\t\t\t// this.nextTick = (time = 50) => new Promise(resolve => {\n\t\t\t// \tclearTimeout(this.timer)\n\t\t\t// \tthis.timer = setTimeout(resolve, time)\n\t\t\t// \treturn this.timer\n\t\t\t// });\n\t\t},\n\t\tmethods: {\n\t\t\tchange() {\n\t\t\t\tthis.$emit('click', {\n\t\t\t\t\tdetail: this.isShow\n\t\t\t\t})\n\t\t\t},\n\t\t\topen() {\n\t\t\t\tclearTimeout(this.timer)\n\t\t\t\tthis.isShow = true\n\t\t\t\tthis.transform = ''\n\t\t\t\tthis.ani.in = ''\n\t\t\t\tfor (let i in this.getTranfrom(false)) {\n\t\t\t\t\tif (i === 'opacity') {\n\t\t\t\t\t\tthis.ani.in = 'fade-in'\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.transform += `${this.getTranfrom(false)[i]} `\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis._animation(true)\n\t\t\t\t\t}, 50)\n\t\t\t\t})\n\n\t\t\t},\n\t\t\tclose(type) {\n\t\t\t\tclearTimeout(this.timer)\n\t\t\t\tthis._animation(false)\n\t\t\t},\n\t\t\t_animation(type) {\n\t\t\t\tlet styles = this.getTranfrom(type)\n\t\t\t\t// #ifdef APP-NVUE\n\t\t\t\tif(!this.$refs['ani']) return\n\t\t\t\tanimation.transition(this.$refs['ani'].ref, {\n\t\t\t\t\tstyles,\n\t\t\t\t\tduration: this.duration, //ms\n\t\t\t\t\ttimingFunction: 'ease',\n\t\t\t\t\tneedLayout: false,\n\t\t\t\t\tdelay: 0 //ms\n\t\t\t\t}, () => {\n\t\t\t\t\tif (!type) {\n\t\t\t\t\t\tthis.isShow = false\n\t\t\t\t\t}\n\t\t\t\t\tthis.$emit('change', {\n\t\t\t\t\t\tdetail: this.isShow\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t// #endif\n\t\t\t\t// #ifndef APP-NVUE\n\t\t\t\tthis.transform = ''\n\t\t\t\tfor (let i in styles) {\n\t\t\t\t\tif (i === 'opacity') {\n\t\t\t\t\t\tthis.ani.in = `fade-${type?'out':'in'}`\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.transform += `${styles[i]} `\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.timer = setTimeout(() => {\n\t\t\t\t\tif (!type) {\n\t\t\t\t\t\tthis.isShow = false\n\t\t\t\t\t}\n\t\t\t\t\tthis.$emit('change', {\n\t\t\t\t\t\tdetail: this.isShow\n\t\t\t\t\t})\n\n\t\t\t\t}, this.duration)\n\t\t\t\t// #endif\n\n\t\t\t},\n\t\t\tgetTranfrom(type) {\n\t\t\t\tlet styles = {\n\t\t\t\t\ttransform: ''\n\t\t\t\t}\n\t\t\t\tthis.modeClass.forEach((mode) => {\n\t\t\t\t\tswitch (mode) {\n\t\t\t\t\t\tcase 'fade':\n\t\t\t\t\t\t\tstyles.opacity = type ? 1 : 0\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'slide-top':\n\t\t\t\t\t\t\tstyles.transform += `translateY(${type?'0':'-100%'}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'slide-right':\n\t\t\t\t\t\t\tstyles.transform += `translateX(${type?'0':'100%'}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'slide-bottom':\n\t\t\t\t\t\t\tstyles.transform += `translateY(${type?'0':'100%'}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'slide-left':\n\t\t\t\t\t\t\tstyles.transform += `translateX(${type?'0':'-100%'}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'zoom-in':\n\t\t\t\t\t\t\tstyles.transform += `scale(${type?1:0.8}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'zoom-out':\n\t\t\t\t\t\t\tstyles.transform += `scale(${type?1:1.2}) `\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn styles\n\t\t\t},\n\t\t\t_modeClassArr(type) {\n\t\t\t\tlet mode = this.modeClass\n\t\t\t\tif (typeof(mode) !== \"string\") {\n\t\t\t\t\tlet modestr = ''\n\t\t\t\t\tmode.forEach((item) => {\n\t\t\t\t\t\tmodestr += (item + '-' + type + ',')\n\t\t\t\t\t})\n\t\t\t\t\treturn modestr.substr(0, modestr.length - 1)\n\t\t\t\t} else {\n\t\t\t\t\treturn mode + '-' + type\n\t\t\t\t}\n\t\t\t},\n\t\t\t// getEl(el) {\n\t\t\t// \tconsole.log(el || el.ref || null);\n\t\t\t// \treturn el || el.ref || null\n\t\t\t// },\n\t\t\ttoLine(name) {\n\t\t\t\treturn name.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n\t\t\t}\n\t\t}\n\t}\n</script>\n\n<style>\n\t.uni-transition {\n\t\ttransition-timing-function: ease;\n\t\ttransition-duration: 0.3s;\n\t\ttransition-property: transform, opacity;\n\t}\n\n\t.fade-in {\n\t\topacity: 0;\n\t}\n\n\t.fade-active {\n\t\topacity: 1;\n\t}\n\n\t.slide-top-in {\n\t\t/* transition-property: transform, opacity; */\n\t\ttransform: translateY(-100%);\n\t}\n\n\t.slide-top-active {\n\t\ttransform: translateY(0);\n\t\t/* opacity: 1; */\n\t}\n\n\t.slide-right-in {\n\t\ttransform: translateX(100%);\n\t}\n\n\t.slide-right-active {\n\t\ttransform: translateX(0);\n\t}\n\n\t.slide-bottom-in {\n\t\ttransform: translateY(100%);\n\t}\n\n\t.slide-bottom-active {\n\t\ttransform: translateY(0);\n\t}\n\n\t.slide-left-in {\n\t\ttransform: translateX(-100%);\n\t}\n\n\t.slide-left-active {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\n\t.zoom-in-in {\n\t\ttransform: scale(0.8);\n\t}\n\n\t.zoom-out-active {\n\t\ttransform: scale(1);\n\t}\n\n\t.zoom-out-in {\n\t\ttransform: scale(1.2);\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--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-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--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../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!./uni-transition.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-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--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../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!./uni-transition.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1635513139854\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":""} |