u-radio-group.js.map 14 KB

1
  1. {"version":3,"sources":["webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?ae73","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?0411","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?d487","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?5349","uni-app:///uview-ui/components/u-radio-group/u-radio-group.vue","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?c64c","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-radio-group/u-radio-group.vue?2b8e"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsI;AACtI;AACiE;AACL;AACsC;;;AAGlG;AACqK;AACrK,gBAAgB,+KAAU;AAC1B,EAAE,mFAAM;AACR,EAAE,oGAAM;AACR,EAAE,6GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,wGAAU;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;AAAumB,CAAgB,ioBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACO3nB,kG;;;;;;AACA;;;;;;;;;;;;;;kBAeA,EACA,qBADA,EAEA,0BAFA,EAGA,SACA;AACA;AACA,mBADA;AAEA,oBAFA,EAFA;;AAMA;AACA;AACA,4BADA;AAEA,iBAFA,EAPA;;AAWA;AACA;AACA,kBADA;AAEA,wBAFA,EAZA;;AAgBA;AACA;AACA,4BADA;AAEA,iBAFA,EAjBA;;AAqBA;AACA;AACA,mBADA;AAEA,oBAFA,EAtBA;;AA0BA;AACA;AACA,kBADA;AAEA,uBAFA,EA3BA;;AA+BA;AACA;AACA,4BADA;AAEA,iBAFA,EAhCA;;AAoCA;AACA;AACA,4BADA;AAEA,qBAFA,EArCA;;AAyCA;AACA;AACA,mBADA;AAEA,oBAFA,EA1CA,EAHA;;;AAkDA,SAlDA,qBAkDA;AACA;AACA;AACA,GArDA;AAsDA;AACA;AACA,cAFA,wBAEA;AACA;AACA;AACA;AACA;AACA,SAHA;AAIA;AACA,KATA,EAtDA;;AAiEA;AACA;AACA;AACA;AACA,cAJA,wBAIA;AACA;AACA,KANA,EAjEA;;AAyEA;AACA;AACA,YAFA,oBAEA,GAFA,EAEA;AACA;AACA;AACA;AACA;AACA,OAFA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAHA,EAGA,EAHA;AAIA,KAjBA,EAzEA,E;;;;;;;;;;;;ACvBA;AAAA;AAAA;AAAA;AAAioC,CAAgB,2mCAAG,EAAC,C;;;;;;;;;;;ACArpC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"uview-ui/components/u-radio-group/u-radio-group.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-radio-group.vue?vue&type=template&id=dd868428&scoped=true&\"\nvar renderjs\nimport script from \"./u-radio-group.vue?vue&type=script&lang=js&\"\nexport * from \"./u-radio-group.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-radio-group.vue?vue&type=style&index=0&id=dd868428&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!E:\\\\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 \"dd868428\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-radio-group/u-radio-group.vue\"\nexport default component.exports","export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-radio-group.vue?vue&type=template&id=dd868428&scoped=true&\"","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 \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-radio-group.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-radio-group.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"u-radio-group u-clearfix\">\r\n\t\t<slot></slot>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport Emitter from '../../libs/util/emitter.js';\r\n\t/**\r\n\t * radioRroup 单选框父组件\r\n\t * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用\r\n\t * @tutorial https://www.uviewui.com/components/radio.html\r\n\t * @property {Boolean} disabled 是否禁用所有radio(默认false)\r\n\t * @property {String Number} size 组件整体的大小,单位rpx(默认40)\r\n\t * @property {String} active-color 选中时的颜色,应用到所有子Radio组件(默认#2979ff)\r\n\t * @property {String Number} icon-size 图标大小,单位rpx(默认20)\r\n\t * @property {String} shape 外观形状,shape-方形,circle-圆形(默认circle)\r\n\t * @property {Boolean} label-disabled 是否禁止点击文本操作checkbox(默认false)\r\n\t * @property {String} width 宽度,需带单位\r\n\t * @property {Boolean} wrap 是否每个radio都换行(默认false)\r\n\t * @event {Function} change 任一个radio状态发生变化时触发\r\n\t * @example <u-radio-group v-model=\"value\"></u-radio-group>\r\n\t */\r\n\texport default {\r\n\t\tname: \"u-radio-group\",\r\n\t\tmixins: [Emitter],\r\n\t\tprops: {\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\t// 匹配某一个radio组件,如果某个radio的name值等于此值,那么这个radio就被会选中\r\n\t\t\tvalue: {\r\n\t\t\t\ttype: [String, Number],\r\n\t\t\t\tdefault: ''\r\n\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: '#2979ff'\r\n\t\t\t},\r\n\t\t\t// 组件的整体大小\r\n\t\t\tsize: {\r\n\t\t\t\ttype: [String, Number],\r\n\t\t\t\tdefault: 34\r\n\t\t\t},\r\n\t\t\t// 是否禁止点击提示语选中复选框\r\n\t\t\tlabelDisabled: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t},\r\n\t\t\t// 形状,square为方形,circle为原型\r\n\t\t\tshape: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: 'circle'\r\n\t\t\t},\r\n\t\t\t// 图标的大小,单位rpx\r\n\t\t\ticonSize: {\r\n\t\t\t\ttype: [String, Number],\r\n\t\t\t\tdefault: 20\r\n\t\t\t},\r\n\t\t\t// 每个checkbox占u-checkbox-group的宽度\r\n\t\t\twidth: {\r\n\t\t\t\ttype: [String, Number],\r\n\t\t\t\tdefault: 'auto'\r\n\t\t\t},\r\n\t\t\t// 是否每个checkbox都换行\r\n\t\t\twrap: {\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\tcreated() {\r\n\t\t\t// 如果将children定义在data中,在微信小程序会造成循环引用而报错\r\n\t\t\tthis.children = [];\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\t// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件\r\n\t\t\tparentData() {\r\n\t\t\t\tif(this.children.length) {\r\n\t\t\t\t\tthis.children.map(child => {\r\n\t\t\t\t\t\t// 判断子组件(u-radio)如果有updateParentData方法的话,就就执行(执行的结果是子组件重新从父组件拉取了最新的值)\r\n\t\t\t\t\t\ttypeof(child.updateParentData) == 'function' && child.updateParentData();\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\t// 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化\r\n\t\t\t// 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)\r\n\t\t\t// 拉取父组件新的变化后的参数\r\n\t\t\tparentData() {\r\n\t\t\t\treturn [this.value, this.disabled, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.width, this.wrap];\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 该方法有子组件radio调用,当一个radio被选中的时候,给父组件设置value值(props传递的value)\r\n\t\t\tsetValue(val) {\r\n\t\t\t\t// 通过子组件传递过来的val值(此被选中的子组件内部已将parentValue设置等于val的值),将其他\r\n\t\t\t\t// u-radio设置未选中的状态\r\n\t\t\t\tthis.children.map(child => {\r\n\t\t\t\t\tif(child.parentData.value != val) child.parentData.value = '';\r\n\t\t\t\t})\r\n\t\t\t\t// 通过emit事件,设置父组件通过v-model双向绑定的值\r\n\t\t\t\tthis.$emit('input', val);\r\n\t\t\t\tthis.$emit('change', val);\r\n\t\t\t\t// 等待下一个周期再执行,因为this.$emit('input')作用于父组件,再反馈到子组件内部,需要时间\r\n\t\t\t\t// 由于头条小程序执行迟钝,故需要用几十毫秒的延时\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t// 将当前的值发送到 u-form-item 进行校验\r\n\t\t\t\t\tthis.dispatch('u-form-item', 'on-form-change', val);\r\n\t\t\t\t}, 60)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t@import \"../../libs/css/style.components.scss\";\r\n\t\r\n\t.u-radio-group {\r\n\t\t/* #ifndef MP || APP-NVUE */\r\n\t\tdisplay: inline-flex;\r\n\t\tflex-wrap: wrap;\r\n\t\t/* #endif */\r\n\t}\r\n</style>\r\n","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-radio-group.vue?vue&type=style&index=0&id=dd868428&lang=scss&scoped=true&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-radio-group.vue?vue&type=style&index=0&id=dd868428&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1631763038678\n var cssReload = require(\"E:/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":""}