1 |
- {"version":3,"sources":["webpack:///D:/yzm/worknew/wardrobe/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue?832e","webpack:///D:/yzm/worknew/wardrobe/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue?21d3","webpack:///D:/yzm/worknew/wardrobe/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue?aa0d","webpack:///D:/yzm/worknew/wardrobe/tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue?51e9","uni-app:///tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC7H;AACoE;AACL;;;AAG/D;AACmM;AACnM,gBAAgB,0MAAU;AAC1B,EAAE,sFAAM;AACR,EAAE,2FAAM;AACR,EAAE,oGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,+FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;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;AAA6wB,CAAgB,2wBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACOjyB;;;;;;;;;;;AAWA;AACA,0BADA;AAEA;AACA;AACA;AACA,kBADA;AAEA,mBAFA,EAFA;;AAMA;AACA;AACA,kBADA;AAEA,iBAFA,EAPA;;AAWA;AACA,kBADA;AAEA,iBAFA,EAXA,EAFA;;;AAkBA,MAlBA,kBAkBA;AACA;;;AAGA,GAtBA;AAuBA,SAvBA,qBAuBA;AACA;;AAEA;AACA,KAHA;AAIA,GA5BA;AA6BA;AACA,UADA,kBACA,CADA,EACA;;AAEA;AACA,KAJA;;AAMA;AACA,UAPA,oBAOA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SALA,MAKA;AACA;AACA;AACA;AACA,aAFA;AAGA;AACA;AACA;AACA;AACA;AACA,KA1BA;AA2BA;AACA;AACA,cA7BA,wBA6BA;AACA;AACA;AACA;;AAEA;AACA,SAHA,MAGA;AACA;AACA;AACA;AACA,aAFA;AAGA;AACA;AACA;AACA;;AAEA,KA7CA;AA8CA;AACA,SA/CA,mBA+CA;AACA;AACA;AACA;;AAEA;AACA,SAHA,MAGA;AACA;AACA;AACA;AACA,aAFA;AAGA;AACA;AACA;AACA;AACA,KA9DA;AA+DA;AACA,SAhEA,mBAgEA;AACA;AACA,uBADA,EACA,YADA;;AAGA;AACA,KArEA,EA7BA,E","file":"tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./tm-groupcheckbox.vue?vue&type=template&id=58965d4d&\"\nvar renderjs\nimport script from \"./tm-groupcheckbox.vue?vue&type=script&lang=js&\"\nexport * from \"./tm-groupcheckbox.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../exe/HBuilderX.3.4.7.20220422/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 = \"tm-vuetify/components/tm-groupcheckbox/tm-groupcheckbox.vue\"\nexport default component.exports","export * from \"-!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tm-groupcheckbox.vue?vue&type=template&id=58965d4d&\"","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 \"-!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tm-groupcheckbox.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../exe/HBuilderX.3.4.7.20220422/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tm-groupcheckbox.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"tm-groupcheckbox \" :class=\"[customClass]\">\r\n\t\t<slot></slot>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\t/**\r\n\t * 复选框组\r\n\t * @description 此组件必须,配合tm-checkbox组件使用,不可单独使用。\r\n\t * @property {Number} max = [999] 最大选择数量\r\n\t * @property {String} name = [] 默认:'',提交表单时的的字段名称标识\r\n\t* @property {String} customClass = [] 默认:'',自定义class\r\n\t * @property {Function} change 任何一个checkekBox改变将会触发此事件,并携带选中的数组数据。\r\n\t * @property {Function} error 如果超过最大选择数量将会触发此事件。\r\n\t * @example <tm-groupcheckbox><tm-checkbox v-model=\"checked\" label=\"苹果\"></tm-checkbox></tm-groupcheckbox>\r\n\t * \r\n\t */\r\n\texport default {\r\n\t\tname:'tm-groupcheckbox',\r\n\t\tprops:{\r\n\t\t\t// 最大选择数量\r\n\t\t\tmax:{\r\n\t\t\t\ttype:Number,\r\n\t\t\t\tdefault:9999\r\n\t\t\t},\r\n\t\t\t//提交表单时的的字段名称\r\n\t\t\tname:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:''\r\n\t\t\t},\r\n\t\t\tcustomClass:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:''\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\t\r\n\t\t\t};\r\n\t\t},\r\n\t\tmounted() {\r\n\t\t\tthis.$nextTick(function(){\r\n\t\t\t\t\r\n\t\t\t\tthis.$emit('change',this.getVal())\r\n\t\t\t})\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tchange(e) {\r\n\t\t\t\t\r\n\t\t\t\tthis.$emit('change',e)\r\n\t\t\t},\r\n\t\r\n\t\t\t// 获取选中的结果 。\r\n\t\t\tgetVal(){\r\n\t\t\t\tlet box = [];\r\n\t\t\t\tfunction findchild(p,index){\r\n\t\t\t\t\tlet preat = p;\r\n\t\t\t\t\tif(preat.$options?.name==='tm-checkbox'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(preat.changValue){\r\n\t\t\t\t\t\t\tbox.push({index:index,value:preat.name,checked:preat.changValue})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(preat.$children.length>0){\r\n\t\t\t\t\t\t\tpreat.$children.forEach(item=>{\r\n\t\t\t\t\t\t\t\tfindchild(item,index++);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tfindchild(this,0);\r\n\t\t\t\treturn box;\r\n\t\t\t},\r\n\t\t\t// 反选。如果一个都没选择。反选就相当于全选。如果是全选,则结果是全部不选。\r\n\t\t\t// 执行完毕后。不能立即使用getVal获取结果需要this.$nextTick\r\n\t\t\treverseVal(){\r\n\t\t\t\tfunction findchild(p,index){\r\n\t\t\t\t\tlet preat = p;\r\n\t\t\t\t\tif(preat.$options?.name==='tm-checkbox'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpreat.changValue = !preat.changValue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(preat.$children.length>0){\r\n\t\t\t\t\t\t\tpreat.$children.forEach(item=>{\r\n\t\t\t\t\t\t\t\tfindchild(item,index++);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tfindchild(this,0);\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t// 清除选中。\r\n\t\t\tclear(){\r\n\t\t\t\tfunction findchild(p,index){\r\n\t\t\t\t\tlet preat = p;\r\n\t\t\t\t\tif(preat.$options?.name==='tm-checkbox'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tpreat.changValue = false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(preat.$children.length>0){\r\n\t\t\t\t\t\t\tpreat.$children.forEach(item=>{\r\n\t\t\t\t\t\t\t\tfindchild(item,index++);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tfindchild(this,0);\r\n\t\t\t},\r\n\t\t\t// 只有当超过最选选项时才会发出错误。\r\n\t\t\terror(){\r\n\t\t\t\tuni.showToast({\r\n\t\t\t\t\ttitle:\"超过选择限制\",icon:'none'\r\n\t\t\t\t})\r\n\t\t\t\tthis.$emit('error',\"超过选择限制\")\r\n\t\t\t}\r\n\t\t},\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\r\n</style>\r\n"],"sourceRoot":""}
|