|
@@ -25,11 +25,11 @@ export default {
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
- this.checkArr=this.categoryValue
|
|
|
|
|
|
+ this.checkArr=JSON.parse(JSON.stringify(this.categoryValue))
|
|
if(this.categoryValue.length!=0){
|
|
if(this.categoryValue.length!=0){
|
|
this.checkId=this.categoryValue[(this.categoryValue.length-1)]
|
|
this.checkId=this.categoryValue[(this.categoryValue.length-1)]
|
|
}
|
|
}
|
|
- this.checkArr.push('000')
|
|
|
|
|
|
+ this.checkArr.push('999')
|
|
//this.init()
|
|
//this.init()
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
@@ -42,7 +42,7 @@ export default {
|
|
const creatNode = (node,num,pId)=>{
|
|
const creatNode = (node,num,pId)=>{
|
|
node.pId=pId
|
|
node.pId=pId
|
|
if(num==1){
|
|
if(num==1){
|
|
- node.parent='000'
|
|
|
|
|
|
+ node.parent='999'
|
|
}
|
|
}
|
|
if(node.children && node.children.length > 0){
|
|
if(node.children && node.children.length > 0){
|
|
let hArr = node.children.map(item=>{
|
|
let hArr = node.children.map(item=>{
|