1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"version":3,"sources":["webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?5bcd","webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?84bb","webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?9236","webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?dbfa","uni-app:///tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue","webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?bab4","webpack:///E:/云商会/云商会/tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue?3a04"],"names":["mixins","name","props","value","type","default","max","disabled","disabledLabel","shape","activeColor","size","width","wrap","iconSize","computed","parentData","data","watch","created","methods","initValue","emitEvent","setTimeout"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0I;AAC1I;AACqE;AACL;AACsC;;;AAGtG;AAC+L;AAC/L,gBAAgB,wMAAU;AAC1B,EAAE,uFAAM;AACR,EAAE,wGAAM;AACR,EAAE,iHAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,4GAAU;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;AAA6uB,CAAgB,kwBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACOjwB;;;;;;;gBAEA;EACAA;EACAC;EACAC;IACAC;MACAC;MACAC;QACA;MACA;IACA;IACA;IACAC;MACAF;MACAC;IACA;IACA;IACAJ;MACAG;MACAC;IACA;IACA;IACAE;MACAH;MACAC;IACA;IACA;IACAG;MACAJ;MACAC;IACA;IACA;IACAI;MACAL;MACAC;IACA;IACA;IACAK;MACAN;MACAC;IACA;IACA;IACAM;MACAP;MACAC;IACA;IACA;IACAO;MACAR;MACAC;IACA;IACA;IACAQ;MACAT;MACAC;IACA;IACA;IACAS;MACAV;MACAC;IACA;EACA;EACAU;IACA;IACA;IACA;IACAC;MACA;IACA;EACA;EACAC;IACA,QAEA;EACA;EACAC;IACA;IACAF;MACA;QACA;UACA;UACA;QACA;MACA;IACA;EACA;EACAG;IACA;EACA;EACAC;IACAC;MACA;IACA;IACA;IACAC;MAAA;MACA;MACA;QACA;MACA;MACA;MACA;MACA;MACA;MACAC;QACA;QACA;MACA;IACA;EACA;AACA;AAAA,4B;;;;;;;;;;;;ACrHA;AAAA;AAAA;AAAA;AAAw5C,CAAgB,q3CAAG,EAAC,C;;;;;;;;;;;ACA56C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./tn-checkbox-group.vue?vue&type=template&id=1eb7130e&scoped=true&\"\nvar renderjs\nimport script from \"./tn-checkbox-group.vue?vue&type=script&lang=js&\"\nexport * from \"./tn-checkbox-group.vue?vue&type=script&lang=js&\"\nimport style0 from \"./tn-checkbox-group.vue?vue&type=style&index=0&id=1eb7130e&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!F:\\\\HBuilderX.3.5.3.20220729\\\\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 \"1eb7130e\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"tuniao-ui/components/tn-checkbox-group/tn-checkbox-group.vue\"\nexport default component.exports","export * from \"-!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./tn-checkbox-group.vue?vue&type=template&id=1eb7130e&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 \"-!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./tn-checkbox-group.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./tn-checkbox-group.vue?vue&type=script&lang=js&\"","<template>\r\n <view class=\"tn-checkbox-group-class tn-checkbox-group\">\r\n <slot></slot>\r\n </view>\n</template>\n\n<script>\r\n import Emitter from '../../libs/utils/emitter.js'\r\n \r\n export default {\r\n mixins: [ Emitter ],\r\n name: 'tn-checkbox-group',\r\n props: {\r\n value: {\r\n type: Array,\r\n default() {\r\n return []\r\n }\r\n },\r\n // 可以选中多少个checkbox\r\n max: {\r\n type: Number,\r\n default: 999\r\n },\r\n // 表单提交时的标识符\r\n name: {\r\n type: String,\r\n default: ''\r\n },\r\n // 禁用选择\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 禁用点击标签进行选择\r\n disabledLabel: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 选择框的形状 square 方形 circle 圆形\r\n shape: {\r\n type: String,\r\n default: 'square'\r\n },\r\n // 选中时的颜色\r\n activeColor: {\r\n type: String,\r\n default: '#01BEFF'\r\n },\r\n // 组件大小\r\n size: {\r\n type: Number,\r\n default: 34\r\n },\r\n // 每个checkbox占的宽度\r\n width: {\r\n type: String,\r\n default: 'auto'\r\n },\r\n // 是否换行\r\n wrap: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 图标大小\r\n iconSize: {\r\n type: Number,\r\n default: 20\r\n }\r\n },\r\n computed: {\r\n // 这里computed的变量,都是子组件tn-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化\r\n // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(tn-checkbox-group)\r\n // 拉取父组件新的变化后的参数\r\n parentData() {\r\n return [this.value, this.disabled, this.disabledLabel, this.shape, this.activeColor, this.size, this.width, this.wrap, this.iconSize]\r\n }\r\n },\r\n data() {\r\n return {\r\n \r\n }\r\n },\r\n watch: {\r\n // 当父组件中的子组件需要共享的参数发生了变化,手动通知子组件\r\n parentData() {\r\n if (this.children.length) {\r\n this.children.map(child => {\r\n // 判断子组件(tn-checkbox)如果有updateParentData方法的话,子组件重新从父组件拉取了最新的值\r\n typeof(child.updateParentData) === 'function' && child.updateParentData()\r\n })\r\n }\r\n }\r\n },\r\n created() {\r\n this.children = []\r\n },\r\n methods: {\r\n initValue(values) {\r\n this.$emit('input', values)\r\n },\r\n // 触发事件\r\n emitEvent() {\r\n let values = []\r\n this.children.map(child => {\r\n if (child.checkValue) values.push(child.name)\r\n })\r\n this.$emit('change', values)\r\n this.$emit('input', values)\r\n // 发出事件,用于在表单组件中嵌入checkbox的情况,进行验证\r\n // 由于头条小程序执行迟钝,故需要用几十毫秒的延时\r\n setTimeout(() => {\r\n \t// 将当前的值发送到 tn-form-item 进行校验\r\n \tthis.dispatch('tn-form-item', 'on-form-change', values)\r\n }, 60)\r\n }\r\n }\r\n }\n</script>\n\n<style lang=\"scss\" scoped>\r\n \r\n .tn-checkbox-group {\r\n /* #ifndef MP || APP-NVUE */\r\n display: inline-flex;\r\n flex-wrap: wrap;\r\n /* #endif */\r\n &::after {\r\n content: \" \";\r\n display: table;\r\n clear: both;\r\n }\r\n }\n</style>\n","import mod from \"-!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./tn-checkbox-group.vue?vue&type=style&index=0&id=1eb7130e&lang=scss&scoped=true&\"; export default mod; export * from \"-!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\HBuilderX.3.5.3.20220729\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./tn-checkbox-group.vue?vue&type=style&index=0&id=1eb7130e&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1715674861450\n var cssReload = require(\"F:/HBuilderX.3.5.3.20220729/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":""} |