Files
aiot-platform-ui/apps/web-antd/dist/js/category-draggable-model-DteL6WRE.js

2 lines
16 KiB
JavaScript
Raw Normal View History

2026-03-25 16:05:53 +08:00
var Re=Object.defineProperty,ze=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Pe=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable;var oe=(l,f,a)=>f in l?Re(l,f,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[f]=a,de=(l,f)=>{for(var a in f||(f={}))Pe.call(f,a)&&oe(l,a,f[a]);if(le)for(var a of le(f))qe.call(f,a)&&oe(l,a,f[a]);return l},re=(l,f)=>ze(l,Fe(f));var y=(l,f,a)=>new Promise((b,U)=>{var x=m=>{try{W(a.next(m))}catch(E){U(E)}},I=m=>{try{W(a.throw(m))}catch(E){U(E)}},W=m=>m.done?b(m.value):Promise.resolve(m.value).then(x,I);W((a=a.apply(l,f)).next())});import{cw as Ae,ac as he,V as Ge,bv as Ve,bF as Ne,ax as V,an as R,ay as _,ak as Q,by as ue,d as D,am as ce,c5 as fe,az as Y,au as je,a9 as g,$ as me,bG as He}from"./bootstrap-Cs_ukuUC.js";import{u as Ke}from"./useSortable-jtnNPDb0-CQ6JsgG-.js";import"./vxe-table-DSSEYvYa.js";import{d as Qe}from"./index-DXflCqNf.js";import{b as Ye,d as Je,e as Ze,f as Xe,h as we}from"./index-BWHt8tN5.js";import{_ as et}from"./rename-form.vue_vue_type_script_setup_true_lang-BjAOjZGk.js";import{_ as tt}from"./detail.vue_vue_type_script_setup_true_lang-CIq1A2lr.js";import{D as st}from"./dict-enum-CaHgMaDZ.js";import{m as ve,aa as P,b9 as T,dc as at,v as nt,Q as it,aW as lt,bF as ke,ad as h,b2 as d,j as o,u as n,bJ as i,bc as J,ae as C,aQ as ot,bL as pe,ab as $,ac as L,bp as p,aR as Z,I as ye,ai as r,cT as dt,bZ as z,ca as rt}from"../jse/index-index-BQSou8bA.js";import{u as ge}from"./use-modal-prLiJWOx.js";import{u as ut}from"./use-vxe-grid-CbSOYI0W.js";import{b as X}from"./biz-bpm-enum-DQJBn5Qr.js";import{v as F}from"./AlertBuilder-Erio6wBA.js";import"./index-SooW4FbJ.js";import"./dict-tag.vue_vue_type_script_setup_true_lang-BW2Qx0j0.js";import"./data-gllCM8Bo.js";import"./rangePickerProps-BemLOpVs.js";import"./biz-system-enum-Ci18uvnT.js";import"./index-CpbSidTp.js";import"./helpers-CZNxzo4u.js";import"./index-Gaf4azCP.js";import"./x-D_RCjpXq.js";import"./circle-check-big-CWWAMhML.js";const ct=ve({__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(l,{emit:f}){const a=l,b=f,U=P(()=>typeof a.maxWidth=="number"?`${a.maxWidth}px`:a.maxWidth),x=T(),I=T(!1),W=T(),m=T(!1),{width:E}=at(x),k=()=>{if(!x.value||!a.tooltipWhenEllipsis)return;const u=x.value;if(!(u.textContent||"").trim()){m.value=!1;return}const j=u.scrollWidth-u.clientWidth,H=u.scrollHeight-u.clientHeight;m.value=a.line===1?j>a.ellipsisThreshold:H>a.ellipsisThreshold};let M=null;nt(()=>{typeof ResizeObserver!="undefined"&&a.tooltipWhenEllipsis&&(M=new ResizeObserver(()=>{k()}),x.value&&M.observe(x.value)),k()}),it(()=>{a.tooltipWhenEllipsis&&k()}),lt(()=>{M&&(M.disconnect(),M=null)}),ke(()=>{var u;a.tooltip&&E.value&&(W.value=(u=a.tooltipMaxWidth)!=null?u:E.value+24)},{flush:"post"});function c(){I.value=!I.value,b("expandChange",I.value),a.tooltipWhenEllipsis&&k()}function S(){a.expand&&c()}return(u,N)=>(d(),h("div",null,[o(n(Ae),{"content-style":re(de({},l.tooltipOverlayStyle),{maxWidth:`${W.value}px`,fontSize:`${l.tooltipFontSize}px`,color:l.tooltipColor,backgroundColor:l.tooltipBackgroundColor}),disabled:!a.tooltip||I.value||a.tooltipWhenEllipsis&&!m.value,side:l.placement},{trigger:i(()=>[C("div",ot({ref_key:"ellipsis",ref:x,class:[{"!cursor-pointer":l.expand,"block truncate":l.line===1,[u.$style.ellipsisMultiLine]:l.line>1},"cursor-text overflow-hidden"],style:{"-webkit-line-clamp":I.value?"":l.line,"max-width":U.value},onClick:S},u.$attrs),[J(u.$slots,"default")],16)]),default:i(()=>[J(u.$slots,"tooltip",{},()=>[J(u.$slots,"default")])]),_:3},8,["content-style","disabled","side"])]))}}),ft="_ellipsisMultiLine_fwtmq_2",mt={ellipsisMultiLine:f