| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322 |
- var Fe = (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 Be, Fragment as ye, nextTick as $e, onBeforeUpdate as ft, onBeforeUnmount as Ee, watchEffect as Oe, 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 Ve, 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 je, j as ve, k as _t, l as Ye, N as Ze, bf as We, 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 De } from "./FormItemContext.js";
- import { B as qe, g as Te, 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"
- }
- }), He = (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({}, He(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({}, He(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({}, He(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"
- }
- }
- }
- };
- }, Ne = $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 Me(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 (Me({
- 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
- }) && !Me({
- 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 Be(() => {
- 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: je(),
- onCompositionend: je(),
- 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(() => Te(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] = Ne(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"));
- }));
- };
- Be(() => {
- 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 = Me({
- 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(We, null, {
- default: () => [b(De, null, {
- default: () => [ge]
- })]
- }),
- addonBefore: le && b(We, null, {
- default: () => [b(De, 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] = Ne(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);
- };
- }
- }), Le = (e) => e != null && (Array.isArray(e) ? Ke(e).length : !0);
- function tn(e) {
- return Le(e.addonBefore) || Le(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`, Te(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();
- Oe(() => {
- 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 Ge(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(() => Te(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] = Ne(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 = Ge(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 = Ge(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
- }), Oe(() => {
- 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));
- };
- Oe(() => {
- 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 = ($) => Fe(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 Be(() => {
- console.log("选择用户组件 - 查看主题色:", window.$utils.env.VITE_APP_THEME.theme);
- }), ($, 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, Ve(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, Ve(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
- };
|