@flyto/farco 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/chunk-0b1102a0.js +95 -0
  2. package/dist/chunk-0d0f8483.js +6 -0
  3. package/dist/chunk-0ec0668f.js +42 -0
  4. package/dist/chunk-0f50b26a.js +153 -0
  5. package/dist/chunk-17a233d7.js +1 -0
  6. package/dist/chunk-18dd07f2.js +71 -0
  7. package/dist/chunk-28ba1e67.js +4525 -0
  8. package/dist/chunk-2d4cc9ab.js +287 -0
  9. package/dist/chunk-32aa5901.js +1 -0
  10. package/dist/chunk-3659754f.js +103 -0
  11. package/dist/chunk-3e27c862.js +38 -0
  12. package/dist/chunk-3e3782aa.js +1 -0
  13. package/dist/chunk-451afd44.js +58 -0
  14. package/dist/chunk-45dbb8f9.js +1 -0
  15. package/dist/chunk-540a3872.js +1 -0
  16. package/dist/chunk-5672685f.js +2 -0
  17. package/dist/chunk-592857c5.js +1 -0
  18. package/dist/chunk-5f89350b.js +2 -0
  19. package/dist/chunk-6c665483.js +4 -0
  20. package/dist/chunk-7779a34c.js +169 -0
  21. package/dist/chunk-7e78427e.js +1 -0
  22. package/dist/chunk-7f0e9b41.js +1 -0
  23. package/dist/chunk-82468a2e.js +1 -0
  24. package/dist/chunk-867494bd.js +99 -0
  25. package/dist/chunk-8a4bafe4.js +135 -0
  26. package/dist/chunk-912642ce.js +36 -0
  27. package/dist/chunk-995c23b4.js +85 -0
  28. package/dist/chunk-a016ffab.js +1 -0
  29. package/dist/chunk-a1e9227b.js +1 -0
  30. package/dist/chunk-a67d2308.js +1 -0
  31. package/dist/chunk-abb01801.js +955 -0
  32. package/dist/chunk-b2838051.js +42 -0
  33. package/dist/chunk-c4c93c86.js +1 -0
  34. package/dist/chunk-c9e8fc0f.js +5 -0
  35. package/dist/chunk-db179b28.js +82 -0
  36. package/dist/chunk-dc6689c4.js +34 -0
  37. package/dist/chunk-e7fc446a.js +29 -0
  38. package/dist/chunk-ed8bf4fb.js +12607 -0
  39. package/dist/chunk-f363e104.js +1 -0
  40. package/dist/chunk-fe45f9f8.js +1 -0
  41. package/dist/fbutton.cjs.js +1 -0
  42. package/dist/fbutton.es.js +9 -0
  43. package/dist/fcheckbox.cjs.js +1 -0
  44. package/dist/fcheckbox.es.js +8 -0
  45. package/dist/fdate.cjs.js +1 -0
  46. package/dist/fdate.es.js +8 -0
  47. package/dist/fform-item.cjs.js +1 -0
  48. package/dist/fform-item.es.js +26 -0
  49. package/dist/fform.cjs.js +1 -0
  50. package/dist/fform.es.js +24 -0
  51. package/dist/ficon.cjs.js +1 -0
  52. package/dist/ficon.es.js +9 -0
  53. package/dist/finput.cjs.js +1 -0
  54. package/dist/finput.es.js +9 -0
  55. package/dist/flink.cjs.js +1 -0
  56. package/dist/flink.es.js +9 -0
  57. package/dist/fml-input.cjs.js +1 -0
  58. package/dist/fml-input.es.js +11 -0
  59. package/dist/fpop-choice.cjs.js +1 -0
  60. package/dist/fpop-choice.es.js +26 -0
  61. package/dist/fquery-list.cjs.js +1 -0
  62. package/dist/fquery-list.es.js +24 -0
  63. package/dist/fradio.cjs.js +1 -0
  64. package/dist/fradio.es.js +8 -0
  65. package/dist/frange.cjs.js +1 -0
  66. package/dist/frange.es.js +10 -0
  67. package/dist/fsearch.cjs.js +1 -0
  68. package/dist/fsearch.es.js +24 -0
  69. package/dist/fselect.cjs.js +1 -0
  70. package/dist/fselect.es.js +12 -0
  71. package/dist/fskeleton.cjs.js +1 -0
  72. package/dist/fskeleton.es.js +8 -0
  73. package/dist/fswitch.cjs.js +1 -0
  74. package/dist/fswitch.es.js +8 -0
  75. package/dist/ftable.cjs.js +1 -0
  76. package/dist/ftable.es.js +13 -0
  77. package/dist/ftext.cjs.js +1 -0
  78. package/dist/ftext.es.js +12 -0
  79. package/dist/ftextarea.cjs.js +1 -0
  80. package/dist/ftextarea.es.js +9 -0
  81. package/dist/index.cjs.js +1 -0
  82. package/dist/index.es.js +175 -19505
  83. package/dist/index.umd.js +25 -25
  84. package/dist/keys.cjs.js +1 -0
  85. package/dist/keys.es.js +9 -0
  86. package/dist/style.css +1 -1
  87. package/dist/types/components/fbutton/fbutton.d.ts +35 -35
  88. package/dist/types/components/fbutton/fbutton.vue.d.ts +35 -33
  89. package/dist/types/components/fbutton/index.d.ts +4 -4
  90. package/dist/types/components/fcheckbox/constants/index.d.ts +10 -10
  91. package/dist/types/components/fcheckbox/fcheckbox.d.ts +41 -41
  92. package/dist/types/components/fcheckbox/fcheckbox.vue.d.ts +168 -166
  93. package/dist/types/components/fcheckbox/index.d.ts +4 -4
  94. package/dist/types/components/fdate/fdate.d.ts +67 -67
  95. package/dist/types/components/fdate/fdate.vue.d.ts +47 -45
  96. package/dist/types/components/fdate/index.d.ts +4 -4
  97. package/dist/types/components/fform/fform.d.ts +83 -83
  98. package/dist/types/components/fform/fform.vue.d.ts +124 -122
  99. package/dist/types/components/fform/index.d.ts +4 -4
  100. package/dist/types/components/fform-item/fform-item.d.ts +91 -91
  101. package/dist/types/components/fform-item/fform-item.vue.d.ts +121 -117
  102. package/dist/types/components/fform-item/index.d.ts +4 -4
  103. package/dist/types/components/ficon/ficon.d.ts +44 -44
  104. package/dist/types/components/ficon/ficon.vue.d.ts +63 -59
  105. package/dist/types/components/ficon/index.d.ts +4 -4
  106. package/dist/types/components/finput/finput.d.ts +54 -54
  107. package/dist/types/components/finput/finput.vue.d.ts +87 -83
  108. package/dist/types/components/finput/index.d.ts +4 -4
  109. package/dist/types/components/flink/flink.d.ts +26 -26
  110. package/dist/types/components/flink/flink.vue.d.ts +42 -40
  111. package/dist/types/components/flink/index.d.ts +4 -4
  112. package/dist/types/components/fml-input/fml-input.d.ts +74 -74
  113. package/dist/types/components/fml-input/fml-input.vue.d.ts +601 -622
  114. package/dist/types/components/fml-input/index.d.ts +4 -4
  115. package/dist/types/components/fpop-choice/fpop-choice.d.ts +52 -52
  116. package/dist/types/components/fpop-choice/fpop-choice.vue.d.ts +884 -891
  117. package/dist/types/components/fpop-choice/index.d.ts +5 -5
  118. package/dist/types/components/fpop-choice/utils/index.d.ts +16 -16
  119. package/dist/types/components/fquery-list/fquery-list.d.ts +133 -133
  120. package/dist/types/components/fquery-list/fquery-list.vue.d.ts +467 -1352
  121. package/dist/types/components/fquery-list/index.d.ts +4 -4
  122. package/dist/types/components/fradio/constants/index.d.ts +8 -8
  123. package/dist/types/components/fradio/fradio.d.ts +48 -48
  124. package/dist/types/components/fradio/fradio.vue.d.ts +176 -174
  125. package/dist/types/components/fradio/index.d.ts +4 -4
  126. package/dist/types/components/frange/frange.d.ts +47 -47
  127. package/dist/types/components/frange/frange.vue.d.ts +92 -90
  128. package/dist/types/components/frange/index.d.ts +4 -4
  129. package/dist/types/components/fsearch/fsearch.d.ts +75 -75
  130. package/dist/types/components/fsearch/fsearch.vue.d.ts +103 -103
  131. package/dist/types/components/fsearch/index.d.ts +4 -4
  132. package/dist/types/components/fselect/constants/index.d.ts +6 -6
  133. package/dist/types/components/fselect/fselect-option.vue.d.ts +25 -25
  134. package/dist/types/components/fselect/fselect.d.ts +120 -120
  135. package/dist/types/components/fselect/fselect.vue.d.ts +184 -182
  136. package/dist/types/components/fselect/index.d.ts +4 -4
  137. package/dist/types/components/fskeleton/fskeleton.d.ts +18 -18
  138. package/dist/types/components/fskeleton/fskeleton.vue.d.ts +17 -15
  139. package/dist/types/components/fskeleton/index.d.ts +4 -4
  140. package/dist/types/components/fswitch/fswitch.d.ts +8 -8
  141. package/dist/types/components/fswitch/fswitch.vue.d.ts +365 -365
  142. package/dist/types/components/fswitch/index.d.ts +4 -4
  143. package/dist/types/components/ftable/constants/index.d.ts +14 -14
  144. package/dist/types/components/ftable/ftable-cols-set.vue.d.ts +6 -6
  145. package/dist/types/components/ftable/ftable-toolbar.vue.d.ts +57 -54
  146. package/dist/types/components/ftable/ftable.d.ts +332 -332
  147. package/dist/types/components/ftable/ftable.vue.d.ts +139 -333
  148. package/dist/types/components/ftable/index.d.ts +4 -4
  149. package/dist/types/components/ftable/utils/index.d.ts +13 -13
  150. package/dist/types/components/ftext/ftext.d.ts +97 -96
  151. package/dist/types/components/ftext/ftext.vue.d.ts +88 -86
  152. package/dist/types/components/ftext/index.d.ts +4 -4
  153. package/dist/types/components/ftextarea/ftextarea.d.ts +32 -32
  154. package/dist/types/components/ftextarea/ftextarea.vue.d.ts +569 -575
  155. package/dist/types/components/ftextarea/index.d.ts +4 -4
  156. package/dist/types/components/index.d.ts +40 -40
  157. package/dist/types/constants/fform.d.ts +8 -8
  158. package/dist/types/constants/global.d.ts +9 -24
  159. package/dist/types/constants/keys.d.ts +14 -0
  160. package/dist/types/env.d.ts +4 -0
  161. package/dist/types/index.d.ts +14 -15
  162. package/dist/types/types/global.d.ts +44 -44
  163. package/dist/types/types/index.d.ts +1 -1
  164. package/dist/types/utils/business-format.d.ts +136 -136
  165. package/dist/types/utils/index.d.ts +4 -4
  166. package/package.json +24 -4
