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.
 
 
 
 

10 lines
4.2 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/select-tree/select-tree"],{"0c50":function(t,e,i){"use strict";var s;i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return h})),i.d(e,"a",(function(){return s}));var c=function(){var t=this,e=t.$createElement;t._self._c},h=[]},"83f5":function(t,e,i){"use strict";var s=i("eec4"),c=i.n(s);c.a},"8b0f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s={name:"select-tree",data:function(){return{finalList:[],menuKey:1,selectList:this.value}},props:{value:{type:Array,default:function(){return[{name:"水果",checked:!1,show:!0,childrenList:[{checked:!1,name:"西瓜"},{checked:!1,name:"桃子"}]},{name:"工具",checked:!1,show:!1,childrenList:[{checked:!1,name:"锄头"},{checked:!1,name:"铲子"}]}]}},showCheck:{type:Boolean,default:!0},disableLv2Check:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!1}},mounted:function(){},methods:{_showlv2:function(t){this.selectList[t].show?(this.$set(this.selectList[t],"show",!1),this.$forceUpdate(),this.$emit("input",this.selectList)):(this.$set(this.selectList[t],"show",!0),this.$forceUpdate(),this.$emit("input",this.selectList))},_chooseAll:function(t,e){this.selectList[e].checked?(this.$set(this.selectList[e],"checked",!1),this.selectList[e].childrenList.forEach((function(t){t.checked=!1})),this.$emit("input",this.selectList)):(this.$set(this.selectList[e],"checked",!0),this.selectList[e].childrenList.forEach((function(t){t.checked=!0})),this.$emit("input",this.selectList)),this.$set(this.selectList[e],"show",!0),this.$emit("input",this.selectList),this.$forceUpdate(),this._computedFinalList()},_chooseOne:function(t,e){this.selectList[t].childrenList[e].checked?(this.$set(this.selectList[t],"checked",!0),this.$set(this.selectList[t].childrenList[e],"checked",!1),this.selectList[t].childrenList.every((function(t){return 0==t.checked}))&&this.$set(this.selectList[t],"checked",!1),this.$forceUpdate(),this.$emit("input",this.selectList),this._computedFinalList()):(this.$set(this.selectList[t],"checked",!0),this.$set(this.selectList[t].childrenList[e],"checked",!0),this.selectList[t].childrenList.every((function(t){return 1==t.checked}))&&this.$set(this.selectList[t],"checked",!0),this.$emit("input",this.selectList),this.$forceUpdate(),this._computedFinalList())},_computedFinalList:function(){var t=this;this.finalList=[],this.selectList.forEach((function(e){e.checked&&t.finalList.push(JSON.parse(JSON.stringify(e)))})),this.finalList.forEach((function(t){t.childrenList.forEach((function(e,i){e.checked||t.childrenList.splice(i,1)}))})),this.$emit("choose",this.finalList)},chooseAll:function(){var t=this;this.selectList.forEach((function(e){t.$set(e,"checked",!0),e.childrenList.forEach((function(e){t.$set(e,"checked",!0)}))})),this.$emit("input",this.selectList),this.$forceUpdate(),this._computedFinalList()},cancelAll:function(){var t=this;this.selectList.forEach((function(e){t.$set(e,"checked",!1),e.childrenList.forEach((function(e){t.$set(e,"checked",!1)}))})),this.$emit("input",this.selectList),this.$forceUpdate(),this._computedFinalList()},deleteItem:function(t){this.$emit("input",this.selectList),this.$emit("deleteItem",t)}},watch:{value:function(t){console.log(t),this.selectList=t,this.$emit("input",this.selectList)}}};e.default=s},c87c:function(t,e,i){"use strict";i.r(e);var s=i("0c50"),c=i("cf08");for(var h in c)"default"!==h&&function(t){i.d(e,t,(function(){return c[t]}))}(h);i("83f5");var n,l=i("f0c5"),o=Object(l["a"])(c["default"],s["b"],s["c"],!1,null,"a98604c2",null,!1,s["a"],n);e["default"]=o.exports},cf08:function(t,e,i){"use strict";i.r(e);var s=i("8b0f"),c=i.n(s);for(var h in s)"default"!==h&&function(t){i.d(e,t,(function(){return s[t]}))}(h);e["default"]=c.a},eec4:function(t,e,i){}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/select-tree/select-tree-create-component',
{
'components/select-tree/select-tree-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("c87c"))
})
},
[['components/select-tree/select-tree-create-component']]
]);