yahee-components 0.0.98-beta-04 → 0.0.102

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 (85) hide show
  1. package/es/_virtual/_commonjs-dynamic-modules.js +6 -0
  2. package/es/_virtual/jszip.min.js +7 -0
  3. package/es/_virtual/jszip.min2.js +4 -0
  4. package/es/complex-search/batch-search-dialog.vue.js +7 -0
  5. package/es/complex-search/batch-search-dialog.vue2.js +159 -0
  6. package/es/complex-search/complex-search.vue.js +46 -143
  7. package/es/complex-search/complex-search.vue2.js +42 -148
  8. package/es/complex-search/props.js +2 -3
  9. package/es/complex-search/useComplexSearch.js +44 -0
  10. package/es/drop-down-condition/drop-down-condition.vue.js +34 -33
  11. package/es/file-download-wrapper/file-download-wrapper.vue.js +265 -0
  12. package/es/file-download-wrapper/file-download-wrapper.vue2.js +4 -0
  13. package/es/file-download-wrapper/index.js +7 -0
  14. package/es/file-download-wrapper/key.js +17 -0
  15. package/es/file-download-wrapper/props.js +12 -0
  16. package/es/file-download-wrapper/style/index.css +66 -0
  17. package/es/filter-container/filter-container.vue.js +37 -36
  18. package/es/filter-container/props.js +11 -0
  19. package/es/filter-container/style/index.css +1 -0
  20. package/es/filter-wrapper/filter-wrapper.vue.js +2 -2
  21. package/es/filter-wrapper/filter-wrapper.vue2.js +31 -30
  22. package/es/filter-wrapper/props.js +10 -0
  23. package/es/height-collapse/height-collapse.vue.js +53 -0
  24. package/es/height-collapse/height-collapse.vue2.js +4 -0
  25. package/es/height-collapse/index.js +7 -0
  26. package/es/height-collapse/props.js +11 -0
  27. package/es/height-collapse/style/index.css +32 -0
  28. package/es/index.js +56 -50
  29. package/es/installs.js +22 -20
  30. package/es/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.js +2320 -0
  31. package/es/style.css +100 -4
  32. package/es/yahee-components.css +1 -1
  33. package/lib/file-download-wrapper/style/index.css +66 -0
  34. package/lib/filter-container/style/index.css +1 -0
  35. package/lib/height-collapse/style/index.css +32 -0
  36. package/lib/style.css +100 -4
  37. package/package.json +4 -3
  38. package/types/src/annex-upload/annex-upload.vue.d.ts +8 -8
  39. package/types/src/annex-upload/index.d.ts +4 -4
  40. package/types/src/complex-search/batch-search-dialog.vue.d.ts +2 -0
  41. package/types/src/complex-search/complex-search.vue.d.ts +137 -0
  42. package/types/src/complex-search/index.d.ts +141 -0
  43. package/types/src/complex-search/props.d.ts +6 -13
  44. package/types/src/complex-search/useComplexSearch.d.ts +16 -0
  45. package/types/src/components.d.ts +2 -1
  46. package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +2 -2
  47. package/types/src/drop-down-condition/index.d.ts +2 -2
  48. package/types/src/drop-down-condition/props.d.ts +1 -1
  49. package/types/src/file-download-wrapper/file-download-wrapper.d.ts +11 -0
  50. package/types/src/file-download-wrapper/file-download-wrapper.vue.d.ts +4 -0
  51. package/types/src/file-download-wrapper/index.d.ts +8 -0
  52. package/types/src/file-download-wrapper/key.d.ts +20 -0
  53. package/types/src/file-download-wrapper/props.d.ts +21 -0
  54. package/types/src/filter-container/filter-container.d.ts +2 -0
  55. package/types/src/filter-container/filter-container.vue.d.ts +3 -8
  56. package/types/src/filter-container/index.d.ts +67 -0
  57. package/types/src/filter-container/props.d.ts +9 -43
  58. package/types/src/filter-wrapper/filter-wrapper.vue.d.ts +4 -15
  59. package/types/src/filter-wrapper/index.d.ts +60 -0
  60. package/types/src/filter-wrapper/key.d.ts +20 -0
  61. package/types/src/filter-wrapper/props.d.ts +6 -43
  62. package/types/src/height-collapse/height-collapse.vue.d.ts +32 -0
  63. package/types/src/height-collapse/index.d.ts +50 -0
  64. package/types/src/height-collapse/props.d.ts +11 -0
  65. package/types/src/help-tag/help-tag.vue.d.ts +8 -8
  66. package/types/src/help-tag/index.d.ts +8 -8
  67. package/types/src/help-tag/props.d.ts +5 -5
  68. package/types/src/installs.d.ts +3020 -0
  69. package/types/src/operation-log/index.d.ts +2 -2
  70. package/types/src/operation-log/operation-log.vue.d.ts +2 -2
  71. package/types/src/operation-log/props.d.ts +1 -1
  72. package/types/src/scale-screen/props.d.ts +2 -2
  73. package/es/input/index.js +0 -7
  74. package/es/input/input.vue.js +0 -40
  75. package/es/input/input.vue2.js +0 -4
  76. package/es/input/style/index.css +0 -3
  77. package/lib/input/style/index.css +0 -3
  78. package/types/src/input/index.d.ts +0 -515
  79. package/types/src/input/input.d.ts +0 -18
  80. package/types/src/input/input.vue.d.ts +0 -513
  81. package/types/src/shared/hello.d.ts +0 -1
  82. package/types/src/shared/index.d.ts +0 -2
  83. package/types/src/shared/typeCheck.d.ts +0 -2
  84. package/types/src/shared/types/InferVueDefaults.d.ts +0 -7
  85. package/types/src/shared/types/index.d.ts +0 -1