@@ -0,0 +1,169 @@
1
+ import { defineComponent as P, mergeModels as D, inject as H, ref as y, computed as k, onMounted as M, useModel as j, watch as B, openBlock as l, createBlock as _, unref as r, withCtx as x, createElementVNode as E, mergeProps as F, createCommentVNode as g, normalizeClass as R, normalizeStyle as I, createVNode as b, resolveDynamicComponent as S, createElementBlock as c, toDisplayString as T, renderSlot as z } from "vue";
2
+ import { TypographyText as A, Tooltip as L } from "@arco-design/web-vue";
3
+ import { s as N } from "./chunk-0ec0668f.js";
4
+ import { a as U } from "./chunk-c9e8fc0f.js";
5
+ import { _ as V } from "./chunk-451afd44.js";
6
+ const W = "\u6682\u65E0", $ = {
7
+ ignoreEllips: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ ellipsType: {
12
+ type: String,
13
+ default: "normal"
14
+ },
15
+ ellipsConfig: {
16
+ type: Object,
17
+ default: () => ({})
18
+ },
19
+ placeholder: {
20
+ type: String,
21
+ default: W
22
+ },
23
+ preIcon: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ preIconProps: {
28
+ type: Object,
29
+ default: () => ({})
30
+ },
31
+ render: {
32
+ type: Function,
33
+ default: null
34
+ }
35
+ }, K = {
36
+ class: "f-text",
37
+ style: { display: "flex", "align-items": "center" }
38
+ }, Y = { key: 1 }, q = { key: 1 }, G = { key: 0 }, J = { key: 1 }, Q = /* @__PURE__ */ P({
39
+ __name: "ftext",
40
+ props: /* @__PURE__ */ D($, {
41
+ modelValue: {},
42
+ modelModifiers: {}
43
+ }),
44
+ emits: ["update:modelValue"],
45
+ setup(i) {
46
+ const p = H(U, null), t = i, a = y(), s = {
47
+ rows: 1,
48
+ type: "normal",
49
+ moreText: "\u66F4\u591A",
50
+ lessText: "\u6536\u8D77",
51
+ moreIcon: "IconSearch"
52
+ }, n = k(() => {
53
+ const e = {
54
+ rows: t.ellipsConfig.rows || s.rows,
55
+ type: t.ellipsConfig.type || s.type
56
+ };
57
+ return e.type === "drawer" && t.ellipsConfig.type === "drawer" && (e.moreText = t.ellipsConfig.moreText || s.moreText, e.lessText = t.ellipsConfig.lessText || s.lessText), e.type === "popup" && t.ellipsConfig.type === "popup" && (e.moreIcon = t.ellipsConfig.moreIcon || s.moreIcon), e;
58
+ }), C = y(!1), d = y(!0);
59
+ function O() {
60
+ const e = n.value.type;
61
+ e === "drawer" ? d.value = !d.value : e === "popup" && N({
62
+ content: String(f.value) || "",
63
+ hideTitle: !0,
64
+ width: "50%",
65
+ closable: !0,
66
+ footer: !1
67
+ });
68
+ }
69
+ const u = y(!1);
70
+ function h() {
71
+ const e = a.value;
72
+ !e || (u.value = e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth);
73
+ }
74
+ M(() => {
75
+ if (!t.ignoreEllips) {
76
+ const e = new ResizeObserver(h);
77
+ a.value && e.observe(a.value);
78
+ }
79
+ });
80
+ const f = j(i, "modelValue");
81
+ B(f, () => {
82
+ h();
83
+ });
84
+ const m = k({
85
+ get: () => String(f.value || ""),
86
+ set(e) {
87
+ f.value = e;
88
+ }
89
+ });
90
+ return (e, v) => (l(), _(r(A), {
91
+ "edit-text": m.value,
92
+ "onUpdate:editText": v[1] || (v[1] = (o) => m.value = o)
93
+ }, {
94
+ default: x(() => [
95
+ E("div", K, [
96
+ e.preIcon ? (l(), _(r(V), F({
97
+ key: 0,
98
+ class: "f-text__pre-icon",
99
+ name: e.preIcon
100
+ }, e.preIconProps), null, 16, ["name"])) : g("", !0),
101
+ E("div", {
102
+ ref_key: "contentRef",
103
+ ref: a,
104
+ class: R(["f-text__content", !e.ignoreEllips && d.value && "ellips"]),
105
+ style: I({
106
+ "-webkit-line-clamp": n.value.rows
107
+ })
108
+ }, [
109
+ b(r(L), {
110
+ "popup-visible": C.value,
111
+ "onUpdate:popupVisible": v[0] || (v[0] = (o) => C.value = u.value && o)
112
+ }, {
113
+ content: x(() => {
114
+ var o;
115
+ return [
116
+ t.render ? (l(), _(S(t.render), {
117
+ key: 0,
118
+ data: ((o = r(p)) == null ? void 0 : o.data) || {}
119
+ }, null, 8, ["data"])) : (l(), c("div", Y, T(m.value), 1))
120
+ ];
121
+ }),
122
+ default: x(() => {
123
+ var o;
124
+ return [
125
+ z(e.$slots, "default", {
126
+ data: (o = r(p)) == null ? void 0 : o.data
127
+ }, () => {
128
+ var w;
129
+ return [
130
+ t.render ? (l(), _(S(t.render), {
131
+ key: 0,
132
+ data: ((w = r(p)) == null ? void 0 : w.data) || {}
133
+ }, null, 8, ["data"])) : (l(), c("div", q, T(m.value || e.placeholder), 1))
134
+ ];
135
+ }, !0)
136
+ ];
137
+ }),
138
+ _: 3
139
+ }, 8, ["popup-visible"]),
140
+ ["drawer", "popup"].includes(n.value.type) && (u.value || !d.value) ? (l(), c("div", {
141
+ key: 0,
142
+ class: "content-more",
143
+ style: I({ bottom: u.value ? "0" : "-20px" }),
144
+ onClick: O
145
+ }, [
146
+ n.value.type === "drawer" ? (l(), c("div", G, T(u.value ? n.value.moreText : n.value.lessText), 1)) : g("", !0),
147
+ n.value.type === "popup" ? (l(), c("div", J, [
148
+ b(r(V), {
149
+ name: n.value.moreIcon
150
+ }, null, 8, ["name"])
151
+ ])) : g("", !0)
152
+ ], 4)) : g("", !0)
153
+ ], 6)
154
+ ])
155
+ ]),
156
+ _: 3
157
+ }, 8, ["edit-text"]));
158
+ }
159
+ });
160
+ const X = (i, p) => {
161
+ const t = i.__vccOpts || i;
162
+ for (const [a, s] of p)
163
+ t[a] = s;
164
+ return t;
165
+ }, ne = /* @__PURE__ */ X(Q, [["__scopeId", "data-v-cc19d558"]]);
166
+ export {
167
+ ne as F,
168
+ $ as f
169
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),r=require("@arco-design/web-vue"),d={defaultValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date"},range:{type:Boolean,default:!1}},g=e.defineComponent({__name:"fdate",props:e.mergeModels(d,{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:p}){const t=n,o=e.useModel(n,"modelValue");t.defaultValue&&(o.value=t.defaultValue);const l=e.ref(),m={time:r.DatePicker,date:r.DatePicker,month:r.MonthPicker,week:r.WeekPicker,quarter:r.QuarterPicker,year:r.YearPicker},c=e.computed(()=>t.range?r.RangePicker:m[t.type]),f=e.computed(()=>{let a={type:"date",range:!1};return t.type==="time"&&(a.showTime=!0),t.range&&(a={range:!0,mode:t.type==="time"?"date":t.type,showTime:t.type==="time",exchangeTime:!1}),{...a,type:void 0,range:void 0}});return p({value:o,ins:l}),(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),e.mergeProps({ref_key:"dateRef",ref:l},f.value,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=u=>o.value=u),class:"f-date"}),e.createSlots({_:2},[e.renderList(a.$slots,(u,i)=>({name:i,fn:e.withCtx(y=>[e.renderSlot(a.$slots,i,e.normalizeProps(e.guardReactiveProps(y)))])}))]),1040,["modelValue"]))}});exports._sfc_main=g;exports.fDateProps=d;
@@ -0,0 +1 @@
1
+ "use strict";const l=require("vue"),c=require("@arco-design/web-vue"),g=require("./chunk-32aa5901.js"),d={defaultValue:{type:String,default:null},placeholder:{type:String,default:""},allowClear:{type:Boolean,default:!0},type:{type:String,default:"text"},autocomplete:{type:Boolean,default:!1},includeMimus:{type:Boolean,default:!1}},w=l.defineComponent({__name:"finput",props:l.mergeModels(d,{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(p,{expose:s}){const t=p,o=l.ref(),u=l.useModel(p,"modelValue"),f=l.computed(()=>{var e;return String((e=u.value)!=null?e:"")});function i(e){["password","text"].includes(t.type)&&(u.value=e),t.type==="number"&&(u.value=e.replace(/(?!^)-|[^\d-]/g,"")),t.type==="decimal"&&(t.includeMimus?u.value=e.replaceAll("\u3002",".").replace(/[^-\d.]/g,"").replace(/^(-?\d+(\.\d*)?).*$/,"$1"):u.value=e.replaceAll("\u3002",".").replace(/^(\d+(\.\d*)?)?.*$/,"$1"))}t.defaultValue&&(u.value=t.defaultValue),typeof u.value=="number"&&String(u.value)==="NaN"&&(u.value="");const r=l.inject(g.fformItemCtxInjectKey,null),m=l.computed(()=>t.placeholder||`\u8BF7\u586B\u5199${((r==null?void 0:r.label)||"\u2026\u2026").replace(/[: | :]$/,"")}`),v=l.computed(()=>t.type==="password"?c.InputPassword:c.Input);return s({value:u,focus(...e){var a;(a=o.value)==null||a.focus(...e)},blur(...e){var a;(a=o.value)==null||a.blur(...e)},ins:o}),(e,a)=>(l.openBlock(),l.createBlock(l.unref(v),{ref_key:"inputRef",ref:o,"model-value":f.value,placeholder:m.value,"allow-clear":e.allowClear,autocomplete:e.autocomplete?"on":"off","onUpdate:modelValue":i},l.createSlots({_:2},[l.renderList(Object.keys(e.$slots),n=>({name:n,fn:l.withCtx(y=>[l.renderSlot(e.$slots,n,l.mergeProps({key:n},y))])}))]),1032,["model-value","placeholder","allow-clear","autocomplete"]))}});exports._sfc_main=w;exports.fInputProps=d;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),h=require("@arco-design/web-vue"),S=require("./chunk-e7fc446a.js"),j=require("./chunk-32aa5901.js"),q={label:"label",value:"value"},_={defaultValue:{type:[String,Number,Boolean,Object,Array],default:null},options:{type:[Array,Function],default:null},optionKeyNames:{type:Object,default:()=>q},defaultHide:{type:Boolean,default:!1},placeholder:{type:String,default:"-- \u8BF7\u9009\u62E9 --"},allowClear:{type:Boolean,default:!0},allowSearch:{type:Boolean,default:!0},maxTagCount:{type:Number,default:1},emptyText:{type:String,default:"\u6682\u65E0\u6570\u636E"},onSearch:{type:Function,default:null},multiple:{type:Boolean,default:!1},autoSelectSingle:{type:Boolean,default:!1},autoSelectFirst:{type:Boolean,default:!1},onFocus:{type:Function,default:null},onBlur:{type:Function,default:null}},F=e.defineComponent({props:{options:{required:!0,type:Array,default:()=>[]},optionKeyNames:{required:!0,type:Object}},setup(r,{slots:s}){return()=>{var v;return(v=r.options)==null?void 0:v.map(n=>n.isGroup?e.createVNode(h.Optgroup,{label:n[r.optionKeyNames.groupLabel||r.optionKeyNames.label]},{default:()=>[e.createVNode(F,{options:n.options,optionKeyNames:r.optionKeyNames},null)]}):e.createVNode(h.Option,e.mergeProps(n,{label:n[r.optionKeyNames.label],value:n[r.optionKeyNames.value]}),{default:()=>{var l;return[(l=s==null?void 0:s.default)==null?void 0:l.call(s,{data:n})]}}))}}}),M={class:"f-select"},P={class:"f-select__preend"},$={class:"f-select-tool"},L={key:0,class:"f-select-multiple-tool"},U={class:"f-select__append"},D=e.defineComponent({inheritAttrs:!1,__name:"fselect",props:e.mergeModels(_,{modelValue:{type:[String,Number,Boolean,Object,Array]},modelModifiers:{}}),emits:e.mergeModels(["popupVisibleChange"],["update:modelValue"]),setup(r,{expose:s,emit:v}){const n=e.inject(j.fformCtxInjectKey,{data:{}}),l=r,A=v,p=e.useAttrs(),B=e.useSlots(),k=e.computed(()=>Object.fromEntries(Object.entries(B).filter(([t])=>!["option","prepend","append"].includes(t)))),d=e.ref(),u=e.useModel(r,"modelValue");l.defaultValue&&(u.value=l.defaultValue);const N=typeof l.options=="function",i=N?e.ref([]):e.toRef(l,"options"),f=e.ref([]),g=e.computed(()=>{const t=i.value.map(a=>a[l.optionKeyNames.value]),o=[...i.value];return f.value.forEach(a=>{const c=a[l.optionKeyNames.value];t.includes(c)||o.unshift(a)}),o});function b(){if(u.value!==0&&!u.value&&(l.autoSelectFirst||l.autoSelectSingle&&i.value.length===1)){const t=i.value[0][l.optionKeyNames.value];u.value=l.multiple?[t]:t,e.nextTick(()=>{var o;(o=p==null?void 0:p.onChange)==null||o.call(p,u.value)})}}const m=e.ref(!1);async function C(t){if(!N){i.value=[];return}try{m.value=!0,i.value=await l.options(t||{})}catch{i.value=[]}finally{m.value=!1,b()}}async function E(t){m.value=!0,l.onSearch&&await l.onSearch(t),m.value=!1}let V=!0;function K(t){var o;!V||(t.relatedTarget&&l.multiple&&!!l.onSearch?(f.value=[...g.value],e.nextTick(()=>{var a;(a=d.value)==null||a.$el.nextElementSibling.querySelector("input").focus()})):(f.value=g.value.filter(a=>(l.multiple?u.value:[u.value]).includes(a[l.optionKeyNames.value])),(o=l.onBlur)==null||o.call(l,t)))}const y=e.ref("");function O(){var o;if(!l.multiple||u.value&&!S.l(u.value)){console.warn("\u5F53\u524D\u672A\u5F00\u542F\u591A\u9009\u6A21\u5F0F");return}V=!1,setTimeout(()=>{V=!0},100);const t=i.value.reduce((a,c)=>(c[l.optionKeyNames.label].toUpperCase().includes(y.value.toUpperCase())&&a.push(c[l.optionKeyNames.value]),a),[]);(o=d.value)==null||o.$el.nextElementSibling.querySelector("input").blur(),y.value="",u.value=[...new Set([...u.value||[],...t])],e.nextTick(()=>{var a;(a=d.value)==null||a.$el.nextElementSibling.querySelector("input").focus()})}function x(){if(!l.multiple||!S.l(u.value)){console.warn("\u5F53\u524D\u672A\u5F00\u542F\u591A\u9009\u6A21\u5F0F");return}u.value=[]}function T(t){if(t){const o=l.multiple?u.value:[u.value];f.value=f.value.filter(a=>o.includes(a[l.optionKeyNames.value]))}A("popupVisibleChange",t)}return N?C():b(),s({value:u,replayMethodOptions(t){C(t)},ins:d}),(t,o)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",P,[e.renderSlot(t.$slots,"prepend",{data:e.unref(n).data})]),e.createVNode(e.unref(h.Select),e.mergeProps({ref_key:"selectRef",ref:d,modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=a=>u.value=a),"input-value":y.value,"onUpdate:inputValue":o[1]||(o[1]=a=>y.value=a)},t.$attrs,{placeholder:t.placeholder,"allow-clear":t.allowClear,"allow-search":t.allowSearch,loading:m.value,"max-tag-count":t.maxTagCount,multiple:t.multiple,onSearch:E,onBlur:K,onPopupVisibleChange:T}),e.createSlots({empty:e.withCtx(()=>[e.createVNode(e.unref(h.Empty),{description:l.emptyText},null,8,["description"])]),default:e.withCtx(()=>[e.createElementVNode("div",$,[l.multiple?(e.openBlock(),e.createElementBlock("div",L,[e.createVNode(e.unref(S._sfc_main),{size:"mini",onClick:O},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode("\u5168\u9009",-1)])]),_:1}),e.createVNode(e.unref(S._sfc_main),{size:"mini",status:"danger",onClick:x},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" \u6E05\u7A7A ",-1)])]),_:1})])):e.createCommentVNode("",!0)]),e.createVNode(F,{options:g.value,"option-key-names":t.optionKeyNames},e.createSlots({_:2},[t.$slots.option?{name:"default",fn:e.withCtx(({data:a})=>[e.renderSlot(t.$slots,"option",{data:a})]),key:"0"}:void 0]),1032,["options","option-key-names"])]),_:2},[e.renderList(k.value,(a,c)=>({name:c,fn:e.withCtx(w=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a),e.normalizeProps(e.guardReactiveProps(w)),null,16))])}))]),1040,["modelValue","input-value","placeholder","allow-clear","allow-search","loading","max-tag-count","multiple"]),e.createElementVNode("div",U,[e.renderSlot(t.$slots,"append",{data:e.unref(n).data})])]))}});exports._sfc_main=D;exports.fSelectProps=_;
@@ -0,0 +1,99 @@
1
+ import { defineComponent as M, mergeModels as g, ref as r, useModel as C, toRef as O, openBlock as s, createBlock as h, unref as d, withCtx as c, createElementBlock as v, Fragment as N, renderList as x, createSlots as A, renderSlot as n, createTextVNode as $, toDisplayString as V, createCommentVNode as E } from "vue";
2
+ import { CheckboxGroup as F, Checkbox as S } from "@arco-design/web-vue";
3
+ const B = {
4
+ label: "label",
5
+ value: "value"
6
+ }, G = {
7
+ defaultValue: {
8
+ type: Array,
9
+ default: null
10
+ },
11
+ options: {
12
+ required: !0,
13
+ type: [Array, Function],
14
+ default: null
15
+ },
16
+ optionKeyNames: {
17
+ type: Object,
18
+ default: () => B
19
+ }
20
+ }, T = /* @__PURE__ */ M({
21
+ __name: "fcheckbox",
22
+ props: /* @__PURE__ */ g(G, {
23
+ modelValue: {},
24
+ modelModifiers: {}
25
+ }),
26
+ emits: ["update:modelValue"],
27
+ setup(p, {
28
+ expose: K
29
+ }) {
30
+ const l = p, f = r(), a = C(p, "modelValue");
31
+ l.defaultValue && (a.value = l.defaultValue);
32
+ const i = typeof l.options == "function", t = i ? r([]) : O(l, "options"), k = r(!1);
33
+ async function y(o) {
34
+ if (!i) {
35
+ t.value = [];
36
+ return;
37
+ }
38
+ try {
39
+ k.value = !0, t.value = await l.options(o || {});
40
+ } catch {
41
+ t.value = [];
42
+ } finally {
43
+ k.value = !1;
44
+ }
45
+ }
46
+ return l.options || y(), K({
47
+ value: a,
48
+ replayMethodOptions(o) {
49
+ y(o);
50
+ },
51
+ ins: f
52
+ }), (o, u) => (s(), h(d(F), {
53
+ ref_key: "checkboxGroupRef",
54
+ ref: f,
55
+ modelValue: a.value,
56
+ "onUpdate:modelValue": u[0] || (u[0] = (e) => a.value = e)
57
+ }, {
58
+ default: c(() => [(s(!0), v(N, null, x(d(t), (e) => (s(), h(d(S), {
59
+ key: e[o.optionKeyNames.value],
60
+ value: e[o.optionKeyNames.value],
61
+ disabled: e.disabled
62
+ }, A({
63
+ default: c(() => [!o.$slots.checkbox && !o.$slots[`checkbox-${e.slotName}`] ? (s(), v(N, {
64
+ key: 0
65
+ }, [e.slotName ? n(o.$slots, `label-${e.slotName}`, {
66
+ key: 0,
67
+ data: e,
68
+ checked: e[o.optionKeyNames.value] === a.value
69
+ }, () => [$(V(e[o.optionKeyNames.label]), 1)]) : n(o.$slots, "label", {
70
+ key: 1,
71
+ data: e
72
+ }, () => [$(V(e[o.optionKeyNames.label]), 1)])], 64)) : E("", !0)]),
73
+ _: 2
74
+ }, [o.$slots.checkbox || o.$slots[`checkbox-${e.slotName}`] ? {
75
+ name: "checkbox",
76
+ fn: c(({
77
+ checked: b,
78
+ disabled: m
79
+ }) => [e.slotName ? n(o.$slots, `checkbox-${e.slotName}`, {
80
+ key: 0,
81
+ data: e,
82
+ checked: b,
83
+ disabled: m
84
+ }) : n(o.$slots, "checkbox", {
85
+ key: 1,
86
+ data: e,
87
+ checked: b,
88
+ disabled: m
89
+ })]),
90
+ key: "0"
91
+ } : void 0]), 1032, ["value", "disabled"]))), 128))]),
92
+ _: 3
93
+ }, 8, ["modelValue"]));
94
+ }
95
+ });
96
+ export {
97
+ T as _,
98
+ G as f
99
+ };
@@ -0,0 +1,135 @@
1
+ import { defineComponent as j, mergeModels as h, inject as z, useModel as A, ref as d, computed as E, openBlock as w, createElementBlock as R, normalizeClass as T, createElementVNode as v, renderSlot as $, createTextVNode as D, toDisplayString as K, createVNode as P, unref as q, createCommentVNode as G, nextTick as I } from "vue";
2
+ import { _ as J } from "./chunk-451afd44.js";
3
+ const L = Symbol(
4
+ "ArcoFormItemContext"
5
+ ), O = {
6
+ defaultValue: {
7
+ type: Array,
8
+ default: null
9
+ },
10
+ type: {
11
+ type: String,
12
+ default: "number"
13
+ },
14
+ placeholder: {
15
+ type: [String, Array],
16
+ default: () => ["\u5F00\u59CB", "\u7ED3\u675F"]
17
+ },
18
+ separator: {
19
+ type: String,
20
+ default: "-"
21
+ },
22
+ allowClear: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ disabled: {
27
+ type: Boolean,
28
+ default: !1
29
+ }
30
+ }, Q = ["value", "type", "placeholder", "disabled"], U = { class: "f-range-separator" }, W = ["value", "placeholder", "disabled", "type"], Z = /* @__PURE__ */ j({
31
+ __name: "frange",
32
+ props: /* @__PURE__ */ h(O, {
33
+ modelValue: {
34
+ default: () => []
35
+ },
36
+ modelModifiers: {}
37
+ }),
38
+ emits: /* @__PURE__ */ h(["focus", "blur"], ["update:modelValue"]),
39
+ setup(b, { expose: C, emit: H }) {
40
+ const n = z(L, null), g = H, o = b, u = A(b, "modelValue");
41
+ o.defaultValue && (u.value = o.defaultValue);
42
+ const s = d(), p = d(), r = d(!1);
43
+ function y(a, e) {
44
+ var l, t;
45
+ r.value = !0, g("focus", a, e), n != null && n.error && ((t = (l = n == null ? void 0 : n.eventHandlers) == null ? void 0 : l.onChange) == null || t.call(l));
46
+ }
47
+ function m(a, e) {
48
+ var l, t;
49
+ r.value = !1, g("blur", a, e), n != null && n.error && ((t = (l = n == null ? void 0 : n.eventHandlers) == null ? void 0 : l.onChange) == null || t.call(l, a));
50
+ }
51
+ const f = d(!1);
52
+ function M() {
53
+ var a, e;
54
+ if (!o.allowClear && u.value.length === 0) {
55
+ f.value = !1;
56
+ return;
57
+ }
58
+ f.value = Boolean(((a = u.value) == null ? void 0 : a[0]) || ((e = u.value) == null ? void 0 : e[1]));
59
+ }
60
+ function N() {
61
+ var a, e, l;
62
+ u.value = [], f.value = !1, (a = s.value) == null || a.focus(), r.value = !0, (l = (e = n == null ? void 0 : n.eventHandlers) == null ? void 0 : e.onChange) == null || l.call(e);
63
+ }
64
+ const V = E(
65
+ () => ["number", "decimal"].includes(o.type) ? "text" : o.type
66
+ );
67
+ function B(a, e) {
68
+ const l = a.target.value;
69
+ let t = /^$/, c = "";
70
+ o.type === "number" && (t = /[^\d]/g, c = ""), o.type === "decimal" && (t = /[^\d.]/g, c = "");
71
+ const k = [...u.value];
72
+ k[e] = l.replace(t, c), u.value = k, I(() => {
73
+ var i, S;
74
+ u.value[0] || u.value[1] || (u.value = [], (S = (i = n == null ? void 0 : n.eventHandlers) == null ? void 0 : i.onChange) == null || S.call(i)), M();
75
+ });
76
+ }
77
+ return C({
78
+ value: u,
79
+ focus(a = "start") {
80
+ var e, l;
81
+ a === "start" && ((e = s.value) == null || e.focus()), a === "end" && ((l = p.value) == null || l.focus());
82
+ },
83
+ blur(a = "start") {
84
+ var e, l;
85
+ a === "start" && ((e = s.value) == null || e.blur()), a === "end" && ((l = p.value) == null || l.blur());
86
+ }
87
+ }), (a, e) => (w(), R("div", {
88
+ class: T(["f-range__wrap arco-input-wrapper", {
89
+ "arco-input-focus": r.value,
90
+ "arco-input-disabled": a.disabled
91
+ }])
92
+ }, [
93
+ v("input", {
94
+ ref_key: "startInputRef",
95
+ ref: s,
96
+ value: u.value[0],
97
+ class: "f-range-start arco-input arco-input-size-medium",
98
+ type: V.value,
99
+ placeholder: a.placeholder[0],
100
+ disabled: a.disabled,
101
+ onFocus: e[0] || (e[0] = (l) => y(l, "start")),
102
+ onBlur: e[1] || (e[1] = (l) => m(l, "start")),
103
+ onInput: e[2] || (e[2] = (l) => B(l, 0))
104
+ }, null, 40, Q),
105
+ v("span", U, [
106
+ $(a.$slots, "separator", {}, () => [
107
+ D(K(a.separator), 1)
108
+ ])
109
+ ]),
110
+ v("input", {
111
+ ref_key: "endInputRef",
112
+ ref: p,
113
+ value: u.value[1],
114
+ class: "f-range-end arco-input arco-input-size-medium",
115
+ placeholder: a.placeholder[1],
116
+ disabled: a.disabled,
117
+ type: V.value,
118
+ onFocus: e[3] || (e[3] = (l) => y(l, "end")),
119
+ onBlur: e[4] || (e[4] = (l) => m(l, "end")),
120
+ onInput: e[5] || (e[5] = (l) => B(l, 1))
121
+ }, null, 40, W),
122
+ a.disabled ? G("", !0) : (w(), R("span", {
123
+ key: 0,
124
+ class: "f-range-clear arco-input-clear-btn arco-icon-hover arco-input-icon-hover",
125
+ onClick: N
126
+ }, [
127
+ P(q(J), { name: "IconClose" })
128
+ ]))
129
+ ], 2));
130
+ }
131
+ });
132
+ export {
133
+ Z as _,
134
+ O as f
135
+ };
@@ -0,0 +1,36 @@
1
+ import { l as r } from "./chunk-28ba1e67.js";
2
+ const l = {
3
+ addQLDefaultFormData(o, e = {}) {
4
+ var a;
5
+ return {
6
+ ...o,
7
+ fFormProps: {
8
+ ...o.fFormProps,
9
+ defaultData: {
10
+ ...(a = o.fFormProps) == null ? void 0 : a.defaultData,
11
+ ...e
12
+ }
13
+ }
14
+ };
15
+ },
16
+ buildQLDefaultConfig(o) {
17
+ const e = {
18
+ id: String(Math.floor(Math.random() * 1e6)),
19
+ title: !1,
20
+ fTableProps: {
21
+ toolbar: !1,
22
+ scroll: {
23
+ maxHeight: "500px"
24
+ },
25
+ selection: "checkbox",
26
+ selectionConfig: {
27
+ onlyCurrent: !1
28
+ }
29
+ }
30
+ };
31
+ return r.exports.merge(e, o), e;
32
+ }
33
+ };
34
+ export {
35
+ l as i
36
+ };
@@ -0,0 +1,85 @@
1
+ import { defineComponent as i, mergeModels as w, ref as v, useModel as V, computed as u, inject as x, openBlock as y, createBlock as g, unref as b, createSlots as h, renderList as B, withCtx as R, renderSlot as $, normalizeProps as C, guardReactiveProps as S } from "vue";
2
+ import { Textarea as k } from "@arco-design/web-vue";
3
+ import { f as M } from "./chunk-c9e8fc0f.js";
4
+ const P = {
5
+ defaultValue: {
6
+ type: String,
7
+ default: null
8
+ },
9
+ placeholder: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ allowClear: {
14
+ type: Boolean,
15
+ default: !0
16
+ },
17
+ rows: {
18
+ type: Number,
19
+ default: 2
20
+ }
21
+ }, z = /* @__PURE__ */ i({
22
+ __name: "ftextarea",
23
+ props: /* @__PURE__ */ w(P, {
24
+ modelValue: {},
25
+ modelModifiers: {}
26
+ }),
27
+ emits: ["update:modelValue"],
28
+ setup(s, { expose: p }) {
29
+ const l = s, r = v(), t = V(s, "modelValue");
30
+ l.defaultValue && (t.value = l.defaultValue);
31
+ const n = u({
32
+ get: () => {
33
+ var e;
34
+ return ((e = t.value) == null ? void 0 : e.replace(/\r/g, `
35
+ `)) || "";
36
+ },
37
+ set(e) {
38
+ t.value = e;
39
+ }
40
+ });
41
+ u(
42
+ () => typeof l.rows == "number" ? {
43
+ minRows: l.rows,
44
+ maxRows: l.rows
45
+ } : l.rows
46
+ );
47
+ const o = x(M, null), m = u(
48
+ () => l.placeholder || `\u8BF7\u586B\u5199${((o == null ? void 0 : o.label) || "\u2026\u2026").replace(/[: | :]$/, "")}`
49
+ );
50
+ return p({
51
+ value: t,
52
+ focus(...e) {
53
+ var a;
54
+ (a = r.value) == null || a.focus(...e);
55
+ },
56
+ blur(...e) {
57
+ var a;
58
+ (a = r.value) == null || a.blur(...e);
59
+ },
60
+ ins: r
61
+ }), (e, a) => (y(), g(b(k), {
62
+ ref_key: "textareaRef",
63
+ ref: r,
64
+ modelValue: n.value,
65
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => n.value = d),
66
+ placeholder: m.value,
67
+ "allow-clear": e.allowClear,
68
+ "textarea-attrs": {
69
+ rows: l.rows,
70
+ ...e.$attrs.textareaAttrs || {}
71
+ }
72
+ }, h({ _: 2 }, [
73
+ B(e.$slots, (d, f) => ({
74
+ name: f,
75
+ fn: R((c) => [
76
+ $(e.$slots, f, C(S(c)))
77
+ ])
78
+ }))
79
+ ]), 1032, ["modelValue", "placeholder", "allow-clear", "textarea-attrs"]));
80
+ }
81
+ });
82
+ export {
83
+ z as _,
84
+ P as f
85
+ };
@@ -0,0 +1 @@
1
+ "use strict";const o=Symbol("iconfont"),O=Symbol("arcoIcon"),E=Symbol("vueRouter");exports.ARCO_ICON_KEY=O;exports.ICONFONT_KEY=o;exports.ROUTER_KEY=E;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),_=require("@arco-design/web-vue"),C=require("./chunk-3e3782aa.js"),h=require("./chunk-32aa5901.js"),g=require("./chunk-592857c5.js"),T="\u6682\u65E0",k={ignoreEllips:{type:Boolean,default:!1},ellipsType:{type:String,default:"normal"},ellipsConfig:{type:Object,default:()=>({})},placeholder:{type:String,default:T},preIcon:{type:String,default:""},preIconProps:{type:Object,default:()=>({})},render:{type:Function,default:null}},w={class:"f-text",style:{display:"flex","align-items":"center"}},B={key:1},E={key:1},V={key:0},b={key:1},I=e.defineComponent({__name:"ftext",props:e.mergeModels(k,{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(a){const c=e.inject(h.fformCtxInjectKey,null),o=a,s=e.ref(),r={rows:1,type:"normal",moreText:"\u66F4\u591A",lessText:"\u6536\u8D77",moreIcon:"IconSearch"},n=e.computed(()=>{const t={rows:o.ellipsConfig.rows||r.rows,type:o.ellipsConfig.type||r.type};return t.type==="drawer"&&o.ellipsConfig.type==="drawer"&&(t.moreText=o.ellipsConfig.moreText||r.moreText,t.lessText=o.ellipsConfig.lessText||r.lessText),t.type==="popup"&&o.ellipsConfig.type==="popup"&&(t.moreIcon=o.ellipsConfig.moreIcon||r.moreIcon),t}),m=e.ref(!1),p=e.ref(!0);function x(){const t=n.value.type;t==="drawer"?p.value=!p.value:t==="popup"&&C.s({content:String(u.value)||"",hideTitle:!0,width:"50%",closable:!0,footer:!1})}const i=e.ref(!1);function v(){const t=s.value;!t||(i.value=t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth)}e.onMounted(()=>{if(!o.ignoreEllips){const t=new ResizeObserver(v);s.value&&t.observe(s.value)}});const u=e.useModel(a,"modelValue");e.watch(u,()=>{v()});const d=e.computed({get:()=>String(u.value||""),set(t){u.value=t}});return(t,f)=>(e.openBlock(),e.createBlock(e.unref(_.TypographyText),{"edit-text":d.value,"onUpdate:editText":f[1]||(f[1]=l=>d.value=l)},{default:e.withCtx(()=>[e.createElementVNode("div",w,[t.preIcon?(e.openBlock(),e.createBlock(e.unref(g._sfc_main),e.mergeProps({key:0,class:"f-text__pre-icon",name:t.preIcon},t.preIconProps),null,16,["name"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:s,class:e.normalizeClass(["f-text__content",!t.ignoreEllips&&p.value&&"ellips"]),style:e.normalizeStyle({"-webkit-line-clamp":n.value.rows})},[e.createVNode(e.unref(_.Tooltip),{"popup-visible":m.value,"onUpdate:popupVisible":f[0]||(f[0]=l=>m.value=i.value&&l)},{content:e.withCtx(()=>{var l;return[o.render?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.render),{key:0,data:((l=e.unref(c))==null?void 0:l.data)||{}},null,8,["data"])):(e.openBlock(),e.createElementBlock("div",B,e.toDisplayString(d.value),1))]}),default:e.withCtx(()=>{var l;return[e.renderSlot(t.$slots,"default",{data:(l=e.unref(c))==null?void 0:l.data},()=>{var y;return[o.render?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.render),{key:0,data:((y=e.unref(c))==null?void 0:y.data)||{}},null,8,["data"])):(e.openBlock(),e.createElementBlock("div",E,e.toDisplayString(d.value||t.placeholder),1))]},!0)]}),_:3},8,["popup-visible"]),["drawer","popup"].includes(n.value.type)&&(i.value||!p.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"content-more",style:e.normalizeStyle({bottom:i.value?"0":"-20px"}),onClick:x},[n.value.type==="drawer"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(i.value?n.value.moreText:n.value.lessText),1)):e.createCommentVNode("",!0),n.value.type==="popup"?(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(e.unref(g._sfc_main),{name:n.value.moreIcon},null,8,["name"])])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],6)])]),_:3},8,["edit-text"]))}});const S=(a,c)=>{const o=a.__vccOpts||a;for(const[s,r]of c)o[s]=r;return o},D=S(I,[["__scopeId","data-v-cc19d558"]]);exports.FText=D;exports.fTextProps=k;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),w=require("./chunk-592857c5.js"),M=Symbol("ArcoFormItemContext"),h={defaultValue:{type:Array,default:null},type:{type:String,default:"number"},placeholder:{type:[String,Array],default:()=>["\u5F00\u59CB","\u7ED3\u675F"]},separator:{type:String,default:"-"},allowClear:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},_=["value","type","placeholder","disabled"],j={class:"f-range-separator"},C=["value","placeholder","disabled","type"],H=a.defineComponent({__name:"frange",props:a.mergeModels(h,{modelValue:{default:()=>[]},modelModifiers:{}}),emits:a.mergeModels(["focus","blur"],["update:modelValue"]),setup(v,{expose:S,emit:E}){const u=a.inject(M,null),g=E,s=v,t=a.useModel(v,"modelValue");s.defaultValue&&(t.value=s.defaultValue);const o=a.ref(),p=a.ref(),i=a.ref(!1);function y(n,e){var l,r;i.value=!0,g("focus",n,e),u!=null&&u.error&&((r=(l=u==null?void 0:u.eventHandlers)==null?void 0:l.onChange)==null||r.call(l))}function b(n,e){var l,r;i.value=!1,g("blur",n,e),u!=null&&u.error&&((r=(l=u==null?void 0:u.eventHandlers)==null?void 0:l.onChange)==null||r.call(l,n))}const f=a.ref(!1);function N(){var n,e;if(!s.allowClear&&t.value.length===0){f.value=!1;return}f.value=Boolean(((n=t.value)==null?void 0:n[0])||((e=t.value)==null?void 0:e[1]))}function R(){var n,e,l;t.value=[],f.value=!1,(n=o.value)==null||n.focus(),i.value=!0,(l=(e=u==null?void 0:u.eventHandlers)==null?void 0:e.onChange)==null||l.call(e)}const m=a.computed(()=>["number","decimal"].includes(s.type)?"text":s.type);function V(n,e){const l=n.target.value;let r=/^$/,c="";s.type==="number"&&(r=/[^\d]/g,c=""),s.type==="decimal"&&(r=/[^\d.]/g,c="");const B=[...t.value];B[e]=l.replace(r,c),t.value=B,a.nextTick(()=>{var d,k;t.value[0]||t.value[1]||(t.value=[],(k=(d=u==null?void 0:u.eventHandlers)==null?void 0:d.onChange)==null||k.call(d)),N()})}return S({value:t,focus(n="start"){var e,l;n==="start"&&((e=o.value)==null||e.focus()),n==="end"&&((l=p.value)==null||l.focus())},blur(n="start"){var e,l;n==="start"&&((e=o.value)==null||e.blur()),n==="end"&&((l=p.value)==null||l.blur())}}),(n,e)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["f-range__wrap arco-input-wrapper",{"arco-input-focus":i.value,"arco-input-disabled":n.disabled}])},[a.createElementVNode("input",{ref_key:"startInputRef",ref:o,value:t.value[0],class:"f-range-start arco-input arco-input-size-medium",type:m.value,placeholder:n.placeholder[0],disabled:n.disabled,onFocus:e[0]||(e[0]=l=>y(l,"start")),onBlur:e[1]||(e[1]=l=>b(l,"start")),onInput:e[2]||(e[2]=l=>V(l,0))},null,40,_),a.createElementVNode("span",j,[a.renderSlot(n.$slots,"separator",{},()=>[a.createTextVNode(a.toDisplayString(n.separator),1)])]),a.createElementVNode("input",{ref_key:"endInputRef",ref:p,value:t.value[1],class:"f-range-end arco-input arco-input-size-medium",placeholder:n.placeholder[1],disabled:n.disabled,type:m.value,onFocus:e[3]||(e[3]=l=>y(l,"end")),onBlur:e[4]||(e[4]=l=>b(l,"end")),onInput:e[5]||(e[5]=l=>V(l,1))},null,40,C),n.disabled?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",{key:0,class:"f-range-clear arco-input-clear-btn arco-icon-hover arco-input-icon-hover",onClick:R},[a.createVNode(a.unref(w._sfc_main),{name:"IconClose"})]))],2))}});exports._sfc_main=H;exports.fRangeProps=h;