UNPKG

@jecloud/func

Version:

JECloud 功能库

1 lines 878 B
var t=this&&this.__assign||function(){return t=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},t.apply(this,arguments)};import{ref as e}from"vue";import{Modal as o}from"@jecloud/ui";import{useTreeSelect as i}from"./hooks/use-renderer";export function treeSelect(n){var r=n.width,l=void 0===r?500:r,a=n.height,c=void 0===a?700:a,s=n.title,u=void 0===s?"树形选择":s,h=e(),f=i({selectOptions:n,modal:h}),d=f.pluginSlot,p=f.onCollapseButtonClick,m=f.onRefreshButtonClick,v=f.modalOptions;return h.value=o.window(t(t({title:u,width:l,height:c,maximizable:!1,minWidth:l,minHeight:c,content:function(){return d()},tools:[{icon:"fal fa-chevron-up",text:"收起",handler:p},{icon:"fal fa-sync",text:"刷新",handler:m}]},v),{className:"je-func-select-window"})),h.value}