@@ -0,0 +1,6 @@
1
+ function r(o) {
2
+ throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
3
+ }
4
+ export {
5
+ r as commonjsRequire
6
+ };
@@ -0,0 +1,7 @@
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as i } from "../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.js";
3
+ var o = i();
4
+ const p = /* @__PURE__ */ r(o);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,4 @@
1
+ var e = { exports: {} };
2
+ export {
3
+ e as __module
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./batch-search-dialog.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-12186e80"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,159 @@
1
+ import { defineComponent as S, ref as p, watch as V, resolveComponent as n, createBlock as m, openBlock as r, withCtx as a, createVNode as u, createElementBlock as g, Fragment as w, renderList as k, createElementVNode as W, createTextVNode as E } from "vue";
2
+ const D = { class: "dialog-footer" }, U = S({
3
+ name: "BatchSearchDialog"
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ }), z = /* @__PURE__ */ S({
6
+ ...U,
7
+ __name: "batch-search-dialog",
8
+ props: {
9
+ modelValue: { type: Boolean, default: !1 },
10
+ showSelect: { type: Boolean, default: !0 },
11
+ isBatchSelectSameWithInput: { type: Boolean, default: !0 },
12
+ inputOptions: { type: Array, default: () => [] },
13
+ batchOptions: { type: Array, default: () => [] },
14
+ defaultOptions: {
15
+ type: Array,
16
+ default: () => [{ value: "WHOLE_SEARCH", label: "综合搜索" }]
17
+ }
18
+ },
19
+ emits: ["update:modelValue", "confirm"],
20
+ setup(s, { emit: B }) {
21
+ const O = s, _ = B, c = p(!1), f = p(!1), v = p(), t = p({ searchType: "WHOLE_SEARCH", searchContent: "" }), x = {
22
+ searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
23
+ };
24
+ V(
25
+ () => O.modelValue,
26
+ (o) => {
27
+ c.value = o;
28
+ }
29
+ ), V(c, (o) => {
30
+ _("update:modelValue", o);
31
+ });
32
+ const T = (o) => {
33
+ var i;
34
+ o.preventDefault();
35
+ const e = (i = o.clipboardData) == null ? void 0 : i.getData("text/plain"), d = e == null ? void 0 : e.replace(/[\n\r\t]+/g, ",");
36
+ d && (t.value.searchContent = t.value.searchContent ? `${t.value.searchContent},${d}` : d);
37
+ }, A = async () => {
38
+ var e;
39
+ if (!v.value) return;
40
+ await v.value.validate().catch(() => !1) && ((e = t.value.searchContent) != null && e.trim()) && (f.value = !0, _("confirm", { ...t.value, searchContent: t.value.searchContent.trim() }), h(), f.value = !1);
41
+ }, h = () => {
42
+ c.value = !1, t.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
43
+ };
44
+ return (o, e) => {
45
+ const d = n("el-option"), i = n("el-select"), y = n("el-form-item"), C = n("el-row"), H = n("el-input"), L = n("el-form"), b = n("el-button"), R = n("el-dialog");
46
+ return r(), m(R, {
47
+ modelValue: c.value,
48
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => c.value = l),
49
+ title: "批量查询",
50
+ width: "30%",
51
+ "before-close": h,
52
+ "append-to-body": !0,
53
+ draggable: ""
54
+ }, {
55
+ footer: a(() => [
56
+ W("div", D, [
57
+ u(b, {
58
+ type: "primary",
59
+ loading: f.value,
60
+ onClick: A
61
+ }, {
62
+ default: a(() => e[4] || (e[4] = [
63
+ E(" 确认 ")
64
+ ])),
65
+ _: 1,
66
+ __: [4]
67
+ }, 8, ["loading"]),
68
+ u(b, { onClick: h }, {
69
+ default: a(() => e[5] || (e[5] = [
70
+ E("关闭")
71
+ ])),
72
+ _: 1,
73
+ __: [5]
74
+ })
75
+ ])
76
+ ]),
77
+ default: a(() => [
78
+ u(L, {
79
+ ref_key: "formRef",
80
+ ref: v,
81
+ model: t.value,
82
+ rules: x
83
+ }, {
84
+ default: a(() => [
85
+ u(C, { class: "row-class" }, {
86
+ default: a(() => [
87
+ u(y, { prop: "searchType" }, {
88
+ default: a(() => [
89
+ s.showSelect ? (r(), m(i, {
90
+ key: 0,
91
+ modelValue: t.value.searchType,
92
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.searchType = l),
93
+ size: "small",
94
+ style: { width: "100px", "background-color": "white" }
95
+ }, {
96
+ default: a(() => [
97
+ (r(!0), g(w, null, k(s.isBatchSelectSameWithInput ? s.inputOptions : s.batchOptions, (l) => (r(), m(d, {
98
+ key: l.label,
99
+ label: l.label,
100
+ value: l.value
101
+ }, null, 8, ["label", "value"]))), 128))
102
+ ]),
103
+ _: 1
104
+ }, 8, ["modelValue"])) : (r(), m(i, {
105
+ key: 1,
106
+ modelValue: t.value.searchType,
107
+ "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.searchType = l),
108
+ size: "small",
109
+ style: { width: "95px" },
110
+ disabled: ""
111
+ }, {
112
+ default: a(() => [
113
+ (r(!0), g(w, null, k(s.defaultOptions, (l) => (r(), m(d, {
114
+ key: l.label,
115
+ label: l.label,
116
+ value: l.value
117
+ }, null, 8, ["label", "value"]))), 128))
118
+ ]),
119
+ _: 1
120
+ }, 8, ["modelValue"]))
121
+ ]),
122
+ _: 1
123
+ })
124
+ ]),
125
+ _: 1
126
+ }),
127
+ u(C, { class: "row-class" }, {
128
+ default: a(() => [
129
+ u(y, {
130
+ prop: "searchContent",
131
+ style: { width: "100%" }
132
+ }, {
133
+ default: a(() => [
134
+ u(H, {
135
+ modelValue: t.value.searchContent,
136
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.searchContent = l),
137
+ placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,",
138
+ type: "textarea",
139
+ rows: 5,
140
+ onPaste: T
141
+ }, null, 8, ["modelValue"])
142
+ ]),
143
+ _: 1
144
+ })
145
+ ]),
146
+ _: 1
147
+ })
148
+ ]),
149
+ _: 1
150
+ }, 8, ["model"])
151
+ ]),
152
+ _: 1
153
+ }, 8, ["modelValue"]);
154
+ };
155
+ }
156
+ });
157
+ export {
158
+ z as default
159
+ };
@@ -1,13 +1,13 @@
1
- import _ from "./complex-search.vue2.js";
2
- import { resolveComponent as r, createElementBlock as d, openBlock as n, Fragment as u, createElementVNode as b, createVNode as t, withKeys as B, createSlots as U, withCtx as a, renderList as i, createBlock as s, createCommentVNode as V, createTextVNode as c, toDisplayString as h } from "vue";
1
+ import w from "./complex-search.vue2.js";
2
+ import { resolveComponent as n, createElementBlock as i, openBlock as a, Fragment as p, createElementVNode as d, createVNode as s, withKeys as v, createSlots as B, withCtx as t, renderList as h, createBlock as r, createCommentVNode as m, createTextVNode as S } from "vue";
3
3
  /* empty css */
