u-radio-group.js.map 14.7 KB
{"version":3,"sources":["webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?3181","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?d984","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?3678","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?510c","uni-app:///uview-ui/components/u-radio-group/u-radio-group.vue","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?762e","webpack:////Users/juvenile/Documents/web/xiaoai/excellent-working/uview-ui/components/u-radio-group/u-radio-group.vue?39a2"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsI;AACtI;AACiE;AACL;AACsC;;;AAGlG;AACsN;AACtN,gBAAgB,iNAAU;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;AAAy2B,CAAgB,2yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACO73B,mG;;;;;;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;AAAklD,CAAgB,65CAAG,EAAC,C;;;;;;;;;;;ACAtmD;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 \"!../../../../../../../../../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  \"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 \"-!../../../../../../../../../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-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 \"-!../../../../../../../../../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-radio-group.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-radio-group.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"u-radio-group u-clearfix\">\n\t\t<slot></slot>\n\t</view>\n</template>\n\n<script>\n\timport Emitter from '../../libs/util/emitter.js';\n\t/**\n\t * radioRroup 单选框父组件\n\t * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用\n\t * @tutorial https://www.uviewui.com/components/radio.html\n\t * @property {Boolean} disabled 是否禁用所有radio(默认false)\n\t * @property {String Number} size 组件整体的大小,单位rpx(默认40)\n\t * @property {String} active-color 选中时的颜色,应用到所有子Radio组件(默认#2979ff)\n\t * @property {String Number} icon-size 图标大小,单位rpx(默认20)\n\t * @property {String} shape 外观形状,shape-方形,circle-圆形(默认circle)\n\t * @property {Boolean} label-disabled 是否禁止点击文本操作checkbox(默认false)\n\t * @property {String} width 宽度,需带单位\n\t * @property {Boolean} wrap 是否每个radio都换行(默认false)\n\t * @event {Function} change 任一个radio状态发生变化时触发\n\t * @example <u-radio-group v-model=\"value\"></u-radio-group>\n\t */\n\texport default {\n\t\tname: \"u-radio-group\",\n\t\tmixins: [Emitter],\n\t\tprops: {\n\t\t\t// 是否禁用所有单选框\n\t\t\tdisabled: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\t// 匹配某一个radio组件,如果某个radio的name值等于此值,那么这个radio就被会选中\n\t\t\tvalue: {\n\t\t\t\ttype: [String, Number],\n\t\t\t\tdefault: ''\n\t\t\t},\n\t\t\t// 选中状态下的颜色\n\t\t\tactiveColor: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: '#2979ff'\n\t\t\t},\n\t\t\t// 组件的整体大小\n\t\t\tsize: {\n\t\t\t\ttype: [String, Number],\n\t\t\t\tdefault: 34\n\t\t\t},\n\t\t\t// 是否禁止点击提示语选中复选框\n\t\t\tlabelDisabled: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\t// 形状,square为方形,circle为原型\n\t\t\tshape: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'circle'\n\t\t\t},\n\t\t\t// 图标的大小,单位rpx\n\t\t\ticonSize: {\n\t\t\t\ttype: [String, Number],\n\t\t\t\tdefault: 20\n\t\t\t},\n\t\t\t// 每个checkbox占u-checkbox-group的宽度\n\t\t\twidth: {\n\t\t\t\ttype: [String, Number],\n\t\t\t\tdefault: 'auto'\n\t\t\t},\n\t\t\t// 是否每个checkbox都换行\n\t\t\twrap: {\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t}\n\t\t},\n\t\tcreated() {\n\t\t\t// 如果将children定义在data中,在微信小程序会造成循环引用而报错\n\t\t\tthis.children = [];\n\t\t},\n\t\twatch: {\n\t\t\t// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件\n\t\t\tparentData() {\n\t\t\t\tif(this.children.length) {\n\t\t\t\t\tthis.children.map(child => {\n\t\t\t\t\t\t// 判断子组件(u-radio)如果有updateParentData方法的话,就就执行(执行的结果是子组件重新从父组件拉取了最新的值)\n\t\t\t\t\t\ttypeof(child.updateParentData) == 'function' && child.updateParentData();\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcomputed: {\n\t\t\t// 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化\n\t\t\t// 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group)\n\t\t\t// 拉取父组件新的变化后的参数\n\t\t\tparentData() {\n\t\t\t\treturn [this.value, this.disabled, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.width, this.wrap];\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t// 该方法有子组件radio调用,当一个radio被选中的时候,给父组件设置value值(props传递的value)\n\t\t\tsetValue(val) {\n\t\t\t\t// 通过子组件传递过来的val值(此被选中的子组件内部已将parentValue设置等于val的值),将其他\n\t\t\t\t// u-radio设置未选中的状态\n\t\t\t\tthis.children.map(child => {\n\t\t\t\t\tif(child.parentData.value != val) child.parentData.value = '';\n\t\t\t\t})\n\t\t\t\t// 通过emit事件,设置父组件通过v-model双向绑定的值\n\t\t\t\tthis.$emit('input', val);\n\t\t\t\tthis.$emit('change', val);\n\t\t\t\t// 等待下一个周期再执行,因为this.$emit('input')作用于父组件,再反馈到子组件内部,需要时间\n\t\t\t\t// 由于头条小程序执行迟钝,故需要用几十毫秒的延时\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// 将当前的值发送到 u-form-item 进行校验\n\t\t\t\t\tthis.dispatch('u-form-item', 'on-form-change', val);\n\t\t\t\t}, 60)\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-radio-group {\n\t\t/* #ifndef MP || APP-NVUE */\n\t\tdisplay: inline-flex;\n\t\tflex-wrap: wrap;\n\t\t/* #endif */\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/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-radio-group.vue?vue&type=style&index=0&id=dd868428&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/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-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      // 1700461803888\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":""}