@web-utils/component 1.2.1 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/65f4f4f2.js +1 -0
- package/dist/chunks/{44535b09.js → 8473fc69.js} +1 -1
- package/dist/chunks/{84860e03.js → b8305633.js} +1 -1
- package/dist/chunks/{5aab4010.js → e8547f66.js} +1 -1
- package/dist/components/address-input/index.js +1 -1
- package/dist/components/aside-menu/index.js +1 -1
- package/dist/components/capsule-tab/index.js +1 -1
- package/dist/components/chunk-file-uploader-button/index.js +1 -1
- package/dist/components/chunk-file-uploader-drop/index.js +1 -1
- package/dist/components/chunk-file-uploader-file/index.js +1 -1
- package/dist/components/chunk-file-uploader-files/index.js +1 -1
- package/dist/components/chunk-file-uploader-list/index.js +1 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +1 -1
- package/dist/components/code-mirror-editor/index.js +5 -5
- package/dist/components/confirm-button/index.js +1 -1
- package/dist/components/confirmable/index.js +1 -1
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/data-table-picker/index.js +1 -1
- package/dist/components/dynamic-table/index.js +1 -1
- package/dist/components/editable-progress/index.js +1 -1
- package/dist/components/editable-tree/index.js +1 -1
- package/dist/components/element-dialog/index.js +1 -1
- package/dist/components/empty-view/index.js +1 -1
- package/dist/components/error-view/index.js +1 -1
- package/dist/components/flex-column/index.js +1 -1
- package/dist/components/flex-item/index.js +1 -1
- package/dist/components/flex-row/index.js +1 -1
- package/dist/components/flex-scroller/index.js +1 -1
- package/dist/components/form-button/index.js +1 -1
- package/dist/components/form-cascader/index.js +1 -1
- package/dist/components/form-checkbox-group/index.js +1 -1
- package/dist/components/form-date-picker/index.js +1 -1
- package/dist/components/form-holder/index.js +1 -1
- package/dist/components/form-input/index.js +1 -1
- package/dist/components/form-input-email/index.js +1 -1
- package/dist/components/form-input-id-card/index.js +1 -1
- package/dist/components/form-input-number/index.js +1 -1
- package/dist/components/form-input-phone-number/index.js +1 -1
- package/dist/components/form-input-time/index.js +1 -1
- package/dist/components/form-item/index.js +1 -1
- package/dist/components/form-item-group/index.js +1 -1
- package/dist/components/form-radio-group/index.js +1 -1
- package/dist/components/form-select/index.js +1 -1
- package/dist/components/form-switch/index.js +1 -1
- package/dist/components/form-textarea/index.js +1 -1
- package/dist/components/form-view/index.js +1 -1
- package/dist/components/guide-steps/index.js +1 -1
- package/dist/components/icon-card/index.js +1 -1
- package/dist/components/iframe-window/index.js +1 -1
- package/dist/components/input-number/index.js +1 -1
- package/dist/components/input-number-range/index.js +1 -1
- package/dist/components/loading-view/index.js +1 -1
- package/dist/components/nav-bar/index.js +1 -1
- package/dist/components/not-implement/index.js +1 -1
- package/dist/components/page/index.js +1 -1
- package/dist/components/page-header/index.js +1 -1
- package/dist/components/page-index/index.js +1 -1
- package/dist/components/page-skeleton/index.js +1 -1
- package/dist/components/page-skeleton-new/index.js +1 -1
- package/dist/components/pageable-table/index.js +1 -1
- package/dist/components/pageable-view/index.js +2 -2
- package/dist/components/photo-swipe/index.js +1 -1
- package/dist/components/resize-observer/index.js +1 -1
- package/dist/components/search-popover/index.js +2 -1
- package/dist/components/sign-panel/index.js +1 -1
- package/dist/components/split-pane/index.js +1 -1
- package/dist/components/stateful/index.js +1 -1
- package/dist/components/swiper/index.js +1 -1
- package/dist/components/tab/index.js +1 -1
- package/dist/components/table-view/index.js +1 -1
- package/dist/components/tag-render/index.js +1 -1
- package/dist/components/tinymce-editor/index.js +1 -1
- package/dist/components/tinymce-wrapper/index.js +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/toolbar-button/index.js +1 -1
- package/dist/components/vue-tags-input/index.js +1 -1
- package/dist/components/watermark/index.js +1 -1
- package/dist/components/x-dialog/index.js +1 -1
- package/dist/index.es.js +1672 -1578
- package/package.json +162 -162
- package/web-types.json +46 -1
- package/dist/chunks/d56ffa71.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=Object.defineProperty,B=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var y=(e,t,a)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,m=(e,t)=>{for(var a in t||(t={}))h.call(t,a)&&y(e,a,t[a]);if(d)for(var a of d(t))M.call(t,a)&&y(e,a,t[a]);return e},x=(e,t)=>B(e,k(t));import{MessageBox as C,Loading as D}from"element-ui";import{isFunction as n}from"@web-utils/core";async function F(e,t,a){const{stop:o,prevent:r,message:f,loadable:l,loadingText:b,confirmable:w,confirmType:S,confirmText:T}=t;o&&e.stopPropagation(),r&&e.preventDefault();const{before:c,click:u,cancel:g,after:p}=a;if(n(u))try{let i=!0;if(n(c)&&(i=await c(e)),i===!1)return;w&&await C.confirm(f||T,{type:S});let s;l&&(s=D.service({background:"rgba(0,0,0,0.3)",text:b}));try{await u(e)}catch{}l&&s.close(),n(p)&&await p(e)}catch(i){n(g)&&await g(i)}}var I={functional:!0,props:{stop:{type:Boolean,default:!0},prevent:{type:Boolean,default:!0},text:{type:String,default:""},message:{type:String,default:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u8BB0\u5F55\u5417\uFF1F"},confirmable:{type:Boolean,default:!0},confirmText:{type:String,default:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u8BB0\u5F55\u5417\uFF1F"},confirmType:{type:String,default:"warning"},loadable:Boolean,loadingText:{type:String,default:"\u6B63\u5728\u5904\u7406\u4E2D\u8BF7\u7A0D\u5019..."},tag:{type:String,default:"i"}},render(e,{props:t,data:a,children:o,listeners:r}){return e(t.tag,x(m({},a),{on:{click:f=>F(f,t,r)},props:t}),o||t.text)}};export{I as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as d,isString as
|
|
1
|
+
import{isObject as d,isString as i,hasOwn as f,isPlainObject as h,isArray as u,isFunction as p,camelize as x}from"@web-utils/core";import m from"vue";const g=(e,t)=>h(e)||i(e)?[t,e]:u(e)?[t,...e]:[t];function b(){const e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){const l=e.indexOf("rv:");return parseInt(e.substring(l+3,e.indexOf(".",l)),10)}const r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}function w(e,t){for(const r in t)m.set(e,r,t[r]);return e}const y=(e,t)=>{if(!e||!t)return null;let r=e;for(;r&&t(r);)r=r.$parent;return r},k=["data","height","max-height","stripe","border","size","fit","show-header","highlight-current-row","current-row-key","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","row-key","empty-text","default-expand-all","expand-row-keys","default-sort","tooltip-effect","show-summary","sum-text","summary-method","span-method","select-on-indeterminate ","indent","lazy","load","tree-props"],v=["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","row-click","row-contextmenu","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],O=["type","index","column-key","label","prop","width","min-width","fixed","render-header","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","selectable","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"],P=["data","empty-text","node-key","props","render-after-expand","load","render-content","highlight-current","default-expand-all","expand-on-click-node","check-on-click-node","auto-expand-parent","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-node-method","accordion","indent","icon-class","lazy","draggable","allow-drag","allow-drop"],z=["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],a=(e,t,r=!0)=>{if(d(e)){let l=t;i(t)&&(l=l.split(","));const o={};return l.forEach(n=>{f(e,n)&&(r?o[n]=e[n]:l.includes(n)||(o[n]=e[n]))}),o}return e},E=e=>{const t={};for(const r in e)t[x(r)]=e[r];return t},T=e=>a(e,k),j=e=>a(e,O),I=e=>a(e,v),A=e=>a(e,P),C=e=>a(e,z),s=(e="",t)=>{const r=t||{};return(e||"").replace(/{(.*?)}/g,(l,o)=>{if(o.indexOf(":")){const[n,c]=o.split(":");return r[n]?r[n]:c}else return r[o]||""})},R=(e,t)=>p(e)?s(e(t),t):i(e)?s(e,t):null;export{A as a,C as b,w as c,T as d,I as e,j as f,b as g,g as h,a as i,y as j,R as k,E as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e}from"./
|
|
1
|
+
import{f as e}from"./e8547f66.js";import{i as r}from"./8473fc69.js";var t={mixins:[e],props:{value:[Boolean,String,Array,Number,Object,Date],readonly:Boolean,disabled:Boolean},computed:{computePlaceholder(){return this.placeholder===!0?this.message:this.placeholder},listeners(){return r(this.$listeners,"input",!1)},inputDisabled(){return this.disabled}}};export{t as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=Object.defineProperty;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var i=(e,r,t)=>r in e?n(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,s=(e,r)=>{for(var t in r||(r={}))p.call(r,t)&&i(e,t,r[t]);if(o)for(var t of o(r))m.call(r,t)&&i(e,t,r[t]);return e};import{i as l}from"./
|
|
1
|
+
var n=Object.defineProperty;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var i=(e,r,t)=>r in e?n(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,s=(e,r)=>{for(var t in r||(r={}))p.call(r,t)&&i(e,t,r[t]);if(o)for(var t of o(r))m.call(r,t)&&i(e,t,r[t]);return e};import{i as l}from"./8473fc69.js";import{Col as f,FormItem as c}from"element-ui";const d=["span"],a=[...Object.keys(f.props)],h=a.filter(e=>!d.includes(e)),b=["label","prop","rules","labelWidth","required"],u=[...Object.keys(c.props)],g=u.filter(e=>!b.includes(e)),y=["wrapCol","wrapFormItem","unwrap","prefixConfig","block","placeholder","prefixPick","half",...a,...u];var B={inject:{elForm:{default:{}},formItemGroup:{default:{}}},props:{disabled:Boolean,wrapCol:{type:Boolean,default:!0},wrapFormItem:{type:Boolean,default:!0},unwrap:Boolean,half:Boolean,prefixConfig:Boolean,block:Boolean,placeholder:{type:[Boolean,String],default:!0},formItemClass:String,prefixPick:Boolean,label:String,labelWidth:String,prop:String,required:Boolean,rules:[Object,Array],error:String,validateStatus:String,for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:String,span:{type:Number,default:12},tag:{type:String,default:"div"},offset:Number,pull:Number,push:Number,xs:[Number,Object],sm:[Number,Object],md:[Number,Object],lg:[Number,Object],xl:[Number,Object]},computed:{prefix(){return this.prefixConfig?"\u8BF7\u914D\u7F6E":this.prefixPick?"\u8BF7\u9009\u62E9":"\u8BF7\u8F93\u5165"},message(){var e;return`${this.prefix}${((e=this.label)==null?void 0:e.replace("\uFF1A",""))||""}`},computeRules(){const e=[...this.rules||[]];if(this.required){const r=e.find(t=>t.required);r?r.ref?r.label=r.label||this.label:r.message=e.message||this.message:e.unshift(this.getRequireRule())}return e.concat(this.getRules())},computeSpan(){return this.block?24:this.span},formItemProps(){return l(s(s({},this.$props),this.$attrs),y)},elFormItemProps(){return l(s(s({},this.$props),this.$attrs),g)},elColProps(){return l(s(s({},this.$props),this.$attrs),h)}},watch:{computeRules(){var e,r;(r=(e=this.elForm)==null?void 0:e.clearValidate)==null||r.call(e,this.prop)}},methods:{getRules(){return[]},getRequireRule(){return{required:!0,message:this.message}}}};export{B as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as r}from"../../chunks/6499de3a.js";var i=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"address-input-wrapper flex-box"},[t("div",{staticClass:"address-input-item-wrapper"},[t("ElCascader",{attrs:{options:e.options,disabled:e.inputDisabled,props:{label:"name",value:e.labelAsValue?"name":"id"}},model:{value:e.internalVal.address,callback:function(s){e.$set(e.internalVal,"address",s)},expression:"internalVal.address"}})],1),t("div",{staticClass:"address-input-item-wrapper flex-1"},[t("ElInput",{attrs:{placeholder:"\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740\uFF01",disabled:e.inputDisabled},model:{value:e.internalVal.detailAddress,callback:function(s){e.$set(e.internalVal,"detailAddress",s)},expression:"internalVal.detailAddress"}})],1)])},l=[];const n={name:"AddressInput",inject:{elForm:{default:""},elFormItem:{default:""}},props:{options:{type:Array,default(){return[]}},value:{type:Object,default:()=>({})},labelAsValue:Boolean,disabled:Boolean},data(){return{internalVal:{address:[],detailAddress:""}}},computed:{inputDisabled(){return this.disabled||(this.elForm||{}).disabled}},watch:{value:{immediate:!0,deep:!0,handler(e){e&&(this.internalVal.address=e.address,this.internalVal.detailAddress=e.detailAddress)}},internalVal:{immediate:!0,deep:!0,handler(e){!e.address&&!e.detailAddress?this.$emit("input",void 0):this.$emit("input",e)}}}},d={};var p=r(n,i,l,!1,u,null,null,null);function u(e){for(let a in d)this[a]=d[a]}var o=function(){return p.exports}();export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as s}from"../../chunks/6499de3a.js";var
|
|
1
|
+
import{n as s}from"../../chunks/6499de3a.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"padding-top":"4px"}},e._l(e.menu,function(n){return a("div",{key:n.key,staticClass:"aside-menu-item hover-active",class:{active:e.$route.path===n.path},on:{click:function(p){return e.$router.push(n.path)}}},[e._t("default",function(){return[a("i",{staticClass:"egd-icon-common",class:n.icon}),e._v(" "+e._s(n.label)+" ")]},{item:n})],2)}),0)},i=[];const o={name:"AsideMenu",props:{menu:{type:Array,default:()=>[]}}},r={};var c=s(o,u,i,!1,_,null,null,null);function _(e){for(let t in r)this[t]=r[t]}var l=function(){return c.exports}();export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n
|
|
1
|
+
import{n}from"../../chunks/6499de3a.js";var s=function(){var e=this,a=e.$createElement,r=e._self._c||a;return r("ul",{staticClass:"capsule-tab"},e._l(e.tabs,function(t){return r("li",{key:t.value,class:["tab-item",{active:e.value===t.value,single:e.tabs.length===1}],on:{click:function(b){return e.$emit("input",t.value)}}},[e._v(" "+e._s(t.label)+" ")])}),0)},i=[];const u={name:"CapsuleTab",props:{tabs:{type:Array,default:()=>[]},value:{type:String}}},l={};var c=n(u,s,i,!1,o,null,null,null);function o(e){for(let a in l)this[a]=l[a]}var p=function(){return c.exports}();export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as
|
|
1
|
+
import{u as r,s}from"../../chunks/163eed3b.js";import{n as a}from"../../chunks/6499de3a.js";var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("label",{directives:[{name:"show",rawName:"v-show",value:e.support,expression:"support"}],ref:"btn",staticClass:"uploader-btn"},[e._t("default")],2)},l=[];const u={name:"ChunkFileUploaderButton",mixins:[r,s],props:{directory:{type:Boolean,default:!1},single:{type:Boolean,default:!1},attrs:{type:Object,default(){return{}}}},mounted(){this.$nextTick(()=>{this.uploader.uploader.assignBrowse(this.$refs.btn,this.directory,this.single,this.attrs)})}},n={};var p=a(u,i,l,!1,d,null,null,null);function d(e){for(let t in n)this[t]=n[t]}var c=function(){return p.exports}();export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as
|
|
1
|
+
import{u as s,s as n}from"../../chunks/163eed3b.js";import{n as t}from"../../chunks/6499de3a.js";var d=function(){var o=this,r=o.$createElement,a=o._self._c||r;return a("div",{directives:[{name:"show",rawName:"v-show",value:o.support,expression:"support"}],ref:"drop",staticClass:"uploader-drop",class:o.dropClass},[o._t("default")],2)},p=[];const l={name:"ChunkFileUploaderDrop",mixins:[s,n],data(){return{dropClass:""}},async mounted(){await this.$nextTick();const o=this.$refs.drop,r=this.uploader.uploader;r.assignDrop(o),r.on("dragenter",this.onDragEnter),r.on("dragleave",this.onDragLeave),r.on("drop",this.onDrop)},beforeDestroy(){const o=this.$refs.drop,r=this.uploader.uploader;r.off("dragenter",this.onDragEnter),r.off("dragleave",this.onDragLeave),r.off("drop",this.onDrop),r.unAssignDrop(o)},methods:{onDragEnter(){this.dropClass="uploader-dragover"},onDragLeave(){this.dropClass=""},onDrop(){this.dropClass="uploader-droped"}}},e={};var i=t(l,d,p,!1,u,null,null,null);function u(o){for(let r in e)this[r]=e[r]}var c=function(){return i.exports}();export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"simple-uploader.js";import{s as
|
|
1
|
+
import n from"simple-uploader.js";import{s as f}from"../../chunks/90bd3d52.js";import{n as p}from"../../chunks/6499de3a.js";const r=["fileProgress","fileSuccess","fileComplete","fileError"];var u=function(){var e=this,s=e.$createElement,i=e._self._c||s;return i("div",{staticClass:"chunk-file-uploader-file",attrs:{status:e.status}},[e._t("default",function(){return[i("div",{staticClass:"chunk-file-uploader-file-info"},[i("div",{staticClass:"chunk-file-uploader-file-name",attrs:{title:e.file.name}},[i("i",{staticClass:"chunk-file-uploader-file-icon",attrs:{icon:e.fileCategory}}),e._v(e._s(e.file.name)+" ")]),i("div",{staticClass:"chunk-file-uploader-file-size"},[e._v(e._s(e.formatedSize))]),i("div",{staticClass:"chunk-file-uploader-file-status"},[i("span",{directives:[{name:"show",rawName:"v-show",value:!["uploading","md5"].includes(e.status),expression:"!['uploading', 'md5'].includes(status)"}]},[e._v(e._s(e.statusText))]),i("span",{directives:[{name:"show",rawName:"v-show",value:e.status==="md5",expression:"status === 'md5'"}]},[e._v(e._s(e.file.md5Progress))]),i("span",{directives:[{name:"show",rawName:"v-show",value:e.status==="uploading",expression:"status === 'uploading'"}],staticStyle:{"padding-left":"4px"}},[i("span",[e._v(e._s(e.progressStyle.progress))]),e._v(" | "),i("em",[e._v(e._s(e.formatedAverageSpeed))]),e._v(" | "),i("i",[e._v(e._s(e.formatedTimeRemaining))])])]),i("div",{staticClass:"chunk-file-uploader-file-actions"},[i("span",{staticClass:"chunk-file-uploader-file-pause",on:{click:e.pause}}),i("span",{staticClass:"chunk-file-uploader-file-resume",on:{click:e.resume}},[e._v("\uFE0F")]),i("span",{staticClass:"chunk-file-uploader-file-retry",on:{click:e.retry}}),i("span",{staticClass:"chunk-file-uploader-file-remove",on:{click:e.remove}})])])]},{file:e.file,list:e.list,status:e.status,paused:e.paused,error:e.error,response:e.response,averageSpeed:e.averageSpeed,formatedAverageSpeed:e.formatedAverageSpeed,currentSpeed:e.currentSpeed,isComplete:e.isComplete,isUploading:e.isUploading,size:e.size,formatedSize:e.formatedSize,uploadedSize:e.uploadedSize,progress:e.progress,progressStyle:e.progressStyle,progressingClass:e.progressingClass,timeRemaining:e.timeRemaining,formatedTimeRemaining:e.formatedTimeRemaining,type:e.type,extension:e.extension,fileCategory:e.fileCategory})],2)},c=[];const d={name:"ChunkFileUploaderFile",props:{file:{type:Object,default(){return{}}},list:{type:Boolean,default:!1}},data(){return{response:null,paused:!1,error:!1,averageSpeed:0,currentSpeed:0,isComplete:!1,isUploading:!1,size:0,formatedSize:"",uploadedSize:0,progress:0,timeRemaining:0,type:"",extension:"",progressingClass:""}},computed:{fileCategory(){const e=this.extension;let i=this.file.isFolder?"folder":"unknown";const t=this.file.uploader.opts.categoryMap||{image:["gif","jpg","jpeg","png","bmp","webp"],video:["mp4","m3u8","rmvb","avi","swf","3gp","mkv","flv"],audio:["mp3","wav","wma","ogg","aac","flac"],document:["doc","txt","docx","pages","epub","pdf","numbers","csv","xls","xlsx","keynote","ppt","pptx"]};return Object.keys(t).forEach(o=>{t[o].indexOf(e)>-1&&(i=o)}),i},progressStyle(){const e=Math.floor(this.progress*100),s=`translateX(${Math.floor(e-100)}%)`;return{progress:`${e}%`,webkitTransform:s,mozTransform:s,msTransform:s,transform:s}},formatedAverageSpeed(){return`${n.utils.formatSize(this.averageSpeed)} / s`},status(){const{isUploading:e,isComplete:s,isError:i,paused:l}=this,{md5Computing:t}=this.file;return t?"md5":s?"success":i?"error":e?"uploading":l?"paused":"waiting"},statusText(){const e=this.status,s=this.file.uploader.fileStatusText;let i=e;return typeof s=="function"?i=s(e,this.response):i=s[e],i||""},formatedTimeRemaining(){const e=this.timeRemaining,s=this.file;if(e===Number.POSITIVE_INFINITY||e===0)return"";let i=f(e);const l=s.uploader.opts.parseTimeRemaining;return l&&(i=l(e,i)),i}},watch:{status(e,s){s&&e==="uploading"&&s!=="uploading"?this.tid=setTimeout(()=>{this.progressingClass="uploader-file-progressing"},200):(clearTimeout(this.tid),this.progressingClass="")}},mounted(){const e=["paused","error","averageSpeed","currentSpeed"],s=["isComplete","isUploading",{key:"size",fn:"getSize"},{key:"formatedSize",fn:"getFormatSize"},{key:"uploadedSize",fn:"sizeUploaded"},"progress","timeRemaining",{key:"type",fn:"getType"},{key:"extension",fn:"getExtension"}];e.forEach(t=>{this[t]=this.file[t]}),s.forEach(t=>{typeof t=="string"?this[t]=this.file[t]():this[t.key]=this.file[t.fn]()});const i=this._handlers={},l=t=>(i[t]=(...o)=>{this.fileEventsHandler(t,o)},i[t]);r.forEach(t=>{this.file.uploader.on(t,l(t))})},destroyed(){r.forEach(e=>{this.file.uploader.off(e,this._handlers[e])}),this._handlers=null},methods:{_actionCheck(){this.paused=this.file.paused,this.error=this.file.error,this.isUploading=this.file.isUploading()},pause(){this.file.pause(),this._actionCheck(),this._fileProgress()},resume(){this.file.resume(),this._actionCheck()},remove(){this.$set(this.file,"canceled",!0),this.file.cancel()},retry(){this.file.retry(),this._actionCheck()},processResponse(e){let s=e;try{s=JSON.parse(e)}catch{}this.response=s},fileEventsHandler(e,s){const i=s[0],l=s[1],t=this.list?i:l;if(this.file===t){if(this.list&&e==="fileSuccess"){this.processResponse(s[2]);return}this[`_${e}`].apply(this,s)}},_fileProgress(){this.progress=this.file.progress(),this.averageSpeed=this.file.averageSpeed,this.currentSpeed=this.file.currentSpeed,this.timeRemaining=this.file.timeRemaining(),this.uploadedSize=this.file.sizeUploaded(),this._actionCheck()},_fileSuccess(e,s,i){e&&this.processResponse(i),this._fileProgress(),this.error=!1,this.isComplete=!0,this.isUploading=!1},_fileComplete(){this._fileSuccess()},_fileError(e,s,i){this._fileProgress(),this.processResponse(i),this.error=!0,this.isComplete=!1,this.isUploading=!1}}},a={};var h=p(d,u,c,!1,g,null,null,null);function g(e){for(let s in a)this[s]=a[s]}var m=function(){return h.exports}();export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as
|
|
1
|
+
import{u as r}from"../../chunks/163eed3b.js";import{n as s}from"../../chunks/6499de3a.js";var o=function(){var e=this,l=e.$createElement,n=e._self._c||l;return n("div",{staticClass:"uploader-files"},[e._t("default",function(){return[n("ul",e._l(e.files,function(i){return n("li",{key:i.id},[n("ChunkFileUploaderFile",{attrs:{file:i}})],1)}),0)]},{files:e.files})],2)},a=[];const u={name:"ChunkFileUploaderFiles",mixins:[r],computed:{files(){return this.uploader.files}}},t={};var _=s(u,o,a,!1,d,null,null,null);function d(e){for(let l in t)this[l]=t[l]}var f=function(){return _.exports}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as r}from"../../chunks/163eed3b.js";import{n as s}from"../../chunks/6499de3a.js";var
|
|
1
|
+
import{u as r}from"../../chunks/163eed3b.js";import{n as s}from"../../chunks/6499de3a.js";var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"uploader-list"},[e._t("default",function(){return[i("ul",e._l(e.fileList,function(l){return i("li",{key:l.id},[i("ChunkFileUploaderFile",{attrs:{file:l,list:!0}})],1)}),0)]},{fileList:e.fileList})],2)},a=[];const u={name:"ChunkFileUploaderList",mixins:[r],computed:{fileList(){return this.uploader.fileList}}},n={};var _=s(u,o,a,!1,d,null,null,null);function d(e){for(let t in n)this[t]=n[t]}var p=function(){return _.exports}();export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,s as a}from"../../chunks/163eed3b.js";import{n as
|
|
1
|
+
import{u as o,s as a}from"../../chunks/163eed3b.js";import{n as i}from"../../chunks/6499de3a.js";var s=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{directives:[{name:"show",rawName:"v-show",value:!e.support,expression:"!support"}],staticClass:"uploader-unsupport"},[e._t("default",function(){return[e._m(0)]})],2)},u=[function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("p",[e._v(" Your browser, unfortunately, is not supported by Uploader.js. The library requires support for "),t("a",{attrs:{href:"http://www.w3.org/TR/FileAPI/"}},[e._v("the HTML5 File API")]),e._v(" along with "),t("a",{attrs:{href:"http://www.w3.org/TR/FileAPI/#normalization-of-params"}},[e._v("file slicing")]),e._v(". ")])}];const l={name:"ChunkFileUploaderUnSupport",mixins:[o,a]},n={};var p=i(l,s,u,!1,_,null,null,null);function _(e){for(let r in n)this[r]=n[r]}var v=function(){return p.exports}();export{v as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import F from"codemirror";import"codemirror/lib/codemirror.css";import"codemirror/theme/idea.css";import"codemirror/mode/javascript/javascript";import"codemirror/addon/edit/matchbrackets";import"codemirror/addon/lint/javascript-lint";import"codemirror/addon/lint/json-lint";import"codemirror/addon/lint/lint";import"codemirror/addon/lint/lint.css";import"codemirror/addon/fold/foldcode";import"codemirror/addon/fold/foldgutter";import"codemirror/addon/fold/foldgutter.css";import"codemirror/addon/fold/brace-fold";import"codemirror/addon/fold/comment-fold";import{n as
|
|
2
|
-
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(u);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=e[
|
|
1
|
+
import F from"codemirror";import"codemirror/lib/codemirror.css";import"codemirror/theme/idea.css";import"codemirror/mode/javascript/javascript";import"codemirror/addon/edit/matchbrackets";import"codemirror/addon/lint/javascript-lint";import"codemirror/addon/lint/json-lint";import"codemirror/addon/lint/lint";import"codemirror/addon/lint/lint.css";import"codemirror/addon/fold/foldcode";import"codemirror/addon/fold/foldgutter";import"codemirror/addon/fold/foldgutter.css";import"codemirror/addon/fold/brace-fold";import"codemirror/addon/fold/comment-fold";import{n as M}from"../../chunks/6499de3a.js";var C=function(){var r={},l=function(){var d={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(u,t,n,p,s,e,o){var i=e.length-1;switch(s){case 1:this.$=u.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
|
|
2
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(u);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=e[i-1];case 13:this.$={};break;case 14:this.$=e[i-1];break;case 15:this.$=[e[i-2],e[i]];break;case 16:this.$={},this.$[e[i][0]]=e[i][1];break;case 17:this.$=e[i-2],e[i-2][e[i][0]]=e[i][1];break;case 18:this.$=[];break;case 19:this.$=e[i-1];break;case 20:this.$=[e[i]];break;case 21:this.$=e[i-2],e[i-2].push(e[i])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(u,t){throw new Error(u)},parse:function(u){function t(y){s.length=s.length-2*y,e.length=e.length-y,o.length=o.length-y}function n(){var y;return y=p.lexer.lex()||1,typeof y!="number"&&(y=p.symbols_[y]||y),y}var p=this,s=[0],e=[null],o=[],i=this.table,k="",m=0,N=0,_=0,$=2,L=1;this.lexer.setInput(u),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var b=this.lexer.yylloc;o.push(b),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);for(var h,v,a,c,w,g={},S,f,A,E;;){if(a=s[s.length-1],this.defaultActions[a]?c=this.defaultActions[a]:(h==null&&(h=n()),c=i[a]&&i[a][h]),typeof c=="undefined"||!c.length||!c[0]){if(!_){E=[];for(S in i[a])this.terminals_[S]&&S>2&&E.push("'"+this.terminals_[S]+"'");var x="";this.lexer.showPosition?x="Parse error on line "+(m+1)+`:
|
|
3
3
|
`+this.lexer.showPosition()+`
|
|
4
|
-
Expecting `+E.join(", ")+", got '"+this.terminals_[h]+"'":x="Parse error on line "+(
|
|
5
|
-
`+n+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,p,s,e;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return u.options={},u.performAction=function(t,n,p,s){switch(p){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},u.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],u.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},u}();return
|
|
4
|
+
Expecting `+E.join(", ")+", got '"+this.terminals_[h]+"'":x="Parse error on line "+(m+1)+": Unexpected "+(h==1?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[h]||h,line:this.lexer.yylineno,loc:b,expected:E})}if(_==3){if(h==L)throw new Error(x||"Parsing halted.");N=this.lexer.yyleng,k=this.lexer.yytext,m=this.lexer.yylineno,b=this.lexer.yylloc,h=n()}for(;!($.toString()in i[a]);){if(a==0)throw new Error(x||"Parsing halted.");t(1),a=s[s.length-1]}v=h,h=$,a=s[s.length-1],c=i[a]&&i[a][$],_=3}if(c[0]instanceof Array&&c.length>1)throw new Error("Parse Error: multiple actions possible at state: "+a+", token: "+h);switch(c[0]){case 1:s.push(h),e.push(this.lexer.yytext),o.push(this.lexer.yylloc),s.push(c[1]),h=null,v?(h=v,v=null):(N=this.lexer.yyleng,k=this.lexer.yytext,m=this.lexer.yylineno,b=this.lexer.yylloc,_>0&&_--);break;case 2:if(f=this.productions_[c[1]][1],g.$=e[e.length-f],g._$={first_line:o[o.length-(f||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(f||1)].first_column,last_column:o[o.length-1].last_column},w=this.performAction.call(g,k,N,m,this.yy,c[1],e,o),typeof w!="undefined")return w;f&&(s=s.slice(0,-1*f*2),e=e.slice(0,-1*f),o=o.slice(0,-1*f)),s.push(this.productions_[c[1]][0]),e.push(g.$),o.push(g._$),A=i[s[s.length-2]][s[s.length-1]],s.push(A);break;case 3:return!0}}return!0}},J=function(){var u={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.match+=t,this.matched+=t;var n=t.match(/\n/);return n&&this.yylineno++,this._input=this._input.slice(1),t},unput:function(t){return this._input=t+this._input,this},more:function(){return this._more=!0,this},less:function(t){this._input=this.match.slice(t)+this._input},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,p,s,e;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;i<o.length&&(p=this._input.match(this.rules[o[i]]),!(p&&(!n||p[0].length>n[0].length)&&(n=p,s=i,!this.options.flex)));i++);if(n)return e=n[0].match(/\n.*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-1:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],t=this.performAction.call(this,this.yy,this,o[s],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0;if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return u.options={},u.performAction=function(t,n,p,s){switch(p){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},u.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],u.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},u}();return d.lexer=J,d}();return r.parser=l,r.parse=function(){return l.parse.apply(l,arguments)},r}(),j=function(){var r=this,l=r.$createElement,d=r._self._c||l;return d("div",{staticClass:"code-mirror-editor"},[d("textarea",{ref:"editor"})])},P=[];window.jsonlint=C;const O=r=>{if(r)try{return JSON.stringify(JSON.parse(r),null,1)}catch{}return r},R=r=>{if(r)try{return JSON.stringify(JSON.parse(r))}catch{}return r},T={name:"CodeMirrorEditor",inject:{elForm:{default:""},elFormItem:{default:""}},props:{value:{type:String,default:""}},watch:{value(r){var l;(l=this.editor)==null||l.setValue(O(r))}},mounted(){this.editor=F.fromTextArea(this.$refs.editor,{mode:"application/json",theme:"idea",tabSize:2,indentUnit:2,lint:!0,foldGutter:!0,smartIndent:!0,lineWrapping:!0,matchBrackets:!0}),this.editor.setValue(O(this.value)),this.editor.on("blur",this.change),this.editor.on("focus",this.focus),this.editor.setOption("extraKeys",{"Ctrl-Alt-L"(r){r.setValue(O(r.getValue()),null,1)}})},beforeDestroy(){var r,l;(r=this.editor)==null||r.off("blur",this.change),(l=this.editor)==null||l.toTextArea()},methods:{focus(){var r,l;(l=(r=this.elFormItem).clearValidate)==null||l.call(r)},change(){var r;this.$emit("input",R((r=this.editor)==null?void 0:r.getValue()))}}},I={};var U=M(T,j,P,!1,V,null,null,null);function V(r){for(let l in I)this[l]=I[l]}var z=function(){return U.exports}();export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"../../chunks/
|
|
1
|
+
import{c as e}from"../../chunks/65f4f4f2.js";import{n as o}from"../../chunks/6499de3a.js";const i={props:{type:{type:String,default:"danger"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,text:{type:String,default:"\u5220\u9664"},tag:{type:String,default:"ElButton"}}},r={name:"ConfirmButton",mixins:[e,i]};let a,l;const n={};var u=o(r,a,l,!1,s,null,null,null);function s(_){for(let t in n)this[t]=n[t]}var p=function(){return u.exports}();export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"../../chunks/
|
|
1
|
+
import{c as o}from"../../chunks/65f4f4f2.js";import{n as t}from"../../chunks/6499de3a.js";const r={name:"Confirmable",mixins:[o]};let _,i;const e={};var l=t(r,_,i,!1,s,null,null,null);function s(c){for(let n in e)this[n]=e[n]}var a=function(){return l.exports}();export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as d}from"../../chunks/6499de3a.js";var u=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.visible?e("div",{staticClass:"cm-container",style:t.axisComputed},[e("svg",{staticStyle:{position:"absolute",width:"0",height:"0",overflow:"hidden"},attrs:{"aria-hidden":"true"}},[e("symbol",{attrs:{id:"icon-arrow",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"}})])]),e("ul",{staticClass:"cm-ul cm-ul-1 easy-cm-ul",class:t.underline?"cm-underline":""},t._l(t.list,function(
|
|
1
|
+
import{n as d}from"../../chunks/6499de3a.js";var u=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.visible?e("div",{staticClass:"cm-container",style:t.axisComputed},[e("svg",{staticStyle:{position:"absolute",width:"0",height:"0",overflow:"hidden"},attrs:{"aria-hidden":"true"}},[e("symbol",{attrs:{id:"icon-arrow",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"}})])]),e("ul",{staticClass:"cm-ul cm-ul-1 easy-cm-ul",class:t.underline?"cm-underline":""},t._l(t.list,function(n,o){return e("li",{key:o,style:t.liStyle},[e("div",{class:t.firstLeft?"cm-left":"",on:{click:function(s){return s.stopPropagation(),t.onItemClick(n,[o])}}},[e("i",{staticClass:"cm-item-icon",class:n.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(n.text))]),t.arrow&&n.children&&n.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-arrow"}})]):t._e()]),n.children&&n.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-2 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.secondBorderCheck(o)},t._l(n.children,function(s,r){return e("li",{key:r,style:t.liStyle},[e("div",{class:t.secondLeft?"cm-left":"",on:{click:function(l){return l.stopPropagation(),t.onItemClick(s,[o,r])}}},[e("i",{staticClass:"cm-item-icon",class:s.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(s.text))]),t.arrow&&s.children&&s.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-arrow"}})]):t._e()]),s.children&&s.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-3 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.thirdBorderCheck(o,r)},t._l(s.children,function(l,c){return e("li",{key:c,style:t.liStyle},[e("div",{on:{click:function(h){return h.stopPropagation(),t.onItemClick(l,[o,r,c])}}},[e("i",{staticClass:"cm-item-icon",class:l.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(l.text))])])])}),0):t._e()])}),0):t._e()])}),0)]):t._e()},m=[];const f={name:"ContextMenu",props:{list:{type:Array,required:!0},underline:{type:Boolean,default:!1},arrow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},itemWidth:{type:Number,default:140},itemHeight:{type:Number,default:36},itemFontSize:{type:[Number,String],default:12},offset:{type:Object,default:()=>({x:6,y:2})},borderWidth:{type:Number,default:6}},data(){return{visible:!1,axis:{x:0,y:0}}},computed:{axisComputed(){return{top:`${this.axis.y+this.offset.y}px`,left:`${this.axis.x+this.offset.x}px`}},liStyle(){return{width:`${this.itemWidth}px`,height:`${this.itemHeight}px`,lineHeight:`${this.itemHeight}px`,fontSize:`${this.itemFontSize}px`}},firstLeft(){const t=document.body.offsetWidth;return this.axis.x+this.itemWidth*2>=t},secondLeft(){const t=document.body.offsetWidth;return this.axis.x+this.itemWidth*3>=t}},watch:{axis(){if(this.border){const t=document.body.offsetWidth,i=document.body.offsetHeight;this.axis.x+this.offset.x+this.itemWidth>=t&&(this.axis.x=t-this.itemWidth-this.borderWidth-this.offset.x),this.axis.y+this.offset.y+this.itemHeight*this.list.length>=i&&(this.axis.y=i-this.itemHeight*this.list.length-this.borderWidth-this.offset.y)}}},methods:{secondBorderCheck(t){const i=document.body.offsetWidth,e=document.body.offsetHeight,n=this.axis.y+(t+this.list[t].children.length)*this.itemHeight;return{left:this.axis.x+this.itemWidth*2>=i?"-100%":"100%",top:e>=n?0:`${-(this.list[t].children.length-1)*this.itemHeight}px`}},thirdBorderCheck(t,i){const e=document.body.offsetWidth,n=document.body.offsetHeight,o=this.axis.y+this.list[t].children[i].children.length*this.itemHeight+(t+i)*this.itemHeight+parseInt(this.secondBorderCheck(t).top);return{left:this.axis.x+this.itemWidth*3>=e?"-100%":"100%",top:o>n?`${-(this.list[t].children[i].children.length-1)*this.itemHeight}px`:0}},show(t){document.addEventListener("click",this.hide,!0),this.axis={x:t.clientX,y:t.clientY},this.visible=!0},hide(){this.visible=!1,document.removeEventListener("click",this.hide)},onItemClick(t,i){this.$emit("on-item-click",t,i)}}},a={};var p=d(f,u,m,!1,x,null,null,null);function x(t){for(let i in a)this[i]=a[i]}var y=function(){return p.exports}();export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dialog as o}from"@web-utils/core/dist/mixin/index";import{f as r}from"../../chunks/
|
|
1
|
+
import{dialog as o}from"@web-utils/core/dist/mixin/index";import{f as r}from"../../chunks/8473fc69.js";import{n as s}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("ElementDialog",{attrs:{visible:e.show,title:e.title,width:e.width,height:e.height,"flex-column":""},on:{"update:visible":function(n){e.show=n},close:e.close,closed:e.closed},scopedSlots:e._u([{key:"default",fn:function(){return[e._t("search-form"),l("PageableTable",{ref:"pageableTable",staticStyle:{height:"60vh"},attrs:{"highlight-current-row":"","hide-on-single-page":"",model:e.model,columns:e.columns,api:e.api,"row-class-name":"pointer",multiple:e.multiple},on:{"selection-change":e.selectionChange,"row-click":e.toggleRowSelection,"current-change":e.currentChange}},[e._t("default")],2)]},proxy:!0},{key:"footer",fn:function(){return[l("ElButton",{attrs:{size:"mini",type:"primary"},on:{click:e.confirm}},[e._v(" \u786E \u5B9A ")]),l("ElButton",{attrs:{size:"mini"},on:{click:e.close}},[e._v(" \u5173 \u95ED ")])]},proxy:!0}],null,!0)})},c=[];const u={name:"DataTablePicker",mixins:[o],props:{api:Function,columns:Array,title:String,width:{type:String,default:"60vw"},height:{type:String,default:null},model:{type:Object,default:()=>{}},multiple:{type:Boolean,default:!0}},data(){return{selectedRows:[],currentRow:null}},methods:{filterTableColumnProperties:r,selectionChange(e){this.selectedRows=e},currentChange(e){this.currentRow=e},toggleRowSelection(e){this.$refs.pageableTable.$refs.table.toggleRowSelection(e)},confirm(){var e;this.multiple?(e=this.selectedRows)!=null&&e.length?(this.$emit("confirm",this.selectedRows),this.close()):this.$message.warning("\u8BF7\u9009\u62E9"):this.currentRow?(this.$emit("confirm",this.currentRow),this.close()):this.$message.warning("\u8BF7\u9009\u62E9")}}},i={};var h=s(u,a,c,!1,m,null,null,null);function m(e){for(let t in i)this[t]=i[t]}var f=function(){return h.exports}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fastClone as
|
|
1
|
+
import{fastClone as d,validateNumber as u,validateIdCard as c,validatePhoneNum as m}from"@web-utils/core";import{n as f}from"../../chunks/6499de3a.js";var y=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"dynamic-table"},[t("ElTable",{key:e.key,staticStyle:{width:"100%"},attrs:{data:e.value}},[e._l(e.columns,function(a){return t("ElTableColumn",{key:a.prop,attrs:{prop:a.prop,label:a.label,"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(n){var l=n.row,r=n.$index;return[t("ElFormItem",{style:{marginBottom:e.inputDisabled?"0px":"16px"},attrs:{prop:`${e.prop}.${r}.${a.prop}`,size:"mini",rules:e.getRules(a)}},[t("ElInput",{attrs:{"prefix-icon":e.getIcon(a),disabled:e.inputDisabled,placeholder:e.inputDisabled?"":`\u8BF7\u8F93\u5165${a.label}\uFF01`},model:{value:l[a.prop],callback:function(o){e.$set(l,a.prop,o)},expression:"row[column.prop]"}})],1)]}}],null,!0)})}),e.inputDisabled?e._e():t("ElTableColumn",{attrs:{label:"\u64CD\u4F5C",width:"60",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){var n=a.row,l=a.column,r=a.$index;return[t("i",{staticClass:"el-icon-minus dynamic-table-action-icon",staticStyle:{position:"relative",top:"-8px",color:"#f00"},attrs:{title:"\u5220\u9664"},on:{click:function(o){return o.stopPropagation(),e.removeRow(n,r,l)}}})]}}],null,!1,410881950)})],2),e.inputDisabled?e._e():t("ElButton",{staticStyle:{color:"#08c108"},attrs:{type:"text",icon:"el-icon-plus"},on:{click:e.addRow}},[e._v(" \u6DFB\u52A0 ")])],1)},b=[];const s={number:"fa fa-superscript",email:"el-icon-lx-mail",phone:"fa fa-phone",idCard:"el-icon-lx-news"},h={name:"DynamicTable",inject:{elForm:{default:""},elFormItem:{default:""}},props:{prop:{type:String,default:"rows"},value:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},disabled:Boolean},data(){return{key:1}},computed:{inputDisabled(){return this.disabled||(this.elForm||{}).disabled}},watch:{value:{deep:!0,handler(e){this.$emit("input",e)}},columns:{deep:!0,handler(){this.key++}}},methods:{getIcon(e){return s[e.type]?s[e.type]:""},addRow(){const e=this.value;e.push(this.newRow()),this.$emit("input",e)},removeRow(e,i){const t=this.value;t.splice(i,1),this.$emit("input",t)},newRow(){const e={};return this.columns.forEach(i=>{e[i.prop]=void 0}),e},getRules(e){const i=e.rules;if(["email","idCard","phone","number"].includes(e.type)){const t=d(i||[]);return e.type==="number"&&t.push({validator:u,message:"\u8BF7\u8F93\u5165\u6570\u5B57\uFF01"}),e.type==="email"&&t.push({type:"email",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740\uFF01"}),e.type==="idCard"&&t.push({validator:c,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7\u7801\uFF01"}),e.type==="phone"&&t.push({validator:m,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801\uFF01"}),t}else return i}}},p={};var v=f(h,y,b,!1,_,null,null,null);function _(e){for(let i in p)this[i]=p[i]}var w=function(){return v.exports}();export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as o}from"../../chunks/6499de3a.js";var l=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"editable-progress",on:{mouseover:e.onMouseOver,mousedown:e.onMouseDown,mouseleave:e.onMouseLeave,click:e.wrapperClick}},[s("ElProgress",{directives:[{name:"show",rawName:"v-show",value:!e.slider,expression:"!slider"}],class:e.percent===100?"progress__success":"",attrs:{"stroke-width":e.strokeWidth,"text-inside":"",percentage:e.percent}}),e.disabled?e._e():s("ElSlider",{directives:[{name:"show",rawName:"v-show",value:e.slider,expression:"slider"}],ref:"slider",style:{width:`${e.max===100?100:e.max-1}%`},attrs:{"tooltip-class":e.tooltipClass,max:e.max,"format-tooltip":e.formatTooltip,disabled:e.disabled,step:e.step},on:{input:e.onInput,change:e.onChange},model:{value:e.percent,callback:function(i){e.percent=i},expression:"percent"}})],1)},a=[];const n={name:"EditableProgress",props:{disabled:{type:Boolean,default:!1},strokeWidth:{type:Number,default:22},step:{type:Number,default:10},max:{type:Number,default:100},value:{type:Number,default:0}},data(){return{slider:!1,mouseDown:!1,tooltipClass:"hide-tooltip",percent:this.value}},watch:{value(e){this.percent!==e&&(this.percent=e)}},methods:{formatTooltip(e){return`${e}%`},onInput(e){this.value!==e&&this.$emit("input",e)},onChange(e){this.slider=!1,this.tooltipClass="hide-tooltip",this.$emit("change",e)},onMouseOver(){this.disabled||this.slider||(this.slider=!0,this.$nextTick(()=>{this.$refs.slider.$refs.button1.$refs.tooltip.updatePopper(),this.tooltipClass=""}))},onMouseDown(){this.disabled||(this.mouseDown=!0,window.addEventListener("mouseup",this.onMouseUp))},onMouseUp(){this.disabled||(this.mouseDown=!1,this.tooltipClass="hide-tooltip",window.removeEventListener("mouseup",this.onMouseUp))},onMouseLeave(){this.disabled||this.mouseDown||(this.tooltipClass="hide-tooltip",this.slider=!1)},wrapperClick(){this.disabled||(this.slider=!0)}}},r={};var d=o(n,l,a,!1,p,null,null,null);function p(e){for(let t in r)this[t]=r[t]}var u=function(){return d.exports}();export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var v=Object.defineProperty,g=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var m=(e,t,i)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,l=(e,t)=>{for(var i in t||(t={}))b.call(t,i)&&m(e,i,t[i]);if(f)for(var i of f(t))_.call(t,i)&&m(e,i,t[i]);return e},d=(e,t)=>g(e,$(t));import{hasOwn as u,addResizeListener as y,removeResizeListener as x,isVerticalScrollbarVisible as k,scrollbarWidth as B,computePosition as T,isPlainObject as c,cloneDeep as w,isFunction as N,isUndefined as h,isNotEmpty as M,fastClone as K,delay as P,findTreeChildren as E}from"@web-utils/core";import{a as D,b as L,c as p}from"../../chunks/44535b09.js";import{n as R}from"../../chunks/6499de3a.js";var z=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"editable-tree"},[!e.readonly&&e.addRootNodeButtonStyle==="top-right"?i("ElButton",{staticStyle:{position:"absolute",top:"4px","z-index":"1"},style:{right:`${e.right}px`},attrs:{type:"primary",size:"mini",icon:"el-icon-plus",circle:"",plain:""},on:{click:function(s){return s.stopPropagation(),e.$emit("add-root-node")}}}):e._e(),i("div",{ref:"treeWrapper",staticClass:"et-tree-wrapper"},[!e.readonly&&e.addRootNodeButtonStyle==="top"?i("div",{staticStyle:{"padding-left":"24px"}},[i("ElButton",{attrs:{disabled:e.loading,size:"mini",type:"text"},on:{click:e.appendRootNode}},[i("i",{staticClass:"el-icon-lx-add"}),e._v(" "+e._s(e.addRootNodeLabel?e.addRootNodeLabel:`\u6DFB\u52A0${e.label}`)+" ")])],1):e._e(),i("ElTree",e._g(e._b({key:e.treeKey,ref:"tree",staticClass:"flex-item",attrs:{"default-expanded-keys":e.expandedKeys,"expand-on-click-node":!1,"highlight-current":"",load:e.loadNode,data:e.innerTreeData,props:e.treeProps,lazy:e.lazy,"node-key":e.nodeKey},on:{"node-click":e.nodeClick,"node-contextmenu":e.showContextMenu,"node-expand":e.addExpandKey,"node-collapse":e.removeExpandKey},scopedSlots:e._u([{key:"default",fn:function(s){var o=s.node,n=s.data;return[e._t("default",function(){return[n.edit?[i("span",{staticClass:"custom-tree-node flex-box flex-1 oh",attrs:{"data-id":n.id}},[e.icon?i("i",{staticClass:"node-icon shrink-0",class:n.loading?"el-icon-loading":"el-icon-edit-outline"}):e._e(),i("ElInput",{ref:"labelTxt",staticClass:"node-input flex-1",attrs:{size:"mini",placeholder:e.defaultOptions.inputPlaceholder},on:{blur:function(a){return e.inputBlur(a,o,n)}},nativeOn:{keyup:function(a){return function(r){return e.inputKeyup(r,o,n)}.apply(null,arguments)},click:function(a){a.stopPropagation()}},model:{value:e.text,callback:function(a){e.text=a},expression:"text"}}),e.confirmButton?[i("ElButton",{directives:[{name:"show",rawName:"v-show",value:!n.loading,expression:"!data.loading"}],staticClass:"shrink-0",attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.onConfirm(o,n)}}},[e._v("\u786E\u5B9A")]),i("ElButton",{directives:[{name:"show",rawName:"v-show",value:!n.loading,expression:"!data.loading"}],staticClass:"shrink-0",attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.onCancel(o,n)}}},[e._v("\u53D6\u6D88")])]:e._e()],2)]:[i("span",{staticClass:"custom-tree-node",attrs:{"data-id":n.id}},[i("span",{staticClass:"node-label flex-box flex-1 oh ellipsis-1"},[e.icon?i("i",{staticClass:"node-icon",class:n.loading?"el-icon-loading":e.icon(n,o)}):e._e(),i("span",{staticClass:"flex-1-relative",staticStyle:{height:"21px"}},[i("span",{staticClass:"ellipsis-1 absolute-box et-tree-label",attrs:{title:o.label}},[e._t("label",function(){return[e._v(e._s(o.label))]},{data:n,node:o})],2)]),e._t("label-suffix",null,{node:o,data:n})],2),!e.contextMenu&&!e.readonly?i("span",{directives:[{name:"show",rawName:"v-show",value:!n.loading&&!e.loading,expression:"!data.loading && !loading"}],staticClass:"handle-actions"},[i("ElButton",{attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.appendChildNode(o,n)}}},[e._v("\u6DFB\u52A0")]),i("ElButton",{attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.editNode(o,n)}}},[e._v("\u4FEE\u6539")]),i("ElPopconfirm",{staticClass:"pop-confirm",attrs:{"icon-color":"red",title:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F"},on:{confirm:function(a){return e.removeNode(o,n)}},scopedSlots:e._u([{key:"reference",fn:function(){return[i("ElButton",{directives:[{name:"show",rawName:"v-show",value:o.isLeaf,expression:"node.isLeaf"}],staticStyle:{"margin-left":"4px"},attrs:{size:"mini",type:"text"},on:{click:function(a){a.stopPropagation()}}},[e._v("\u5220\u9664")])]},proxy:!0}],null,!0)})],1):e._e(),e.contextMenuIcon&&e.contextMenu&&!e.readonly?i("span",{directives:[{name:"show",rawName:"v-show",value:!n.loading&&!e.loading,expression:"!data.loading && !loading"}],staticClass:"handle-actions",staticStyle:{display:"inline-block"}},[i("ElButton",{staticStyle:{padding:"6px 10px 0"},attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.showContextMenu(a,n,o)}}},[e._v(". . .")])],1):e._e()])]]},{node:o,data:n})]}}],null,!0)},"ElTree",e.filterTreeProperties(e.$attrs),!1),e.filterTreeEvents(e.$listeners))),e.contextMenu&&!e.readonly?i("div",{directives:[{name:"show",rawName:"v-show",value:e.showMenu,expression:"showMenu"}],ref:"contextMenu",staticClass:"menu",style:e.position},[i("ul",{staticClass:"menu-list"},[e._t("context-menu",function(){return[i("li",{directives:[{name:"show",rawName:"v-show",value:e.curData.id>-1,expression:"curData.id > -1"}],staticClass:"menu-item",on:{click:function(s){return e.appendPeerNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-lx-add",staticStyle:{color:"#228b22"}}),e._v(e._s(e.menuLabel.appendPeer)+" ")]),i("li",{staticClass:"menu-item",on:{click:function(s){return e.appendChildNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-lx-add",staticStyle:{color:"#228b22"}}),e._v(e._s(e.menuLabel.appendChild)+" ")]),i("li",{directives:[{name:"show",rawName:"v-show",value:e.curData.id>-1,expression:"curData.id > -1"}],staticClass:"menu-item",on:{click:function(s){return e.editNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-edit-outline",staticStyle:{color:"#ffa500"}}),e._v(e._s(e.menuLabel.editNode)+" ")]),i("li",{directives:[{name:"show",rawName:"v-show",value:e.curNode.isLeaf,expression:"curNode.isLeaf"}],staticClass:"menu-item",on:{click:function(s){return e.removeNodeModal(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-delete",staticStyle:{color:"#f00"}}),e._v(e._s(e.menuLabel.removeNode)+" ")])]},{curNode:e.curNode,curData:e.curData})],2)]):e._e()],1)],1)},S=[];const I={name:"EditableTree",props:{label:{type:String,default:"\u4E66\u7B7E"},addRootNodeLabel:{type:String},defaultExpandedKeys:{type:Array,default:()=>[]},newNodeBuilder:{type:Function,default:(e,t)=>({name:e,parentId:t.id})},contextMenu:Boolean,lazy:{type:Boolean,default:!0},expandFirstNode:{type:Boolean,default:!0},readonly:Boolean,saveApi:{type:Function},updateApi:{type:Function},deleteApi:{type:Function},fetchApi:{type:Function},customRootNode:{type:{type:Object,default:void 0}},rootNode:{type:Object},contextMenuIcon:Boolean,contextMenuInline:Boolean,treeProps:{type:Object,default:()=>({children:"children",label:"name",isLeaf:e=>u(e,"hasChildren")?!e.hasChildren:u(e,"hasChild")?!e.hasChild:u(e,"children")&&e.children?e.children.length===0:!0})},menuLabel:{type:Object,default:()=>({appendPeer:"\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9",appendChild:"\u6DFB\u52A0",removeNode:"\u5220\u9664",editNode:"\u4FEE\u6539"})},icon:{type:[Function,Boolean],default:(e,t)=>"el-icon-collection-tag"},confirmButton:{type:Boolean,default:!0},addRootNodeButtonStyle:{type:String,default:"top"},reserveExpandKey:Boolean,nodeKey:{type:String,default:"id"}},data(){return{loading:!1,showMenu:!1,empty:!0,expandedKeys:this.lazy?[]:this.defaultExpandedKeys,treeData:[],curNode:{},curData:{},position:{},text:"",right:4,treeKey:Date.now()}},computed:{defaultOptions(){return{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",closeOnClickModal:!1,modal:!0,inputErrorMessage:`${this.label}\u540D\u4E0D\u80FD\u4E3A\u7A7A\uFF01`,inputPlaceholder:`\u8BF7\u8F93\u5165${this.label}\u540D...`,inputValidator:e=>e!=null&&e.trim().length>0}},innerTreeData(){var e;return(e=this.$attrs.data)!=null&&e.length?this.$attrs.data:this.treeData}},watch:{defaultExpandedKeys:{immediate:!0,handler(e){this.expandedKeys=[...e]}}},created(){this.tryFetch()},mounted(){y(this.$refs.tree.$el,this.resize),y(this.$refs.treeWrapper,this.resize)},beforeDestroy(){x(this.$refs.tree.$el,this.resize),x(this.$refs.treeWrapper,this.resize)},methods:{filterTreeProperties:D,filterTreeEvents:L,addExpandKey(e){this.reserveExpandKey&&this.expandedKeys.push(e[this.nodeKey])},removeExpandKey(e){this.reserveExpandKey&&(this.expandedKeys=this.expandedKeys.filter(t=>t!==e[this.nodeKey]))},resize(){k(this.$refs.treeWrapper)?this.right=4+B:this.right=4},async showContextMenu(e,t,i){t.contextmenu===!1||t.id===-1||t.id===0||t.edit===!0||this.contextMenu&&(this.curNode=i,this.curData=t,this.showMenu=!0,this.$refs.tree.setCurrentKey(t.id),await this.$nextTick(),this.position=T(e,this.$refs.contextMenu),window.addEventListener("click",this.hideContextMenu))},hideContextMenu(){this.showMenu=!1,window.removeEventListener("click",this.hideContextMenu)},async tryFetch(){var e,t;if(this.lazy===!1&&this.fetchApi){const i=await this.fetchApi((t=(e=this.rootNode)==null?void 0:e.id)!=null?t:-1,{});if(c(i.data)&&(i.data=[i.data]),i.data=i.data||[],this.empty=i.data.length===0,c(this.customRootNode)){const s=w(this.customRootNode);s[this.treeProps.children||"children"]=i.data,this.treeData=[s]}else if(N(this.customRootNode)){const s=this.customRootNode(i.data);s[this.treeProps.children||"children"]=i.data,this.treeData=c(s)?[s]:s}else this.treeData=i.data}},async loadNode(e,t){var i,s,o,n;if(e.level===0){const a=await this.fetchApi((s=(i=this.rootNode)==null?void 0:i.id)!=null?s:-1,e);if(this.empty=a.data.length===0,c(this.customRootNode)){const r=w(this.customRootNode);r[this.treeProps.children||"children"]=a.data,t([r])}else if(N(this.customRootNode)){const r=this.customRootNode(a.data);r[this.treeProps.children||"children"]=a.data,this.treeData=c(r)?[r]:r}else t(a.data);await this.$nextTick(),this.$emit("root-node-loaded",a.data),this.defaultExpandedKeys?this.expandedKeys=[(o=a==null?void 0:a.data[0])==null?void 0:o.id,...this.defaultExpandedKeys]:this.expandFirstNode&&(this.expandedKeys=[(n=a==null?void 0:a.data[0])==null?void 0:n.id])}else{if(e.leaf||e.data.isTempNode)return t([]);const a=await this.fetchApi(e.data.id,e);t(a.data),await this.$nextTick(),this.$emit("node-loaded",a.data)}},clear(){this.cancelEdit(),this.removeNewNode()},clearChecked(){this.$refs.tree.setCheckedKeys([])},removeNewNode(){this.newChild&&this.newChild.id===-1&&(console.log(this.newChild),this.$refs.tree.remove(this.newChild),this.$emit("remove-new-node"))},cancelEdit(){this.editData&&(h(this.editData.edit)?this.$set(this.editData,"edit",!0):this.editData.edit=!1)},async editNode(e,t){!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.editData=t,this.text=t[this.treeProps.label],h(t.edit)?this.$set(t,"edit",!0):t.edit=!0,await this.$nextTick(),this.$refs.labelTxt.focus()):await this.$prompt(`\u8BF7\u8F93\u5165\u65B0\u7684${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{inputValue:t[this.treeProps.label],beforeClose:async(i,s,o)=>{if(i==="confirm"){try{s.confirmButtonLoading=!0,s.confirmButtonText="\u5904\u7406\u4E2D...",this.text=s.inputValue,await this.onConfirm(this.curNode,this.curData),o()}catch{s.confirmButtonText="\u786E\u5B9A"}s.confirmButtonLoading=!1}else o()}})).catch(i=>i)},async appendRootNode(){this.text="",!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.createNewChild(void 0),this.$refs.tree.root.insertChild({data:this.newChild},void 0,!0),await this.scrollIntoView(!0)):await this.$prompt(`\u8BF7\u8F93\u5165${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{beforeClose:async(e,t,i)=>{if(e==="confirm"){try{this.createNewChild(-1),t.confirmButtonLoading=!0,t.confirmButtonText="\u5904\u7406\u4E2D...";const s=await this.saveApi(this.newNodeBuilder(t.inputValue,{id:-1}));this.newChild[this.treeProps.label]=t.inputValue,this.newChild.edit=!1,p(this.newChild,s.data),this.$refs.tree.root.insertChild({data:this.newChild},void 0,!0),await this.locateView(),i()}catch{t.confirmButtonText="\u786E\u5B9A"}t.confirmButtonLoading=!1}else i()}})).catch(e=>e)},appendChildNode(e){this.text="";const t=e.expanded;e.expand(async()=>{!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.createNewChild(e.data.id),this.$refs.tree.append(this.newChild,e),await this.scrollIntoView(t)):await this.$prompt(`\u8BF7\u8F93\u5165${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{beforeClose:async(i,s,o)=>{if(i==="confirm"){try{this.createNewChild(e.data.id),s.confirmButtonLoading=!0,s.confirmButtonText="\u5904\u7406\u4E2D...";const n=await this.saveApi(this.newNodeBuilder(s.inputValue,e.data));this.newChild[this.treeProps.label]=s.inputValue,this.newChild.edit=!1,p(this.newChild,n.data),this.$refs.tree.append(this.newChild,e),await this.locateView(),o()}catch{s.confirmButtonText="\u786E\u5B9A"}s.confirmButtonLoading=!1}else o()}})).catch(i=>i)})},appendChildNodeWithData(e,t,i){this.text="";const s=e.expanded;e.expand(async()=>{this.clear(),this.newChild={id:-1,parentId:t,[this.treeProps.label]:i,edit:!1,isTempNode:!0,hasChildren:!1},this.$refs.tree.append(this.newChild,e),await this.scrollIntoView(s)})},appendPeerNode(e){e.parent&&e.parent.level!==0?this.appendChildNode(e.parent):this.appendRootNode()},async addRootNode(e){this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.root.insertChild({data:e},void 0,!0)},async addChildNode(e){this.curNode&&this.curNode.level!==0?this.curNode.expand(async()=>{this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.append(e,this.curNode)}):await this.addRootNode(e)},async addPeerNode(e){this.curNode&&this.curNode.parent&&this.curNode.parent.level!==0?this.curNode.parent.expand(async()=>{this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.append(e,this.curNode.parent)}):await this.addRootNode(e)},updateNode(e){const t=this.$refs.tree.getNode(e);t&&(t.data=e)},setCurrentKey(e){this.$refs.tree&&this.$refs.tree.setCurrentKey(e)},createNewChild(e){this.newChild={id:-1,parentId:e,[this.treeProps.label]:"",edit:!0,isTempNode:!0,hasChildren:!1},this.$emit("create-new-node",this.newChild)},async removeNodeModal(e){await this.$confirm(`\u4F60\u786E\u5B9A\u8981\u5220\u9664${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]\u5417\uFF1F`,"\u7CFB\u7EDF\u63D0\u793A",{type:"warning",modal:!0,dangerouslyUseHTMLString:!0,iconClass:"el-icon-question",closeOnClickModal:!1,confirmButtonClass:"el-button--danger",cancelButtonClass:"el-button--primary is-plain",beforeClose:async(t,i,s)=>{if(t==="confirm"){try{i.confirmButtonLoading=!0,i.confirmButtonText="\u5220\u9664...";const o=e.parent,n=await this.deleteApi(e.data.id);n.code===0?(this.$message.success("\u5220\u9664\u6210\u529F!"),this.$refs.tree.remove(e),this.$emit("node-deleted",o,e.data),s()):this.$message.error(n.message)}catch{}i.confirmButtonText="\u786E\u5B9A",i.confirmButtonLoading=!1}else s()}}).catch(t=>t)},async removeNode(e){try{const t=e.parent;if(this.deleteApi){const i=await this.deleteApi(e.data.id);i.code===0?(this.$message.success("\u5220\u9664\u6210\u529F!"),this.$refs.tree.remove(e),this.$emit("node-deleted",t,e.data)):this.$message.error(i.message)}else this.$refs.tree.remove(e)}catch{}},async onConfirm(e,t){if(t[this.treeProps.label]===this.text||!M(this.text)){this.clear();return}h(t.loading)?this.$set(t,"loading",!0):t.loading=!0;try{if(this.loading=!0,t.id===-1){const i=await this.saveApi(this.newNodeBuilder(this.text,e.parent.data||{id:-1})),s=K(t);p(t,d(l({},i.data),{isTempNode:!1})),this.$emit("node-added",t,s,e),this.registerNode(e)}else await this.updateApi(d(l({},t),{[this.treeProps.label]:this.text}));t[this.treeProps.label]=this.text,t.edit=!1,this.$emit("node-updated",t,e),this.text=""}catch{}t.loading=!1,this.loading=!1},onCancel(e,t){t.id===-1?this.$refs.tree.remove(e):t.edit=!1,this.text=""},nodeClick(e,t,i){this.hideContextMenu(),(h(e.loading)||!e.loading)&&(this.curNode=t,this.curData=e,this.$emit("on-node-click",e,t,i))},getCurrentNode(){return this.$refs.tree.getCurrentNode()},async locateView(){await this.$nextTick();const e=this.$el.querySelector(`[data-id="${this.newChild.id}"]`);e&&e.scrollIntoView()},async scrollIntoView(e){var t,i;await this.$nextTick(),e||await P(300),(i=(t=this.$refs)==null?void 0:t.labelTxt)==null||i.focus()},inputKeyup(e,t,i){e.keyCode===13&&this.onConfirm(t,i),e.keyCode===27&&this.clear()},inputBlur(e,t,i){this.confirmButton||this.onConfirm(t,i)},getCheckedKeys(){return this.$refs.tree.getCheckedKeys()},setCheckedKeys(e){this.$refs.tree.setCheckedKeys(e)},getCheckedNodes(){return this.$refs.tree.getCheckedNodes()},setCheckedNodes(e){this.$refs.tree.setCheckedNodes(e)},getNode(e){return this.$refs.tree.getNode(e)},getRootNode(){return this.$refs.tree.root},findTreeNode(e){return E(this.$refs.tree.root.childNodes,t=>t.data===e||t.data.id===e,"childNodes")},registerNode(e){e.store.registerNode(e),delete e.store.nodesMap[-1]},async reloadTree(){this.lazy?this.treeKey=Date.now():await this.tryFetch()}}},C={};var V=R(I,z,S,!1,A,null,null,null);function A(e){for(let t in C)this[t]=C[t]}var O=function(){return V.exports}();export{O as default};
|
|
1
|
+
var C=Object.defineProperty,v=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var m=(e,t,i)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,l=(e,t)=>{for(var i in t||(t={}))b.call(t,i)&&m(e,i,t[i]);if(f)for(var i of f(t))_.call(t,i)&&m(e,i,t[i]);return e},d=(e,t)=>v(e,$(t));import{hasOwn as u,addResizeListener as x,removeResizeListener as y,isVerticalScrollbarVisible as k,scrollbarWidth as B,computePosition as T,isPlainObject as c,cloneDeep as w,isFunction as g,isUndefined as h,isNotEmpty as M,fastClone as K,delay as P,findTreeChildren as E}from"@web-utils/core";import{a as D,b as z,c as p}from"../../chunks/8473fc69.js";import{n as L}from"../../chunks/6499de3a.js";var R=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"editable-tree"},[!e.readonly&&e.addRootNodeButtonStyle==="top-right"?i("ElButton",{staticStyle:{position:"absolute",top:"4px","z-index":"1"},style:{right:`${e.right}px`},attrs:{type:"primary",size:"mini",icon:"el-icon-plus",circle:"",plain:""},on:{click:function(s){return s.stopPropagation(),e.$emit("add-root-node")}}}):e._e(),i("div",{ref:"treeWrapper",staticClass:"et-tree-wrapper"},[!e.readonly&&e.addRootNodeButtonStyle==="top"?i("div",{staticStyle:{"padding-left":"24px"}},[i("ElButton",{attrs:{disabled:e.loading,size:"mini",type:"text"},on:{click:e.appendRootNode}},[i("i",{staticClass:"el-icon-lx-add"}),e._v(" "+e._s(e.addRootNodeLabel?e.addRootNodeLabel:`\u6DFB\u52A0${e.label}`)+" ")])],1):e._e(),i("ElTree",e._g(e._b({key:e.treeKey,ref:"tree",staticClass:"flex-item",attrs:{"default-expanded-keys":e.expandedKeys,"expand-on-click-node":!1,"highlight-current":"",load:e.loadNode,data:e.innerTreeData,props:e.treeProps,lazy:e.lazy,"node-key":e.nodeKey},on:{"node-click":e.nodeClick,"node-contextmenu":e.showContextMenu,"node-expand":e.addExpandKey,"node-collapse":e.removeExpandKey},scopedSlots:e._u([{key:"default",fn:function(s){var o=s.node,n=s.data;return[e._t("default",function(){return[n.edit?[i("span",{staticClass:"custom-tree-node flex-box flex-1 oh",attrs:{"data-id":n.id}},[e.icon?i("i",{staticClass:"node-icon shrink-0",class:n.loading?"el-icon-loading":"el-icon-edit-outline"}):e._e(),i("ElInput",{ref:"labelTxt",staticClass:"node-input flex-1",attrs:{size:"mini",placeholder:e.defaultOptions.inputPlaceholder},on:{blur:function(a){return e.inputBlur(a,o,n)}},nativeOn:{keyup:function(a){return function(r){return e.inputKeyup(r,o,n)}.apply(null,arguments)},click:function(a){a.stopPropagation()}},model:{value:e.text,callback:function(a){e.text=a},expression:"text"}}),e.confirmButton?[i("ElButton",{directives:[{name:"show",rawName:"v-show",value:!n.loading,expression:"!data.loading"}],staticClass:"shrink-0",attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.onConfirm(o,n)}}},[e._v("\u786E\u5B9A")]),i("ElButton",{directives:[{name:"show",rawName:"v-show",value:!n.loading,expression:"!data.loading"}],staticClass:"shrink-0",attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.onCancel(o,n)}}},[e._v("\u53D6\u6D88")])]:e._e()],2)]:[i("span",{staticClass:"custom-tree-node",attrs:{"data-id":n.id}},[i("span",{staticClass:"node-label flex-box flex-1 oh ellipsis-1"},[e.icon?i("i",{staticClass:"node-icon",class:n.loading?"el-icon-loading":e.icon(n,o)}):e._e(),i("span",{staticClass:"flex-1-relative",staticStyle:{height:"21px"}},[i("span",{staticClass:"ellipsis-1 absolute-box et-tree-label",attrs:{title:o.label}},[e._t("label",function(){return[e._v(e._s(o.label))]},{data:n,node:o})],2)]),e._t("label-suffix",null,{node:o,data:n})],2),!e.contextMenu&&!e.readonly?i("span",{directives:[{name:"show",rawName:"v-show",value:!n.loading&&!e.loading,expression:"!data.loading && !loading"}],staticClass:"handle-actions"},[i("ElButton",{attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.appendChildNode(o,n)}}},[e._v("\u6DFB\u52A0")]),i("ElButton",{attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.editNode(o,n)}}},[e._v("\u4FEE\u6539")]),i("ElPopconfirm",{staticClass:"pop-confirm",attrs:{"icon-color":"red",title:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F"},on:{confirm:function(a){return e.removeNode(o,n)}},scopedSlots:e._u([{key:"reference",fn:function(){return[i("ElButton",{directives:[{name:"show",rawName:"v-show",value:o.isLeaf,expression:"node.isLeaf"}],staticStyle:{"margin-left":"4px"},attrs:{size:"mini",type:"text"},on:{click:function(a){a.stopPropagation()}}},[e._v("\u5220\u9664")])]},proxy:!0}],null,!0)})],1):e._e(),e.contextMenuIcon&&e.contextMenu&&!e.readonly?i("span",{directives:[{name:"show",rawName:"v-show",value:!n.loading&&!e.loading,expression:"!data.loading && !loading"}],staticClass:"handle-actions",staticStyle:{display:"inline-block"}},[i("ElButton",{staticStyle:{padding:"6px 10px 0"},attrs:{size:"mini",type:"text"},on:{click:function(a){return a.stopPropagation(),e.showContextMenu(a,n,o)}}},[e._v(". . .")])],1):e._e()])]]},{node:o,data:n})]}}],null,!0)},"ElTree",e.filterTreeProperties(e.$attrs),!1),e.filterTreeEvents(e.$listeners))),e.contextMenu&&!e.readonly?i("div",{directives:[{name:"show",rawName:"v-show",value:e.showMenu,expression:"showMenu"}],ref:"contextMenu",staticClass:"menu",style:e.position},[i("ul",{staticClass:"menu-list"},[e._t("context-menu",function(){return[i("li",{directives:[{name:"show",rawName:"v-show",value:e.curData.id>-1,expression:"curData.id > -1"}],staticClass:"menu-item",on:{click:function(s){return e.appendPeerNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-lx-add",staticStyle:{color:"#228b22"}}),e._v(e._s(e.menuLabel.appendPeer)+" ")]),i("li",{staticClass:"menu-item",on:{click:function(s){return e.appendChildNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-lx-add",staticStyle:{color:"#228b22"}}),e._v(e._s(e.menuLabel.appendChild)+" ")]),i("li",{directives:[{name:"show",rawName:"v-show",value:e.curData.id>-1,expression:"curData.id > -1"}],staticClass:"menu-item",on:{click:function(s){return e.editNode(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-edit-outline",staticStyle:{color:"#ffa500"}}),e._v(e._s(e.menuLabel.editNode)+" ")]),i("li",{directives:[{name:"show",rawName:"v-show",value:e.curNode.isLeaf,expression:"curNode.isLeaf"}],staticClass:"menu-item",on:{click:function(s){return e.removeNodeModal(e.curNode,e.curData)}}},[i("i",{staticClass:"menu-item-icon el-icon-delete",staticStyle:{color:"#f00"}}),e._v(e._s(e.menuLabel.removeNode)+" ")])]},{curNode:e.curNode,curData:e.curData})],2)]):e._e()],1)],1)},S=[];const I={name:"EditableTree",props:{label:{type:String,default:"\u4E66\u7B7E"},addRootNodeLabel:{type:String},defaultExpandedKeys:{type:Array,default:()=>[]},newNodeBuilder:{type:Function,default:(e,t)=>({name:e,parentId:t.id})},contextMenu:Boolean,lazy:{type:Boolean,default:!0},expandFirstNode:{type:Boolean,default:!0},readonly:Boolean,saveApi:{type:Function},updateApi:{type:Function},deleteApi:{type:Function},fetchApi:{type:Function},customRootNode:{type:{type:Object,default:void 0}},rootNode:{type:Object},contextMenuIcon:Boolean,contextMenuInline:Boolean,treeProps:{type:Object,default:()=>({children:"children",label:"name",isLeaf:e=>u(e,"hasChildren")?!e.hasChildren:u(e,"hasChild")?!e.hasChild:u(e,"children")&&e.children?e.children.length===0:!0})},menuLabel:{type:Object,default:()=>({appendPeer:"\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9",appendChild:"\u6DFB\u52A0",removeNode:"\u5220\u9664",editNode:"\u4FEE\u6539"})},icon:{type:[Function,Boolean],default:(e,t)=>"el-icon-collection-tag"},confirmButton:{type:Boolean,default:!0},addRootNodeButtonStyle:{type:String,default:"top"},reserveExpandKey:Boolean,nodeKey:{type:String,default:"id"}},data(){return{loading:!1,showMenu:!1,empty:!0,expandedKeys:this.lazy?[]:this.defaultExpandedKeys,treeData:[],curNode:{},curData:{},position:{},text:"",right:4,treeKey:Date.now()}},computed:{defaultOptions(){return{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",closeOnClickModal:!1,modal:!0,inputErrorMessage:`${this.label}\u540D\u4E0D\u80FD\u4E3A\u7A7A\uFF01`,inputPlaceholder:`\u8BF7\u8F93\u5165${this.label}\u540D...`,inputValidator:e=>e!=null&&e.trim().length>0}},innerTreeData(){var e;return(e=this.$attrs.data)!=null&&e.length?this.$attrs.data:this.treeData}},watch:{defaultExpandedKeys:{immediate:!0,handler(e){this.expandedKeys=[...e]}}},created(){this.tryFetch()},mounted(){x(this.$refs.tree.$el,this.resize),x(this.$refs.treeWrapper,this.resize)},beforeDestroy(){y(this.$refs.tree.$el,this.resize),y(this.$refs.treeWrapper,this.resize)},methods:{filterTreeProperties:D,filterTreeEvents:z,addExpandKey(e){this.reserveExpandKey&&this.expandedKeys.push(e[this.nodeKey])},removeExpandKey(e){this.reserveExpandKey&&(this.expandedKeys=this.expandedKeys.filter(t=>t!==e[this.nodeKey]))},resize(){k(this.$refs.treeWrapper)?this.right=4+B:this.right=4},async showContextMenu(e,t,i){t.contextmenu===!1||t.id===-1||t.id===0||t.edit===!0||this.contextMenu&&(this.curNode=i,this.curData=t,this.showMenu=!0,this.$refs.tree.setCurrentKey(t.id),await this.$nextTick(),this.position=T(e,this.$refs.contextMenu),window.addEventListener("click",this.hideContextMenu))},hideContextMenu(){this.showMenu=!1,window.removeEventListener("click",this.hideContextMenu)},async tryFetch(){var e,t;if(this.lazy===!1&&this.fetchApi){const i=await this.fetchApi((t=(e=this.rootNode)==null?void 0:e.id)!=null?t:-1,{});if(c(i.data)&&(i.data=[i.data]),i.data=i.data||[],this.empty=i.data.length===0,c(this.customRootNode)){const s=w(this.customRootNode);s[this.treeProps.children||"children"]=i.data,this.treeData=[s]}else if(g(this.customRootNode)){const s=this.customRootNode(i.data);s[this.treeProps.children||"children"]=i.data,this.treeData=c(s)?[s]:s}else this.treeData=i.data}},async loadNode(e,t){var i,s,o,n;if(e.level===0){const a=await this.fetchApi((s=(i=this.rootNode)==null?void 0:i.id)!=null?s:-1,e);if(this.empty=a.data.length===0,c(this.customRootNode)){const r=w(this.customRootNode);r[this.treeProps.children||"children"]=a.data,t([r])}else if(g(this.customRootNode)){const r=this.customRootNode(a.data);r[this.treeProps.children||"children"]=a.data,this.treeData=c(r)?[r]:r}else t(a.data);await this.$nextTick(),this.$emit("root-node-loaded",a.data),this.defaultExpandedKeys?this.expandedKeys=[(o=a==null?void 0:a.data[0])==null?void 0:o.id,...this.defaultExpandedKeys]:this.expandFirstNode&&(this.expandedKeys=[(n=a==null?void 0:a.data[0])==null?void 0:n.id])}else{if(e.leaf||e.data.isTempNode)return t([]);const a=await this.fetchApi(e.data.id,e);t(a.data),await this.$nextTick(),this.$emit("node-loaded",a.data)}},clear(){this.cancelEdit(),this.removeNewNode()},clearChecked(){this.$refs.tree.setCheckedKeys([])},removeNewNode(){this.newChild&&this.newChild.id===-1&&(console.log(this.newChild),this.$refs.tree.remove(this.newChild),this.$emit("remove-new-node"))},cancelEdit(){this.editData&&(h(this.editData.edit)?this.$set(this.editData,"edit",!0):this.editData.edit=!1)},async editNode(e,t){!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.editData=t,this.text=t[this.treeProps.label],h(t.edit)?this.$set(t,"edit",!0):t.edit=!0,await this.$nextTick(),this.$refs.labelTxt.focus()):await this.$prompt(`\u8BF7\u8F93\u5165\u65B0\u7684${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{inputValue:t[this.treeProps.label],beforeClose:async(i,s,o)=>{if(i==="confirm"){try{s.confirmButtonLoading=!0,s.confirmButtonText="\u5904\u7406\u4E2D...",this.text=s.inputValue,await this.onConfirm(this.curNode,this.curData),o()}catch{s.confirmButtonText="\u786E\u5B9A"}s.confirmButtonLoading=!1}else o()}})).catch(i=>i)},async appendRootNode(){this.text="",!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.createNewChild(void 0),this.$refs.tree.root.insertChild({data:this.newChild},void 0,!0),await this.scrollIntoView(!0)):await this.$prompt(`\u8BF7\u8F93\u5165${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{beforeClose:async(e,t,i)=>{if(e==="confirm"){try{this.createNewChild(-1),t.confirmButtonLoading=!0,t.confirmButtonText="\u5904\u7406\u4E2D...";const s=await this.saveApi(this.newNodeBuilder(t.inputValue,{id:-1}));this.newChild[this.treeProps.label]=t.inputValue,this.newChild.edit=!1,p(this.newChild,s.data),this.$refs.tree.root.insertChild({data:this.newChild},void 0,!0),await this.locateView(),i()}catch{t.confirmButtonText="\u786E\u5B9A"}t.confirmButtonLoading=!1}else i()}})).catch(e=>e)},appendChildNode(e){this.text="";const t=e.expanded;e.expand(async()=>{!this.contextMenu||this.contextMenuIcon||this.contextMenuInline?(this.clear(),this.createNewChild(e.data.id),this.$refs.tree.append(this.newChild,e),await this.scrollIntoView(t)):await this.$prompt(`\u8BF7\u8F93\u5165${this.label}\u540D\uFF1A`,d(l({},this.defaultOptions),{beforeClose:async(i,s,o)=>{if(i==="confirm"){try{this.createNewChild(e.data.id),s.confirmButtonLoading=!0,s.confirmButtonText="\u5904\u7406\u4E2D...";const n=await this.saveApi(this.newNodeBuilder(s.inputValue,e.data));this.newChild[this.treeProps.label]=s.inputValue,this.newChild.edit=!1,p(this.newChild,n.data),this.$refs.tree.append(this.newChild,e),await this.locateView(),o()}catch{s.confirmButtonText="\u786E\u5B9A"}s.confirmButtonLoading=!1}else o()}})).catch(i=>i)})},appendChildNodeWithData(e,t,i){this.text="";const s=e.expanded;e.expand(async()=>{this.clear(),this.newChild={id:-1,parentId:t,[this.treeProps.label]:i,edit:!1,isTempNode:!0,hasChildren:!1},this.$refs.tree.append(this.newChild,e),await this.scrollIntoView(s)})},appendPeerNode(e){e.parent&&e.parent.level!==0?this.appendChildNode(e.parent):this.appendRootNode()},async addRootNode(e){this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.root.insertChild({data:e},void 0,!0)},async addChildNode(e){this.curNode&&this.curNode.level!==0?this.curNode.expand(async()=>{this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.append(e,this.curNode)}):await this.addRootNode(e)},async addPeerNode(e){this.curNode&&this.curNode.parent&&this.curNode.parent.level!==0?this.curNode.parent.expand(async()=>{this.$refs.tree.remove(e),await this.$nextTick(),this.$refs.tree.append(e,this.curNode.parent)}):await this.addRootNode(e)},updateNode(e){const t=this.$refs.tree.getNode(e);t&&(t.data=e)},setCurrentKey(e){this.$refs.tree&&this.$refs.tree.setCurrentKey(e)},createNewChild(e){this.newChild={id:-1,parentId:e,[this.treeProps.label]:"",edit:!0,isTempNode:!0,hasChildren:!1},this.$emit("create-new-node",this.newChild)},async removeNodeModal(e){await this.$confirm(`\u4F60\u786E\u5B9A\u8981\u5220\u9664${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]\u5417\uFF1F`,"\u7CFB\u7EDF\u63D0\u793A",{type:"warning",modal:!0,dangerouslyUseHTMLString:!0,iconClass:"el-icon-question",closeOnClickModal:!1,confirmButtonClass:"el-button--danger",cancelButtonClass:"el-button--primary is-plain",beforeClose:async(t,i,s)=>{if(t==="confirm"){try{i.confirmButtonLoading=!0,i.confirmButtonText="\u5220\u9664...";const o=e.parent,n=await this.deleteApi(e.data.id);n.code===0?(this.$message.success("\u5220\u9664\u6210\u529F!"),this.$refs.tree.remove(e),this.$emit("node-deleted",o,e.data),s()):this.$message.error(n.message)}catch{}i.confirmButtonText="\u786E\u5B9A",i.confirmButtonLoading=!1}else s()}}).catch(t=>t)},async removeNode(e){try{const t=e.parent;if(this.deleteApi){const i=await this.deleteApi(e.data.id);i.code===0?(this.$message.success("\u5220\u9664\u6210\u529F!"),this.$refs.tree.remove(e),this.$emit("node-deleted",t,e.data)):this.$message.error(i.message)}else this.$refs.tree.remove(e)}catch{}},async onConfirm(e,t){if(t[this.treeProps.label]===this.text||!M(this.text)){this.clear();return}h(t.loading)?this.$set(t,"loading",!0):t.loading=!0;try{if(this.loading=!0,t.id===-1){const i=await this.saveApi(this.newNodeBuilder(this.text,e.parent.data||{id:-1})),s=K(t);p(t,d(l({},i.data),{isTempNode:!1})),this.$emit("node-added",t,s,e),this.registerNode(e)}else await this.updateApi(d(l({},t),{[this.treeProps.label]:this.text}));t[this.treeProps.label]=this.text,t.edit=!1,this.$emit("node-updated",t,e),this.text=""}catch{}t.loading=!1,this.loading=!1},onCancel(e,t){t.id===-1?this.$refs.tree.remove(e):t.edit=!1,this.text=""},nodeClick(e,t,i){this.hideContextMenu(),(h(e.loading)||!e.loading)&&(this.curNode=t,this.curData=e,this.$emit("on-node-click",e,t,i))},getCurrentNode(){return this.$refs.tree.getCurrentNode()},async locateView(){await this.$nextTick();const e=this.$el.querySelector(`[data-id="${this.newChild.id}"]`);e&&e.scrollIntoView()},async scrollIntoView(e){var t,i;await this.$nextTick(),e||await P(300),(i=(t=this.$refs)==null?void 0:t.labelTxt)==null||i.focus()},inputKeyup(e,t,i){e.keyCode===13&&this.onConfirm(t,i),e.keyCode===27&&this.clear()},inputBlur(e,t,i){this.confirmButton||this.onConfirm(t,i)},getCheckedKeys(){return this.$refs.tree.getCheckedKeys()},setCheckedKeys(e){this.$refs.tree.setCheckedKeys(e)},getCheckedNodes(){return this.$refs.tree.getCheckedNodes()},setCheckedNodes(e){this.$refs.tree.setCheckedNodes(e)},getNode(e){return this.$refs.tree.getNode(e)},getRootNode(){return this.$refs.tree.root},findTreeNode(e){return E(this.$refs.tree.root.childNodes,t=>t.data===e||t.data.id===e,"childNodes")},registerNode(e){e.store.registerNode(e),delete e.store.nodesMap[-1]},async reloadTree(){this.lazy?this.treeKey=Date.now():await this.tryFetch()}}},N={};var V=L(I,R,S,!1,A,null,null,null);function A(e){for(let t in N)this[t]=N[t]}var O=function(){return V.exports}();export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dialog as
|
|
1
|
+
import{Dialog as a}from"element-ui";import{dialogDrag as n}from"@web-utils/core/dist/directives/index";import{n as d}from"../../chunks/6499de3a.js";var r=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("Transition",{attrs:{name:"dialog-fade"},on:{"after-enter":e.afterEnter,"after-leave":e.afterLeave}},[l("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"},{name:"dialog-drag",rawName:"v-dialog-drag:[fullScreen]",value:{onMove:e.updatePopper},expression:"{onMove:updatePopper}",arg:e.fullScreen}],staticClass:"el-dialog__wrapper",on:{click:function(o){return o.target!==o.currentTarget?null:e.handleWrapperClick.apply(null,arguments)}}},[l("div",{ref:"dialog",class:["el-dialog","element-dialog","el-dialog-resizeable","normalize",{"is-fullscreen":e.fullScreen,"el-dialog__body-padding":e.bodyPadding,"el-dialog--center":e.center,"el-dialog--flex-row":e.flexRow,"el-dialog--flex-column":e.flexColumn},e.customClass],style:e.style,attrs:{role:"dialog","aria-modal":"true","aria-label":e.title||"dialog"}},[l("div",{staticClass:"el-dialog__header"},[e._t("title",function(){return[l("span",{staticClass:"el-dialog__title"},[e._v(e._s(e.title))])]}),l("div",{staticClass:"header-button-wrapper"},[e._t("header-button"),e.showFullScreen?l("ElButton",{staticClass:"header-button",attrs:{type:"text",icon:e.fullScreen?"el-icon-copy-document":"el-icon-full-screen",size:"medium",title:e.fullScreen?"\u8FD8\u539F":"\u6700\u5927\u5316"},on:{click:e.toggleFullScreen}}):e._e(),e.showClose?l("ElButton",{staticClass:"header-button",attrs:{"aria-label":"Close",type:"text",title:"\u5173\u95ED",icon:"el-icon-close",size:"medium"},on:{click:e.handleClose}}):e._e()],2)],2),e.rendered?l("div",{staticClass:"el-dialog__body",style:{height:e.fullScreen?"100%":e.height}},[e.destroyOnClose?[e.visible?e._t("default"):e._e()]:e._t("default")],2):e._e(),e.shouldShowFooter()?l("div",{staticClass:"el-dialog__footer"},[e._t("footer",null,{handleClose:e.handleClose})],2):e._e()])])])},s=[];const p={props:{modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0}}},u={name:"ElementDialog",directives:{dialogDrag:n},mixins:[...a.mixins,p],props:{title:{type:String,default:""},appendToBody:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showFullScreen:Boolean,width:{type:String},height:{type:String},customClass:{type:String,default:""},top:{type:String,default:"15vh"},beforeClose:{type:Function},center:{type:Boolean,default:!0},destroyOnClose:Boolean,flexRow:Boolean,flexColumn:Boolean,bodyPadding:{type:Boolean,default:!0}},data(){return{fullScreen:!1,closed:!1}},computed:{style(){const e={};return this.fullScreen||(e.marginTop=this.top,this.width&&(e.width=this.width)),e}},watch:{visible(e){e?(this.closed=!1,this.$emit("open"),this.$el.addEventListener("scroll",this.updatePopper),this.$nextTick(()=>{this.$refs.dialog.scrollTop=0}),this.appendToBody&&document.body.appendChild(this.$el)):(this.$el.removeEventListener("scroll",this.updatePopper),this.closed||this.$emit("close"))}},mounted(){this.visible&&(this.rendered=!0,this.open(),this.appendToBody&&document.body.appendChild(this.$el))},destroyed(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{toggleFullScreen(){this.fullScreen=!this.fullScreen},enterFullScreen(){this.fullScreen=!0},exitFullScreen(){this.fullScreen=!1},shouldShowFooter(){var e,t;return!!((t=(e=this.$scopedSlots).footer)!=null&&t.call(e))},handleWrapperClick(){!this.closeOnClickModal||this.handleClose()},handleClose(){typeof this.beforeClose=="function"?this.beforeClose(this.hide):this.hide()},hide(e){e!==!1&&(this.$emit("update:visible",!1),this.$emit("close"),this.closed=!0)},updatePopper(){this.broadcast("ElSelectDropdown","updatePopper"),this.broadcast("ElDropdownMenu","updatePopper")},afterEnter(){this.$emit("opened")},afterLeave(){this.exitFullScreen(),this.$emit("closed")}}},i={};var g=d(u,r,s,!1,c,null,null,null);function c(e){for(let t in i)this[t]=i[t]}var f=function(){return g.exports}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as o}from"../../chunks/6499de3a.js";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"empty-view",style:{fontSize:e.fontSize,height:e.height}},[e._t("default",function(){return[n("div",{staticClass:"flex-column horizon-center"},[e.showIcon?n("i",{class:e.icon,style:{fontSize:e.iconSize}}):e._e(),n("p",[e._v(e._s(e.emptyTips))])])]})],2)},s=[];const
|
|
1
|
+
import{n as o}from"../../chunks/6499de3a.js";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"empty-view",style:{fontSize:e.fontSize,height:e.height}},[e._t("default",function(){return[n("div",{staticClass:"flex-column horizon-center"},[e.showIcon?n("i",{class:e.icon,style:{fontSize:e.iconSize}}):e._e(),n("p",[e._v(e._s(e.emptyTips))])])]})],2)},s=[];const l={name:"EmptyView",props:{emptyTips:{type:String,default:"\u6682\u65E0\u6570\u636E"},fontSize:{type:String,default:"20px"},icon:{type:String,default:"fa fa-dropbox"},iconSize:{type:String,default:"20px"},showIcon:{type:Boolean,default:!1},height:{type:String,default:"100%"}}},i={};var a=o(l,r,s,!1,c,null,null,null);function c(e){for(let t in i)this[t]=i[t]}var p=function(){return a.exports}();export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as i}from"../../chunks/6499de3a.js";var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"error-view",style:{fontSize:e.fontSize,height:e.height}},[e._t("default",function(){return[r("div",{staticClass:"flex-column horizon-center"},[r("i",{staticClass:"fa fa-frown-o",style:{fontSize:e.iconSize}}),r("p",[e._v(e._s(e.errorTips))])])]})],2)},s=[];const a={name:"ErrorView",props:{errorTips:{type:String,default:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"},fontSize:{type:String,default:"20px"},iconSize:{type:String,default:"20px"},height:{type:String,default:"100%"}}},n={};var l=i(a,o,s,!1,
|
|
1
|
+
import{n as i}from"../../chunks/6499de3a.js";var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"error-view",style:{fontSize:e.fontSize,height:e.height}},[e._t("default",function(){return[r("div",{staticClass:"flex-column horizon-center"},[r("i",{staticClass:"fa fa-frown-o",style:{fontSize:e.iconSize}}),r("p",[e._v(e._s(e.errorTips))])])]})],2)},s=[];const a={name:"ErrorView",props:{errorTips:{type:String,default:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"},fontSize:{type:String,default:"20px"},iconSize:{type:String,default:"20px"},height:{type:String,default:"100%"}}},n={};var l=i(a,o,s,!1,c,null,null,null);function c(e){for(let t in n)this[t]=n[t]}var f=function(){return l.exports}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty,f=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var a=(t,e,n)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s=(t,e)=>{for(var n in e||(e={}))v.call(e,n)&&a(t,n,e[n]);if(o)for(var n of o(e))C.call(e,n)&&a(t,n,e[n]);return t},c=(t,e)=>f(t,_(e));import{h}from"../../chunks/
|
|
1
|
+
var u=Object.defineProperty,f=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var a=(t,e,n)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s=(t,e)=>{for(var n in e||(e={}))v.call(e,n)&&a(t,n,e[n]);if(o)for(var n of o(e))C.call(e,n)&&a(t,n,e[n]);return t},c=(t,e)=>f(t,_(e));import{h}from"../../chunks/8473fc69.js";import{n as m}from"../../chunks/6499de3a.js";const d={name:"FlexColumn",functional:!0,props:{verticalCenter:{type:Boolean,default:!1},horizonCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},textCenter:{type:Boolean,default:!1}},render(t,{data:e,children:n,props:l}){const r=h(e.class,"flex-column");return l.center||l.horizonCenter&&l.verticalCenter?(r.push("horizon-center"),r.push("vertical-center")):(l.horizonCenter&&r.push("horizon-center"),l.verticalCenter&&r.push("vertical-center")),l.textCenter&&r.push("text-center"),t("div",c(s({},e),{class:r}),n)}};let x,p;const i={};var z=m(d,x,p,!1,y,null,null,null);function y(t){for(let e in i)this[e]=i[e]}var B=function(){return z.exports}();export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty,c=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var s=(t,e,l)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,o=(t,e)=>{for(var l in e||(e={}))_.call(e,l)&&s(t,l,e[l]);if(r)for(var l of r(e))x.call(e,l)&&s(t,l,e[l]);return t},f=(t,e)=>c(t,v(e));import{h}from"../../chunks/
|
|
1
|
+
var u=Object.defineProperty,c=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var s=(t,e,l)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,o=(t,e)=>{for(var l in e||(e={}))_.call(e,l)&&s(t,l,e[l]);if(r)for(var l of r(e))x.call(e,l)&&s(t,l,e[l]);return t},f=(t,e)=>c(t,v(e));import{h}from"../../chunks/8473fc69.js";import{n as m}from"../../chunks/6499de3a.js";const d={name:"FlexItem",functional:!0,props:{flexRow:{type:Boolean,default:!1},flexColumn:{type:Boolean,default:!1},verticalCenter:{type:Boolean,default:!1},horizonCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},textCenter:{type:Boolean,default:!1},relative:{type:Boolean,default:!1},absolute:{type:Boolean,default:!1}},render(t,{children:e,data:l,props:n}){const a=h(l.class,n.relative?"flex-item-relative":"flex-item");return n.absolute&&!n.relative&&a.push("flex-item-relative"),n.center||n.horizonCenter&&n.verticalCenter?(a.push("horizon-center"),a.push("vertical-center")):(n.horizonCenter&&a.push("horizon-center"),n.verticalCenter&&a.push("vertical-center")),n.textCenter&&a.push("text-center"),n.flexColumn&&a.push("flex-column"),n.flexRow&&a.push("flex-row"),n.absolute?t("div",f(o({},l),{class:a}),[t("div",{class:"absolute",style:"overflow:auto"},e)]):t("div",f(o({},l),{class:a}),e)}};let C,y;const i={};var B=m(d,C,y,!1,z,null,null,null);function z(t){for(let e in i)this[e]=i[e]}var w=function(){return B.exports}();export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty,f=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var a=(t,e,n)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s=(t,e)=>{for(var n in e||(e={}))v.call(e,n)&&a(t,n,e[n]);if(o)for(var n of o(e))h.call(e,n)&&a(t,n,e[n]);return t},i=(t,e)=>f(t,_(e));import{h as C}from"../../chunks/
|
|
1
|
+
var u=Object.defineProperty,f=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var a=(t,e,n)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s=(t,e)=>{for(var n in e||(e={}))v.call(e,n)&&a(t,n,e[n]);if(o)for(var n of o(e))h.call(e,n)&&a(t,n,e[n]);return t},i=(t,e)=>f(t,_(e));import{h as C}from"../../chunks/8473fc69.js";import{n as d}from"../../chunks/6499de3a.js";const x={name:"FlexRow",functional:!0,props:{verticalCenter:{type:Boolean,default:!1},horizonCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},textCenter:{type:Boolean,default:!1}},render(t,{data:e,children:n,props:r}){const l=C(e.class,"flex-row");return r.center||r.horizonCenter&&r.verticalCenter?(l.push("horizon-center"),l.push("vertical-center")):(r.horizonCenter&&l.push("horizon-center"),r.verticalCenter&&l.push("vertical-center")),r.textCenter&&l.push("text-center"),t("div",i(s({},e),{class:l}),n)}};let m,p;const c={};var z=d(x,m,p,!1,y,null,null,null);function y(t){for(let e in c)this[e]=c[e]}var w=function(){return z.exports}();export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as t}from"../../chunks/6499de3a.js";var n=function(){var e=this,l=e.$createElement,o=e._self._c||l;return o("div",{staticClass:"flex-scroller-wrapper"},[o("div",{class:["flex-scroller",{"flex-column":e.flexColumn,"flex-row":e.flexRow,"content-scroll":e.contentScroll},e.contentClass]},[e._t("default")],2)])},s=[];const c={name:"FlexScroller",props:{flexColumn:Boolean,flexRow:Boolean,contentClass:{type:String},contentScroll:{type:Boolean,default:!0}}},r={};var a=t(c,n,s,!1,f,null,null,null);function f(e){for(let l in r)this[l]=r[l]}var _=function(){return a.exports}();export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r}from"../../chunks/
|
|
1
|
+
import{c as r}from"../../chunks/65f4f4f2.js";import{n as o}from"../../chunks/6499de3a.js";const i={name:"Confirmable",mixins:[r]};let a,s;const e={};var _=o(i,a,s,!1,u,null,null,null);function u(l){for(let n in e)this[n]=e[n]}var c=function(){return _.exports}();const p={props:{type:{type:String,default:"danger"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,confirmable:Boolean,text:{type:String,default:""},tag:{type:String,default:"AwesomeButton"}}},f={name:"FormButton",mixins:[c,p]};let m,d;const t={};var v=o(f,m,d,!1,g,null,null,null);function g(l){for(let n in t)this[n]=t[n]}var x=function(){return v.exports}();export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var u=Object.defineProperty;var n=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var o=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))c.call(t,r)&&o(e,r,t[r]);return e};import{f as d}from"../../chunks/
|
|
1
|
+
var u=Object.defineProperty;var n=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var o=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))c.call(t,r)&&o(e,r,t[r]);return e};import{f as d}from"../../chunks/b8305633.js";import{f as m}from"../../chunks/23bd3525.js";import{Cascader as f}from"element-ui";import{i as h,n as y}from"../../chunks/8473fc69.js";import{findTreeChildren as v,cloneDeep as _,setParent as b}from"@web-utils/core";import{n as S}from"../../chunks/6499de3a.js";var k=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("FormItem",e._b({attrs:{rules:e.computeRules,disabled:e.inputDisabled},scopedSlots:e._u([{key:"default",fn:function(){return[e._t("default",function(){return[r("ElCascader",e._g(e._b({class:{"is-readonly":e.readonly},staticStyle:{width:"100%"},attrs:{value:e.inputVal,"show-all-levels":e.showAllLevels,separator:e.separator,readonly:e.readonly,options:e.innerOptions,props:{checkStrictly:e.checkStrictly,label:e.labelKey,value:e.valueKey},disabled:e.inputDisabled,placeholder:e.computePlaceholder},on:{input:e.emitInput}},"ElCascader",e.inputProps,!1),e.listeners))]})]},proxy:!0},{key:"error",fn:function(a){var i=a.error;return[e._t("error",null,{error:i})]}},{key:"label",fn:function(){return[e._t("label")]},proxy:!0}],null,!0)},"FormItem",e.formItemProps,!1))},x=[];const P=Object.keys(f.props).filter(e=>!["value","placeholder","disabled","options","showAllLevels","show-all-levels","separator"].includes(e)),w={name:"FormCascader",mixins:[d,m],props:{value:{type:[String,Number]},options:{type:Array,default:()=>[]},showAllLevels:Boolean,separator:{type:String,default:"/"},last:{type:Boolean,default:!0},checkStrictly:{type:Boolean,default:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},data(){return{innerOptions:[]}},computed:{inputProps(){return h(l(l({},y(this.$attrs)),this.$props),P)},inputVal(){let[e]=v(this.innerOptions,r=>r[this.valueKey]===this.value);const t=[];for(;e;)t.push(e[this.valueKey]),e=e.parent;return t.reverse()}},watch:{options:{immediate:!0,handler(e){if(e){const t=_(e);b(t),this.innerOptions=t}else this.innerOptions=[]}}},methods:{emitInput(e){const t=this.last?e[e.length-1]:e;this.$emit("input",t)}}},s={};var C=S(w,k,x,!1,K,null,null,null);function K(e){for(let t in s)this[t]=s[t]}var g=function(){return C.exports}();export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var c=Object.defineProperty;var i=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var a=(e,o,r)=>o in e?c(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,l=(e,o)=>{for(var r in o||(o={}))u.call(o,r)&&a(e,r,o[r]);if(i)for(var r of i(o))s.call(o,r)&&a(e,r,o[r]);return e};import{f as h}from"../../chunks/b8305633.js";import{f as b}from"../../chunks/23bd3525.js";import{i as f,n as m}from"../../chunks/8473fc69.js";import{CheckboxGroup as x}from"element-ui";import{n as d}from"../../chunks/6499de3a.js";var k=function(){var e=this,o=e.$createElement,r=e._self._c||o;return r("FormItem",e._b({class:["form-checkbox-group",{"form-checkbox-group-row":e.fillRow},e.ellipsis?"form-checkbox-group-row-ellipsis":e.fillRow?"form-checkbox-group-row-break-word":""],attrs:{rules:e.computeRules,disabled:e.inputDisabled},scopedSlots:e._u([{key:"default",fn:function(){return[r("ElCheckboxGroup",e._g(e._b({attrs:{disabled:e.inputDisabled,value:e.computeVal,placeholder:e.computePlaceholder},on:{input:e.emitInput}},"ElCheckboxGroup",e.inputProps,!1),e.listeners),e._l(e.innerOptions,function(t){return r("ElCheckbox",{key:t[e.valueKey],attrs:{label:t[e.valueKey]}},[e._v(" "+e._s(t[e.labelKey])+" ")])}),1),e.computeVal.includes(e.otherVal)?r("FormInput",{staticClass:"form-checkbox-group-other",style:e.otherLabel?{width:e.otherWidth}:{marginBottom:0,width:e.otherWidth},attrs:{"wrap-col":!1,"label-width":"0",prop:e.otherProp,required:!!e.otherProp,placeholder:e.otherPlaceholder,label:e.otherLabel,"show-message":!!e.otherLabel,value:e.other},on:{input:function(t){return e.$emit("update:other",t)}}}):e._e()]},proxy:!0},{key:"error",fn:function(t){var p=t.error;return[e._t("error",null,{error:p})]}},{key:"label",fn:function(){return[e._t("label")]},proxy:!0},{key:"below",fn:function(){return[e._t("below")]},proxy:!0}],null,!0)},"FormItem",e.formItemProps,!1))},g=[];const _=Object.keys(x.props).filter(e=>!["value","placeholder","disabled"].includes(e)),y={name:"FormCheckboxGroup",mixins:[h,b],props:{options:{type:Array,default:()=>[]},value:{type:[String,Array]},other:{type:String},otherVal:{type:String},otherProp:{type:String},otherPlaceholder:{type:String},otherLabel:{type:String},otherWidth:{type:String,default:"200px"},gender:Boolean,confirm:Boolean,labelProp:{type:String,default:"name"},valueProp:{type:String,default:"code"},split:Boolean,classic:Boolean,fillRow:Boolean,ellipsis:Boolean},computed:{prefix(){return"\u8BF7\u9009\u62E9"},labelKey(){return this.classic?"label":this.labelProp},valueKey(){return this.classic?"value":this.valueProp},inputProps(){return f(l(l({},m(this.$attrs)),this.$props),_)},innerOptions(){return this.gender?[{[this.labelKey]:"\u7537",[this.valueKey]:"\u7537"},{[this.labelKey]:"\u5973",[this.valueKey]:"\u5973"}]:this.confirm?[{[this.labelKey]:"\u662F",[this.valueKey]:"\u662F"},{[this.labelKey]:"\u5426",[this.valueKey]:"\u5426"}]:this.options},computeVal(){return this.split?this.value?this.value.split(","):[]:this.value||[]}},methods:{emitInput(e){this.split?this.$emit("input",e.join(",")):this.$emit("input",e)}}},n={};var v=d(y,k,g,!1,w,null,null,null);function w(e){for(let o in n)this[o]=n[o]}var P=function(){return v.exports}();export{P as default};
|