@qynpm/ui 1.0.5 → 1.0.6

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 (117) hide show
  1. package/README.md +228 -228
  2. package/dist/index.cjs +2 -1
  3. package/dist/index.mjs +54 -19
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +4 -4
  6. package/dist/qy-dialog/index.cjs +1 -1
  7. package/dist/qy-dialog/index.mjs +4 -5
  8. package/dist/qy-form-section/index.cjs +1 -1
  9. package/dist/qy-form-section/index.mjs +2 -2
  10. package/dist/qy-input/index.cjs +1 -1
  11. package/dist/qy-input/index.mjs +4 -4
  12. package/dist/qy-money-input/index.cjs +1 -1
  13. package/dist/qy-money-input/index.mjs +4 -4
  14. package/dist/qy-radio-group/index.cjs +1 -1
  15. package/dist/qy-radio-group/index.mjs +4 -4
  16. package/dist/qy-record-quote-search/index.cjs +1 -1
  17. package/dist/qy-record-quote-search/index.mjs +2 -2
  18. package/dist/qy-remark-image/index.cjs +1 -2
  19. package/dist/qy-remark-image/index.mjs +3 -4
  20. package/dist/qy-remote-select/index.cjs +1 -1
  21. package/dist/qy-remote-select/index.mjs +4 -4
  22. package/dist/qy-search-input/index.cjs +1 -1
  23. package/dist/qy-search-input/index.mjs +3 -3
  24. package/dist/qy-select/index.cjs +1 -1
  25. package/dist/qy-select/index.mjs +4 -4
  26. package/dist/qy-upload/index.cjs +1 -1
  27. package/dist/qy-upload/index.mjs +3 -3
  28. package/dist/qy-voucher-upload/index.cjs +1 -1
  29. package/dist/qy-voucher-upload/index.mjs +4 -4
  30. package/dist/shared/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  31. package/dist/shared/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  32. package/dist/{lib/qy-action-bar/index.vue2.mjs → shared/index-Bw9kVFsm.mjs} +14 -13
  33. package/dist/{lib/qy-record-quote-search/index.vue2.mjs → shared/index-BzV4959-.mjs} +58 -57
  34. package/dist/{lib/qy-form-section/index.vue2.mjs → shared/index-C0ADdL4S.mjs} +20 -19
  35. package/dist/shared/index-CBSjmD0C.mjs +217 -0
  36. package/dist/shared/index-CJb1S7CP.cjs +1 -0
  37. package/dist/shared/index-CO8lz02r.cjs +1 -0
  38. package/dist/shared/index-ClPxDFKd.cjs +1 -0
  39. package/dist/shared/index-CtOqRiaj.cjs +1 -0
  40. package/dist/shared/index-DXB7_Tb5.cjs +1 -0
  41. package/dist/{lib/upload/index.vue.mjs → shared/index-DeWkPj3O.mjs} +121 -119
  42. package/dist/{lib/qy-voucher-upload/index.vue.mjs → shared/index-PUYQxK94.mjs} +2 -2
  43. package/dist/shared/index-UzZbxoqZ.cjs +1 -0
  44. package/dist/shared/index-a90QeEC4.cjs +1 -0
  45. package/dist/{lib/qy-search-input/index.vue2.mjs → shared/index-wW02nNOp.mjs} +50 -49
  46. package/dist/{lib/qy-remote-select/index.vue.mjs → shared/index.vue_vue_type_script_setup_true_lang-BcZg8D-y.mjs} +2 -2
  47. package/dist/{lib/qy-select/index.vue.mjs → shared/index.vue_vue_type_script_setup_true_lang-BmeBeCu0.mjs} +1 -1
  48. package/dist/shared/index.vue_vue_type_script_setup_true_lang-C85575cL.cjs +1 -0
  49. package/dist/{lib/qy-radio-group/index.vue.mjs → shared/index.vue_vue_type_script_setup_true_lang-DkYwdYdF.mjs} +4 -4
  50. package/dist/shared/index.vue_vue_type_script_setup_true_lang-Do5SZ8yS.cjs +1 -0
  51. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DpZzyX5f.cjs +1 -0
  52. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DuUkOqwY.cjs +1 -0
  53. package/dist/{lib/qy-input/index.vue.mjs → shared/index.vue_vue_type_script_setup_true_lang-Dvh1BFaR.mjs} +7 -7
  54. package/dist/{lib/qy-money-input/index.vue.mjs → shared/index.vue_vue_type_script_setup_true_lang-RtfqJ73A.mjs} +24 -24
  55. package/dist/shared/index.vue_vue_type_script_setup_true_lang-VVjCLNMD.cjs +1 -0
  56. package/dist/{lib/dialog/index.vue.mjs → shared/index.vue_vue_type_style_index_0_lang-DpIL_6vO.mjs} +1 -1
  57. package/dist/shared/index.vue_vue_type_style_index_0_lang-haqCjB5x.cjs +1 -0
  58. package/dist/{lib/utils/install.mjs → shared/install-CxBnxbuN.mjs} +2 -2
  59. package/dist/shared/install-c8il9DQv.cjs +1 -0
  60. package/dist/shared/js.cookie-CojEIxHg.cjs +1 -0
  61. package/dist/{node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.mjs → shared/js.cookie-OLEfuq_g.mjs} +13 -13
  62. package/index.d.ts +20 -20
  63. package/package.json +1 -1
  64. package/qy-money-input/index.d.ts +12 -12
  65. package/qy-money-input/index.js +15 -15
  66. package/qy-radio-group/index.d.ts +12 -12
  67. package/qy-radio-group/index.js +15 -15
  68. package/qy-remote-select/index.d.ts +12 -12
  69. package/qy-remote-select/index.js +15 -15
  70. package/qy-voucher-upload/index.d.ts +12 -12
  71. package/qy-voucher-upload/index.js +15 -15
  72. package/dist/_virtual/_plugin-vue_export-helper.cjs +0 -1
  73. package/dist/_virtual/_plugin-vue_export-helper.mjs +0 -9
  74. package/dist/lib/dialog/index.vue.cjs +0 -1
  75. package/dist/lib/dialog/index.vue3.cjs +0 -1
  76. package/dist/lib/dialog/index.vue3.mjs +0 -5
  77. package/dist/lib/index.cjs +0 -1
  78. package/dist/lib/index.mjs +0 -53
  79. package/dist/lib/qy-action-bar/index.vue.cjs +0 -1
  80. package/dist/lib/qy-action-bar/index.vue.mjs +0 -7
  81. package/dist/lib/qy-action-bar/index.vue2.cjs +0 -1
  82. package/dist/lib/qy-form-section/index.vue.cjs +0 -1
  83. package/dist/lib/qy-form-section/index.vue.mjs +0 -7
  84. package/dist/lib/qy-form-section/index.vue2.cjs +0 -1
  85. package/dist/lib/qy-input/index.vue.cjs +0 -1
  86. package/dist/lib/qy-input/index.vue2.cjs +0 -1
  87. package/dist/lib/qy-input/index.vue2.mjs +0 -4
  88. package/dist/lib/qy-money-input/index.vue.cjs +0 -1
  89. package/dist/lib/qy-money-input/index.vue2.cjs +0 -1
  90. package/dist/lib/qy-money-input/index.vue2.mjs +0 -4
  91. package/dist/lib/qy-radio-group/index.vue.cjs +0 -1
  92. package/dist/lib/qy-radio-group/index.vue2.cjs +0 -1
  93. package/dist/lib/qy-radio-group/index.vue2.mjs +0 -4
  94. package/dist/lib/qy-record-quote-search/index.vue.cjs +0 -1
  95. package/dist/lib/qy-record-quote-search/index.vue.mjs +0 -7
  96. package/dist/lib/qy-record-quote-search/index.vue2.cjs +0 -1
  97. package/dist/lib/qy-remote-select/index.vue.cjs +0 -1
  98. package/dist/lib/qy-remote-select/index.vue2.cjs +0 -1
  99. package/dist/lib/qy-remote-select/index.vue2.mjs +0 -4
  100. package/dist/lib/qy-search-input/index.vue.cjs +0 -1
  101. package/dist/lib/qy-search-input/index.vue.mjs +0 -7
  102. package/dist/lib/qy-search-input/index.vue2.cjs +0 -1
  103. package/dist/lib/qy-select/index.vue.cjs +0 -1
  104. package/dist/lib/qy-select/index.vue2.cjs +0 -1
  105. package/dist/lib/qy-select/index.vue2.mjs +0 -4
  106. package/dist/lib/qy-voucher-upload/index.vue.cjs +0 -1
  107. package/dist/lib/remark-image/index.vue.cjs +0 -1
  108. package/dist/lib/remark-image/index.vue.mjs +0 -7
  109. package/dist/lib/remark-image/index.vue2.cjs +0 -1
  110. package/dist/lib/remark-image/index.vue2.mjs +0 -197
  111. package/dist/lib/remark-image/utils.cjs +0 -1
  112. package/dist/lib/remark-image/utils.mjs +0 -22
  113. package/dist/lib/upload/index.vue.cjs +0 -1
  114. package/dist/lib/utils/auth.cjs +0 -1
  115. package/dist/lib/utils/auth.mjs +0 -8
  116. package/dist/lib/utils/install.cjs +0 -1
  117. package/dist/node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.cjs +0 -1
