You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
23 KiB

{"version":3,"sources":["webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?7267","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?b8dc","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?eb4f","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?c058","uni-app:///components/tki-tree/tki-tree.vue","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?09d2","webpack:////Users/yanghao/Desktop/禅易云/zhaoshangMiniApp-uniapp/components/tki-tree/tki-tree.vue?1939"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4I;AAC5I;AAC4D;AACL;AACqC;;;AAG5F;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,0GAAM;AACR,EAAE,mHAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,8GAAU;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;AAAs0B,CAAgB,syBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC0C11B;AACA,kBADA;AAEA;AACA;AACA,iBADA;AAEA;AACA;AACA,OAJA,EADA;;AAOA;AACA,kBADA;AAEA,mBAFA,EAPA;;AAWA;AACA,kB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gEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WARA;AASA;AACA,OAZA;AAaA,KA9EA;AA+EA;AACA,gBAhFA,wBAgFA,IAhFA,EAgFA,KAhFA,EAgFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WARA,MAQA;AACA;AACA;AACA;AACA;AACA;AACA,SAnBA,MAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAxCA;AAyCA;AACA,KArIA;AAsIA,mBAtIA,2BAsIA,IAtIA,EAsIA,KAtIA,EAsIA;AACA;AACA;AACA,KAzIA;AA0IA;AACA,gBA3IA,wBA2IA,KA3IA,EA2IA;AACA;AACA;AACA;AACA;AACA;AACA,WAFA,MAEA;AACA;AACA;AACA,SANA;AAOA,OATA,MASA;AACA;AACA;AACA;AACA,WAFA,MAEA;AACA;AACA;AACA,SANA;AAOA;AACA,KA9JA;AA+JA;AACA,eAhKA,yBAgKA;AACA;AACA;AACA,OAFA;AAGA,KApKA;AAqKA,aArKA,uBAqKA;AACA;AACA;AACA;AACA;AACA,OAFA;AAGA,KA3KA,EAvEA;;AAoPA;AACA,SADA,iBACA,IADA,EACA;AACA;AACA,KAHA;AAIA,YAJA,sBAIA;AACA;AACA;AACA;AACA,KARA;AASA,gBATA,0BASA;AACA;AACA;AACA;AACA,KAbA,EApPA;;AAmQA,SAnQA,qBAmQA;AACA;AACA,GArQA,E;;;;;;;;;;;;AC1CA;AAAA;AAAA;AAAA;AAA2sC,CAAgB,2nCAAG,EAAC,C;;;;;;;;;;;ACA/tC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/tki-tree/tki-tree.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./tki-tree.vue?vue&type=template&id=a8274bb8&scoped=true&xlang=wxml&\"\nvar renderjs\nimport script from \"./tki-tree.vue?vue&type=script&lang=js&\"\nexport * from \"./tki-tree.vue?vue&type=script&lang=js&\"\nimport style0 from \"./tki-tree.vue?vue&type=style&index=0&id=a8274bb8&scoped=true&lang=css&\"\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 \"a8274bb8\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/tki-tree/tki-tree.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!./tki-tree.vue?vue&type=template&id=a8274bb8&scoped=true&xlang=wxml&\"","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!./tki-tree.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!./tki-tree.vue?vue&type=script&lang=js&\"","<template xlang=\"wxml\">\n\t<view class=\"tki-tree\">\n\t\t<view class=\"tki-tree-mask\" :class=\"{'show':showTree}\" @tap=\"_cancel\"></view>\n\t\t<view class=\"tki-tree-cnt\" :class=\"{'show':showTree}\">\n\t\t\t<view class=\"tki-tree-bar\">\n\t\t\t\t<view class=\"tki-tree-bar-cancel\" :style=\"{'color':cancelColor}\" hover-class=\"hover-c\" @tap=\"_cancel\">取消</view>\n\t\t\t\t<view class=\"tki-tree-bar-title\" :style=\"{'color':titleColor}\">{{title}}</view>\n\t\t\t\t<view class=\"tki-tree-bar-confirm\" :style=\"{'color':confirmColor}\" hover-class=\"hover-c\" @tap=\"_confirm\">确定</view>\n\t\t\t</view>\n\t\t\t<view class=\"tki-tree-view\">\n\t\t\t\t<scroll-view class=\"tki-tree-view-sc\" :scroll-y=\"true\">\n\t\t\t\t\t<block v-for=\"(item, index) in treeList\" :key=\"index\">\n\t\t\t\t\t\t<view class=\"tki-tree-item\" :style=\"[{\n\t\t\t\t\t\t\tpaddingLeft: item.rank*15 + 'px',\n\t\t\t\t\t\t\tzIndex: item.rank*-1 +50\n\t\t\t\t\t\t}]\"\n\t\t\t\t\t\t :class=\"{\n\t\t\t\t\t\t\tborder: border === true,\n\t\t\t\t\t\t\tshow: item.show,\n\t\t\t\t\t\t\tlast: item.lastRank,\n\t\t\t\t\t\t\tshowchild: item.showChild,\n\t\t\t\t\t\t\topen: item.open,\n\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<view class=\"tki-tree-label\" @tap.stop=\"_treeItemTap(item, index)\">\n\t\t\t\t\t\t\t\t<image class=\"tki-tree-icon\" :src=\"item.lastRank ? lastIcon : item.showChild ? currentIcon : defaultIcon\"></image>\n\t\t\t\t\t\t\t\t{{item.name}}\n\t\t\t\t\t\t\t</view>\n\t\t\t\t\t\t\t<view class=\"tki-tree-check\" @tap.stop=\"_treeItemSelect(item, index)\" v-if=\"selectParent?true:item.lastRank\">\n\t\t\t\t\t\t\t\t<view class=\"tki-tree-check-yes\" v-if=\"item.checked\" :class=\"{'radio':!multiple}\" :style=\"{'border-color':confirmColor}\">\n\t\t\t\t\t\t\t\t\t<view class=\"tki-tree-check-yes-b\" :style=\"{'background-color':confirmColor}\"></view>\n\t\t\t\t\t\t\t\t</view>\n\t\t\t\t\t\t\t\t<view class=\"tki-tree-check-no\" v-else :class=\"{'radio':!multiple}\" :style=\"{'border-color':confirmColor}\"></view>\n\t\t\t\t\t\t\t</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t</block>\n\t\t\t\t</scroll-view>\n\t\t\t</view>\n\t\t</view>\n\t</view>\n</template>\n\n<script>\n\texport default {\n\t\tname: \"tki-tree\",\n\t\tprops: {\n\t\t\trange: {\n\t\t\t\ttype: Array,\n\t\t\t\tdefault: function() {\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t},\n\t\t\tidKey: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'id'\n\t\t\t},\n\t\t\trangeKey: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'label'\n\t\t\t},\n\t\t\ttitle: {\n\t\t\t\ttype: String,\n\t\t\t\tdefault: ''\n\t\t\t},\n\t\t\tmultiple: { // 是否可以多选\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t\t// default: true\n\t\t\t},\n\t\t\tselectParent: { //是否可以选父级\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\tfoldAll: { //折叠时关闭所有已经打开的子集,再次打开时需要一级一级打开\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t\tconfirmColor: { // 确定按钮颜色\n\t\t\t\ttype: String,\n\t\t\t\tdefault: '' // #07bb07\n\t\t\t},\n\t\t\tcancelColor: { // 取消按钮颜色\n\t\t\t\ttype: String,\n\t\t\t\tdefault: '' // #757575\n\t\t\t},\n\t\t\ttitleColor: { // 标题颜色\n\t\t\t\ttype: String,\n\t\t\t\tdefault: '' // #757575\n\t\t\t},\n\t\t\tcurrentIcon: { // 展开时候的ic\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF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候的ic\n\t\t\t\ttype: String,\n\t\t\t\tdefault: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAACE0lEQVR4Xu3c200DMRCF4XEltJAOkEugA+ggpUAHoQMqiFMCdEAJUMEiS4mEELlIO7bPOeN9i6K1rG/952myyea1WiCtXmEuYBPR4RBMxInoIOCwhOtJLKVszWyXc/5y2BvNEq6I+/3+kFK6M7OHnPM7jcLKjbZAvD/uaZtzflm5P4rbWyJWgDcze1LPuzVihfxUz7sH4ilJ2bx7Isrm3RtRMu8RiHJ5j0SUyXs0okTeCIj0eSMh0uaNhkiZNyIiXd7IiDR5oyNS5M2ACJ83EyJs3myIkHkzIsLlzYwIkzc7IkTeCojD81ZCHJa3GuKQvBURu+etjNgtb3XELnlHQGyedyTEZnlHQ2ySd0RE97wjI7rlHR3RJe+JeIrbLOecD6ePpZQ6W1kn2epo4MUrPOKyLN8ppYq1+y1VStncOjIdGnFZlo+U0uOtWOeOY2TE12Ouq//pEA7xXL7XfvcufR8K0Svfv6CREN3yDYfYIt9QiK3yjYTYLF95xB75SiP2ylcZsVu+cogj8pVCHJWvEuKwfOkREfKlRkTJlxkRJl86RMR8qRBR82VChM0XHpEhX2hElnyREWnyhUNkzBcKkTVfJETafIcjKuQ7FFEl35GIMvl2R1TMtyuiar49EWXzbY5oZpv/hibXTF2h3+s60FRKeT6+3TjMS3nrA3ZFRD8xrfY3ER1kJ+JEdBBwWGKeRAfEH1wS5WFZSDB/AAAAAElFTkSuQmCC'\n\t\t\t},\n\t\t\tlastIcon: { // 没有子集的ic\n\t\t\t\ttype: String,\n\t\t\t\tdefault: ''\n\t\t\t},\n\t\t\tborder: { // 是否有分割线\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: false\n\t\t\t},\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tshowTree: false,\n\t\t\t\ttreeList: [],\n\t\t\t\tselectIndex: -1,\n\t\t\t}\n\t\t},\n\t\tcomputed: {},\n\t\tmethods: {\n\t\t\t_show() {\n\t\t\t\tthis.showTree = true\n\t\t\t},\n\t\t\t_hide() {\n\t\t\t\tthis.showTree = false\n\t\t\t},\n\t\t\t_cancel() {\n\t\t\t\tthis._hide()\n\t\t\t\tthis.$emit(\"cancel\", '');\n\t\t\t},\n\t\t\t_confirm() {\n\t\t\t\t// 处理所选数据\n\t\t\t\tlet rt = [],\n\t\t\t\t\tobj = {};\n\t\t\t\tthis.treeList.forEach((v, i) => {\n\t\t\t\t\tif (this.treeList[i].checked) {\n\t\t\t\t\t\tobj = {}\n\t\t\t\t\t\tobj.parents = this.treeList[i].parents\n\t\t\t\t\t\tobj = Object.assign(obj, this.treeList[i].source)\n\t\t\t\t\t\t// 移除子元素\n\t\t\t\t\t\tdelete obj.children\n\t\t\t\t\t\trt.push(obj)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis._hide()\n\t\t\t\tthis.$emit(\"confirm\", rt);\n\t\t\t},\n\t\t\t//扁平化树结构\n\t\t\t_renderTreeList(list = [], rank = 0, parentId = [], parents = []) {\n\t\t\t\tlist.forEach(item => {\n\t\t\t\t\tthis.treeList.push({\n\t\t\t\t\t\tid: item[this.idKey],\n\t\t\t\t\t\tname: item[this.rangeKey],\n\t\t\t\t\t\tsource: item,\n\t\t\t\t\t\tparentId, // 父级id数组\n\t\t\t\t\t\tparents, // 父级id数组\n\t\t\t\t\t\trank, // 层级\n\t\t\t\t\t\tshowChild: false, //子级是否显示\n\t\t\t\t\t\topen: false, //是否打开\n\t\t\t\t\t\tshow: rank === 0, // 自身是否显示\n\t\t\t\t\t\thideArr: [],\n\t\t\t\t\t\torChecked: item.checked ? item.checked : false,\n\t\t\t\t\t\tchecked: item.checked ? item.checked : false,\n\t\t\t\t\t})\n\t\t\t\t\tif (Array.isArray(item.children) && item.children.length > 0) {\n\t\t\t\t\t\t// console.log(item)\n\t\t\t\t\t\tlet parentid = [...parentId],\n\t\t\t\t\t\t\tparentArr = [...parents],\n\t\t\t\t\t\t\tchildrenid = [...childrenid];\n\t\t\t\t\t\tdelete parentArr.children\n\t\t\t\t\t\tparentid.push(item[this.idKey]);\n\t\t\t\t\t\tparentArr.push({\n\t\t\t\t\t\t\t[this.idKey]: item[this.idKey],\n\t\t\t\t\t\t\t[this.rangeKey]: item[this.rangeKey]\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis._renderTreeList(item.children, rank + 1, parentid, parentArr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.treeList[this.treeList.length - 1].lastRank = true;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// console.log(list)\n\t\t\t},\n\t\t\t// 处理默认选择\n\t\t\t_defaultSelect() {\n\t\t\t\tthis.treeList.forEach((v, i) => {\n\t\t\t\t\tif (v.checked) {\n\t\t\t\t\t\tthis.treeList.forEach((v2, i2) => {\n\t\t\t\t\t\t\tif (v.parentId.toString().indexOf(v2.parentId.toString()) >= 0) {\n\t\t\t\t\t\t\t\tv2.show = true\n\t\t\t\t\t\t\t\tif (v.parentId.includes(v2.id)) {\n\t\t\t\t\t\t\t\t\tv2.showChild = true;\n\t\t\t\t\t\t\t\t\tv2.open = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 点击\n\t\t\t_treeItemTap(item, index) {\n\t\t\t\tif (item.lastRank === true) {\n\t\t\t\t\t//点击最后一级时触发事件\n\t\t\t\t\tthis.treeList[index].checked = !this.treeList[index].checked\n\t\t\t\t\tthis._fixMultiple(index)\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet list = this.treeList;\n\t\t\t\tlet id = item.id;\n\t\t\t\titem.showChild = !item.showChild;\n\t\t\t\titem.open = item.showChild ? true : !item.open;\n\t\t\t\tlist.forEach((childItem, i) => {\n\t\t\t\t\tif (item.showChild === false) {\n\t\t\t\t\t\t//隐藏所有子级\n\t\t\t\t\t\tif (!childItem.parentId.includes(id)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!this.foldAll) {\n\t\t\t\t\t\t\tif (childItem.lastRank !== true && !childItem.open) {\n\t\t\t\t\t\t\t\tchildItem.showChild = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// 为隐藏的内容添加一个标记\n\t\t\t\t\t\t\tif (childItem.show) {\n\t\t\t\t\t\t\t\tchildItem.hideArr[item.rank] = id\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (childItem.lastRank !== true) {\n\t\t\t\t\t\t\t\tchildItem.showChild = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchildItem.show = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// 打开子集\n\t\t\t\t\t\tif (childItem.parentId[childItem.parentId.length - 1] === id) {\n\t\t\t\t\t\t\tchildItem.show = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 打开被隐藏的子集\n\t\t\t\t\t\tif (childItem.parentId.includes(id) && !this.foldAll) {\n\t\t\t\t\t\t\t// console.log(childItem.hideArr)\n\t\t\t\t\t\t\tif (childItem.hideArr[item.rank] === id) {\n\t\t\t\t\t\t\t\tchildItem.show = true;\n\t\t\t\t\t\t\t\tif (childItem.open && childItem.showChild) {\n\t\t\t\t\t\t\t\t\tchildItem.showChild = true\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tchildItem.showChild = false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tchildItem.hideArr[item.rank] = null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// console.log(childItem.hideArr)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// console.log(this.treeList)\n\t\t\t},\n\t\t\t_treeItemSelect(item, index) {\n\t\t\t\tthis.treeList[index].checked = !this.treeList[index].checked\n\t\t\t\tthis._fixMultiple(index)\n\t\t\t},\n\t\t\t// 处理单选多选\n\t\t\t_fixMultiple(index) {\n\t\t\t\tif (!this.multiple) {\n\t\t\t\t\t// 如果是单选\n\t\t\t\t\tthis.treeList.forEach((v, i) => {\n\t\t\t\t\t\tif (i != index) {\n\t\t\t\t\t\t\tthis.treeList[i].checked = false\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.treeList[i].checked = true\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tthis.treeList.forEach((obj, i) => {\n\t\t\t\t\t\t\tif (!this.treeList[index].checked && this.treeList[index].parentId.indexOf(obj.id) > -1) {\n\t\t\t\t\t\t\t\tthis.treeList[i].checked = false;\n\t\t\t\t\t\t\t} else if (obj.parentId.indexOf(this.treeList[index].id) > -1) {\n\t\t\t\t\t\t\t\tthis.treeList[i].checked = this.treeList[index].checked;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 重置数据\n\t\t\t_reTreeList() {\n\t\t\t\tthis.treeList.forEach((v, i) => {\n\t\t\t\t\tthis.treeList[i].checked = v.orChecked\n\t\t\t\t})\n\t\t\t},\n\t\t\t_initTree(range = this.range){\n\t\t\t\tthis.treeList = [];\n\t\t\t\tthis._renderTreeList(range);\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis._defaultSelect(range)\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\twatch: {\n\t\t\trange(list) {\n\t\t\t\tthis._initTree(list);\n\t\t\t},\n\t\t\tmultiple() {\n\t\t\t\tif (this.range.length) {\n\t\t\t\t\tthis._reTreeList();\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectParent() {\n\t\t\t\tif (this.range.length) {\n\t\t\t\t\tthis._reTreeList();\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tmounted() {\n\t\t\tthis._initTree();\n\t\t}\n\t}\n</script>\n\n<style scoped>\n\t@import \"./style.css\";\n</style>\n","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-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--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../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!./tki-tree.vue?vue&type=style&index=0&id=a8274bb8&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-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--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../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!./tki-tree.vue?vue&type=style&index=0&id=a8274bb8&scoped=true&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1635513141171\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":""}