{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\components\\tree\\index.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\components\\tree\\index.vue","mtime":1681724619352},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nexport default {\n name: 'tree',\n props: {\n defaultProps: {\n typeof: Object,\n default: function _default() {\n return {\n children: 'children',\n label: 'name'\n };\n }\n },\n data: {\n typeof: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n filterText: '',\n expandAll: false\n };\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n }\n },\n methods: {\n expandHandle: function expandHandle() {\n this.expandAll = !this.expandAll;\n this.expandNodes(this.$refs.tree.store.root);\n },\n // 遍历树形数据,设置每一项的expanded属性,实现展开收起\n expandNodes: function expandNodes(node) {\n node.expanded = this.expandAll;\n\n for (var i = 0; i < node.childNodes.length; i++) {\n node.childNodes[i].expanded = this.expandAll;\n\n if (node.childNodes[i].childNodes.length > 0) {\n this.expandNodes(node.childNodes[i]);\n }\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.label.indexOf(value) !== -1;\n },\n handleNodeClick: function handleNodeClick(data) {\n this.$emit('node-click', data);\n },\n loadTree: function loadTree() {\n this.$emit('loadTree');\n }\n }\n};",null]}