| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320 |
- var Me = (e, n, t) => new Promise((o, a) => {
- var f = (r) => {
- try {
- l(t.next(r));
- } catch (u) {
- a(u);
- }
- }, d = (r) => {
- try {
- l(t.throw(r));
- } catch (u) {
- a(u);
- }
- }, l = (r) => r.done ? o(r.value) : Promise.resolve(r.value).then(f, d);
- l((t = t.apply(e, n)).next());
- });
- import { defineComponent as ee, ref as W, createVNode as b, shallowRef as Y, watch as de, computed as J, onMounted as Ge, Fragment as ye, nextTick as $e, onBeforeUpdate as ft, onBeforeUnmount as Ee, watchEffect as Be, getCurrentInstance as Ue, resolveComponent as we, resolveDirective as pt, withDirectives as vt, openBlock as ie, createElementBlock as se, withCtx as Q, createTextVNode as me, createElementVNode as N, toDisplayString as q, withModifiers as gt, renderList as Fe, normalizeClass as ht, createCommentVNode as mt } from "vue";
- import { g as bt, l as xt, a as yt } from "./common.js";
- import { g as $t, f as St, _ as p, J as Xe, I as Se, a3 as Ct, $ as Ke, P as te, A as wt, c as ae, m as G, a as D, o as k, be as Ve, j as ve, k as _t, l as Ye, N as Ze, bf as je, aY as It, B as Je, aD as zt, E as oe, b6 as be, aJ as Rt, b5 as Et, i as At, X as Pt, bg as Bt, bh as Ot, aN as Tt, bi as Ht } from "./index2.js";
- import { u as Qe, F as pe, N as We } from "./FormItemContext.js";
- import { B as qe, g as Oe, a as ue } from "./statusUtils.js";
- import { i as Nt } from "./isPlainObject.js";
- import { M as Mt } from "./index7.js";
- const Ft = (e) => ({
- // Firefox
- "&::-moz-placeholder": {
- opacity: 1
- },
- "&::placeholder": {
- color: e,
- userSelect: "none"
- // https://github.com/ant-design/ant-design/pull/32639
- },
- "&:placeholder-shown": {
- textOverflow: "ellipsis"
- }
- }), Te = (e) => ({
- borderColor: e.inputBorderHoverColor,
- borderInlineEndWidth: e.lineWidth
- }), Ae = (e) => ({
- borderColor: e.inputBorderHoverColor,
- boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,
- borderInlineEndWidth: e.lineWidth,
- outline: 0
- }), Vt = (e) => ({
- color: e.colorTextDisabled,
- backgroundColor: e.colorBgContainerDisabled,
- borderColor: e.colorBorder,
- boxShadow: "none",
- cursor: "not-allowed",
- opacity: 1,
- "&:hover": p({}, Te(Se(e, {
- inputBorderHoverColor: e.colorBorder
- })))
- }), ke = (e) => {
- const {
- inputPaddingVerticalLG: n,
- fontSizeLG: t,
- lineHeightLG: o,
- borderRadiusLG: a,
- inputPaddingHorizontalLG: f
- } = e;
- return {
- padding: `${n}px ${f}px`,
- fontSize: t,
- lineHeight: o,
- borderRadius: a
- };
- }, et = (e) => ({
- padding: `${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM - 1}px`,
- borderRadius: e.borderRadiusSM
- }), tt = (e, n) => {
- const {
- componentCls: t,
- colorError: o,
- colorWarning: a,
- colorErrorOutline: f,
- colorWarningOutline: d,
- colorErrorBorderHover: l,
- colorWarningBorderHover: r
- } = e;
- return {
- [`&-status-error:not(${n}-disabled):not(${n}-borderless)${n}`]: {
- borderColor: o,
- "&:hover": {
- borderColor: l
- },
- "&:focus, &-focused": p({}, Ae(Se(e, {
- inputBorderActiveColor: o,
- inputBorderHoverColor: o,
- controlOutline: f
- }))),
- [`${t}-prefix`]: {
- color: o
- }
- },
- [`&-status-warning:not(${n}-disabled):not(${n}-borderless)${n}`]: {
- borderColor: a,
- "&:hover": {
- borderColor: r
- },
- "&:focus, &-focused": p({}, Ae(Se(e, {
- inputBorderActiveColor: a,
- inputBorderHoverColor: a,
- controlOutline: d
- }))),
- [`${t}-prefix`]: {
- color: a
- }
- }
- };
- }, nt = (e) => p(p({
- position: "relative",
- display: "inline-block",
- width: "100%",
- minWidth: 0,
- padding: `${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,
- color: e.colorText,
- fontSize: e.fontSize,
- lineHeight: e.lineHeight,
- backgroundColor: e.colorBgContainer,
- backgroundImage: "none",
- borderWidth: e.lineWidth,
- borderStyle: e.lineType,
- borderColor: e.colorBorder,
- borderRadius: e.borderRadius,
- transition: `all ${e.motionDurationMid}`
- }, Ft(e.colorTextPlaceholder)), {
- "&:hover": p({}, Te(e)),
- "&:focus, &-focused": p({}, Ae(e)),
- "&-disabled, &[disabled]": p({}, Vt(e)),
- "&-borderless": {
- "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
- backgroundColor: "transparent",
- border: "none",
- boxShadow: "none"
- }
- },
- // Reset height for `textarea`s
- "textarea&": {
- maxWidth: "100%",
- height: "auto",
- minHeight: e.controlHeight,
- lineHeight: e.lineHeight,
- verticalAlign: "bottom",
- transition: `all ${e.motionDurationSlow}, height 0s`,
- resize: "vertical"
- },
- // Size
- "&-lg": p({}, ke(e)),
- "&-sm": p({}, et(e)),
- // RTL
- "&-rtl": {
- direction: "rtl"
- },
- "&-textarea-rtl": {
- direction: "rtl"
- }
- }), jt = (e) => {
- const {
- componentCls: n,
- antCls: t
- } = e;
- return {
- position: "relative",
- display: "table",
- width: "100%",
- borderCollapse: "separate",
- borderSpacing: 0,
- // Undo padding and float of grid classes
- "&[class*='col-']": {
- paddingInlineEnd: e.paddingXS,
- "&:last-child": {
- paddingInlineEnd: 0
- }
- },
- // Sizing options
- [`&-lg ${n}, &-lg > ${n}-group-addon`]: p({}, ke(e)),
- [`&-sm ${n}, &-sm > ${n}-group-addon`]: p({}, et(e)),
- [`> ${n}`]: {
- display: "table-cell",
- "&:not(:first-child):not(:last-child)": {
- borderRadius: 0
- }
- },
- [`${n}-group`]: {
- "&-addon, &-wrap": {
- display: "table-cell",
- width: 1,
- whiteSpace: "nowrap",
- verticalAlign: "middle",
- "&:not(:first-child):not(:last-child)": {
- borderRadius: 0
- }
- },
- "&-wrap > *": {
- display: "block !important"
- },
- "&-addon": {
- position: "relative",
- padding: `0 ${e.inputPaddingHorizontal}px`,
- color: e.colorText,
- fontWeight: "normal",
- fontSize: e.fontSize,
- textAlign: "center",
- backgroundColor: e.colorFillAlter,
- border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
- borderRadius: e.borderRadius,
- transition: `all ${e.motionDurationSlow}`,
- lineHeight: 1,
- // Reset Select's style in addon
- [`${t}-select`]: {
- margin: `-${e.inputPaddingVertical + 1}px -${e.inputPaddingHorizontal}px`,
- [`&${t}-select-single:not(${t}-select-customize-input)`]: {
- [`${t}-select-selector`]: {
- backgroundColor: "inherit",
- border: `${e.lineWidth}px ${e.lineType} transparent`,
- boxShadow: "none"
- }
- },
- "&-open, &-focused": {
- [`${t}-select-selector`]: {
- color: e.colorPrimary
- }
- }
- },
- // https://github.com/ant-design/ant-design/issues/31333
- [`${t}-cascader-picker`]: {
- margin: `-9px -${e.inputPaddingHorizontal}px`,
- backgroundColor: "transparent",
- [`${t}-cascader-input`]: {
- textAlign: "start",
- border: 0,
- boxShadow: "none"
- }
- }
- },
- "&-addon:first-child": {
- borderInlineEnd: 0
- },
- "&-addon:last-child": {
- borderInlineStart: 0
- }
- },
- [`${n}`]: {
- float: "inline-start",
- width: "100%",
- marginBottom: 0,
- textAlign: "inherit",
- "&:focus": {
- zIndex: 1,
- borderInlineEndWidth: 1
- },
- "&:hover": {
- zIndex: 1,
- borderInlineEndWidth: 1,
- [`${n}-search-with-button &`]: {
- zIndex: 0
- }
- }
- },
- // Reset rounded corners
- [`> ${n}:first-child, ${n}-group-addon:first-child`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- // Reset Select's style in addon
- [`${t}-select ${t}-select-selector`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- [`> ${n}-affix-wrapper`]: {
- [`&:not(:first-child) ${n}`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- },
- [`&:not(:last-child) ${n}`]: {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0
- }
- },
- [`> ${n}:last-child, ${n}-group-addon:last-child`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0,
- // Reset Select's style in addon
- [`${t}-select ${t}-select-selector`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`${n}-affix-wrapper`]: {
- "&:not(:last-child)": {
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- [`${n}-search &`]: {
- borderStartStartRadius: e.borderRadius,
- borderEndStartRadius: e.borderRadius
- }
- },
- [`&:not(:first-child), ${n}-search &:not(:first-child)`]: {
- borderStartStartRadius: 0,
- borderEndStartRadius: 0
- }
- },
- [`&${n}-group-compact`]: p(p({
- display: "block"
- }, Ct()), {
- [`${n}-group-addon, ${n}-group-wrap, > ${n}`]: {
- "&:not(:first-child):not(:last-child)": {
- borderInlineEndWidth: e.lineWidth,
- "&:hover": {
- zIndex: 1
- },
- "&:focus": {
- zIndex: 1
- }
- }
- },
- "& > *": {
- display: "inline-block",
- float: "none",
- verticalAlign: "top",
- borderRadius: 0
- },
- [`& > ${n}-affix-wrapper`]: {
- display: "inline-flex"
- },
- [`& > ${t}-picker-range`]: {
- display: "inline-flex"
- },
- "& > *:not(:last-child)": {
- marginInlineEnd: -e.lineWidth,
- borderInlineEndWidth: e.lineWidth
- },
- // Undo float for .ant-input-group .ant-input
- [`${n}`]: {
- float: "none"
- },
- // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
- [`& > ${t}-select > ${t}-select-selector,
- & > ${t}-select-auto-complete ${n},
- & > ${t}-cascader-picker ${n},
- & > ${n}-group-wrapper ${n}`]: {
- borderInlineEndWidth: e.lineWidth,
- borderRadius: 0,
- "&:hover": {
- zIndex: 1
- },
- "&:focus": {
- zIndex: 1
- }
- },
- [`& > ${t}-select-focused`]: {
- zIndex: 1
- },
- // update z-index for arrow icon
- [`& > ${t}-select > ${t}-select-arrow`]: {
- zIndex: 1
- // https://github.com/ant-design/ant-design/issues/20371
- },
- [`& > *:first-child,
- & > ${t}-select:first-child > ${t}-select-selector,
- & > ${t}-select-auto-complete:first-child ${n},
- & > ${t}-cascader-picker:first-child ${n}`]: {
- borderStartStartRadius: e.borderRadius,
- borderEndStartRadius: e.borderRadius
- },
- [`& > *:last-child,
- & > ${t}-select:last-child > ${t}-select-selector,
- & > ${t}-cascader-picker:last-child ${n},
- & > ${t}-cascader-picker-focused:last-child ${n}`]: {
- borderInlineEndWidth: e.lineWidth,
- borderStartEndRadius: e.borderRadius,
- borderEndEndRadius: e.borderRadius
- },
- // https://github.com/ant-design/ant-design/issues/12493
- [`& > ${t}-select-auto-complete ${n}`]: {
- verticalAlign: "top"
- },
- [`${n}-group-wrapper + ${n}-group-wrapper`]: {
- marginInlineStart: -e.lineWidth,
- [`${n}-affix-wrapper`]: {
- borderRadius: 0
- }
- },
- [`${n}-group-wrapper:not(:last-child)`]: {
- [`&${n}-search > ${n}-group`]: {
- [`& > ${n}-group-addon > ${n}-search-button`]: {
- borderRadius: 0
- },
- [`& > ${n}`]: {
- borderStartStartRadius: e.borderRadius,
- borderStartEndRadius: 0,
- borderEndEndRadius: 0,
- borderEndStartRadius: e.borderRadius
- }
- }
- }
- }),
- [`&&-sm ${t}-btn`]: {
- fontSize: e.fontSizeSM,
- height: e.controlHeightSM,
- lineHeight: "normal"
- },
- [`&&-lg ${t}-btn`]: {
- fontSize: e.fontSizeLG,
- height: e.controlHeightLG,
- lineHeight: "normal"
- },
- // Fix https://github.com/ant-design/ant-design/issues/5754
- [`&&-lg ${t}-select-single ${t}-select-selector`]: {
- height: `${e.controlHeightLG}px`,
- [`${t}-select-selection-item, ${t}-select-selection-placeholder`]: {
- // -2 is for the border size & override default
- lineHeight: `${e.controlHeightLG - 2}px`
- },
- [`${t}-select-selection-search-input`]: {
- height: `${e.controlHeightLG}px`
- }
- },
- [`&&-sm ${t}-select-single ${t}-select-selector`]: {
- height: `${e.controlHeightSM}px`,
- [`${t}-select-selection-item, ${t}-select-selection-placeholder`]: {
- // -2 is for the border size & override default
- lineHeight: `${e.controlHeightSM - 2}px`
- },
- [`${t}-select-selection-search-input`]: {
- height: `${e.controlHeightSM}px`
- }
- }
- };
- }, Wt = (e) => {
- const {
- componentCls: n,
- controlHeightSM: t,
- lineWidth: o
- } = e, f = (t - o * 2 - 16) / 2;
- return {
- [n]: p(p(p(p({}, Xe(e)), nt(e)), tt(e, n)), {
- '&[type="color"]': {
- height: e.controlHeight,
- [`&${n}-lg`]: {
- height: e.controlHeightLG
- },
- [`&${n}-sm`]: {
- height: t,
- paddingTop: f,
- paddingBottom: f
- }
- }
- })
- };
- }, Dt = (e) => {
- const {
- componentCls: n
- } = e;
- return {
- // ========================= Input =========================
- [`${n}-clear-icon`]: {
- margin: 0,
- color: e.colorTextQuaternary,
- fontSize: e.fontSizeIcon,
- verticalAlign: -1,
- // https://github.com/ant-design/ant-design/pull/18151
- // https://codesandbox.io/s/wizardly-sun-u10br
- cursor: "pointer",
- transition: `color ${e.motionDurationSlow}`,
- "&:hover": {
- color: e.colorTextTertiary
- },
- "&:active": {
- color: e.colorText
- },
- "&-hidden": {
- visibility: "hidden"
- },
- "&-has-suffix": {
- margin: `0 ${e.inputAffixPadding}px`
- }
- },
- // ======================= TextArea ========================
- "&-textarea-with-clear-btn": {
- padding: "0 !important",
- border: "0 !important",
- [`${n}-clear-icon`]: {
- position: "absolute",
- insetBlockStart: e.paddingXS,
- insetInlineEnd: e.paddingXS,
- zIndex: 1
- }
- }
- };
- }, Lt = (e) => {
- const {
- componentCls: n,
- inputAffixPadding: t,
- colorTextDescription: o,
- motionDurationSlow: a,
- colorIcon: f,
- colorIconHover: d,
- iconCls: l
- } = e;
- return {
- [`${n}-affix-wrapper`]: p(p(p(p(p({}, nt(e)), {
- display: "inline-flex",
- [`&:not(${n}-affix-wrapper-disabled):hover`]: p(p({}, Te(e)), {
- zIndex: 1,
- [`${n}-search-with-button &`]: {
- zIndex: 0
- }
- }),
- "&-focused, &:focus": {
- zIndex: 1
- },
- "&-disabled": {
- [`${n}[disabled]`]: {
- background: "transparent"
- }
- },
- [`> input${n}`]: {
- padding: 0,
- fontSize: "inherit",
- border: "none",
- borderRadius: 0,
- outline: "none",
- "&:focus": {
- boxShadow: "none !important"
- }
- },
- "&::before": {
- width: 0,
- visibility: "hidden",
- content: '"\\a0"'
- },
- [`${n}`]: {
- "&-prefix, &-suffix": {
- display: "flex",
- flex: "none",
- alignItems: "center",
- "> *:not(:last-child)": {
- marginInlineEnd: e.paddingXS
- }
- },
- "&-show-count-suffix": {
- color: o
- },
- "&-show-count-has-suffix": {
- marginInlineEnd: e.paddingXXS
- },
- "&-prefix": {
- marginInlineEnd: t
- },
- "&-suffix": {
- marginInlineStart: t
- }
- }
- }), Dt(e)), {
- // password
- [`${l}${n}-password-icon`]: {
- color: f,
- cursor: "pointer",
- transition: `all ${a}`,
- "&:hover": {
- color: d
- }
- }
- }), tt(e, `${n}-affix-wrapper`))
- };
- }, Gt = (e) => {
- const {
- componentCls: n,
- colorError: t,
- colorSuccess: o,
- borderRadiusLG: a,
- borderRadiusSM: f
- } = e;
- return {
- [`${n}-group`]: p(p(p({}, Xe(e)), jt(e)), {
- "&-rtl": {
- direction: "rtl"
- },
- "&-wrapper": {
- display: "inline-block",
- width: "100%",
- textAlign: "start",
- verticalAlign: "top",
- "&-rtl": {
- direction: "rtl"
- },
- // Size
- "&-lg": {
- [`${n}-group-addon`]: {
- borderRadius: a
- }
- },
- "&-sm": {
- [`${n}-group-addon`]: {
- borderRadius: f
- }
- },
- // Status
- "&-status-error": {
- [`${n}-group-addon`]: {
- color: t,
- borderColor: t
- }
- },
- "&-status-warning": {
- [`${n}-group-addon:last-child`]: {
- color: o,
- borderColor: o
- }
- }
- }
- })
- };
- }, Ut = (e) => {
- const {
- componentCls: n,
- antCls: t
- } = e, o = `${n}-search`;
- return {
- [o]: {
- [`${n}`]: {
- "&:hover, &:focus": {
- borderColor: e.colorPrimaryHover,
- [`+ ${n}-group-addon ${o}-button:not(${t}-btn-primary)`]: {
- borderInlineStartColor: e.colorPrimaryHover
- }
- }
- },
- [`${n}-affix-wrapper`]: {
- borderRadius: 0
- },
- // fix slight height diff in Firefox:
- // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
- [`${n}-lg`]: {
- lineHeight: e.lineHeightLG - 2e-4
- },
- [`> ${n}-group`]: {
- [`> ${n}-group-addon:last-child`]: {
- insetInlineStart: -1,
- padding: 0,
- border: 0,
- [`${o}-button`]: {
- paddingTop: 0,
- paddingBottom: 0,
- borderStartStartRadius: 0,
- borderStartEndRadius: e.borderRadius,
- borderEndEndRadius: e.borderRadius,
- borderEndStartRadius: 0
- },
- [`${o}-button:not(${t}-btn-primary)`]: {
- color: e.colorTextDescription,
- "&:hover": {
- color: e.colorPrimaryHover
- },
- "&:active": {
- color: e.colorPrimaryActive
- },
- [`&${t}-btn-loading::before`]: {
- insetInlineStart: 0,
- insetInlineEnd: 0,
- insetBlockStart: 0,
- insetBlockEnd: 0
- }
- }
- }
- },
- [`${o}-button`]: {
- height: e.controlHeight,
- "&:hover, &:focus": {
- zIndex: 1
- }
- },
- [`&-large ${o}-button`]: {
- height: e.controlHeightLG
- },
- [`&-small ${o}-button`]: {
- height: e.controlHeightSM
- },
- "&-rtl": {
- direction: "rtl"
- },
- // ===================== Compact Item Customized Styles =====================
- [`&${n}-compact-item`]: {
- [`&:not(${n}-compact-last-item)`]: {
- [`${n}-group-addon`]: {
- [`${n}-search-button`]: {
- marginInlineEnd: -e.lineWidth,
- borderRadius: 0
- }
- }
- },
- [`&:not(${n}-compact-first-item)`]: {
- [`${n},${n}-affix-wrapper`]: {
- borderRadius: 0
- }
- },
- [`> ${n}-group-addon ${n}-search-button,
- > ${n},
- ${n}-affix-wrapper`]: {
- "&:hover,&:focus,&:active": {
- zIndex: 2
- }
- },
- [`> ${n}-affix-wrapper-focused`]: {
- zIndex: 2
- }
- }
- }
- };
- };
- function Xt(e) {
- return Se(e, {
- inputAffixPadding: e.paddingXXS,
- inputPaddingVertical: Math.max(Math.round((e.controlHeight - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 3),
- inputPaddingVerticalLG: Math.ceil((e.controlHeightLG - e.fontSizeLG * e.lineHeightLG) / 2 * 10) / 10 - e.lineWidth,
- inputPaddingVerticalSM: Math.max(Math.round((e.controlHeightSM - e.fontSize * e.lineHeight) / 2 * 10) / 10 - e.lineWidth, 0),
- inputPaddingHorizontal: e.paddingSM - e.lineWidth,
- inputPaddingHorizontalSM: e.paddingXS - e.lineWidth,
- inputPaddingHorizontalLG: e.controlPaddingHorizontal - e.lineWidth,
- inputBorderHoverColor: e.colorPrimaryHover,
- inputBorderActiveColor: e.colorPrimaryHover
- });
- }
- const Kt = (e) => {
- const {
- componentCls: n,
- inputPaddingHorizontal: t,
- paddingLG: o
- } = e, a = `${n}-textarea`;
- return {
- [a]: {
- position: "relative",
- [`${a}-suffix`]: {
- position: "absolute",
- top: 0,
- insetInlineEnd: t,
- bottom: 0,
- zIndex: 1,
- display: "inline-flex",
- alignItems: "center",
- margin: "auto"
- },
- "&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating": {
- [`&${a}-has-feedback`]: {
- [`${n}`]: {
- paddingInlineEnd: o
- }
- }
- },
- "&-show-count": {
- // https://github.com/ant-design/ant-design/issues/33049
- [`> ${n}`]: {
- height: "100%"
- },
- "&::after": {
- color: e.colorTextDescription,
- whiteSpace: "nowrap",
- content: "attr(data-count)",
- pointerEvents: "none",
- float: "right"
- }
- },
- "&-rtl": {
- "&::after": {
- float: "left"
- }
- }
- }
- };
- }, He = $t("Input", (e) => {
- const n = Xt(e);
- return [
- Wt(n),
- Kt(n),
- Lt(n),
- Gt(n),
- Ut(n),
- // =====================================================
- // == Space Compact ==
- // =====================================================
- St(n)
- ];
- }), ce = (e) => e != null && (Array.isArray(e) ? Ke(e).length : !0);
- function Ne(e) {
- return ce(e.prefix) || ce(e.suffix) || ce(e.allowClear);
- }
- function xe(e) {
- return ce(e.addonBefore) || ce(e.addonAfter);
- }
- function Pe(e) {
- return typeof e == "undefined" || e === null ? "" : String(e);
- }
- function fe(e, n, t, o) {
- if (!t)
- return;
- const a = n;
- if (n.type === "click") {
- Object.defineProperty(a, "target", {
- writable: !0
- }), Object.defineProperty(a, "currentTarget", {
- writable: !0
- });
- const f = e.cloneNode(!0);
- a.target = f, a.currentTarget = f, f.value = "", t(a);
- return;
- }
- if (o !== void 0) {
- Object.defineProperty(a, "target", {
- writable: !0
- }), Object.defineProperty(a, "currentTarget", {
- writable: !0
- }), a.target = e, a.currentTarget = e, e.value = o, t(a);
- return;
- }
- t(a);
- }
- function ot(e, n) {
- if (!e) return;
- e.focus(n);
- const {
- cursor: t
- } = n || {};
- if (t) {
- const o = e.value.length;
- switch (t) {
- case "start":
- e.setSelectionRange(0, 0);
- break;
- case "end":
- e.setSelectionRange(o, o);
- break;
- default:
- e.setSelectionRange(0, o);
- }
- }
- }
- const Yt = () => ({
- addonBefore: te.any,
- addonAfter: te.any,
- prefix: te.any,
- suffix: te.any,
- clearIcon: te.any,
- affixWrapperClassName: String,
- groupClassName: String,
- wrapperClassName: String,
- inputClassName: String,
- allowClear: {
- type: Boolean,
- default: void 0
- }
- }), at = () => p(p({}, Yt()), {
- value: {
- type: [String, Number, Symbol],
- default: void 0
- },
- defaultValue: {
- type: [String, Number, Symbol],
- default: void 0
- },
- inputElement: te.any,
- prefixCls: String,
- disabled: {
- type: Boolean,
- default: void 0
- },
- focused: {
- type: Boolean,
- default: void 0
- },
- triggerFocus: Function,
- readonly: {
- type: Boolean,
- default: void 0
- },
- handleReset: Function,
- hidden: {
- type: Boolean,
- default: void 0
- }
- }), lt = () => p(p({}, at()), {
- id: String,
- placeholder: {
- type: [String, Number]
- },
- autocomplete: String,
- type: wt("text"),
- name: String,
- size: {
- type: String
- },
- autofocus: {
- type: Boolean,
- default: void 0
- },
- lazy: {
- type: Boolean,
- default: !0
- },
- maxlength: Number,
- loading: {
- type: Boolean,
- default: void 0
- },
- bordered: {
- type: Boolean,
- default: void 0
- },
- showCount: {
- type: [Boolean, Object]
- },
- htmlSize: Number,
- onPressEnter: Function,
- onKeydown: Function,
- onKeyup: Function,
- onFocus: Function,
- onBlur: Function,
- onChange: Function,
- onInput: Function,
- "onUpdate:value": Function,
- onCompositionstart: Function,
- onCompositionend: Function,
- valueModifiers: Object,
- hidden: {
- type: Boolean,
- default: void 0
- },
- status: String
- }), Zt = ee({
- name: "BaseInput",
- inheritAttrs: !1,
- props: at(),
- setup(e, n) {
- let {
- slots: t,
- attrs: o
- } = n;
- const a = W(), f = (l) => {
- var r;
- if (!((r = a.value) === null || r === void 0) && r.contains(l.target)) {
- const {
- triggerFocus: u
- } = e;
- u == null || u();
- }
- }, d = () => {
- var l;
- const {
- allowClear: r,
- value: u,
- disabled: v,
- readonly: h,
- handleReset: c,
- suffix: E = t.suffix,
- prefixCls: P
- } = e;
- if (!r)
- return null;
- const B = !v && !h && u, g = `${P}-clear-icon`, T = ((l = t.clearIcon) === null || l === void 0 ? void 0 : l.call(t)) || "*";
- return b("span", {
- onClick: c,
- onMousedown: (R) => R.preventDefault(),
- class: G({
- [`${g}-hidden`]: !B,
- [`${g}-has-suffix`]: !!E
- }, g),
- role: "button",
- tabindex: -1
- }, [T]);
- };
- return () => {
- var l, r;
- const {
- focused: u,
- value: v,
- disabled: h,
- allowClear: c,
- readonly: E,
- hidden: P,
- prefixCls: B,
- prefix: g = (l = t.prefix) === null || l === void 0 ? void 0 : l.call(t),
- suffix: T = (r = t.suffix) === null || r === void 0 ? void 0 : r.call(t),
- addonAfter: R = t.addonAfter,
- addonBefore: A = t.addonBefore,
- inputElement: M,
- affixWrapperClassName: x,
- wrapperClassName: y,
- groupClassName: i
- } = e;
- let _ = ae(M, {
- value: v,
- hidden: P
- });
- if (Ne({
- prefix: g,
- suffix: T,
- allowClear: c
- })) {
- const I = `${B}-affix-wrapper`, H = G(I, {
- [`${I}-disabled`]: h,
- [`${I}-focused`]: u,
- [`${I}-readonly`]: E,
- [`${I}-input-with-clear-btn`]: T && c && v
- }, !xe({
- addonAfter: R,
- addonBefore: A
- }) && o.class, x), $ = (T || c) && b("span", {
- class: `${B}-suffix`
- }, [d(), T]);
- _ = b("span", {
- class: H,
- style: o.style,
- hidden: !xe({
- addonAfter: R,
- addonBefore: A
- }) && P,
- onMousedown: f,
- ref: a
- }, [g && b("span", {
- class: `${B}-prefix`
- }, [g]), ae(M, {
- style: null,
- value: v,
- hidden: null
- }), $]);
- }
- if (xe({
- addonAfter: R,
- addonBefore: A
- })) {
- const I = `${B}-group`, H = `${I}-addon`, $ = G(`${B}-wrapper`, I, y), C = G(`${B}-group-wrapper`, o.class, i);
- return b("span", {
- class: C,
- style: o.style,
- hidden: P
- }, [b("span", {
- class: $
- }, [A && b("span", {
- class: H
- }, [A]), ae(_, {
- style: null,
- hidden: null
- }), R && b("span", {
- class: H
- }, [R])])]);
- }
- return _;
- };
- }
- });
- var Jt = function(e, n) {
- var t = {};
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
- n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
- return t;
- };
- const Qt = ee({
- name: "VCInput",
- inheritAttrs: !1,
- props: lt(),
- setup(e, n) {
- let {
- slots: t,
- attrs: o,
- expose: a,
- emit: f
- } = n;
- const d = Y(e.value === void 0 ? e.defaultValue : e.value), l = Y(!1), r = Y(), u = Y();
- de(() => e.value, () => {
- d.value = e.value;
- }), de(() => e.disabled, () => {
- e.disabled && (l.value = !1);
- });
- const v = (i) => {
- r.value && ot(r.value.input, i);
- }, h = () => {
- var i;
- (i = r.value.input) === null || i === void 0 || i.blur();
- }, c = (i, _, I) => {
- var H;
- (H = r.value.input) === null || H === void 0 || H.setSelectionRange(i, _, I);
- }, E = () => {
- var i;
- (i = r.value.input) === null || i === void 0 || i.select();
- };
- a({
- focus: v,
- blur: h,
- input: J(() => {
- var i;
- return (i = r.value.input) === null || i === void 0 ? void 0 : i.input;
- }),
- stateValue: d,
- setSelectionRange: c,
- select: E
- });
- const P = (i) => {
- f("change", i);
- }, B = (i, _) => {
- d.value !== i && (e.value === void 0 ? d.value = i : $e(() => {
- var I;
- r.value.input.value !== d.value && ((I = u.value) === null || I === void 0 || I.$forceUpdate());
- }), $e(() => {
- _ && _();
- }));
- }, g = (i) => {
- const {
- value: _
- } = i.target;
- if (d.value === _) return;
- const I = i.target.value;
- fe(r.value.input, i, P), B(I);
- }, T = (i) => {
- i.keyCode === 13 && f("pressEnter", i), f("keydown", i);
- }, R = (i) => {
- l.value = !0, f("focus", i);
- }, A = (i) => {
- l.value = !1, f("blur", i);
- }, M = (i) => {
- fe(r.value.input, i, P), B("", () => {
- v();
- });
- }, x = () => {
- var i, _;
- const {
- addonBefore: I = t.addonBefore,
- addonAfter: H = t.addonAfter,
- disabled: $,
- valueModifiers: C = {},
- htmlSize: m,
- autocomplete: z,
- prefixCls: F,
- inputClassName: V,
- prefix: U = (i = t.prefix) === null || i === void 0 ? void 0 : i.call(t),
- suffix: K = (_ = t.suffix) === null || _ === void 0 ? void 0 : _.call(t),
- allowClear: s,
- type: w = "text"
- } = e, O = k(e, [
- "prefixCls",
- "onPressEnter",
- "addonBefore",
- "addonAfter",
- "prefix",
- "suffix",
- "allowClear",
- // Input elements must be either controlled or uncontrolled,
- // specify either the value prop, or the defaultValue prop, but not both.
- "defaultValue",
- "size",
- "bordered",
- "htmlSize",
- "lazy",
- "showCount",
- "valueModifiers",
- "showCount",
- "affixWrapperClassName",
- "groupClassName",
- "inputClassName",
- "wrapperClassName"
- ]), j = p(p(p({}, O), o), {
- autocomplete: z,
- onChange: g,
- onInput: g,
- onFocus: R,
- onBlur: A,
- onKeydown: T,
- class: G(F, {
- [`${F}-disabled`]: $
- }, V, !xe({
- addonAfter: H,
- addonBefore: I
- }) && !Ne({
- prefix: U,
- suffix: K,
- allowClear: s
- }) && o.class),
- ref: r,
- key: "ant-input",
- size: m,
- type: w,
- lazy: e.lazy
- });
- return C.lazy && delete j.onInput, j.autofocus || delete j.autofocus, b(qe, k(j, ["size"]), null);
- }, y = () => {
- var i;
- const {
- maxlength: _,
- suffix: I = (i = t.suffix) === null || i === void 0 ? void 0 : i.call(t),
- showCount: H,
- prefixCls: $
- } = e, C = Number(_) > 0;
- if (I || H) {
- const m = [...Pe(d.value)].length, z = typeof H == "object" ? H.formatter({
- count: m,
- maxlength: _
- }) : `${m}${C ? ` / ${_}` : ""}`;
- return b(ye, null, [!!H && b("span", {
- class: G(`${$}-show-count-suffix`, {
- [`${$}-show-count-has-suffix`]: !!I
- })
- }, [z]), I]);
- }
- return null;
- };
- return Ge(() => {
- process.env.NODE_ENV === "test" && e.autofocus && v();
- }), () => {
- const {
- prefixCls: i,
- disabled: _
- } = e, I = Jt(e, ["prefixCls", "disabled"]);
- return b(Zt, D(D(D({}, I), o), {}, {
- ref: u,
- prefixCls: i,
- inputElement: x(),
- handleReset: M,
- value: Pe(d.value),
- focused: l.value,
- triggerFocus: v,
- suffix: y(),
- disabled: _
- }), t);
- };
- }
- }), Ce = () => k(lt(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), rt = () => p(p({}, k(Ce(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
- rows: Number,
- autosize: {
- type: [Boolean, Object],
- default: void 0
- },
- autoSize: {
- type: [Boolean, Object],
- default: void 0
- },
- onResize: {
- type: Function
- },
- onCompositionstart: Ve(),
- onCompositionend: Ve(),
- valueModifiers: Object
- });
- var qt = function(e, n) {
- var t = {};
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
- n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
- return t;
- };
- const L = ee({
- compatConfig: {
- MODE: 3
- },
- name: "AInput",
- inheritAttrs: !1,
- props: Ce(),
- setup(e, n) {
- let {
- slots: t,
- attrs: o,
- expose: a,
- emit: f
- } = n;
- const d = W(), l = Qe(), r = pe.useInject(), u = J(() => Oe(r.status, e.status)), {
- direction: v,
- prefixCls: h,
- size: c,
- autocomplete: E
- } = ve("input", e), {
- compactSize: P,
- compactItemClassnames: B
- } = _t(h, v), g = J(() => P.value || c.value), [T, R] = He(h), A = Ye();
- a({
- focus: (m) => {
- var z;
- (z = d.value) === null || z === void 0 || z.focus(m);
- },
- blur: () => {
- var m;
- (m = d.value) === null || m === void 0 || m.blur();
- },
- input: d,
- setSelectionRange: (m, z, F) => {
- var V;
- (V = d.value) === null || V === void 0 || V.setSelectionRange(m, z, F);
- },
- select: () => {
- var m;
- (m = d.value) === null || m === void 0 || m.select();
- }
- });
- const _ = W([]), I = () => {
- _.value.push(setTimeout(() => {
- var m, z, F, V;
- !((m = d.value) === null || m === void 0) && m.input && ((z = d.value) === null || z === void 0 ? void 0 : z.input.getAttribute("type")) === "password" && (!((F = d.value) === null || F === void 0) && F.input.hasAttribute("value")) && ((V = d.value) === null || V === void 0 || V.input.removeAttribute("value"));
- }));
- };
- Ge(() => {
- I();
- }), ft(() => {
- _.value.forEach((m) => clearTimeout(m));
- }), Ee(() => {
- _.value.forEach((m) => clearTimeout(m));
- });
- const H = (m) => {
- I(), f("blur", m), l.onFieldBlur();
- }, $ = (m) => {
- I(), f("focus", m);
- }, C = (m) => {
- f("update:value", m.target.value), f("change", m), f("input", m), l.onFieldChange();
- };
- return () => {
- var m, z, F, V, U, K;
- const {
- hasFeedback: s,
- feedbackIcon: w
- } = r, {
- allowClear: O,
- bordered: j = !0,
- prefix: S = (m = t.prefix) === null || m === void 0 ? void 0 : m.call(t),
- suffix: ne = (z = t.suffix) === null || z === void 0 ? void 0 : z.call(t),
- addonAfter: ge = (F = t.addonAfter) === null || F === void 0 ? void 0 : F.call(t),
- addonBefore: le = (V = t.addonBefore) === null || V === void 0 ? void 0 : V.call(t),
- id: he = (U = l.id) === null || U === void 0 ? void 0 : U.value
- } = e, re = qt(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), dt = (s || ne) && b(ye, null, [ne, s && w]), X = h.value, ut = Ne({
- prefix: S,
- suffix: ne
- }) || !!s, ct = t.clearIcon || (() => b(Ze, null, null));
- return T(b(Qt, D(D(D({}, o), k(re, ["onUpdate:value", "onChange", "onInput"])), {}, {
- onChange: C,
- id: he,
- disabled: (K = e.disabled) !== null && K !== void 0 ? K : A.value,
- ref: d,
- prefixCls: X,
- autocomplete: E.value,
- onBlur: H,
- onFocus: $,
- prefix: S,
- suffix: dt,
- allowClear: O,
- addonAfter: ge && b(je, null, {
- default: () => [b(We, null, {
- default: () => [ge]
- })]
- }),
- addonBefore: le && b(je, null, {
- default: () => [b(We, null, {
- default: () => [le]
- })]
- }),
- class: [o.class, B.value],
- inputClassName: G({
- [`${X}-sm`]: g.value === "small",
- [`${X}-lg`]: g.value === "large",
- [`${X}-rtl`]: v.value === "rtl",
- [`${X}-borderless`]: !j
- }, !ut && ue(X, u.value), R.value),
- affixWrapperClassName: G({
- [`${X}-affix-wrapper-sm`]: g.value === "small",
- [`${X}-affix-wrapper-lg`]: g.value === "large",
- [`${X}-affix-wrapper-rtl`]: v.value === "rtl",
- [`${X}-affix-wrapper-borderless`]: !j
- }, ue(`${X}-affix-wrapper`, u.value, s), R.value),
- wrapperClassName: G({
- [`${X}-group-rtl`]: v.value === "rtl"
- }, R.value),
- groupClassName: G({
- [`${X}-group-wrapper-sm`]: g.value === "small",
- [`${X}-group-wrapper-lg`]: g.value === "large",
- [`${X}-group-wrapper-rtl`]: v.value === "rtl"
- }, ue(`${X}-group-wrapper`, u.value, s), R.value)
- }), p(p({}, t), {
- clearIcon: ct
- })));
- };
- }
- }), kt = ee({
- compatConfig: {
- MODE: 3
- },
- name: "AInputGroup",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- size: {
- type: String
- },
- compact: {
- type: Boolean,
- default: void 0
- }
- },
- setup(e, n) {
- let {
- slots: t,
- attrs: o
- } = n;
- const {
- prefixCls: a,
- direction: f,
- getPrefixCls: d
- } = ve("input-group", e), l = pe.useInject();
- pe.useProvide(l, {
- isFormItemInput: !1
- });
- const r = J(() => d("input")), [u, v] = He(r), h = J(() => {
- const c = a.value;
- return {
- [`${c}`]: !0,
- [v.value]: !0,
- [`${c}-lg`]: e.size === "large",
- [`${c}-sm`]: e.size === "small",
- [`${c}-compact`]: e.compact,
- [`${c}-rtl`]: f.value === "rtl"
- };
- });
- return () => {
- var c;
- return u(b("span", D(D({}, o), {}, {
- class: G(h.value, o.class)
- }), [(c = t.default) === null || c === void 0 ? void 0 : c.call(t)]));
- };
- }
- });
- var en = function(e, n) {
- var t = {};
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
- n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
- return t;
- };
- const it = ee({
- compatConfig: {
- MODE: 3
- },
- name: "AInputSearch",
- inheritAttrs: !1,
- props: p(p({}, Ce()), {
- inputPrefixCls: String,
- // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
- enterButton: te.any,
- onSearch: {
- type: Function
- }
- }),
- setup(e, n) {
- let {
- slots: t,
- attrs: o,
- expose: a,
- emit: f
- } = n;
- const d = Y(), l = Y(!1);
- a({
- focus: () => {
- var x;
- (x = d.value) === null || x === void 0 || x.focus();
- },
- blur: () => {
- var x;
- (x = d.value) === null || x === void 0 || x.blur();
- }
- });
- const v = (x) => {
- f("update:value", x.target.value), x && x.target && x.type === "click" && f("search", x.target.value, x), f("change", x);
- }, h = (x) => {
- var y;
- document.activeElement === ((y = d.value) === null || y === void 0 ? void 0 : y.input) && x.preventDefault();
- }, c = (x) => {
- var y, i;
- f("search", (i = (y = d.value) === null || y === void 0 ? void 0 : y.input) === null || i === void 0 ? void 0 : i.stateValue, x);
- }, E = (x) => {
- l.value || e.loading || c(x);
- }, P = (x) => {
- l.value = !0, f("compositionstart", x);
- }, B = (x) => {
- l.value = !1, f("compositionend", x);
- }, {
- prefixCls: g,
- getPrefixCls: T,
- direction: R,
- size: A
- } = ve("input-search", e), M = J(() => T("input", e.inputPrefixCls));
- return () => {
- var x, y, i, _;
- const {
- disabled: I,
- loading: H,
- addonAfter: $ = (x = t.addonAfter) === null || x === void 0 ? void 0 : x.call(t),
- suffix: C = (y = t.suffix) === null || y === void 0 ? void 0 : y.call(t)
- } = e, m = en(e, ["disabled", "loading", "addonAfter", "suffix"]);
- let {
- enterButton: z = (_ = (i = t.enterButton) === null || i === void 0 ? void 0 : i.call(t)) !== null && _ !== void 0 ? _ : !1
- } = e;
- z = z || z === "";
- const F = typeof z == "boolean" ? b(It, null, null) : null, V = `${g.value}-button`, U = Array.isArray(z) ? z[0] : z;
- let K;
- const s = U.type && Nt(U.type) && U.type.__ANT_BUTTON;
- if (s || U.tagName === "button")
- K = ae(U, p({
- onMousedown: h,
- onClick: c,
- key: "enterButton"
- }, s ? {
- class: V,
- size: A.value
- } : {}), !1);
- else {
- const O = F && !z;
- K = b(Je, {
- class: V,
- type: z ? "primary" : void 0,
- size: A.value,
- disabled: I,
- key: "enterButton",
- onMousedown: h,
- onClick: c,
- loading: H,
- icon: O ? F : null
- }, {
- default: () => [O ? null : F || z]
- });
- }
- $ && (K = [K, $]);
- const w = G(g.value, {
- [`${g.value}-rtl`]: R.value === "rtl",
- [`${g.value}-${A.value}`]: !!A.value,
- [`${g.value}-with-button`]: !!z
- }, o.class);
- return b(L, D(D(D({
- ref: d
- }, k(m, ["onUpdate:value", "onSearch", "enterButton"])), o), {}, {
- onPressEnter: E,
- onCompositionstart: P,
- onCompositionend: B,
- size: A.value,
- prefixCls: M.value,
- addonAfter: K,
- suffix: C,
- onChange: v,
- class: w,
- disabled: I
- }), t);
- };
- }
- }), De = (e) => e != null && (Array.isArray(e) ? Ke(e).length : !0);
- function tn(e) {
- return De(e.addonBefore) || De(e.addonAfter);
- }
- const nn = ["text", "input"], on = ee({
- compatConfig: {
- MODE: 3
- },
- name: "ClearableLabeledInput",
- inheritAttrs: !1,
- props: {
- prefixCls: String,
- inputType: te.oneOf(zt("text", "input")),
- value: oe(),
- defaultValue: oe(),
- allowClear: {
- type: Boolean,
- default: void 0
- },
- element: oe(),
- handleReset: Function,
- disabled: {
- type: Boolean,
- default: void 0
- },
- direction: {
- type: String
- },
- size: {
- type: String
- },
- suffix: oe(),
- prefix: oe(),
- addonBefore: oe(),
- addonAfter: oe(),
- readonly: {
- type: Boolean,
- default: void 0
- },
- focused: {
- type: Boolean,
- default: void 0
- },
- bordered: {
- type: Boolean,
- default: !0
- },
- triggerFocus: {
- type: Function
- },
- hidden: Boolean,
- status: String,
- hashId: String
- },
- setup(e, n) {
- let {
- slots: t,
- attrs: o
- } = n;
- const a = pe.useInject(), f = (l) => {
- const {
- value: r,
- disabled: u,
- readonly: v,
- handleReset: h,
- suffix: c = t.suffix
- } = e, E = !u && !v && r, P = `${l}-clear-icon`;
- return b(Ze, {
- onClick: h,
- onMousedown: (B) => B.preventDefault(),
- class: G({
- [`${P}-hidden`]: !E,
- [`${P}-has-suffix`]: !!c
- }, P),
- role: "button"
- }, null);
- }, d = (l, r) => {
- const {
- value: u,
- allowClear: v,
- direction: h,
- bordered: c,
- hidden: E,
- status: P,
- addonAfter: B = t.addonAfter,
- addonBefore: g = t.addonBefore,
- hashId: T
- } = e, {
- status: R,
- hasFeedback: A
- } = a;
- if (!v)
- return ae(r, {
- value: u,
- disabled: e.disabled
- });
- const M = G(`${l}-affix-wrapper`, `${l}-affix-wrapper-textarea-with-clear-btn`, ue(`${l}-affix-wrapper`, Oe(R, P), A), {
- [`${l}-affix-wrapper-rtl`]: h === "rtl",
- [`${l}-affix-wrapper-borderless`]: !c,
- // className will go to addon wrapper
- [`${o.class}`]: !tn({
- addonAfter: B,
- addonBefore: g
- }) && o.class
- }, T);
- return b("span", {
- class: M,
- style: o.style,
- hidden: E
- }, [ae(r, {
- style: null,
- value: u,
- disabled: e.disabled
- }), f(l)]);
- };
- return () => {
- var l;
- const {
- prefixCls: r,
- inputType: u,
- element: v = (l = t.element) === null || l === void 0 ? void 0 : l.call(t)
- } = e;
- return u === nn[0] ? d(r, v) : null;
- };
- }
- }), an = `
- min-height:0 !important;
- max-height:none !important;
- height:0 !important;
- visibility:hidden !important;
- overflow:hidden !important;
- position:absolute !important;
- z-index:-1000 !important;
- top:0 !important;
- right:0 !important;
- pointer-events: none !important;
- `, ln = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], _e = {};
- let Z;
- function rn(e) {
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
- const t = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
- if (n && _e[t])
- return _e[t];
- const o = window.getComputedStyle(e), a = o.getPropertyValue("box-sizing") || o.getPropertyValue("-moz-box-sizing") || o.getPropertyValue("-webkit-box-sizing"), f = parseFloat(o.getPropertyValue("padding-bottom")) + parseFloat(o.getPropertyValue("padding-top")), d = parseFloat(o.getPropertyValue("border-bottom-width")) + parseFloat(o.getPropertyValue("border-top-width")), r = {
- sizingStyle: ln.map((u) => `${u}:${o.getPropertyValue(u)}`).join(";"),
- paddingSize: f,
- borderSize: d,
- boxSizing: a
- };
- return n && t && (_e[t] = r), r;
- }
- function sn(e) {
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
- Z || (Z = document.createElement("textarea"), Z.setAttribute("tab-index", "-1"), Z.setAttribute("aria-hidden", "true"), document.body.appendChild(Z)), e.getAttribute("wrap") ? Z.setAttribute("wrap", e.getAttribute("wrap")) : Z.removeAttribute("wrap");
- const {
- paddingSize: a,
- borderSize: f,
- boxSizing: d,
- sizingStyle: l
- } = rn(e, n);
- Z.setAttribute("style", `${l};${an}`), Z.value = e.value || e.placeholder || "";
- let r, u, v, h = Z.scrollHeight;
- if (d === "border-box" ? h += f : d === "content-box" && (h -= a), t !== null || o !== null) {
- Z.value = " ";
- const E = Z.scrollHeight - a;
- t !== null && (r = E * t, d === "border-box" && (r = r + a + f), h = Math.max(r, h)), o !== null && (u = E * o, d === "border-box" && (u = u + a + f), v = h > u ? "" : "hidden", h = Math.min(u, h));
- }
- const c = {
- height: `${h}px`,
- overflowY: v,
- resize: "none"
- };
- return r && (c.minHeight = `${r}px`), u && (c.maxHeight = `${u}px`), c;
- }
- const Ie = 0, ze = 1, Re = 2, dn = ee({
- compatConfig: {
- MODE: 3
- },
- name: "ResizableTextArea",
- inheritAttrs: !1,
- props: rt(),
- setup(e, n) {
- let {
- attrs: t,
- emit: o,
- expose: a
- } = n, f, d;
- const l = W(), r = W({}), u = W(Re);
- Ee(() => {
- be.cancel(f), be.cancel(d);
- });
- const v = () => {
- try {
- if (l.value && document.activeElement === l.value.input) {
- const y = l.value.getSelectionStart(), i = l.value.getSelectionEnd(), _ = l.value.getScrollTop();
- l.value.setSelectionRange(y, i), l.value.setScrollTop(_);
- }
- } catch (y) {
- }
- }, h = W(), c = W();
- Be(() => {
- const y = e.autoSize || e.autosize;
- y ? (h.value = y.minRows, c.value = y.maxRows) : (h.value = void 0, c.value = void 0);
- });
- const E = J(() => !!(e.autoSize || e.autosize)), P = () => {
- u.value = Ie;
- };
- de([() => e.value, h, c, E], () => {
- E.value && P();
- }, {
- immediate: !0
- });
- const B = W();
- de([u, l], () => {
- if (l.value)
- if (u.value === Ie)
- u.value = ze;
- else if (u.value === ze) {
- const y = sn(l.value.input, !1, h.value, c.value);
- u.value = Re, B.value = y;
- } else
- v();
- }, {
- immediate: !0,
- flush: "post"
- });
- const g = Ue(), T = W(), R = () => {
- be.cancel(T.value);
- }, A = (y) => {
- u.value === Re && (o("resize", y), E.value && (R(), T.value = be(() => {
- P();
- })));
- };
- Ee(() => {
- R();
- }), a({
- resizeTextarea: () => {
- P();
- },
- textArea: J(() => {
- var y;
- return (y = l.value) === null || y === void 0 ? void 0 : y.input;
- }),
- instance: g
- }), Rt(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
- const x = () => {
- const {
- prefixCls: y,
- disabled: i
- } = e, _ = k(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), I = G(y, t.class, {
- [`${y}-disabled`]: i
- }), H = E.value ? B.value : null, $ = [t.style, r.value, H], C = p(p(p({}, _), t), {
- style: $,
- class: I
- });
- return (u.value === Ie || u.value === ze) && $.push({
- overflowX: "hidden",
- overflowY: "hidden"
- }), C.autofocus || delete C.autofocus, C.rows === 0 && delete C.rows, b(Et, {
- onResize: A,
- disabled: !E.value
- }, {
- default: () => [b(qe, D(D({}, C), {}, {
- ref: l,
- tag: "textarea"
- }), null)]
- });
- };
- return () => x();
- }
- });
- function st(e, n) {
- return [...e || ""].slice(0, n).join("");
- }
- function Le(e, n, t, o) {
- let a = t;
- return e ? a = st(t, o) : [...n || ""].length < t.length && [...t || ""].length > o && (a = n), a;
- }
- const un = ee({
- compatConfig: {
- MODE: 3
- },
- name: "ATextarea",
- inheritAttrs: !1,
- props: rt(),
- setup(e, n) {
- let {
- attrs: t,
- expose: o,
- emit: a
- } = n;
- var f;
- const d = Qe(), l = pe.useInject(), r = J(() => Oe(l.status, e.status)), u = Y((f = e.value) !== null && f !== void 0 ? f : e.defaultValue), v = Y(), h = Y(""), {
- prefixCls: c,
- size: E,
- direction: P
- } = ve("input", e), [B, g] = He(c), T = Ye(), R = J(() => e.showCount === "" || e.showCount || !1), A = J(() => Number(e.maxlength) > 0), M = Y(!1), x = Y(), y = Y(0), i = (s) => {
- M.value = !0, x.value = h.value, y.value = s.currentTarget.selectionStart, a("compositionstart", s);
- }, _ = (s) => {
- var w;
- M.value = !1;
- let O = s.currentTarget.value;
- if (A.value) {
- const j = y.value >= e.maxlength + 1 || y.value === ((w = x.value) === null || w === void 0 ? void 0 : w.length);
- O = Le(j, x.value, O, e.maxlength);
- }
- O !== h.value && (C(O), fe(s.currentTarget, s, F, O)), a("compositionend", s);
- }, I = Ue();
- de(() => e.value, () => {
- var s;
- "value" in I.vnode.props, u.value = (s = e.value) !== null && s !== void 0 ? s : "";
- });
- const H = (s) => {
- var w;
- ot((w = v.value) === null || w === void 0 ? void 0 : w.textArea, s);
- }, $ = () => {
- var s, w;
- (w = (s = v.value) === null || s === void 0 ? void 0 : s.textArea) === null || w === void 0 || w.blur();
- }, C = (s, w) => {
- u.value !== s && (e.value === void 0 ? u.value = s : $e(() => {
- var O, j, S;
- v.value.textArea.value !== h.value && ((S = (O = v.value) === null || O === void 0 ? void 0 : (j = O.instance).update) === null || S === void 0 || S.call(j));
- }), $e(() => {
- w && w();
- }));
- }, m = (s) => {
- s.keyCode === 13 && a("pressEnter", s), a("keydown", s);
- }, z = (s) => {
- const {
- onBlur: w
- } = e;
- w == null || w(s), d.onFieldBlur();
- }, F = (s) => {
- a("update:value", s.target.value), a("change", s), a("input", s), d.onFieldChange();
- }, V = (s) => {
- fe(v.value.textArea, s, F), C("", () => {
- H();
- });
- }, U = (s) => {
- let w = s.target.value;
- if (u.value !== w) {
- if (A.value) {
- const O = s.target, j = O.selectionStart >= e.maxlength + 1 || O.selectionStart === w.length || !O.selectionStart;
- w = Le(j, h.value, w, e.maxlength);
- }
- fe(s.currentTarget, s, F, w), C(w);
- }
- }, K = () => {
- var s, w;
- const {
- class: O
- } = t, {
- bordered: j = !0
- } = e, S = p(p(p({}, k(e, ["allowClear"])), t), {
- class: [{
- [`${c.value}-borderless`]: !j,
- [`${O}`]: O && !R.value,
- [`${c.value}-sm`]: E.value === "small",
- [`${c.value}-lg`]: E.value === "large"
- }, ue(c.value, r.value), g.value],
- disabled: T.value,
- showCount: null,
- prefixCls: c.value,
- onInput: U,
- onChange: U,
- onBlur: z,
- onKeydown: m,
- onCompositionstart: i,
- onCompositionend: _
- });
- return !((s = e.valueModifiers) === null || s === void 0) && s.lazy && delete S.onInput, b(dn, D(D({}, S), {}, {
- id: (w = S == null ? void 0 : S.id) !== null && w !== void 0 ? w : d.id.value,
- ref: v,
- maxlength: e.maxlength,
- lazy: e.lazy
- }), null);
- };
- return o({
- focus: H,
- blur: $,
- resizableTextArea: v
- }), Be(() => {
- let s = Pe(u.value);
- !M.value && A.value && (e.value === null || e.value === void 0) && (s = st(s, e.maxlength)), h.value = s;
- }), () => {
- var s;
- const {
- maxlength: w,
- bordered: O = !0,
- hidden: j
- } = e, {
- style: S,
- class: ne
- } = t, ge = p(p(p({}, e), t), {
- prefixCls: c.value,
- inputType: "text",
- handleReset: V,
- direction: P.value,
- bordered: O,
- style: R.value ? void 0 : S,
- hashId: g.value,
- disabled: (s = e.disabled) !== null && s !== void 0 ? s : T.value
- });
- let le = b(on, D(D({}, ge), {}, {
- value: h.value,
- status: e.status
- }), {
- element: K
- });
- if (R.value || l.hasFeedback) {
- const he = [...h.value].length;
- let re = "";
- typeof R.value == "object" ? re = R.value.formatter({
- value: h.value,
- count: he,
- maxlength: w
- }) : re = `${he}${A.value ? ` / ${w}` : ""}`, le = b("div", {
- hidden: j,
- class: G(`${c.value}-textarea`, {
- [`${c.value}-textarea-rtl`]: P.value === "rtl",
- [`${c.value}-textarea-show-count`]: R.value,
- [`${c.value}-textarea-in-form-item`]: l.isFormItemInput
- }, `${c.value}-textarea-show-count`, ne, g.value),
- style: S,
- "data-count": typeof re != "object" ? re : void 0
- }, [le, l.hasFeedback && b("span", {
- class: `${c.value}-textarea-suffix`
- }, [l.feedbackIcon])]);
- }
- return B(le);
- };
- }
- });
- var cn = function(e, n) {
- var t = {};
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
- n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
- return t;
- };
- const fn = {
- click: "onClick",
- hover: "onMouseover"
- }, pn = (e) => e ? b(Pt, null, null) : b(Bt, null, null), vn = ee({
- compatConfig: {
- MODE: 3
- },
- name: "AInputPassword",
- inheritAttrs: !1,
- props: p(p({}, Ce()), {
- prefixCls: String,
- inputPrefixCls: String,
- action: {
- type: String,
- default: "click"
- },
- visibilityToggle: {
- type: Boolean,
- default: !0
- },
- visible: {
- type: Boolean,
- default: void 0
- },
- "onUpdate:visible": Function,
- iconRender: Function
- }),
- setup(e, n) {
- let {
- slots: t,
- attrs: o,
- expose: a,
- emit: f
- } = n;
- const d = Y(!1), l = () => {
- const {
- disabled: g
- } = e;
- g || (d.value = !d.value, f("update:visible", d.value));
- };
- Be(() => {
- e.visible !== void 0 && (d.value = !!e.visible);
- });
- const r = Y();
- a({
- focus: () => {
- var g;
- (g = r.value) === null || g === void 0 || g.focus();
- },
- blur: () => {
- var g;
- (g = r.value) === null || g === void 0 || g.blur();
- }
- });
- const h = (g) => {
- const {
- action: T,
- iconRender: R = t.iconRender || pn
- } = e, A = fn[T] || "", M = R(d.value), x = {
- [A]: l,
- class: `${g}-icon`,
- key: "passwordIcon",
- onMousedown: (y) => {
- y.preventDefault();
- },
- onMouseup: (y) => {
- y.preventDefault();
- }
- };
- return ae(At(M) ? M : b("span", null, [M]), x);
- }, {
- prefixCls: c,
- getPrefixCls: E
- } = ve("input-password", e), P = J(() => E("input", e.inputPrefixCls)), B = () => {
- const {
- size: g,
- visibilityToggle: T
- } = e, R = cn(e, ["size", "visibilityToggle"]), A = T && h(c.value), M = G(c.value, o.class, {
- [`${c.value}-${g}`]: !!g
- }), x = p(p(p({}, k(R, ["suffix", "iconRender", "action"])), o), {
- type: d.value ? "text" : "password",
- class: M,
- prefixCls: P.value,
- suffix: A
- });
- return g && (x.size = g), b(L, D({
- ref: r
- }, x), t);
- };
- return () => B();
- }
- });
- L.Group = kt;
- L.Search = it;
- L.TextArea = un;
- L.Password = vn;
- L.install = function(e) {
- return e.component(L.name, L), e.component(L.Group.name, L.Group), e.component(L.Search.name, L.Search), e.component(L.TextArea.name, L.TextArea), e.component(L.Password.name, L.Password), e;
- };
- const gn = { class: "s-user-select-common" }, hn = { class: "modal-container" }, mn = { class: "side" }, bn = { class: "main" }, xn = { class: "filter" }, yn = { class: "list-wrap" }, $n = { class: "item left-wrap" }, Sn = { class: "head" }, Cn = { class: "sub-title" }, wn = { class: "right" }, _n = /* @__PURE__ */ N("a", { href: "javascript:;" }, "节点全选", -1), In = ["onClick"], zn = { class: "icon" }, Rn = { class: "cont" }, En = { class: "name" }, An = { class: "job" }, Pn = {
- key: 0,
- class: "not-more"
- }, Bn = { class: "item right-wrap" }, On = { class: "head" }, Tn = /* @__PURE__ */ N("div", { class: "sub-title" }, "本次已选", -1), Hn = { class: "icon" }, Nn = { class: "cont" }, Mn = { class: "name" }, Fn = { class: "job" }, Vn = ["onClick"], Yn = {
- __name: "SUserSelect",
- props: {
- modelValue: {
- type: [String, Array],
- default() {
- return "";
- }
- },
- placeholder: {
- type: String,
- default: "请选择"
- },
- // 弹窗标题
- title: {
- type: String,
- default: "选择用户"
- }
- },
- emits: ["change:modelValue"],
- setup(e, { emit: n }) {
- const t = n, o = e, a = W(""), f = W(""), d = W(""), l = W(!1), r = W(!1), u = W({}), v = W([]), h = W(1), c = W(0), E = W(!1);
- let P = null;
- de(() => o.modelValue, ($) => {
- $ && (a.value = $);
- }, { immediate: !0 });
- const B = () => {
- r.value = !0;
- }, g = () => {
- r.value = !1, A();
- }, T = () => {
- E.value = !E.value, E.value ? R() : A();
- }, R = () => {
- v.value.forEach(($) => $.selected = !0), a.value = v.value.map(($) => $.name).join(",");
- }, A = () => {
- E.value = !1, v.value.forEach(($) => $.selected = !1), a.value = "";
- }, M = () => {
- r.value = !1, t("change:modelValue", v.value.filter(($) => $.selected));
- }, x = ($, C) => {
- u.value = C.node, h.value = 1, c.value = 0, v.value = [], l.value = !0, y($);
- }, y = ($) => Me(this, null, function* () {
- const C = {
- pageNum: h.value,
- pageSize: 20,
- searchValue: d.value,
- unitid: $.join(","),
- containsChild: !0
- };
- l.value = !0;
- const m = yield bt(C);
- v.value = v.value.concat(m.list), c.value = m.pages, P = setTimeout(() => {
- l.value = !1, clearTimeout(P);
- }, 200);
- }), i = ($) => {
- $.selected = !$.selected, a.value = v.value.filter((C) => C.selected).map((C) => C.name).join(",");
- }, _ = ({ target: { offsetHeight: $, scrollHeight: C, scrollTop: m } }) => {
- l.value || $ + m >= C - 20 && h.value <= c.value && (h.value++, y([u.value.id]));
- }, I = ($) => xt($), H = ($) => yt($);
- return ($, C) => {
- const m = it, z = Je, F = we("s-tree"), V = we("DownOutlined"), U = Ot, K = Tt, s = Ht, w = we("CloseCircleOutlined"), O = Mt, j = pt("removeAriaHidden");
- return vt((ie(), se("div", gn, [
- b(m, {
- value: a.value,
- "onUpdate:value": C[0] || (C[0] = (S) => a.value = S),
- readonly: "",
- placeholder: e.placeholder,
- onSearch: B
- }, null, 8, ["value", "placeholder"]),
- b(O, {
- wrapClassName: "s-user-select-modal",
- open: r.value,
- "onUpdate:open": C[4] || (C[4] = (S) => r.value = S),
- title: e.title,
- onOk: M,
- keyboard: !1,
- maskClosable: !1,
- width: "1000px"
- }, {
- footer: Q(() => [
- b(z, {
- key: "back",
- onClick: g
- }, {
- default: Q(() => [
- me("取消")
- ]),
- _: 1
- }),
- b(z, {
- key: "submit",
- type: "primary",
- loading: l.value,
- onClick: M
- }, {
- default: Q(() => [
- me("确认")
- ]),
- _: 1
- }, 8, ["loading"])
- ]),
- default: Q(() => [
- N("div", hn, [
- N("div", mn, [
- b(F, {
- levelOneChildren: I,
- levelTwoChildren: H,
- "onSelect:modelValue": x,
- select: f.value,
- "onUpdate:select": C[1] || (C[1] = (S) => f.value = S),
- height: 470
- }, null, 8, ["select"])
- ]),
- N("div", bn, [
- N("div", xn, [
- b(m, {
- value: d.value,
- "onUpdate:value": C[2] || (C[2] = (S) => d.value = S),
- placeholder: $.$l("请输入", "components.placeInput"),
- style: { width: "340px" },
- onSearch: B
- }, null, 8, ["value", "placeholder"])
- ]),
- N("div", yn, [
- N("div", $n, [
- N("div", Sn, [
- N("div", Cn, q(u.value.title || u.value.name), 1),
- N("div", wn, [
- b(z, {
- type: "link",
- onClick: T
- }, {
- default: Q(() => [
- me(q(E.value ? "反选" : "全选"), 1)
- ]),
- _: 1
- }),
- b(s, null, {
- overlay: Q(() => [
- b(K, null, {
- default: Q(() => [
- b(U, null, {
- default: Q(() => [
- _n
- ]),
- _: 1
- })
- ]),
- _: 1
- })
- ]),
- default: Q(() => [
- N("a", {
- class: "ant-dropdown-link",
- onClick: C[3] || (C[3] = gt(() => {
- }, ["prevent"]))
- }, [
- b(V)
- ])
- ]),
- _: 1
- })
- ])
- ]),
- N("div", {
- class: "user-list",
- onScroll: _
- }, [
- (ie(!0), se(ye, null, Fe(v.value, (S) => (ie(), se("div", {
- class: ht(["item", { select: !!S.selected }]),
- key: S.id,
- onClick: (ne) => i(S)
- }, [
- N("div", zn, q(S.name && S.name.slice(0, 1)), 1),
- N("div", Rn, [
- N("div", En, q(S.name) + " (" + q(S.nameOrCount) + ")", 1),
- N("div", An, q(S.deptName), 1)
- ])
- ], 10, In))), 128)),
- h.value >= c.value ? (ie(), se("div", Pn, "没有更多了")) : mt("", !0)
- ], 32)
- ]),
- N("div", Bn, [
- N("div", On, [
- Tn,
- b(z, {
- type: "link",
- onClick: A
- }, {
- default: Q(() => [
- me("清除")
- ]),
- _: 1
- })
- ]),
- N("div", {
- class: "user-list select-list",
- onScroll: _
- }, [
- (ie(!0), se(ye, null, Fe(v.value.filter((S) => S.selected), (S) => (ie(), se("div", {
- class: "item",
- key: S.id
- }, [
- N("div", Hn, q(S.name && S.name.slice(0, 1)), 1),
- N("div", Nn, [
- N("div", Mn, q(S.name) + " (" + q(S.nameOrCount) + ")", 1),
- N("div", Fn, q(S.deptName), 1)
- ]),
- N("div", {
- class: "icon no-bg",
- onClick: (ne) => i(S)
- }, [
- b(w)
- ], 8, Vn)
- ]))), 128))
- ], 32)
- ])
- ])
- ])
- ])
- ]),
- _: 1
- }, 8, ["open", "title"])
- ])), [
- [j]
- ]);
- };
- }
- };
- export {
- Yn as default
- };
|