@@ -1,15 +1,16 @@
1
- import { defineComponent as U, useAttrs as D, ref as M, computed as $, createElementBlock as i, openBlock as c, renderSlot as a, createVNode as I, createCommentVNode as f, toDisplayString as p, mergeProps as J, unref as Z, createSlots as j, withCtx as d, normalizeProps as G, guardReactiveProps as H, createElementVNode as K, normalizeClass as W } from "vue";
2
- import X from "../qy-search-input/index.vue.mjs";
3
- const Y = { class: "qy-record-quote-search" }, x = {
1
+ import { defineComponent as U, useAttrs as I, ref as M, computed as $, createElementBlock as i, openBlock as c, renderSlot as r, createVNode as D, createCommentVNode as f, toDisplayString as p, mergeProps as J, unref as Z, createSlots as j, withCtx as d, normalizeProps as G, guardReactiveProps as H, createElementVNode as K, normalizeClass as W } from "vue";
2
+ import { Q as X } from "./index-wW02nNOp.mjs";
3
+ import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const _ = { class: "qy-record-quote-search" }, x = {
4
5
  key: 0,
5
6
  class: "qy-record-quote-search__header"
6
- }, _ = {
7
+ }, ee = {
7
8
  key: 0,
8
9
  class: "qy-record-quote-search__label"
9
- }, ee = {
10
+ }, te = {
10
11
  key: 1,
11
12
  class: "qy-record-quote-search__description"
12
- }, ne = /* @__PURE__ */ U({
13
+ }, oe = /* @__PURE__ */ U({
13
14
  name: "QyRecordQuoteSearch",
14
15
  inheritAttrs: !1,
15
16
  __name: "index",
@@ -38,101 +39,101 @@ const Y = { class: "qy-record-quote-search" }, x = {
38
39
  },
39
40
  emits: ["update:modelValue", "search", "clear", "normalize", "enter", "select", "error", "success"],
40
41
  setup(k, { expose: z, emit: C }) {
41
- const o = k, n = C, q = D(), r = M(null), h = M(!1), m = $(() => o.statusText || ""), B = $(() => o.loading || h.value);
42
+ const o = k, a = C, Q = I(), l = M(null), h = M(!1), m = $(() => o.statusText || ""), q = $(() => o.loading || h.value);
42
43
  function s(e) {
43
44
  return e == null ? "" : String(e);
44
45
  }
45
- function E(e) {
46
- const t = s(e).trim(), l = g(t), u = l.match(/BJ\d{8}[A-Z0-9]{4}/i);
47
- return u ? u[0] : l;
46
+ function B(e) {
47
+ const t = s(e).trim(), n = g(t), u = n.match(/BJ\d{8}[A-Z0-9]{4}/i);
48
+ return u ? u[0] : n;
48
49
  }
49
50
  function g(e) {
50
51
  return s(e).replace(/\s+/g, "").trim().toUpperCase();
51
52
  }
52
53
  function y(e) {
53
- return o.extractMethod ? o.extractMethod(e) : E(e);
54
+ return o.extractMethod ? o.extractMethod(e) : B(e);
54
55
  }
55
56
  function v(e) {
56
57
  return o.normalizeMethod ? o.normalizeMethod(e) : g(e);
57
58
  }
58
- function b(e, t) {
59
- const l = s(e), u = y(l), V = o.autoNormalize ? v(u) : u;
60
- return n("normalize", { rawValue: l, code: V }), {
61
- rawValue: l,
59
+ function S(e, t) {
60
+ const n = s(e), u = y(n), V = o.autoNormalize ? v(u) : u;
61
+ return a("normalize", { rawValue: n, code: V }), {
62
+ rawValue: n,
62
63
  code: V,
63
64
  item: t
64
65
  };
65
66
  }
66
- function Q(e) {
67
- n("update:modelValue", e);
67
+ function E(e) {
68
+ a("update:modelValue", e);
68
69
  }
69
- async function S(e) {
70
- if (n("search", e), !!o.searchMethod) {
70
+ async function b(e) {
71
+ if (a("search", e), !!o.searchMethod) {
71
72
  h.value = !0;
72
73
  try {
73
74
  const t = await o.searchMethod(e);
74
- n("success", t);
75
+ a("success", t);
75
76
  } catch (t) {
76
- n("error", t);
77
+ a("error", t);
77
78
  } finally {
78
79
  h.value = !1;
79
80
  }
80
81
  }
81
82
  }
82
83
  function N(e) {
83
- const t = b(e);
84
- t.code !== s(o.modelValue) && n("update:modelValue", t.code), S(t);
84
+ const t = S(e);
85
+ t.code !== s(o.modelValue) && a("update:modelValue", t.code), b(t);
85
86
  }
86
87
  function O() {
87
- n("clear");
88
+ a("clear");
88
89
  }
89
90
  function T(e) {
90
- n("enter", e);
91
+ a("enter", e);
91
92
  }
92
93
  function w(e) {
93
- if (n("select", e), !o.searchOnSelect) return;
94
- const t = b(e.value, e);
95
- t.code !== s(o.modelValue) && n("update:modelValue", t.code), S(t);
94
+ if (a("select", e), !o.searchOnSelect) return;
95
+ const t = S(e.value, e);
96
+ t.code !== s(o.modelValue) && a("update:modelValue", t.code), b(t);
96
97
  }
97
98
  function F(e) {
98
- n("error", e);
99
+ a("error", e);
99
100
  }
100
- function L() {
101
+ function R() {
101
102
  var e, t;
102
- (t = (e = r.value) == null ? void 0 : e.focus) == null || t.call(e);
103
+ (t = (e = l.value) == null ? void 0 : e.focus) == null || t.call(e);
103
104
  }
104
- function P() {
105
+ function L() {
105
106
  var e, t;
106
- (t = (e = r.value) == null ? void 0 : e.blur) == null || t.call(e);
107
+ (t = (e = l.value) == null ? void 0 : e.blur) == null || t.call(e);
107
108
  }
108
- function R() {
109
+ function P() {
109
110
  var e, t;
110
- (t = (e = r.value) == null ? void 0 : e.select) == null || t.call(e);
111
+ (t = (e = l.value) == null ? void 0 : e.select) == null || t.call(e);
111
112
  }
112
113
  function A() {
113
114
  var e, t;
114
- (t = (e = r.value) == null ? void 0 : e.clear) == null || t.call(e);
115
+ (t = (e = l.value) == null ? void 0 : e.clear) == null || t.call(e);
115
116
  }
116
117
  return z({
117
- focus: L,
118
- blur: P,
119
- select: R,
118
+ focus: R,
119
+ blur: L,
120
+ select: P,
120
121
  clear: A,
121
122
  extractQuoteOrderCode: y,
122
123
  normalizeQuoteOrderCode: v
123
- }), (e, t) => (c(), i("div", Y, [
124
- a(e.$slots, "label", {}, () => [
124
+ }), (e, t) => (c(), i("div", _, [
125
+ r(e.$slots, "label", {}, () => [
125
126
  e.label || e.description ? (c(), i("div", x, [
126
- e.label ? (c(), i("div", _, p(e.label), 1)) : f("", !0),
127
- e.description ? (c(), i("div", ee, p(e.description), 1)) : f("", !0)
127
+ e.label ? (c(), i("div", ee, p(e.label), 1)) : f("", !0),
128
+ e.description ? (c(), i("div", te, p(e.description), 1)) : f("", !0)
128
129
  ])) : f("", !0)
129
130
  ], !0),
130
- I(X, J({
131
+ D(X, J({
131
132
  ref_key: "searchRef",
132
- ref: r
133
- }, Z(q), {
133
+ ref: l
134
+ }, Z(Q), {
134
135
  "model-value": e.modelValue,
135
- loading: B.value,
136
+ loading: q.value,
136
137
  disabled: e.disabled,
137
138
  placeholder: e.placeholder,
138
139
  "remove-space": !0,
@@ -144,7 +145,7 @@ const Y = { class: "qy-record-quote-search" }, x = {
144
145
  debounce: e.debounce,
145
146
  "min-length": e.minLength,
146
147
  "search-on-select": !1,
147
- "onUpdate:modelValue": Q,
148
+ "onUpdate:modelValue": E,
148
149
  onSearch: N,
149
150
  onClear: O,
150
151
  onEnter: T,
@@ -154,40 +155,40 @@ const Y = { class: "qy-record-quote-search" }, x = {
154
155
  e.$slots.prefix ? {
155
156
  name: "prefix",
156
157
  fn: d(() => [
157
- a(e.$slots, "prefix", {}, void 0, !0)
158
+ r(e.$slots, "prefix", {}, void 0, !0)
158
159
  ]),
159
160
  key: "0"
160
161
  } : void 0,
161
162
  e.$slots.suffix ? {
162
163
  name: "suffix",
163
164
  fn: d(() => [
164
- a(e.$slots, "suffix", {}, void 0, !0)
165
+ r(e.$slots, "suffix", {}, void 0, !0)
165
166
  ]),
166
167
  key: "1"
167
168
  } : void 0,
168
169
  e.$slots.item ? {
169
170
  name: "item",
170
- fn: d((l) => [
171
- a(e.$slots, "item", G(H(l)), void 0, !0)
171
+ fn: d((n) => [
172
+ r(e.$slots, "item", G(H(n)), void 0, !0)
172
173
  ]),
173
174
  key: "2"
174
175
  } : void 0,
175
176
  e.$slots.empty ? {
176
177
  name: "empty",
177
178
  fn: d(() => [
178
- a(e.$slots, "empty", {}, void 0, !0)
179
+ r(e.$slots, "empty", {}, void 0, !0)
179
180
  ]),
180
181
  key: "3"
181
182
  } : void 0,
182
183
  e.$slots.loading ? {
183
184
  name: "loading",
184
185
  fn: d(() => [
185
- a(e.$slots, "loading", {}, void 0, !0)
186
+ r(e.$slots, "loading", {}, void 0, !0)
186
187
  ]),
187
188
  key: "4"
188
189
  } : void 0
189
190
  ]), 1040, ["model-value", "loading", "disabled", "placeholder", "trim-mode", "button-text", "suggestions", "fetch-suggestions", "fetch-suggestions-method", "debounce", "min-length"]),
190
- e.showStatus && m.value ? a(e.$slots, "status", {
191
+ e.showStatus && m.value ? r(e.$slots, "status", {
191
192
  key: 0,
192
193
  status: e.status,
193
194
  statusText: m.value
@@ -198,7 +199,7 @@ const Y = { class: "qy-record-quote-search" }, x = {
198
199
  ], !0) : f("", !0)
199
200
  ]));
200
201
  }
201
- });
202
+ }), le = /* @__PURE__ */ Y(oe, [["__scopeId", "data-v-3a314f64"]]);
202
203
  export {
203
- ne as default
204
+ le as Q
204
205
  };
@@ -1,11 +1,12 @@
1
- import { defineComponent as y, ref as b, watch as h, createElementBlock as o, openBlock as s, normalizeClass as a, createElementVNode as d, withDirectives as v, renderSlot as i, createCommentVNode as n, toDisplayString as r, withModifiers as g, vShow as _ } from "vue";
2
- const k = { class: "qy-form-section__heading" }, C = {
1
+ import { defineComponent as y, ref as b, watch as v, createElementBlock as o, openBlock as s, normalizeClass as a, createElementVNode as d, withDirectives as _, renderSlot as i, createCommentVNode as n, toDisplayString as r, withModifiers as h, vShow as g } from "vue";
2
+ import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
+ const C = { class: "qy-form-section__heading" }, q = {
3
4
  key: 0,
4
5
  class: "qy-form-section__title"
5
- }, q = {
6
+ }, $ = {
6
7
  key: 0,
7
8
  class: "qy-form-section__description"
8
- }, $ = { class: "qy-form-section__actions" }, B = /* @__PURE__ */ y({
9
+ }, E = { class: "qy-form-section__actions" }, w = /* @__PURE__ */ y({
9
10
  name: "QyFormSection",
10
11
  __name: "index",
11
12
  props: {
@@ -21,21 +22,21 @@ const k = { class: "qy-form-section__heading" }, C = {
21
22
  headerClass: { default: "" }
22
23
  },
23
24
  emits: ["toggle"],
24
- setup(c, { emit: p }) {
25
- const l = c, f = p, t = b(l.defaultExpanded);
26
- h(
25
+ setup(p, { emit: u }) {
26
+ const l = p, f = u, t = b(l.defaultExpanded);
27
+ v(
27
28
  () => l.defaultExpanded,
28
29
  (e) => {
29
30
  t.value = e;
30
31
  }
31
32
  );
32
- function u() {
33
+ function c() {
33
34
  l.collapsible && (t.value = !t.value, f("toggle", t.value));
34
35
  }
35
36
  function m() {
36
- l.collapsible && u();
37
+ l.collapsible && c();
37
38
  }
38
- return (e, E) => (s(), o("section", {
39
+ return (e, B) => (s(), o("section", {
39
40
  class: a(["qy-form-section", [
40
41
  `is-bg-${e.background}`,
41
42
  {
@@ -48,25 +49,25 @@ const k = { class: "qy-form-section__heading" }, C = {
48
49
  class: a(["qy-form-section__header", e.headerClass]),
49
50
  onClick: m
50
51
  }, [
51
- d("div", k, [
52
+ d("div", C, [
52
53
  i(e.$slots, "title", {}, () => [
53
- e.title ? (s(), o("div", C, r(e.title), 1)) : n("", !0)
54
+ e.title ? (s(), o("div", q, r(e.title), 1)) : n("", !0)
54
55
  ], !0),
55
56
  i(e.$slots, "description", {}, () => [
56
- e.description ? (s(), o("div", q, r(e.description), 1)) : n("", !0)
57
+ e.description ? (s(), o("div", $, r(e.description), 1)) : n("", !0)
57
58
  ], !0)
58
59
  ]),
59
- d("div", $, [
60
+ d("div", E, [
60
61
  i(e.$slots, "actions", {}, void 0, !0),
61
62
  e.collapsible ? (s(), o("button", {
62
63
  key: 0,
63
64
  type: "button",
64
65
  class: "qy-form-section__toggle",
65
- onClick: g(u, ["stop"])
66
+ onClick: h(c, ["stop"])
66
67
  }, r(t.value ? "收起" : "展开"), 1)) : n("", !0)
67
68
  ])
68
69
  ], 2),
69
- v(d("div", {
70
+ _(d("div", {
70
71
  class: a(["qy-form-section__body", e.bodyClass])
71
72
  }, [
72
73
  i(e.$slots, "tip", {}, () => [
@@ -77,11 +78,11 @@ const k = { class: "qy-form-section__heading" }, C = {
77
78
  ], !0),
78
79
  i(e.$slots, "default", {}, void 0, !0)
79
80
  ], 2), [
80
- [_, t.value]
81
+ [g, t.value]
81
82
  ])
82
83
  ], 2));
83
84
  }
84
- });
85
+ }), D = /* @__PURE__ */ k(w, [["__scopeId", "data-v-8149aa01"]]);
85
86
  export {
86
- B as default
87
+ D as Q
87
88
  };
@@ -0,0 +1,217 @@
1
+ import { defineComponent as N, useAttrs as j, ref as v, computed as V, watch as B, onMounted as F, nextTick as K, onUnmounted as M, createElementBlock as g, openBlock as h, normalizeStyle as O, createElementVNode as s, createVNode as _, unref as c, mergeProps as Q, withCtx as y, createTextVNode as W } from "vue";
2
+ import { ElMessage as E, ElInput as G, ElPopover as H, ElButton as J, ElUpload as X } from "element-plus";
3
+ import { a as Y } from "./js.cookie-OLEfuq_g.mjs";
4
+ import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
+ function S(r) {
6
+ const l = r == null ? void 0 : r.match(/(\[url\:(.*?)\])(.*)/);
7
+ return l ? {
8
+ imageUrl: l[2],
9
+ text: l[3]
10
+ } : {
11
+ imageUrl: "",
12
+ text: r || ""
13
+ };
14
+ }
15
+ function ee(r) {
16
+ const l = String(r || "").match(/(\[url\:.*?\])([\s\S]*)/);
17
+ return l ? l[2] : r;
18
+ }
19
+ function A(r, l) {
20
+ return l ? `[url:${l}]${r}` : r;
21
+ }
22
+ const ae = { class: "qy-remark-image__field" }, te = { class: "qy-remark-image__upload-anchor" }, re = {
23
+ key: 0,
24
+ class: "icon-[line-md--loading-twotone-loop]",
25
+ role: "img",
26
+ "aria-hidden": "true"
27
+ }, le = {
28
+ key: 1,
29
+ class: "icon-[ion--cloud-upload-outline]",
30
+ role: "img",
31
+ "aria-hidden": "true"
32
+ }, oe = {
33
+ key: 2,
34
+ class: "icon-[ph--images-thin]",
35
+ role: "img",
36
+ "aria-hidden": "true"
37
+ }, ne = { class: "qy-remark-image__popover" }, ie = ["src"], se = { class: "qy-remark-image__popover-footer" }, de = /* @__PURE__ */ N({
38
+ __name: "index",
39
+ props: {
40
+ defaultValue: { default: "" },
41
+ defaultImage: { default: "" },
42
+ rows: { default: 6 },
43
+ width: { default: "" },
44
+ autosize: { type: [Boolean, Object], default: !1 },
45
+ disabled: { type: Boolean, default: !1 },
46
+ placeholder: { default: "粘贴图片上传" },
47
+ type: { default: "textarea" },
48
+ api: { default: "/permission-api/common/uploads" },
49
+ tokenKey: { default: "Admin-Token" }
50
+ },
51
+ emits: ["change"],
52
+ setup(r, { expose: l, emit: P }) {
53
+ const o = r, R = P, C = j(), k = v(null), i = v(""), n = v(""), m = v(!1), T = V(
54
+ () => o.type === "text" ? "text" : "textarea"
55
+ ), D = V(() => {
56
+ if (o.width)
57
+ return {
58
+ width: typeof o.width == "number" ? `${o.width}px` : o.width
59
+ };
60
+ });
61
+ B(
62
+ () => o.defaultValue,
63
+ (e) => {
64
+ const a = S(e || "");
65
+ i.value = a.text, n.value = a.imageUrl || o.defaultImage || "";
66
+ },
67
+ { immediate: !0 }
68
+ ), B(
69
+ () => o.defaultImage,
70
+ (e) => {
71
+ e !== void 0 && !S(o.defaultValue || "").imageUrl && (n.value = e || "");
72
+ },
73
+ { immediate: !0 }
74
+ ), F(() => {
75
+ K(L);
76
+ }), M(() => {
77
+ const e = I();
78
+ e && e.removeEventListener("paste", w);
79
+ });
80
+ function I() {
81
+ var e, a;
82
+ return ((e = k.value) == null ? void 0 : e.textarea) || ((a = k.value) == null ? void 0 : a.input) || null;
83
+ }
84
+ function L() {
85
+ const e = I();
86
+ e && (e.removeEventListener("paste", w), e.addEventListener("paste", w));
87
+ }
88
+ function $(e) {
89
+ i.value = ee(e || "");
90
+ }
91
+ function q() {
92
+ n.value = "", b();
93
+ }
94
+ async function w(e) {
95
+ var u;
96
+ const d = Array.from(((u = e.clipboardData) == null ? void 0 : u.files) || []).find((f) => f.type.startsWith("image/"));
97
+ d && (e.preventDefault(), await z({
98
+ file: d,
99
+ onError: () => {
100
+ },
101
+ onProgress: () => {
102
+ },
103
+ onSuccess: () => {
104
+ }
105
+ }));
106
+ }
107
+ async function z(e) {
108
+ var a, d, u, f;
109
+ if (e.file.size > 51200 * 1e3)
110
+ return E.error("图片过大"), !1;
111
+ m.value = !0;
112
+ try {
113
+ const p = new FormData();
114
+ p.append("files", e.file);
115
+ const U = Y.get(o.tokenKey), t = await (await fetch(o.api, {
116
+ method: "POST",
117
+ body: p,
118
+ credentials: "include",
119
+ headers: U ? { Authorization: `Bearer ${U}` } : void 0
120
+ })).json(), x = (t == null ? void 0 : t.urls) ?? ((a = t == null ? void 0 : t.data) == null ? void 0 : a.urls) ?? ((d = t == null ? void 0 : t.data) == null ? void 0 : d.url) ?? (t == null ? void 0 : t.url) ?? "";
121
+ return n.value = Array.isArray(x) ? x[0] : x, b(), E.success("上传图片成功"), (u = e.onSuccess) == null || u.call(e, t), !0;
122
+ } catch (p) {
123
+ return (f = e.onError) == null || f.call(e, p), E.error("上传失败"), !1;
124
+ } finally {
125
+ m.value = !1;
126
+ }
127
+ }
128
+ function b() {
129
+ R(
130
+ "change",
131
+ A(i.value || "", n.value || ""),
132
+ n.value || ""
133
+ );
134
+ }
135
+ return l({
136
+ deleteImage: q,
137
+ // 给表单保存或外部调试读取当前拆分值。
138
+ getValue: () => ({
139
+ text: i.value || "",
140
+ imageUrl: n.value || "",
141
+ value: A(i.value || "", n.value || "")
142
+ })
143
+ }), (e, a) => (h(), g("div", {
144
+ class: "qy-remark-image",
145
+ style: O(D.value)
146
+ }, [
147
+ s("div", ae, [
148
+ _(c(G), Q({
149
+ ref_key: "inputRef",
150
+ ref: k,
151
+ "model-value": i.value,
152
+ type: T.value,
153
+ rows: e.rows,
154
+ autosize: e.autosize,
155
+ disabled: e.disabled,
156
+ placeholder: e.placeholder
157
+ }, c(C), {
158
+ "onUpdate:modelValue": $,
159
+ onBlur: b
160
+ }), null, 16, ["model-value", "type", "rows", "autosize", "disabled", "placeholder"]),
161
+ _(c(H), {
162
+ placement: "top-start",
163
+ width: 400,
164
+ trigger: "hover",
165
+ disabled: !n.value
166
+ }, {
167
+ reference: y(() => [
168
+ s("div", te, [
169
+ _(c(X), {
170
+ disabled: m.value || e.disabled,
171
+ class: "qy-remark-image__upload",
172
+ "show-file-list": !1,
173
+ "http-request": z
174
+ }, {
175
+ default: y(() => [
176
+ m.value ? (h(), g("span", re)) : n.value ? (h(), g("span", oe)) : (h(), g("span", le))
177
+ ]),
178
+ _: 1
179
+ }, 8, ["disabled"])
180
+ ])
181
+ ]),
182
+ default: y(() => [
183
+ s("div", ne, [
184
+ s("img", {
185
+ src: n.value,
186
+ class: "qy-remark-image__preview-img"
187
+ }, null, 8, ie),
188
+ s("div", se, [
189
+ a[1] || (a[1] = s("span", { class: "qy-remark-image__popover-tip" }, "再次点击按钮可更换图片", -1)),
190
+ _(c(J), {
191
+ link: "",
192
+ size: "small",
193
+ type: "danger",
194
+ disabled: e.disabled,
195
+ onClick: q
196
+ }, {
197
+ default: y(() => a[0] || (a[0] = [
198
+ W(" 删除图片 ", -1)
199
+ ])),
200
+ _: 1,
201
+ __: [0]
202
+ }, 8, ["disabled"])
203
+ ])
204
+ ])
205
+ ]),
206
+ _: 1
207
+ }, 8, ["disabled"])
208
+ ])
209
+ ], 4));
210
+ }
211
+ }), ve = /* @__PURE__ */ Z(de, [["__scopeId", "data-v-f8d38d88"]]);
212
+ export {
213
+ ve as Q,
214
+ A as a,
215
+ ee as f,
216
+ S as p
217
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),c={class:"qy-form-section__heading"},p={key:0,class:"qy-form-section__title"},u={key:0,class:"qy-form-section__description"},m={class:"qy-form-section__actions"},f=e.defineComponent({name:"QyFormSection",__name:"index",props:{title:{default:""},description:{default:""},tip:{default:""},tipType:{default:"info"},collapsible:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!0},bordered:{type:Boolean,default:!0},background:{default:"white"},bodyClass:{default:""},headerClass:{default:""}},emits:["toggle"],setup(i,{emit:n}){const l=i,a=n,o=e.ref(l.defaultExpanded);e.watch(()=>l.defaultExpanded,t=>{o.value=t});function s(){l.collapsible&&(o.value=!o.value,a("toggle",o.value))}function r(){l.collapsible&&s()}return(t,k)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["qy-form-section",[`is-bg-${t.background}`,{"is-bordered":t.bordered,"is-collapsible":t.collapsible}]])},[e.createElementVNode("header",{class:e.normalizeClass(["qy-form-section__header",t.headerClass]),onClick:r},[e.createElementVNode("div",c,[e.renderSlot(t.$slots,"title",{},()=>[t.title?(e.openBlock(),e.createElementBlock("div",p,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(t.$slots,"description",{},()=>[t.description?(e.openBlock(),e.createElementBlock("div",u,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",m,[e.renderSlot(t.$slots,"actions",{},void 0,!0),t.collapsible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qy-form-section__toggle",onClick:e.withModifiers(s,["stop"])},e.toDisplayString(o.value?"收起":"展开"),1)):e.createCommentVNode("",!0)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qy-form-section__body",t.bodyClass])},[e.renderSlot(t.$slots,"tip",{},()=>[t.tip?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qy-form-section__tip",`is-${t.tipType}`])},e.toDisplayString(t.tip),3)):e.createCommentVNode("",!0)],!0),e.renderSlot(t.$slots,"default",{},void 0,!0)],2),[[e.vShow,o.value]])],2))}}),y=d._export_sfc(f,[["__scopeId","data-v-8149aa01"]]);exports.QyFormSection=y;
@@ -0,0 +1 @@
1
+ "use strict";const l=require("vue"),k=require("./index-a90QeEC4.cjs"),S=Object.assign({name:"QyVoucherUpload",inheritAttrs:!1},{__name:"index",props:{modelValue:{type:Array,default:()=>[]},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},limit:{type:Number,default:9},isShowTip:{type:Boolean,default:!1},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"90px"},disableDrag:{type:Boolean,default:!1},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},pastePlaceholder:{type:String,default:"粘贴图片上传"}},emits:["update:modelValue","change","success","error","remove"],setup(t,{expose:r,emit:d}){const i=d,s=l.useAttrs(),n=l.ref(null);function o(e){return Array.isArray(e)?e:[]}function c(e){i("update:modelValue",o(e))}function f(e){const a=o(e==null?void 0:e.files);i("change",a)}function m(e){i("success",e)}function p(e){i("error",e)}function y(e,a){i("remove",e,a)}function h(){var e,a;(a=(e=n.value)==null?void 0:e.openFileDialog)==null||a.call(e)}function u(){var e,a;return((a=(e=n.value)==null?void 0:e.getPathList)==null?void 0:a.call(e))||[]}function g(){var e,a;(a=(e=n.value)==null?void 0:e.clearFiles)==null||a.call(e)}function b(){return u()}return r({openFileDialog:h,getPathList:u,clearFiles:g,getValue:b}),(e,a)=>(l.openBlock(),l.createBlock(k.QyUpload,l.mergeProps({ref_key:"uploadRef",ref:n},l.unref(s),{"model-value":t.modelValue,"value-format":"array",api:t.api,name:t.name,multiple:t.multiple,disabled:t.disabled,"file-type":t.fileType,"file-size":t.fileSize,limit:t.limit,"is-show-tip":t.isShowTip,"token-key":t.tokenKey,"support-video":t.supportVideo,size:t.size,"disable-drag":t.disableDrag,"call-back":t.callBack,"extra-data":t.extraData,"show-text":!1,"show-paste-input":!0,"paste-placeholder":t.pastePlaceholder,"onUpdate:modelValue":c,onChange:f,onSuccess:m,onError:p,onRemove:y}),null,16,["model-value","api","name","multiple","disabled","file-type","file-size","limit","is-show-tip","token-key","support-video","size","disable-drag","call-back","extra-data","paste-placeholder"]))}});exports._sfc_main=S;
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),w=require("element-plus"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y={class:"qy-search-input__item"},Z=["innerHTML"],ee={key:0,class:"qy-search-input__item-description"},te=n.defineComponent({name:"QySearchInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入搜索内容"},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"},clearable:{type:Boolean,default:!0},buttonText:{default:"搜索"},buttonProps:{default:()=>({})},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},triggerOnFocus:{type:Boolean,default:!1},searchOnEnter:{type:Boolean,default:!0},searchOnSelect:{type:Boolean,default:!1},highlightKeyword:{type:Boolean,default:!0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},fitInputWidth:{type:Boolean,default:!0}},emits:["update:modelValue","search","clear","input","change","focus","blur","enter","select","visible-change","suggestions-change","error"],setup(k,{expose:B,emit:C}){const o=k,a=C,$=n.useAttrs(),s=n.ref(null),c=n.ref(u(o.modelValue)),p=n.computed(()=>u(o.modelValue)),E=n.computed(()=>["qy-search-input__popper",o.popperClass].filter(Boolean).join(" ")),I=n.computed(()=>u(o.modelValue)),f=n.ref("");n.watch(()=>o.modelValue,e=>{c.value=u(e)});function u(e){return e==null?"":String(e)}function M(e){return o.removeSpace?e.replace(/\s+/g,""):e}function y(e,t){return o.trimMode!==t?e:e.trim()}function g(e){return M(u(e))}function h(e){c.value=e,a("update:modelValue",e)}function v(e,t=""){return{...e,label:e.label||e.value,value:e.value||e.label,description:e.description||t}}function m(e=[]){return e.flatMap(t=>{if(Array.isArray(t.items)){const l=t;return l.items.map(r=>v(r,l.groupLabel))}return v(t)})}function F(e){const t=e.toLowerCase();return l=>[l.label,l.value,l.description].filter(Boolean).some(r=>String(r).toLowerCase().includes(t))}function L(e){return e?e.length>=o.minLength:o.triggerOnFocus}function i(e){a("suggestions-change",e),a("visible-change",e.length>0)}async function T(e){if(!L(e))return i([]),[];if(o.fetchSuggestionsMethod){const r=await new Promise(d=>{var S;(S=o.fetchSuggestionsMethod)==null||S.call(o,e,J=>{d(m(J))})});return i(r),r}if(o.fetchSuggestions){const r=await o.fetchSuggestions(e),d=m(Array.isArray(r)?r:[]);return i(d),d}const t=m(o.suggestions),l=e?t.filter(F(e)):t;return i(l),l}async function _(e,t){f.value=e;try{const l=await T(e);t(l)}catch(l){a("error",l),i([]),t([])}}function P(){var e,t;f.value&&((t=(e=s.value)==null?void 0:e.getData)==null||t.call(e,f.value))}function A(e){const t=g(e);h(t)}function O(e){const t=g(e);c.value=t,a("input",t)}function z(e){const t=y(g(e),"change");t!==u(o.modelValue)&&h(t),a("change",t)}function q(e){a("focus",e)}function x(e){const t=y(c.value,"blur");t!==u(o.modelValue)&&h(t),a("blur",e),a("visible-change",!1)}function H(){c.value="",a("update:modelValue",""),a("clear"),i([])}function K(e){a("enter",e),o.searchOnEnter&&b()}function b(){a("search",u(o.modelValue))}function N(e){a("select",e),o.searchOnSelect&&a("search",e.value)}function V(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R(e){const t=V(e||"");if(!o.highlightKeyword||!p.value)return t;const l=Q(V(p.value));return l?t.replace(new RegExp(`(${l})`,"ig"),'<mark class="qy-search-input__mark">$1</mark>'):t}function D(){var e,t;(t=(e=s.value)==null?void 0:e.focus)==null||t.call(e)}function U(){var e,t;(t=(e=s.value)==null?void 0:e.blur)==null||t.call(e)}function W(){var e,t,l;(l=(t=(e=s.value)==null?void 0:e.inputRef)==null?void 0:t.select)==null||l.call(t)}function j(){var e,t;(t=(e=s.value)==null?void 0:e.clear)==null||t.call(e)}function G(){var e,t;(t=(e=s.value)==null?void 0:e.close)==null||t.call(e)}return B({focus:D,blur:U,select:W,clear:j,closePanel:G,retryFetch:P}),(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["qy-search-input",{"is-disabled":e.disabled}])},[n.createVNode(n.unref(w.ElAutocomplete),n.mergeProps({ref_key:"autocompleteRef",ref:s},n.unref($),{"model-value":I.value,disabled:e.disabled,placeholder:e.placeholder,clearable:e.clearable,debounce:e.debounce,"fetch-suggestions":_,"trigger-on-focus":e.triggerOnFocus,teleported:e.teleported,"fit-input-width":e.fitInputWidth,"popper-class":E.value,"append-to":e.appendTo,"value-key":"value","onUpdate:modelValue":A,onInput:O,onChange:z,onFocus:q,onBlur:x,onClear:H,onSelect:N,onKeydown:n.withKeys(K,["enter"])}),n.createSlots({append:n.withCtx(()=>[e.$slots.append?n.renderSlot(e.$slots,"append",{key:0},void 0,!0):(n.openBlock(),n.createBlock(n.unref(w.ElButton),n.mergeProps({key:1},e.buttonProps,{loading:e.loading,disabled:e.disabled,onClick:b}),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.buttonText),1)]),_:1},16,["loading","disabled"]))]),default:n.withCtx(({item:l})=>[n.renderSlot(e.$slots,"item",{item:l,keyword:p.value},()=>[n.createElementVNode("div",Y,[n.createElementVNode("div",{class:"qy-search-input__item-label",innerHTML:R(l.label||l.value||"")},null,8,Z),l.description?(n.openBlock(),n.createElementBlock("div",ee,n.toDisplayString(l.description),1)):n.createCommentVNode("",!0)])],!0)]),_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prepend",{},void 0,!0)]),key:"2"}:void 0]),1040,["model-value","disabled","placeholder","clearable","debounce","trigger-on-focus","teleported","fit-input-width","popper-class","append-to"])],2))}}),ne=X._export_sfc(te,[["__scopeId","data-v-f1f0e1f9"]]);exports.QySearchInput=ne;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),a=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),l={key:0,class:"qy-action-bar__left"},n={key:1,class:"qy-action-bar__center"},d={key:2,class:"qy-action-bar__right"},c=e.defineComponent({name:"QyActionBar",__name:"index",props:{sticky:{type:Boolean,default:!0},offsetBottom:{default:0},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1},wrap:{type:Boolean,default:!0},justify:{default:"between"},background:{default:"#fff"}},setup(r){const o=r,s=e.computed(()=>({bottom:`${o.offsetBottom}px`,background:o.background}));return(t,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qy-action-bar",[`is-justify-${t.justify}`,{"is-sticky":t.sticky,"is-bordered":t.bordered,"is-shadow":t.shadow,"is-wrap":t.wrap}]]),style:e.normalizeStyle(s.value)},[t.$slots.left?(e.openBlock(),e.createElementBlock("div",l,[e.renderSlot(t.$slots,"left",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.default?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(t.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.right?(e.openBlock(),e.createElementBlock("div",d,[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),i=a._export_sfc(c,[["__scopeId","data-v-ecba8f49"]]);exports.QyActionBar=i;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),O=require("./index-ClPxDFKd.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),T={class:"qy-record-quote-search"},F={key:0,class:"qy-record-quote-search__header"},L={key:0,class:"qy-record-quote-search__label"},P={key:1,class:"qy-record-quote-search__description"},A=t.defineComponent({name:"QyRecordQuoteSearch",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"请输入报价单号"},buttonText:{default:"查询报价单"},autoNormalize:{type:Boolean,default:!0},showStatus:{type:Boolean,default:!0},status:{default:"default"},statusText:{default:""},suggestions:{default:()=>[]},fetchSuggestions:{type:[Function,null],default:null},fetchSuggestionsMethod:{type:[Function,null],default:null},debounce:{default:300},minLength:{default:1},searchOnSelect:{type:Boolean,default:!0},searchMethod:{type:[Function,null],default:null},extractMethod:{type:[Function,null],default:null},normalizeMethod:{type:[Function,null],default:null},label:{default:"报价单号"},description:{default:""},trimMode:{default:"blur"}},emits:["update:modelValue","search","clear","normalize","enter","select","error","success"],setup(y,{expose:S,emit:v}){const r=y,n=v,b=t.useAttrs(),a=t.ref(null),d=t.ref(!1),i=t.computed(()=>r.statusText||""),V=t.computed(()=>r.loading||d.value);function s(e){return e==null?"":String(e)}function k(e){const o=s(e).trim(),l=c(o),u=l.match(/BJ\d{8}[A-Z0-9]{4}/i);return u?u[0]:l}function c(e){return s(e).replace(/\s+/g,"").trim().toUpperCase()}function f(e){return r.extractMethod?r.extractMethod(e):k(e)}function h(e){return r.normalizeMethod?r.normalizeMethod(e):c(e)}function m(e,o){const l=s(e),u=f(l),g=r.autoNormalize?h(u):u;return n("normalize",{rawValue:l,code:g}),{rawValue:l,code:g,item:o}}function C(e){n("update:modelValue",e)}async function p(e){if(n("search",e),!!r.searchMethod){d.value=!0;try{const o=await r.searchMethod(e);n("success",o)}catch(o){n("error",o)}finally{d.value=!1}}}function B(e){const o=m(e);o.code!==s(r.modelValue)&&n("update:modelValue",o.code),p(o)}function M(){n("clear")}function q(e){n("enter",e)}function $(e){if(n("select",e),!r.searchOnSelect)return;const o=m(e.value,e);o.code!==s(r.modelValue)&&n("update:modelValue",o.code),p(o)}function z(e){n("error",e)}function Q(){var e,o;(o=(e=a.value)==null?void 0:e.focus)==null||o.call(e)}function E(){var e,o;(o=(e=a.value)==null?void 0:e.blur)==null||o.call(e)}function w(){var e,o;(o=(e=a.value)==null?void 0:e.select)==null||o.call(e)}function N(){var e,o;(o=(e=a.value)==null?void 0:e.clear)==null||o.call(e)}return S({focus:Q,blur:E,select:w,clear:N,extractQuoteOrderCode:f,normalizeQuoteOrderCode:h}),(e,o)=>(t.openBlock(),t.createElementBlock("div",T,[t.renderSlot(e.$slots,"label",{},()=>[e.label||e.description?(t.openBlock(),t.createElementBlock("div",F,[e.label?(t.openBlock(),t.createElementBlock("div",L,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("div",P,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],!0),t.createVNode(O.QySearchInput,t.mergeProps({ref_key:"searchRef",ref:a},t.unref(b),{"model-value":e.modelValue,loading:V.value,disabled:e.disabled,placeholder:e.placeholder,"remove-space":!0,"trim-mode":e.trimMode,"button-text":e.buttonText,suggestions:e.suggestions,"fetch-suggestions":e.fetchSuggestions,"fetch-suggestions-method":e.fetchSuggestionsMethod,debounce:e.debounce,"min-length":e.minLength,"search-on-select":!1,"onUpdate:modelValue":C,onSearch:B,onClear:M,onEnter:q,onSelect:$,onError:z}),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix",{},void 0,!0)]),key:"1"}:void 0,e.$slots.item?{name:"item",fn:t.withCtx(l=>[t.renderSlot(e.$slots,"item",t.normalizeProps(t.guardReactiveProps(l)),void 0,!0)]),key:"2"}:void 0,e.$slots.empty?{name:"empty",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty",{},void 0,!0)]),key:"3"}:void 0,e.$slots.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},void 0,!0)]),key:"4"}:void 0]),1040,["model-value","loading","disabled","placeholder","trim-mode","button-text","suggestions","fetch-suggestions","fetch-suggestions-method","debounce","min-length"]),e.showStatus&&i.value?t.renderSlot(e.$slots,"status",{key:0,status:e.status,statusText:i.value},()=>[t.createElementVNode("div",{class:t.normalizeClass(["qy-record-quote-search__status",`is-${e.status}`])},t.toDisplayString(i.value),3)],!0):t.createCommentVNode("",!0)]))}}),D=R._export_sfc(A,[["__scopeId","data-v-3a314f64"]]);exports.QyRecordQuoteSearch=D;