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.

11 lines
7.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/ly-tree/ly-tree"],{"17b1":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;i(o("66fd"));var n=i(o("2c3e")),r=o("3bb4");function i(e){return e&&e.__esModule?e:{default:e}}var d=function(){o.e("components/ly-tree/ly-tree-node").then(function(){return resolve(o("6ae6"))}.bind(null,o)).catch(o.oe)},s={name:"LyTree",componentName:"LyTree",components:{LyTreeNode:d},data:function(){return{updateKey:(new Date).getTime(),elId:"ly_".concat(Math.ceil(1e6*Math.random()).toString(36)),visible:!0,store:{ready:!1},currentNode:null,childNodesId:[]}},provide:function(){return{tree:this}},props:{treeData:Array,ready:{type:Boolean,default:!0},emptyText:{type:String,default:"暂无数据"},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,toggleExpendAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},expandOnCheckNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,expandCurrentNodeParent:Boolean,currentNodeKey:[String,Number],checkOnlyLeaf:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},showRadio:{type:Boolean,default:!1},props:{type:[Object,Function],default:function(){return{children:"children",label:"label",disabled:"disabled"}}},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,childVisibleForFilterNode:{type:Boolean,default:!1},accordion:Boolean,indent:{type:Number,default:18},iconClass:String,showNodeIcon:{type:Boolean,default:!1},defaultNodeIcon:{type:String,default:"https://img-cdn-qiniu.dcloud.net.cn/uniapp/doc/github.svg"},isInjectParentInNode:{type:Boolean,default:!1}},computed:{isEmpty:function(){if(this.store.root){var e=this.store.root.getChildNodes(this.childNodesId);return!e||0===e.length||e.every((function(e){var t=e.visible;return!t}))}return!0},showLoading:function(){return!(this.store.ready&&this.ready)}},watch:{toggleExpendAll:function(e){this.store.toggleExpendAll(e)},defaultCheckedKeys:function(e){this.store.setDefaultCheckedKey(e)},defaultExpandedKeys:function(e){this.store.defaultExpandedKeys=e,this.store.setDefaultExpandedKeys(e)},checkStrictly:function(e){this.store.checkStrictly=e||this.checkOnlyLeaf},"store.root.childNodesId":function(e){this.childNodesId=e},"store.root.visible":function(e){this.visible=e},childNodesId:function(){var e=this;this.$nextTick((function(){e.$emit("ly-tree-render-completed")}))},treeData:{handler:function(e){this.updateKey=(new Date).getTime(),this.store.setData(e)},deep:!0}},methods:{filter:function(e,t){if(!this.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");this.store.filter(e,t)},getNodeKey:function(e){var t=this.store.root.getChildNodes([e])[0];return(0,r.getNodeKey)(this.nodeKey,t.data)},getNodePath:function(e){return this.store.getNodePath(e)},getCheckedNodes:function(e,t){return this.store.getCheckedNodes(e,t)},getCheckedKeys:function(e,t){return this.store.getCheckedKeys(e,t)},getCurrentNode:function(){var e=this.store.getCurrentNode();return e?e.data:null},getCurrentKey:function(){var e=this.getCurrentNode();return e?e[this.nodeKey]:null},setCheckAll:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.showRadio)throw new Error('You set the "show-radio" property, so you cannot select all nodes');this.showCheckbox||console.warn('You have not set the property "show-checkbox". Please check your settings'),this.store.setCheckAll(e)},setCheckedNodes:function(e,t){this.store.setCheckedNodes(e,t)},setCheckedKeys:function(e,t){if(!this.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");this.store.setCheckedKeys(e,t)},setChecked:function(e,t,o){this.store.setChecked(e,t,o)},getHalfCheckedNodes:function(){return this.store.getHalfCheckedNodes()},getHalfCheckedKeys:function(){return this.store.getHalfCheckedKe
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/ly-tree/ly-tree-create-component',
{
'components/ly-tree/ly-tree-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("a1aa"))
})
},
[['components/ly-tree/ly-tree-create-component']]
]);