4
- import O from "../_virtual/_plugin-vue_export-helper.js";
5
- const z = { class: "yahee-complex-search" }, I = { class: "search-type-checkbox" }, P = { class: "dialog-footer" };
6
- function W(e, o, E, N, $, K) {
7
- const m = r("el-option"), p = r("el-select"), C = r("Search"), w = r("el-icon"), f = r("el-input"), g = r("el-checkbox"), v = r("el-link"), y = r("el-form-item"), S = r("el-row"), F = r("el-form"), k = r("el-button"), T = r("el-dialog");
8
- return n(), d(u, null, [
9
- b("div", z, [
10
- t(f, {
4
+ import g from "../_virtual/_plugin-vue_export-helper.js";
5
+ const O = { class: "yahee-complex-search" }, F = { class: "search-type-checkbox" };
6
+ function T(e, o, I, U, W, $) {
7
+ const u = n("el-option"), c = n("el-select"), f = n("Search"), b = n("el-icon"), V = n("el-input"), k = n("el-checkbox"), y = n("el-link"), C = n("BatchSearchDialog");
8
+ return a(), i(p, null, [
9
+ d("div", O, [
10
+ s(V, {
11
11
  modelValue: e.putSearch,
12
12
  "onUpdate:modelValue": o[2] || (o[2] = (l) => e.putSearch = l),
13
13
  placeholder: e.placeholderText,
@@ -15,20 +15,20 @@ function W(e, o, E, N, $, K) {
15
15
  clearable: "",
16
16
  maxlength: "30",
17
17
  onChange: e.handleSearch,
18
- onKeyup: B(e.handleSearch, ["enter"]),
18
+ onKeyup: v(e.handleSearch, ["enter"]),
19
19
  onPaste: e.pasteFormatInput,
20
20
  onClear: e.handleClear
21
- }, U({
22
- append: a(() => [
23
- t(w, {
21
+ }, B({
22
+ append: t(() => [
23
+ s(b, {
24
24
  size: "12",
25
25
  color: "#3366cc",
26
26
  style: { cursor: "pointer" },
27
27
  class: "icon-cusor",
28
28
  onClick: e.handleSearch
29
29
  }, {
30
- default: a(() => [
31
- t(C)
30
+ default: t(() => [
31
+ s(f)
32
32
  ]),
33
33
  _: 1
34
34
  }, 8, ["onClick"])
@@ -37,15 +37,15 @@ function W(e, o, E, N, $, K) {
37
37
  }, [
38
38
  e.showSelect ? {
39
39
  name: "prepend",
40
- fn: a(() => [
41
- t(p, {
40
+ fn: t(() => [
41
+ s(c, {
42
42
  modelValue: e.selectedSearchType,
43
43
  "onUpdate:modelValue": o[0] || (o[0] = (l) => e.selectedSearchType = l),
44
44
  size: "small",
45
45
  class: "custom-select"
46
46
  }, {
47
- default: a(() => [
48
- (n(!0), d(u, null, i(e.options, (l) => (n(), s(m, {
47
+ default: t(() => [
48
+ (a(!0), i(p, null, h(e.options, (l) => (a(), r(u, {
49
49
  key: l.label,
50
50
  label: l.label,
51
51
  value: l.value
@@ -57,16 +57,16 @@ function W(e, o, E, N, $, K) {
57
57
  key: "0"
58
58
  } : {
59
59
  name: "prepend",
60
- fn: a(() => [
61
- t(p, {
60
+ fn: t(() => [
61
+ s(c, {
62
62
  modelValue: e.selectedSearchType,
63
63
  "onUpdate:modelValue": o[1] || (o[1] = (l) => e.selectedSearchType = l),
64
64
  size: "small",
65
65
  class: "custom-select",
66
66
  disabled: ""
67
67
  }, {
68
- default: a(() => [
69
- (n(!0), d(u, null, i(e.defalutOptions, (l) => (n(), s(m, {
68
+ default: t(() => [
69
+ (a(!0), i(p, null, h(e.defaultOptions, (l) => (a(), r(u, {
70
70
  key: l.label,
71
71
  label: l.label,
72
72
  value: l.value
@@ -78,142 +78,45 @@ function W(e, o, E, N, $, K) {
78
78
  key: "1"
79
79
  }
80
80
  ]), 1032, ["modelValue", "placeholder", "onChange", "onKeyup", "onPaste", "onClear"]),
81
- b("div", I, [
82
- e.showWithinFilterCheckbox ? (n(), s(g, {
81
+ d("div", F, [
82
+ e.showWithinFilterCheckbox ? (a(), r(k, {
83
83
  key: 0,
84
84
  modelValue: e.localIsWithinFilterOptions,
85
85
  "onUpdate:modelValue": o[3] || (o[3] = (l) => e.localIsWithinFilterOptions = l),
86
86
  onChange: e.searchWithinFilterOptions
87
87
  }, {
88
- default: a(() => o[8] || (o[8] = [
89
- c(h("在筛选条件内查询"))
88
+ default: t(() => o[6] || (o[6] = [
89
+ S(" 在筛选条件内查询 ")
90
90
  ])),
91
91
  _: 1,
92
- __: [8]
93
- }, 8, ["modelValue", "onChange"])) : V("", !0),
94
- e.showPatchSearch ? (n(), s(v, {
92
+ __: [6]
93
+ }, 8, ["modelValue", "onChange"])) : m("", !0),
94
+ e.showPatchSearch ? (a(), r(y, {
95
95
  key: 1,
96
96
  type: "primary",
97
- onClick: e.showBatchSearchDialog
97
+ onClick: o[4] || (o[4] = (l) => e.showBatchSearch = !0)
98
98
  }, {
99
- default: a(() => o[9] || (o[9] = [
100
- c(h("批量查询"))
99
+ default: t(() => o[7] || (o[7] = [
100
+ S(" 批量查询 ")
101
101
  ])),
102
102
  _: 1,
103
- __: [9]
104
- }, 8, ["onClick"])) : V("", !0)
103
+ __: [7]
104
+ })) : m("", !0)
105
105
  ])
106
106
  ]),
107
- t(T, {
107
+ s(C, {
108
108
  modelValue: e.showBatchSearch,
109
- "onUpdate:modelValue": o[7] || (o[7] = (l) => e.showBatchSearch = l),
110
- title: "批量查询",
111
- width: "30%",
112
- "before-close": e.handleBatchSearchClose,
113
- "append-to-body": !0,
114
- draggable: ""
115
- }, {
116
- footer: a(() => [
117
- b("div", P, [
118
- t(k, {
119
- type: "primary",
120
- loading: e.confirmLoading,
121
- onClick: e.confirmSearch
122
- }, {
123
- default: a(() => o[10] || (o[10] = [
124
- c(h("确认"))
125
- ])),
126
- _: 1,
127
- __: [10]
128
- }, 8, ["loading", "onClick"]),
129
- t(k, { onClick: e.handleBatchSearchClose }, {
130
- default: a(() => o[11] || (o[11] = [
131
- c(h("关闭"))
132
- ])),
133
- _: 1,
134
- __: [11]
135
- }, 8, ["onClick"])
136
- ])
137
- ]),
138
- default: a(() => [
139
- t(F, {
140
- ref: "batchSearchFormRef",
141
- model: e.batchSearchForm,
142
- rules: e.rules
143
- }, {
144
- default: a(() => [
145
- t(S, { class: "row-class" }, {
146
- default: a(() => [
147
- t(y, { prop: "searchType" }, {
148
- default: a(() => [
149
- e.showSelect ? (n(), s(p, {
150
- key: 0,
151
- modelValue: e.batchSearchForm.searchType,
152
- "onUpdate:modelValue": o[4] || (o[4] = (l) => e.batchSearchForm.searchType = l),
153
- size: "small",
154
- style: { width: "100px", "background-color": "white" }
155
- }, {
156
- default: a(() => [
157
- (n(!0), d(u, null, i(e.isBatchSelectOptionsSameWithInput ? e.options : e.batchOptions, (l) => (n(), s(m, {
158
- key: l.label,
159
- label: l.label,
160
- value: l.value
161
- }, null, 8, ["label", "value"]))), 128))
162
- ]),
163
- _: 1
164
- }, 8, ["modelValue"])) : (n(), s(p, {
165
- key: 1,
166
- modelValue: e.batchSearchForm.searchType,
167
- "onUpdate:modelValue": o[5] || (o[5] = (l) => e.batchSearchForm.searchType = l),
168
- size: "small",
169
- style: { width: "95px", "background-color": "white" },
170
- disabled: ""
171
- }, {
172
- default: a(() => [
173
- (n(!0), d(u, null, i(e.defalutOptions, (l) => (n(), s(m, {
174
- key: l.label,
175
- label: l.label,
176
- value: l.value
177
- }, null, 8, ["label", "value"]))), 128))
178
- ]),
179
- _: 1
180
- }, 8, ["modelValue"]))
181
- ]),
182
- _: 1
183
- })
184
- ]),
185
- _: 1
186
- }),
187
- t(S, { class: "row-class" }, {
188
- default: a(() => [
189
- t(y, {
190
- prop: "searchContent",
191
- style: { width: "100%" }
192
- }, {
193
- default: a(() => [
194
- t(f, {
195
- modelValue: e.batchSearchForm.searchContent,
196
- "onUpdate:modelValue": o[6] || (o[6] = (l) => e.batchSearchForm.searchContent = l),
197
- placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
198
- type: "textarea",
199
- rows: 5,
200
- onPaste: e.pasteFormat
201
- }, null, 8, ["modelValue", "onPaste"])
202
- ]),
203
- _: 1
204
- })
205
- ]),
206
- _: 1
207
- })
208
- ]),
209
- _: 1
210
- }, 8, ["model", "rules"])
211
- ]),
212
- _: 1
213
- }, 8, ["modelValue", "before-close"])
109
+ "onUpdate:modelValue": o[5] || (o[5] = (l) => e.showBatchSearch = l),
110
+ "show-select": e.showSelect,
111
+ "is-batch-select-same-with-input": e.isBatchSelectOptionsSameWithInput,
112
+ "input-options": e.options,
113
+ "batch-options": e.batchOptions,
114
+ "default-options": e.defaultOptions,
115
+ onConfirm: e.handleBatchSearchConfirm
116
+ }, null, 8, ["modelValue", "show-select", "is-batch-select-same-with-input", "input-options", "batch-options", "default-options", "onConfirm"])
214
117
  ], 64);
215
118
  }
216
- const j = /* @__PURE__ */ O(_, [["render", W], ["__scopeId", "data-v-715db21e"]]);
119
+ const D = /* @__PURE__ */ g(w, [["render", T], ["__scopeId", "data-v-c03e960b"]]);
217
120
  export {
218
- j as default
121
+ D as default
219
122
  };
@@ -1,177 +1,71 @@
1
- import { defineComponent as w, toRefs as B, ref as n, watch as f } from "vue";
2
- import { defaultComplexSearchProps as a } from "./props.js";
3
- import { ElLink as g, ElOption as H, ElButton as x, ElRow as A, ElFormItem as R, ElForm as L, ElIcon as _, ElDialog as D, ElSelect as k, ElCheckbox as P, ElInput as j } from "element-plus";
4
- import "element-plus/theme-chalk/src/base.scss";
5
- import "element-plus/theme-chalk/src/input.scss";
6
- import "element-plus/theme-chalk/src/checkbox.scss";
7
- import "element-plus/theme-chalk/src/tag.scss";
8
- import "element-plus/theme-chalk/src/option.scss";
9
- import "element-plus/theme-chalk/src/option-group.scss";
10
- import "element-plus/theme-chalk/src/scrollbar.scss";
11
- import "element-plus/theme-chalk/src/popper.scss";
12
- import "element-plus/theme-chalk/src/select.scss";
13
- import "element-plus/theme-chalk/src/dialog.scss";
14
- import "element-plus/theme-chalk/src/overlay.scss";
15
- import "element-plus/theme-chalk/src/form.scss";
16
- import "element-plus/theme-chalk/src/form-item.scss";
17
- import "element-plus/theme-chalk/src/row.scss";
18
- import "element-plus/theme-chalk/src/button.scss";
19
- import "element-plus/theme-chalk/src/link.scss";
20
- import { Search as q } from "@element-plus/icons-vue";
21
- const se = w({
1
+ import { defineComponent as p, ref as u } from "vue";
2
+ import { defaultComplexSearchProps as e } from "./props.js";
3
+ import { useComplexSearch as f } from "./useComplexSearch.js";
4
+ import d from "./batch-search-dialog.vue.js";
5
+ const F = p({
22
6
  name: "YaheeComplexSearch",
23
7
  components: {
24
- ElInput: j,
25
- ElCheckbox: P,
26
- ElSelect: k,
27
- ElDialog: D,
28
- ElIcon: _,
29
- ElForm: L,
30
- ElFormItem: R,
31
- ElRow: A,
32
- ElButton: x,
33
- ElOption: H,
34
- ElLink: g,
35
- Search: q
8
+ BatchSearchDialog: d
36
9
  },
37
10
  props: {
38
- defaultSearch: {
39
- type: String,
40
- default: a().defaultSearch
41
- },
11
+ defaultSearch: { type: String, default: e().defaultSearch },
42
12
  options: {
43
13
  type: Array,
44
- default: a().options
45
- },
46
- placeholderText: {
47
- type: String,
48
- default: a().placeholderText
49
- },
50
- showPatchSearch: {
51
- type: Boolean,
52
- default: a().showPatchSearch
14
+ default: e().options
53
15
  },
16
+ placeholderText: { type: String, default: e().placeholderText },
17
+ showPatchSearch: { type: Boolean, default: e().showPatchSearch },
54
18
  showWithinFilterCheckbox: {
55
19
  type: Boolean,
56
- default: a().showWithinFilterCheckbox
57
- },
58
- isWithinFilterOptions: {
59
- type: Boolean,
60
- default: !1
61
- },
62
- specialOptions: {
63
- type: Array,
64
- default: a().specialOptions
65
- },
66
- normalOptions: {
67
- type: Array,
68
- default: a().normalOptions
69
- },
70
- showSelect: {
71
- type: Boolean,
72
- default: a().showSelect
20
+ default: e().showWithinFilterCheckbox
73
21
  },
22
+ isWithinFilterOptions: { type: Boolean, default: !1 },
23
+ showSelect: { type: Boolean, default: e().showSelect },
74
24
  searchItem: {
75
25
  type: Object,
76
- default: a().searchItem
26
+ default: e().searchItem
77
27
  },
78
28
  isBatchSelectOptionsSameWithInput: {
79
29
  type: Boolean,
80
- default: a().isBatchSelectOptionsSameWithInput
30
+ default: e().isBatchSelectOptionsSameWithInput
81
31
  },
82
32
  batchOptions: {
83
33
  type: Array,
84
- default: a().batchOptions
34
+ default: e().batchOptions
85
35
  }
86
36
  },
87
37
  emits: ["update:isWithinFilterOptions", "search"],
88
- setup(c, { emit: i }) {
89
- const { searchItem: S } = B(c), h = n(c.defaultSearch || "WHOLE_SEARCH"), s = n(""), o = n(c.isWithinFilterOptions), u = n(!1), p = n(!1), m = n(null), r = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), v = [{ value: "WHOLE_SEARCH", label: "综合搜索" }], O = {
90
- searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
91
- }, y = n({ ...S.value });
92
- f(
93
- () => S.value,
94
- (e) => {
95
- y.value = { ...e };
96
- },
97
- { deep: !0 }
98
- ), f(
99
- () => c.isWithinFilterOptions,
100
- (e) => {
101
- o.value = e;
102
- }
103
- ), f(o, (e) => {
104
- i("update:isWithinFilterOptions", e);
105
- });
106
- const C = () => {
107
- i("search", {
108
- putSearch: s.value || "",
109
- searchType: h.value,
110
- isWithinFilterOptions: o.value
111
- });
112
- }, E = () => {
113
- s.value = "", i("search", {
114
- putSearch: "",
115
- searchType: h.value,
116
- isWithinFilterOptions: o.value
117
- });
118
- }, W = () => {
119
- i("update:isWithinFilterOptions", o.value);
120
- }, F = () => {
121
- p.value = !0;
122
- }, I = () => {
123
- p.value = !1, r.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
124
- }, T = (e) => {
125
- const t = d(e);
126
- t !== null && (s.value = t, setTimeout(() => {
127
- i("search", {
128
- putSearch: s.value || "",
129
- searchType: h.value,
130
- isWithinFilterOptions: o.value
131
- });
132
- }, 50));
133
- }, b = (e) => {
134
- const t = d(e);
135
- if (t) {
136
- const l = r.value.searchContent || "";
137
- r.value.searchContent = l ? `${l},${t}` : t;
138
- }
139
- }, d = (e) => {
140
- var l;
141
- e.preventDefault();
142
- const t = (l = e.clipboardData) == null ? void 0 : l.getData("text/plain");
143
- return t == null ? void 0 : t.replace(/[\n\r\t]+/g, ",");
144
- };
38
+ setup(h, { emit: t }) {
39
+ const {
40
+ selectedSearchType: i,
41
+ putSearch: r,
42
+ localIsWithinFilterOptions: a,
43
+ handleSearch: l,
44
+ handleClear: n,
45
+ pasteFormatInput: s
46
+ } = f(h, t), c = u(!1);
145
47
  return {
146
- selectedSearchType: h,
147
- putSearch: s,
148
- localIsWithinFilterOptions: o,
149
- confirmLoading: u,
150
- showBatchSearch: p,
151
- batchSearchFormRef: m,
152
- batchSearchForm: r,
153
- defalutOptions: v,
154
- rules: O,
155
- showBatchSearchDialog: F,
156
- handleBatchSearchClose: I,
157
- searchWithinFilterOptions: W,
158
- handleSearch: C,
159
- handleClear: E,
160
- pasteFormatInput: T,
161
- confirmSearch: () => {
162
- m.value && m.value.validate((t) => {
163
- var l;
164
- t && ((l = r.value.searchContent) != null && l.trim()) && (u.value = !0, i("search", {
165
- putSearch: r.value.searchContent.trim(),
166
- searchType: r.value.searchType,
167
- isWithinFilterOptions: o.value
168
- }), r.value = { searchType: "WHOLE_SEARCH", searchContent: "" }, p.value = !1, u.value = !1);
48
+ selectedSearchType: i,
49
+ putSearch: r,
50
+ localIsWithinFilterOptions: a,
51
+ showBatchSearch: c,
52
+ defaultOptions: [{ value: "WHOLE_SEARCH", label: "综合搜索" }],
53
+ handleSearch: l,
54
+ handleClear: n,
55
+ pasteFormatInput: s,
56
+ handleBatchSearchConfirm: (o) => {
57
+ t("search", {
58
+ putSearch: o.searchContent,
59
+ searchType: o.searchType,
60
+ isWithinFilterOptions: a.value
169
61
  });
170
62
  },
171
- pasteFormat: b
63
+ searchWithinFilterOptions: () => {
64
+ t("update:isWithinFilterOptions", a.value);
65
+ }
172
66
  };
173
67
  }
174
68
  });
175
69
  export {
176
- se as default
70
+ F as default
177
71
  };