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
12 KiB

{"version":3,"sources":["webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?8f00","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?fa84","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?d62f","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?c932","uni-app:///components/uni-segmented-control.vue","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?0ebc","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/uni-segmented-control.vue?142c"],"names":["name","props","current","type","default","values","activeColor","styleType","haveBorder","lockTap","data","currentIndex","watch","computed","wrapStyle","styleString","itemStyle","activeStyle","methods","onClick","console"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkI;AAClI;AACyE;AACL;AACa;;;AAGjF;AACuM;AACvM,gBAAgB,iNAAU;AAC1B,EAAE,2FAAM;AACR,EAAE,gGAAM;AACR,EAAE,yGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oGAAU;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;AAAsyB,CAAgB,mzBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;gBCU1zB;EACAA;EACAC;IACAC;MACAC;MACAC;IACA;IACAC;MACAF;MACAC;QACA;MACA;IACA;IACAE;MACAH;MACAC;IACA;IACAG;MACAJ;MACAC;IACA;IACAI;MACAL;MACAC;QACA;MACA;IACA;IACAK;MACAN;MACAC;QACA;MACA;IACA;EACA;EACAM;IACA;MACAC;IACA;EACA;EACAC;IACAV;MACA;QACA;MACA;IACA;EACA;EACAW;IACAC;MACA;MACA;QACA;UACAC;UACA;QACA;UACAA;UACA;MAAA;MAEA;IACA;IACAC;MACA;MACA;QACA;UACAD;UACA;QACA;UACAA;UACA;MAAA;MAEA;IACA;IACAE;MACA;MACA;QACA;UACAF;UACA;QACA;UACAA;UACA;MAAA;MAEA;IACA;EACA;EACAG;IACAC;MACA,IACAV,UAEA,KAFAA;QACAE,eACA,KADAA;MAEAS;MACA;QACA;QACA;MACA;IACA;EACA;AACA;AAAA,4B;;;;;;;;;;;;AC3GA;AAAA;AAAA;AAAA;AAAioC,CAAgB,gnCAAG,EAAC,C;;;;;;;;;;;ACArpC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/uni-segmented-control.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./uni-segmented-control.vue?vue&type=template&id=3e12d15a&\"\nvar renderjs\nimport script from \"./uni-segmented-control.vue?vue&type=script&lang=js&\"\nexport * from \"./uni-segmented-control.vue?vue&type=script&lang=js&\"\nimport style0 from \"./uni-segmented-control.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../Downloads/HBuilderX.3.99.2023122611/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-segmented-control.vue\"\nexport default component.exports","export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./uni-segmented-control.vue?vue&type=template&id=3e12d15a&\"","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 \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./uni-segmented-control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./uni-segmented-control.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"segmented-control\" :class=\"styleType\" :style=\"wrapStyle\">\r\n\t\t<view v-for=\"(item, index) in values\" class=\"segmented-control-item\" :class=\"styleType\" :key=\"index\"\r\n\t\t\t:style=\"index === currentIndex ? activeStyle : itemStyle\" @click=\"onClick(index)\">\r\n\t\t\t{{item.title}}\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tname: 'uni-segmented-control',\r\n\t\tprops: {\r\n\t\t\tcurrent: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 0\r\n\t\t\t},\r\n\t\t\tvalues: {\r\n\t\t\t\ttype: Array,\r\n\t\t\t\tdefault () {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tactiveColor: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: '#007aff'\r\n\t\t\t},\r\n\t\t\tstyleType: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: 'button'\r\n\t\t\t},\r\n\t\t\thaveBorder: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault () {\r\n\t\t\t\t\treturn false\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tlockTap: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault () {\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcurrentIndex: this.current\r\n\t\t\t}\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\tcurrent(val) {\r\n\t\t\t\tif (val !== this.currentIndex) {\r\n\t\t\t\t\tthis.currentIndex = val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\twrapStyle() {\r\n\t\t\t\tlet styleString = '';\r\n\t\t\t\tswitch (this.styleType) {\r\n\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\tstyleString = `border:0;`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tstyleString = this.haveBorder ? `border: 1rpx solid ${this.activeColor};` : ``;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn styleString;\r\n\t\t\t},\r\n\t\t\titemStyle() {\r\n\t\t\t\tlet styleString = '';\r\n\t\t\t\tswitch (this.styleType) {\r\n\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\tstyleString = `color:#000;border-left:0;`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tstyleString = `color:#222;background:#eddbba;border-color:#fff;`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn styleString;\r\n\t\t\t},\r\n\t\t\tactiveStyle() {\r\n\t\t\t\tlet styleString = '';\r\n\t\t\t\tswitch (this.styleType) {\r\n\t\t\t\t\tcase 'text':\r\n\t\t\t\t\t\tstyleString = `color:${this.activeColor};border-left:0;border-bottom-style:solid;`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tstyleString = `color:#fff;border-color:${this.activeColor};background-color:${this.activeColor}`;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn styleString;\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tonClick(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlockTap,\r\n\t\t\t\t\tcurrentIndex\r\n\t\t\t\t} = this\r\n\t\t\t\tconsole.log(lockTap, currentIndex);\r\n\t\t\t\tif (currentIndex !== index || !lockTap) {\r\n\t\t\t\t\tthis.currentIndex = index;\r\n\t\t\t\t\tthis.$emit('clickItem', index);\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>\r\n\t.segmented-control {\r\n\t\tdisplay: flex;\r\n\t\tflex-direction: row;\r\n\t\tjustify-content: center;\r\n\t\tfont-size: 26rpx;\r\n\t\tborder-radius: 5rpx;\r\n\t\tbox-sizing: border-box;\r\n\t\tmargin: 0 auto;\r\n\t\toverflow: hidden;\r\n\t}\r\n\r\n\t.segmented-control.button {\r\n\t\tborder-radius: 54rpx;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t.segmented-control.text {\r\n\t\tborder: 0;\r\n\t\tborder-radius: 0rpx;\r\n\t}\r\n\r\n\r\n\t.segmented-control-item {\r\n\t\tflex: 1;\r\n\t\ttext-align: center;\r\n\t\tline-height: 54rpx;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t.segmented-control-item.button {\r\n\t\tborder-left: 1upx solid;\r\n\t}\r\n\r\n\t.segmented-control-item.button:first-child {\r\n\t\tborder-radius: 54rpx 0 0 54rpx;\r\n\t}\r\n\r\n\t.segmented-control-item.button:last-child {\r\n\t\tborder-radius: 0 54rpx 54rpx 0;\r\n\t}\r\n\r\n\t.segmented-control-item.text {\r\n\t\tborder-left: 0;\r\n\t}\r\n\r\n\t.segmented-control-item:first-child {\r\n\t\tborder-left-width: 0;\r\n\t}\r\n</style>\n","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./uni-segmented-control.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./uni-segmented-control.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1725332653667\n var cssReload = require(\"C:/Users/Administrator/Downloads/HBuilderX.3.99.2023122611/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":""}