2026-01-26 16:11:17 +08:00
|
|
|
var Rn=Object.defineProperty,Ln=Object.defineProperties;var Bn=Object.getOwnPropertyDescriptors;var tt=Object.getOwnPropertySymbols;var Zt=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable;var Qt=(n,e,t)=>e in n?Rn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,nt=(n,e)=>{for(var t in e||(e={}))Zt.call(e,t)&&Qt(n,t,e[t]);if(tt)for(var t of tt(e))Jt.call(e,t)&&Qt(n,t,e[t]);return n},en=(n,e)=>Ln(n,Bn(e));var tn=(n,e)=>{var t={};for(var o in n)Zt.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&tt)for(var o of tt(n))e.indexOf(o)<0&&Jt.call(n,o)&&(t[o]=n[o]);return t};var z=(n,e,t)=>new Promise((o,i)=>{var a=s=>{try{l(t.next(s))}catch(u){i(u)}},r=s=>{try{l(t.throw(s))}catch(u){i(u)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,r);l((t=t.apply(n,e)).next())});import{cA as $n,ac as bn,V as Wn,bF as Yn,bL as Xn,ax as ot,an as $e,ay as me,ak as _t,bI as nn,d as ue,am as on,c8 as an,aL as St,au as zn,a9 as G,$ as rn,aR as Gn}from"./bootstrap-DbEPETmd.js";import{i as Hn,a as Un,b as jn}from"./index-S2xADzfa.js";import{m as En,aa as Xe,b9 as ve,dc as qn,v as Vn,Q as Kn,aW as Qn,bF as Dn,ad as U,b2 as I,j as x,u as E,bJ as _,bc as wt,ae as oe,aQ as Zn,bu as Rt,aJ as Jn,n as eo,bL as ln,ab as de,ac as ge,bp as Y,aR as Ct,I as sn,ai as k,cT as to,bZ as We,ca as no}from"../jse/index-index-CpE3Y1Uf.js";import"./vxe-table-CtpSpFEw.js";import{d as oo}from"./index-BAIHuvwB.js";import{b as io,d as ao,e as ro,f as lo,h as so}from"./index-8agsA3QL.js";import{_ as uo}from"./rename-form.vue_vue_type_script_setup_true_lang-ByL5O4Oe.js";import{_ as co}from"./detail.vue_vue_type_script_setup_true_lang-CILLbYzu.js";import{D as fo}from"./dict-enum-DRf9W45H.js";import{u as un}from"./use-modal-BrcTcT4j.js";import{u as po}from"./use-vxe-grid-CId3fC0d.js";import{b as Tt}from"./biz-bpm-enum-DQJBn5Qr.js";import{v as Ye}from"./AlertBuilder-j7Ta-P7B.js";const ho=En({__name:"ellipsis-text",props:{expand:{type:Boolean,default:!1},line:{default:1},maxWidth:{default:"100%"},placement:{default:"top"},tooltip:{type:Boolean,default:!0},tooltipWhenEllipsis:{type:Boolean,default:!1},ellipsisThreshold:{default:3},tooltipBackgroundColor:{default:""},tooltipColor:{default:""},tooltipFontSize:{default:14},tooltipMaxWidth:{default:void 0},tooltipOverlayStyle:{default:()=>({textAlign:"justify"})}},emits:["expandChange"],setup(n,{emit:e}){const t=n,o=e,i=Xe(()=>typeof t.maxWidth=="number"?`${t.maxWidth}px`:t.maxWidth),a=ve(),r=ve(!1),l=ve(),s=ve(!1),{width:u}=qn(a),f=()=>{if(!a.value||!t.tooltipWhenEllipsis)return;const g=a.value;if(!(g.textContent||"").trim()){s.value=!1;return}const q=g.scrollWidth-g.clientWidth,F=g.scrollHeight-g.clientHeight;s.value=t.line===1?q>t.ellipsisThreshold:F>t.ellipsisThreshold};let d=null;Vn(()=>{typeof ResizeObserver!="undefined"&&t.tooltipWhenEllipsis&&(d=new ResizeObserver(()=>{f()}),a.value&&d.observe(a.value)),f()}),Kn(()=>{t.tooltipWhenEllipsis&&f()}),Qn(()=>{d&&(d.disconnect(),d=null)}),Dn(()=>{var g;t.tooltip&&u.value&&(l.value=(g=t.tooltipMaxWidth)!=null?g:u.value+24)},{flush:"post"});function h(){r.value=!r.value,o("expandChange",r.value),t.tooltipWhenEllipsis&&f()}function S(){t.expand&&h()}return(g,T)=>(I(),U("div",null,[x(E($n),{"content-style":en(nt({},n.tooltipOverlayStyle),{maxWidth:`${l.value}px`,fontSize:`${n.tooltipFontSize}px`,color:n.tooltipColor,backgroundColor:n.tooltipBackgroundColor}),disabled:!t.tooltip||r.value||t.tooltipWhenEllipsis&&!s.value,side:n.placement},{trigger:_(()=>[oe("div",Zn({ref_key:"ellipsis",ref:a,class:[{"!cursor-pointer":n.expand,"block truncate":n.line===1,[g.$style.ellipsisMultiLine]:n.line>1},"cursor-text overflow-hidden"],style:{"-webkit-line-clamp":r.value?"":n.line,"max-width":i.value},onClick:S},g.$attrs),[wt(g.$slots,"default")],16)]),default:_(()=>[wt(g.$slots,"tooltip",{},()=>[wt(g.$slots,"default")])]),_:3},8,["content-style","disabled","side"])]))}}),mo="_ellipsisMultiLine_fwtmq_2",go={ellipsisMultiLine:mo},vo={$style:go},yo=bn(ho,[["__cssModules",vo]]),bo=Hn?window.document:void 0;function Eo(n){var e;const t=Rt(n);return(e=t==nul
|