1 |
- {"version":3,"sources":["webpack:///G:/item/appBase/components/uni-number-box.vue?d00b","webpack:///G:/item/appBase/components/uni-number-box.vue?fd03","webpack:///G:/item/appBase/components/uni-number-box.vue?6a27","webpack:///G:/item/appBase/components/uni-number-box.vue?2335","uni-app:///components/uni-number-box.vue","webpack:///G:/item/appBase/components/uni-number-box.vue?5000","webpack:///G:/item/appBase/components/uni-number-box.vue?c5c8"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2H;AAC3H;AACkE;AACL;AACa;;;AAG1E;AAC2K;AAC3K,gBAAgB,oLAAU;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;AAAsoB,CAAgB,2pBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACuB1pB;AACA,wBADA;AAEA;AACA;AACA,mBADA;AAEA,oBAFA,EADA;;AAKA;AACA,mBADA;AAEA,oBAFA,EALA;;AASA;AACA,kBADA;AAEA,gBAFA,EATA;;AAaA;AACA,kBADA;AAEA,gBAFA,EAbA;;AAiBA;AACA,kBADA;AAEA,wBAFA,EAjBA;;AAqBA;AACA,kBADA;AAEA,uBAFA,EArBA;;AAyBA;AACA,kBADA;AAEA,gBAFA,EAzBA;;AA6BA;AACA,mBADA;AAEA,oBAFA,EA7BA,EAFA;;;AAoCA,MApCA,kBAoCA;AACA;AACA,4BADA;AAEA,wBAFA;AAGA,wBAHA;;AAKA,GA1CA;AA2CA,SA3CA,qBA2CA;AACA;AACA;AACA,GA9CA;AA+CA,cA/CA;;;AAkDA;AACA,cADA,sBACA,MADA,EACA;AACA;AACA,sBADA;AAEA,yBAFA;;AAIA;AACA,KAPA,EAlDA;;AA2DA;AACA,cADA,sBACA,IADA,EACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAXA,MAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAlCA;AAmCA,oBAnCA,8BAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA1CA;AA2CA,WA3CA,mBA2CA,KA3CA,EA2CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;;AAEA;AACA,KAzDA,EA3DA,E;;;;;;;;;;;;ACvBA;AAAA;AAAA;AAAA;AAAo6B,CAAgB,85BAAG,EAAC,C;;;;;;;;;;;ACAx7B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/uni-number-box.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./uni-number-box.vue?vue&type=template&id=75f95e3f&\"\nvar renderjs\nimport script from \"./uni-number-box.vue?vue&type=script&lang=js&\"\nexport * from \"./uni-number-box.vue?vue&type=script&lang=js&\"\nimport style0 from \"./uni-number-box.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\work\\\\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-number-box.vue\"\nexport default component.exports","export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./uni-number-box.vue?vue&type=template&id=75f95e3f&\"","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 \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./uni-number-box.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./uni-number-box.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"uni-numbox\">\r\n\t\t<view class=\"uni-numbox-minus\" \r\n\t\t\t@click=\"_calcValue('subtract')\"\r\n\t\t>\r\n\t\t\t<text class=\"iconfont iconmove\" :class=\"minDisabled?'uni-numbox-disabled': ''\" ></text>\r\n\t\t</view>\r\n\t\t<input \r\n\t\t\tclass=\"uni-numbox-value\" \r\n\t\t\ttype=\"number\" \r\n\t\t\t:disabled=\"disabled\"\r\n\t\t\t:value=\"inputValue\" \r\n\t\t\t@blur=\"_onBlur\"\r\n\t\t>\r\n\t\t<view \r\n\t\t\tclass=\"uni-numbox-plus\" \r\n\t\t\t@click=\"_calcValue('add')\"\r\n\t\t>\r\n\t\t\t<text class=\"iconfont iconadd\" :class=\"maxDisabled?'uni-numbox-disabled': ''\" ></text>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n<script>\r\n\texport default {\r\n\t\tname: 'uni-number-box',\r\n\t\tprops: {\r\n\t\t\tisMax: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\tisMin: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\tindex: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 0\r\n\t\t\t},\r\n\t\t\tvalue: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 0\r\n\t\t\t},\r\n\t\t\tmin: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: -Infinity\r\n\t\t\t},\r\n\t\t\tmax: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: Infinity\r\n\t\t\t},\r\n\t\t\tstep: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 1\r\n\t\t\t},\r\n\t\t\tdisabled: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tinputValue: this.value,\r\n\t\t\t\tminDisabled: false,\r\n\t\t\t\tmaxDisabled: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreated(){\r\n\t\t\tthis.maxDisabled = this.isMax;\r\n\t\t\tthis.minDisabled = this.isMin;\r\n\t\t},\r\n\t\tcomputed: {\r\n\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\tinputValue(number) {\r\n\t\t\t\tconst data = {\r\n\t\t\t\t\tnumber: number,\r\n\t\t\t\t\tindex: this.index\r\n\t\t\t\t}\r\n\t\t\t\tthis.$emit('eventChange', data);\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t_calcValue(type) {\r\n\t\t\t\tconst scale = this._getDecimalScale();\r\n\t\t\t\tlet value = this.inputValue * scale;\r\n\t\t\t\tlet newValue = 0;\r\n\t\t\t\tlet step = this.step * scale;\r\n\t\t\t\t\r\n\t\t\t\tif(type === 'subtract'){\r\n\t\t\t\t\tnewValue = value - step;\r\n\t\t\t\t\tif (newValue <= this.min){\r\n\t\t\t\t\t\tthis.minDisabled = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(newValue < this.min){\r\n\t\t\t\t\t\tnewValue = this.min\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(newValue < this.max && this.maxDisabled === true){\r\n\t\t\t\t\t\tthis.maxDisabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(type === 'add'){\r\n\t\t\t\t\tnewValue = value + step;\r\n\t\t\t\t\tif (newValue >= this.max){\r\n\t\t\t\t\t\tthis.maxDisabled = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(newValue > this.max){\r\n\t\t\t\t\t\tnewValue = this.max\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(newValue > this.min && this.minDisabled === true){\r\n\t\t\t\t\t\tthis.minDisabled = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(newValue === value){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis.inputValue = newValue / scale;\r\n\t\t\t},\r\n\t\t\t_getDecimalScale() {\r\n\t\t\t\tlet scale = 1;\r\n\t\t\t\t// 浮点型\r\n\t\t\t\tif (~~this.step !== this.step) {\r\n\t\t\t\t\tscale = Math.pow(10, (this.step + '').split('.')[1].length);\r\n\t\t\t\t}\r\n\t\t\t\treturn scale;\r\n\t\t\t},\r\n\t\t\t_onBlur(event) {\r\n\t\t\t\tlet value = event.detail.value;\r\n\t\t\t\tif (!value) {\r\n\t\t\t\t\tthis.inputValue = 0;\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tvalue = +value;\r\n\t\t\t\tif (value > this.max) {\r\n\t\t\t\t\tvalue = this.max;\r\n\t\t\t\t} else if (value < this.min) {\r\n\t\t\t\t\tvalue = this.min\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.inputValue = value\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n<style>\r\n\t.uni-numbox {\r\n\t\t/* position:absolute; */\r\n\t\t/* left: 30rpx; */\r\n\t\t/* bottom: 0; */\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: flex-start;\r\n\t\talign-items: center;\r\n\t\twidth:230rpx;\r\n\t\theight: 70rpx;\r\n\t\tbackground:#f5f5f5;\r\n\t}\r\n\r\n\t.uni-numbox-minus,\r\n\t.uni-numbox-plus {\r\n\t\tmargin: 0;\r\n\t\tbackground-color: #f5f5f5;\r\n\t\twidth: 70rpx;\r\n\t\theight: 100%;\r\n\t\tline-height: 70rpx;\r\n\t\ttext-align: center;\r\n\t\tposition: relative;\r\n\t}\r\n\t.uni-numbox-minus .yticon,\r\n\t.uni-numbox-plus .yticon{\r\n\t\tfont-size: 36rpx;\r\n\t\tcolor: #555;\r\n\t}\r\n\r\n\t.uni-numbox-minus {\r\n\t\tborder-right: none;\r\n\t\tborder-top-left-radius: 6rpx;\r\n\t\tborder-bottom-left-radius: 6rpx;\r\n\t}\r\n\r\n\t.uni-numbox-plus {\r\n\t\tborder-left: none;\r\n\t\tborder-top-right-radius: 6rpx;\r\n\t\tborder-bottom-right-radius: 6rpx;\r\n\t}\r\n\r\n\t.uni-numbox-value {\r\n\t\tposition: relative;\r\n\t\tbackground-color: #f5f5f5;\r\n\t\twidth: 90rpx;\r\n\t\theight: 50rpx;\r\n\t\ttext-align: center;\r\n\t\tpadding: 0;\r\n\t\tfont-size: 30rpx;\r\n\t}\r\n\r\n\t.uni-numbox-disabled.iconfont {\r\n\t\tcolor: #d6d6d6;\r\n\t}\r\n</style>\r\n","import mod from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./uni-number-box.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./uni-number-box.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1618025082750\n var cssReload = require(\"D:/work/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":""}
|