yahee-components 0.0.9 → 0.0.12

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 (213) hide show
  1. package/es/annex-upload/annex-upload.vue.js +6 -6
  2. package/es/api/server.js +29 -0
  3. package/es/api/tool.js +69 -0
  4. package/es/comprehensive-search/comprehensive-search.vue.js +10 -10
  5. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +218 -0
  6. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +4 -0
  7. package/es/country-platform-shop-condition/index.js +7 -0
  8. package/es/country-platform-shop-condition/style/index.css +48 -0
  9. package/es/drop-down-condition/drop-down-condition.vue.js +215 -0
  10. package/es/drop-down-condition/drop-down-condition.vue2.js +4 -0
  11. package/es/drop-down-condition/index.js +7 -0
  12. package/es/drop-down-condition/style/index.css +45 -0
  13. package/es/image-upload/image-upload.vue.js +125 -124
  14. package/es/index.js +28 -15
  15. package/es/installs.js +18 -10
  16. package/es/left-condition/index.js +7 -0
  17. package/es/left-condition/left-condition-sub.vue.js +95 -0
  18. package/es/left-condition/left-condition-sub.vue2.js +4 -0
  19. package/es/left-condition/left-condition.vue.js +214 -0
  20. package/es/left-condition/left-condition.vue2.js +4 -0
  21. package/es/left-condition/style/index.css +11 -0
  22. package/es/left-condition-enum/index.js +7 -0
  23. package/es/left-condition-enum/left-condition-enum.vue.js +76 -0
  24. package/es/left-condition-enum/left-condition-enum.vue2.js +4 -0
  25. package/es/left-condition-enum/style/index.css +0 -0
  26. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
  27. package/es/operation-log/operation-log-content.vue.js +6 -6
  28. package/es/operation-log/operation-log-form.vue.js +2 -2
  29. package/es/operation-log/operation-log-form.vue2.js +17 -17
  30. package/es/operation-log/operation-log.vue.js +50 -49
  31. package/es/packages/components/api/log/index.js +15 -0
  32. package/es/packages/components/api/log-server.js +17 -21
  33. package/es/packages/components/api/server.js +19 -0
  34. package/es/packages/components/api/tool.js +57 -0
  35. package/es/packages/components/api/{requestTools.js → upload-server.js} +13 -10
  36. package/es/packages/components/hooks/useClipboard.js +16 -14
  37. package/es/packages/components/hooks/useImport.js +14 -12
  38. package/es/packages/components/hooks/useUpload.js +9 -9
  39. package/es/static/CommonObject.js +4 -0
  40. package/es/style.css +81 -196
  41. package/es/utils/config.js +19 -0
  42. package/es/utils/const.js +19 -0
  43. package/es/utils/style.js +28 -0
  44. package/es/utils/translate.js +50 -31
  45. package/lib/country-platform-shop-condition/style/index.css +48 -0
  46. package/lib/drop-down-condition/style/index.css +45 -0
  47. package/lib/left-condition/style/index.css +11 -0
  48. package/lib/left-condition-enum/style/index.css +0 -0
  49. package/lib/style.css +81 -196
  50. package/package.json +1 -1
  51. package/types/hooks/useClipboard.d.ts +7 -0
  52. package/types/hooks/useImg.d.ts +10 -0
  53. package/types/hooks/useImgPath.d.ts +5 -0
  54. package/types/hooks/useImport.d.ts +11 -0
  55. package/types/hooks/useUpload.d.ts +12 -0
  56. package/types/index.d.ts +6 -1204
  57. package/types/src/annex-upload/annex-upload.d.ts +30 -0
  58. package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
  59. package/types/src/annex-upload/index.d.ts +123 -0
  60. package/types/src/annex-upload/mimeType.d.ts +2 -0
  61. package/types/src/api/server.d.ts +6 -0
  62. package/types/src/api/tool.d.ts +6 -0
  63. package/types/src/api/types.d.ts +17 -0
  64. package/types/src/components.d.ts +10 -0
  65. package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
  66. package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +33 -0
  67. package/types/src/comprehensive-search/index.d.ts +36 -0
  68. package/types/src/copy/copy.d.ts +12 -0
  69. package/types/src/copy/copy.vue.d.ts +21 -0
  70. package/types/src/copy/index.d.ts +32 -0
  71. package/types/src/country-platform-shop-condition/country-platform-shop-condition.d.ts +17 -0
  72. package/types/src/country-platform-shop-condition/country-platform-shop-condition.vue.d.ts +14 -0
  73. package/types/src/country-platform-shop-condition/index.d.ts +16 -0
  74. package/types/src/drop-down-condition/drop-down-condition.d.ts +6 -0
  75. package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +38 -0
  76. package/types/src/drop-down-condition/index.d.ts +40 -0
  77. package/types/src/image-upload/image-upload.d.ts +26 -0
  78. package/types/src/image-upload/image-upload.vue.d.ts +43 -0
  79. package/types/src/image-upload/index.d.ts +94 -0
  80. package/types/src/index.d.ts +7 -0
  81. package/types/src/input/index.d.ts +16 -0
  82. package/types/src/input/input.d.ts +18 -0
  83. package/types/src/input/input.vue.d.ts +14 -0
  84. package/types/src/installs.d.ts +535 -0
  85. package/types/src/left-condition/index.d.ts +69 -0
  86. package/types/src/left-condition/left-condition-sub.vue.d.ts +47 -0
  87. package/types/src/left-condition/left-condition.d.ts +5 -0
  88. package/types/src/left-condition/left-condition.vue.d.ts +68 -0
  89. package/types/src/left-condition-enum/index.d.ts +153 -0
  90. package/types/src/left-condition-enum/left-condition-enum.d.ts +5 -0
  91. package/types/src/left-condition-enum/left-condition-enum.vue.d.ts +151 -0
  92. package/types/src/operation-log/index.d.ts +9 -0
  93. package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
  94. package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
  95. package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
  96. package/types/src/operation-log/operation-log.d.ts +11 -0
  97. package/types/src/operation-log/operation-log.vue.d.ts +6 -0
  98. package/types/src/static/CommonObject.d.ts +18 -0
  99. package/types/src/static/CommonVariables.d.ts +4 -0
  100. package/types/src/utils/config.d.ts +8 -0
  101. package/types/src/utils/const.d.ts +19 -0
  102. package/types/src/utils/functions.d.ts +1 -0
  103. package/types/src/utils/install.d.ts +8 -0
  104. package/types/src/utils/storage.d.ts +18 -0
  105. package/types/src/utils/style.d.ts +19 -0
  106. package/types/src/utils/to-kebab-case.d.ts +1 -0
  107. package/types/src/utils/translate.d.ts +5 -0
  108. package/types/src/utils/typescript.d.ts +5 -0
  109. package/es/packages/components/api/remarkApi.js +0 -15
  110. package/es/packages/components/api/requestRemark.js +0 -47
  111. package/lib/_virtual/_commonjsHelpers.js +0 -1
  112. package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
  113. package/lib/_virtual/dayjs.min.js +0 -1
  114. package/lib/_virtual/lodash.js +0 -1
  115. package/lib/annex-upload/annex-upload.vue.js +0 -1
  116. package/lib/annex-upload/annex-upload.vue2.js +0 -1
  117. package/lib/annex-upload/index.js +0 -1
  118. package/lib/annex-upload/mimeType.js +0 -1
  119. package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
  120. package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
  121. package/lib/comprehensive-search/index.js +0 -1
  122. package/lib/copy/copy.vue.js +0 -1
  123. package/lib/copy/copy.vue2.js +0 -1
  124. package/lib/copy/index.js +0 -1
  125. package/lib/image-upload/image-upload.vue.js +0 -1
  126. package/lib/image-upload/image-upload.vue2.js +0 -1
  127. package/lib/image-upload/index.js +0 -1
  128. package/lib/index.js +0 -1
  129. package/lib/input/index.js +0 -1
  130. package/lib/input/input.vue.js +0 -1
  131. package/lib/input/input.vue2.js +0 -1
  132. package/lib/installs.js +0 -1
  133. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +0 -3
  134. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +0 -1
  135. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +0 -1
  136. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +0 -1
  137. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +0 -1
  138. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +0 -1
  139. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +0 -1
  140. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +0 -2
  141. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +0 -1
  142. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +0 -2
  143. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +0 -1
  144. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +0 -1
  145. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +0 -1
  146. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +0 -1
  147. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +0 -1
  148. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +0 -1
  149. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +0 -1
  150. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +0 -1
  151. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +0 -1
  152. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -1
  153. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -1
  154. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +0 -1
  155. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +0 -1
  156. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +0 -1
  157. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +0 -1
  158. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +0 -1
  159. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +0 -1
  160. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
  161. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +0 -1
  162. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -1
  163. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +0 -1
  164. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +0 -2
  165. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +0 -1
  166. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +0 -1
  167. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +0 -1
  168. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +0 -1
  169. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +0 -1
  170. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +0 -1
  171. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +0 -1
  172. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -1
  173. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +0 -1
  174. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +0 -1
  175. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -1
  176. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -1
  177. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -1
  178. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +0 -1
  179. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +0 -1
  180. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +0 -1
  181. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +0 -1
  182. package/lib/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +0 -1
  183. package/lib/node_modules/.pnpm/element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -1
  184. package/lib/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +0 -27
  185. package/lib/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +0 -1
  186. package/lib/operation-log/index.js +0 -1
  187. package/lib/operation-log/operation-log-content.vue.js +0 -1
  188. package/lib/operation-log/operation-log-content.vue2.js +0 -1
  189. package/lib/operation-log/operation-log-dialog.vue.js +0 -1
  190. package/lib/operation-log/operation-log-dialog.vue2.js +0 -1
  191. package/lib/operation-log/operation-log-form.vue.js +0 -1
  192. package/lib/operation-log/operation-log-form.vue2.js +0 -1
  193. package/lib/operation-log/operation-log.vue.js +0 -1
  194. package/lib/operation-log/operation-log.vue2.js +0 -1
  195. package/lib/packages/components/api/log-server.js +0 -1
  196. package/lib/packages/components/api/remarkApi.js +0 -1
  197. package/lib/packages/components/api/requestRemark.js +0 -1
  198. package/lib/packages/components/api/requestTools.js +0 -1
  199. package/lib/packages/components/assets/images/errorimg.png.js +0 -1
  200. package/lib/packages/components/assets/images/excel.png.js +0 -1
  201. package/lib/packages/components/assets/images/file-word.png.js +0 -1
  202. package/lib/packages/components/assets/images/pdf.png.js +0 -1
  203. package/lib/packages/components/assets/images/ppt.png.js +0 -1
  204. package/lib/packages/components/assets/images/vue.svg.js +0 -1
  205. package/lib/packages/components/hooks/useClipboard.js +0 -1
  206. package/lib/packages/components/hooks/useImg.js +0 -1
  207. package/lib/packages/components/hooks/useImgPath.js +0 -1
  208. package/lib/packages/components/hooks/useImport.js +0 -1
  209. package/lib/packages/components/hooks/useUpload.js +0 -1
  210. package/lib/utils/install.js +0 -1
  211. package/lib/utils/storage.js +0 -1
  212. package/lib/utils/translate.js +0 -1
  213. /package/es/node_modules/.pnpm/{element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_ → element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_}/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -0
@@ -0,0 +1,215 @@
1
+ import { defineComponent as ae, ref as x, reactive as E, toRefs as ce, watch as re, onMounted as ie, resolveComponent as V, openBlock as a, createElementBlock as v, createVNode as Y, normalizeStyle as j, withCtx as f, createTextVNode as _, toDisplayString as p, unref as r, createCommentVNode as w, createElementVNode as S, Fragment as b, renderList as K, createBlock as k } from "vue";
2
+ import s from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
+ import { Get as de } from "../api/server.js";
4
+ import { stylesUtils as M } from "../utils/style.js";
5
+ import { storage as H } from "../utils/storage.js";
6
+ import { M2 as y } from "../utils/translate.js";
7
+ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ge = ["onClick"], xe = { class: "scrollable-container" }, ke = { key: 0 }, Ve = /* @__PURE__ */ ae({
8
+ name: "YaheeDropDownCondition",
9
+ __name: "drop-down-condition",
10
+ props: {
11
+ filterList: {},
12
+ totalCount: {},
13
+ level1Count: {},
14
+ level2Count: {},
15
+ filterKey: {},
16
+ enumEntity: {},
17
+ noNeedRefreshNumFilterName: {}
18
+ },
19
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
20
+ setup(J, { emit: Q }) {
21
+ const X = x(), o = E({});
22
+ let O = E({});
23
+ const i = E({}), h = E({}), m = x(!0), F = J, T = Q, { filterKey: L, filterList: q, totalCount: C, level1Count: B, level2Count: A, noNeedRefreshNumFilterName: I } = ce(F), W = x(s.get(C, "value", 0)), R = x(s.get(B, "value", [])), z = x(s.get(A, "value", [])), d = x();
24
+ q.value && (d.value = [...q.value]);
25
+ function G(e) {
26
+ const { text: l, value: u } = e, n = o[l];
27
+ s.isNil(n) || s.isEmpty(n) ? o[l] = [u] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), i[l] = M.getBackgroundColor(!0), m.value = !1) : (se(l), i[e.text] = {}, m.value = !0), m.value = D(), U();
28
+ }
29
+ function D() {
30
+ const e = d.value.filter((n) => !s.isEmpty(n.subs)).flatMap((n) => n.subs).length, l = d.value.filter((n) => s.isEmpty(n.subs)).length;
31
+ return Object.values(o).map((n) => n.length).reduce((n, g) => n + g, 0) === e + l || s.isEmpty(Object.values(o).flat());
32
+ }
33
+ function Z(e) {
34
+ s.isEmpty(o[e.text]) ? (i[e.text] = {}, h[e.text] = !1) : o[e.text].length === s.get(e, "subs.length", 1) ? (i[e.text] = M.getBackgroundColor(!0), h[e.text] = !0) : i[e.text] = {
35
+ backgroundColor: "#0F7535",
36
+ color: "#fff",
37
+ borderColor: "#0F7535"
38
+ }, m.value = D(), U();
39
+ }
40
+ function ee() {
41
+ m.value = D(), U();
42
+ }
43
+ function U() {
44
+ T("setNoNeedRefreshNumFilterName", L.value);
45
+ }
46
+ function te() {
47
+ m.value = !0;
48
+ for (const e in i)
49
+ i[e] = {};
50
+ for (const e in o)
51
+ delete o[e];
52
+ for (const e in h)
53
+ delete h[e];
54
+ P();
55
+ }
56
+ const le = (e) => M.getBackgroundColor(e);
57
+ function oe(e) {
58
+ if (e)
59
+ O = s.cloneDeep(o);
60
+ else {
61
+ if (s.isEqual(O, o))
62
+ return;
63
+ P();
64
+ }
65
+ }
66
+ function P() {
67
+ T("filterChange", [
68
+ {
69
+ filterKey: L.value,
70
+ checkedValues: Object.values(o).flat()
71
+ }
72
+ ]);
73
+ }
74
+ function ne(e) {
75
+ const l = d.value.find((u) => u.text === e);
76
+ l && l.subs && (o[e] = l.subs.map((u) => u.value));
77
+ }
78
+ function se(e) {
79
+ o[e] = [];
80
+ }
81
+ return re(
82
+ [() => C.value, () => B.value, () => A.value],
83
+ ([e, l, u], [n, g, $]) => {
84
+ console.log(e, l, u), console.log(n, g, $), (!I.value || !s.eq(I.value, L.value)) && (W.value = C.value, R.value = B.value, z.value = A.value);
85
+ }
86
+ ), ie(() => {
87
+ const e = `filter-key-${F.enumEntity}`, l = H.getWithExpireTime(e);
88
+ l ? d.value = l : de(`/${F.enumEntity}`).then((u) => {
89
+ d.value = u.data, H.setWithExpireTime(e, d.value, 1200 * 1e3);
90
+ }).catch((u) => {
91
+ console.log(u);
92
+ });
93
+ }), (e, l) => {
94
+ const u = V("el-button"), n = V("el-checkbox"), g = V("el-checkbox-group"), $ = V("el-dropdown");
95
+ return a(), v("div", ve, [
96
+ Y(u, {
97
+ size: "small",
98
+ class: "el-button custom-total-button",
99
+ style: j(le(m.value)),
100
+ onClick: te
101
+ }, {
102
+ default: f(() => [
103
+ _(p(r(y)("全部")) + " ", 1),
104
+ r(C) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : w("", !0)
105
+ ]),
106
+ _: 1
107
+ }, 8, ["style"]),
108
+ Y($, {
109
+ ref_key: "dropdown1",
110
+ ref: X,
111
+ onVisibleChange: oe
112
+ }, {
113
+ dropdown: f(() => [
114
+ S("div", me, [
115
+ (a(!0), v(b, null, K(d.value, (t) => (a(), k(g, {
116
+ key: t.value,
117
+ modelValue: o[t.text],
118
+ "onUpdate:modelValue": (c) => o[t.text] = c,
119
+ size: "small",
120
+ class: "checkbox-group inner-checkbox-group",
121
+ onChange: (c) => Z(t)
122
+ }, {
123
+ default: f(() => [
124
+ r(s).isNil(t.subs) ? (a(), k(n, {
125
+ key: 1,
126
+ value: t.value,
127
+ class: "checkbox custom-button",
128
+ border: ""
129
+ }, {
130
+ default: f(() => [
131
+ _(p(r(y)(t.text)), 1)
132
+ ]),
133
+ _: 2
134
+ }, 1032, ["value"])) : (a(), v(b, { key: 0 }, [
135
+ S("span", {
136
+ class: "el-button custom-button el-button--small inner-el-button",
137
+ style: j(i[t.text]),
138
+ onClick: (c) => G(t)
139
+ }, p(r(y)(t.text)), 13, ge),
140
+ S("div", xe, [
141
+ (a(!0), v(b, null, K(t.subs, (c) => (a(), k(n, {
142
+ key: c.value,
143
+ class: "checkbox custom-button",
144
+ value: c.value,
145
+ border: ""
146
+ }, {
147
+ default: f(() => {
148
+ var N;
149
+ return [
150
+ _(p(r(y)(c.text)), 1),
151
+ r(s).isEmpty(z.value) ? w("", !0) : (a(), v("span", ke, "(" + p((N = z.value.filter((ue) => ue.value == c.value)[0]) == null ? void 0 : N.count) + ")", 1))
152
+ ];
153
+ }),
154
+ _: 2
155
+ }, 1032, ["value"]))), 128))
156
+ ])
157
+ ], 64))
158
+ ]),
159
+ _: 2
160
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
161
+ ])
162
+ ]),
163
+ default: f(() => [
164
+ S("div", pe, [
165
+ (a(!0), v(b, null, K(d.value, (t) => (a(), v(b, null, [
166
+ t.isCheckbox ? (a(), k(g, {
167
+ key: t.value,
168
+ modelValue: o[t.text],
169
+ "onUpdate:modelValue": (c) => o[t.text] = c,
170
+ class: "checkbox-group",
171
+ size: "small",
172
+ onChange: ee
173
+ }, {
174
+ default: f(() => [
175
+ t.isCheckbox ? (a(), k(n, {
176
+ key: 0,
177
+ class: "custom-button",
178
+ value: t.value,
179
+ border: ""
180
+ }, {
181
+ default: f(() => [
182
+ _(p(r(y)(t.text)), 1)
183
+ ]),
184
+ _: 2
185
+ }, 1032, ["value"])) : w("", !0)
186
+ ]),
187
+ _: 2
188
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), k(u, {
189
+ key: t.text,
190
+ style: j(i[t.text]),
191
+ class: "custom-button",
192
+ size: "small",
193
+ onClick: (c) => G(t)
194
+ }, {
195
+ default: f(() => {
196
+ var c;
197
+ return [
198
+ _(p(r(y)(t.text)), 1),
199
+ r(s).isEmpty(R.value) ? w("", !0) : (a(), v("span", he, "(" + p((c = R.value.filter((N) => N.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
200
+ ];
201
+ }),
202
+ _: 2
203
+ }, 1032, ["style", "onClick"]))
204
+ ], 64))), 256))
205
+ ])
206
+ ]),
207
+ _: 1
208
+ }, 512)
209
+ ]);
210
+ };
211
+ }
212
+ });
213
+ export {
214
+ Ve as default
215
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./drop-down-condition.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { withInstall as o } from "../utils/install.js";
2
+ import t from "./drop-down-condition.vue.js";
3
+ const r = o(t);
4
+ export {
5
+ r as YaheeDropDownCondition,
6
+ r as default
7
+ };
@@ -0,0 +1,45 @@
1
+ @charset "UTF-8";
2
+ .yahee-drop-down-condition {
3
+ /* 滚动槽 */
4
+ /* 滚动条滑块 */
5
+ }
6
+ .yahee-drop-down-condition .checkbox-group {
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .yahee-drop-down-condition .checkbox {
11
+ margin-top: 5px;
12
+ }
13
+ .yahee-drop-down-condition .custom-total-button {
14
+ margin-right: 0;
15
+ padding: 1px 4px;
16
+ height: 22px;
17
+ }
18
+ .yahee-drop-down-condition .custom-button {
19
+ margin-right: 0;
20
+ padding: 1px 4px;
21
+ min-height: 22px;
22
+ height: 22px;
23
+ margin-left: 5px;
24
+ }
25
+ .yahee-drop-down-condition .custom-button.inner-el-button {
26
+ margin-top: 5px;
27
+ }
28
+ .yahee-drop-down-condition .scrollable-container {
29
+ max-height: 700px;
30
+ overflow-y: auto;
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar {
35
+ width: 5px;
36
+ }
37
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar-track {
38
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
39
+ border-radius: 10px;
40
+ }
41
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar-thumb {
42
+ border-radius: 10px;
43
+ background: rgba(0, 0, 0, 0.1);
44
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
45
+ }
@@ -1,7 +1,7 @@
1
- import { defineComponent as U, ref as c, resolveDirective as B, openBlock as d, createElementBlock as p, Fragment as N, withDirectives as D, createVNode as t, unref as i, normalizeStyle as F, withCtx as s, renderSlot as L, createElementVNode as n, createTextVNode as M, withModifiers as w, createCommentVNode as $, createBlock as b } from "vue";
2
- import S from "../packages/components/hooks/useImg.js";
3
- import { useIsImg as P, useUpload as T } from "../packages/components/hooks/useUpload.js";
4
- import { ElUpload as _, ElImage as j, ElIcon as g, ElDialog as A, ElMessage as h } from "element-plus";
1
+ import { defineComponent as U, ref as g, onMounted as B, getCurrentInstance as N, openBlock as d, createElementBlock as p, Fragment as F, withDirectives as D, createVNode as a, unref as t, normalizeStyle as L, withCtx as o, renderSlot as M, createElementVNode as n, createTextVNode as $, withModifiers as I, createCommentVNode as b, createBlock as P } from "vue";
2
+ import w from "../packages/components/hooks/useImg.js";
3
+ import { useIsImg as T, useUpload as j } from "../packages/components/hooks/useUpload.js";
4
+ import { vLoading as S, ElUpload as A, ElImage as G, ElIcon as c, ElDialog as x, ElMessage as h } from "element-plus";
5
5
  import "element-plus/theme-chalk/src/base.scss";
6
6
  import "element-plus/theme-chalk/src/upload.scss";
7
7
  import "element-plus/theme-chalk/src/progress.scss";
@@ -11,11 +11,11 @@ import "element-plus/theme-chalk/src/image.scss";
11
11
  import "element-plus/theme-chalk/src/image-viewer.scss";
12
12
  import "element-plus/theme-chalk/src/badge.scss";
13
13
  import "element-plus/theme-chalk/src/message.scss";
14
- import { Delete as G, Plus as R, CircleCloseFilled as Y } from "@element-plus/icons-vue";
15
- const q = { class: "yahee-image-upload" }, x = {
14
+ import { Delete as R, Plus as Y, CircleCloseFilled as _ } from "@element-plus/icons-vue";
15
+ const q = { class: "yahee-image-upload" }, H = {
16
16
  key: 0,
17
17
  style: { width: "100%", height: "100%" }
18
- }, H = ["src"], re = /* @__PURE__ */ U({
18
+ }, J = ["src"], de = /* @__PURE__ */ U({
19
19
  name: "YaheeImageUpload",
20
20
  __name: "image-upload",
21
21
  props: {
@@ -31,146 +31,147 @@ const q = { class: "yahee-image-upload" }, x = {
31
31
  },
32
32
  emits: ["update:modelValue", "change"],
33
33
  setup(y, { emit: V }) {
34
- const r = y, f = V, m = c(!1), k = (e) => {
35
- if (!P(e.raw)) {
34
+ const s = y, f = V, u = g(!1), C = (e) => {
35
+ if (!T(e.raw)) {
36
36
  h.error("只能选择图片格式文件!");
37
37
  return;
38
38
  }
39
- if (r.limitFileSize) {
39
+ if (s.limitFileSize) {
40
40
  let l = e.size;
41
- if (r.fileSizeUnit.toLowerCase() == "kb" ? l = e.size / 1024 : l = e.size / 1024 / 1024, !(l < r.fileSize)) {
42
- h.error(`图片大小不能超过 ${r.fileSize}${r.fileSizeUnit}!`);
41
+ if (s.fileSizeUnit.toLowerCase() == "kb" ? l = e.size / 1024 : l = e.size / 1024 / 1024, !(l < s.fileSize)) {
42
+ h.error(`图片大小不能超过 ${s.fileSize}${s.fileSizeUnit}!`);
43
43
  return;
44
44
  }
45
45
  }
46
- m.value = !0, T(r.fileType, e.raw).then((l) => {
47
- const o = {
46
+ u.value = !0, j(s.fileType, e.raw).then((l) => {
47
+ const r = {
48
48
  fileName: e.name,
49
49
  fileId: l[0],
50
50
  index: 0
51
51
  };
52
- f("update:modelValue", o), f("change", {
52
+ f("update:modelValue", r), f("change", {
53
53
  fileName: e.name,
54
54
  fileId: l[0],
55
55
  index: 0
56
- }), m.value = !1;
56
+ }), u.value = !1;
57
57
  }).catch((l) => {
58
- h.error("update image error", l), m.value = !1;
58
+ h.error("update image error", l), u.value = !1;
59
59
  });
60
- }, C = () => {
60
+ }, k = () => {
61
61
  f("update:modelValue", "");
62
- }, z = c(""), u = c(!1), E = () => {
62
+ }, z = g(""), m = g(!1), E = () => {
63
63
  var e;
64
- z.value = S((e = r.modelValue) == null ? void 0 : e.fileId, !0), u.value = !0;
64
+ z.value = w((e = s.modelValue) == null ? void 0 : e.fileId, !0), m.value = !0;
65
65
  };
66
- return (e, a) => {
67
- const l = B("loading");
68
- return d(), p(N, null, [
69
- D((d(), p("div", q, [
70
- t(i(_), {
71
- class: "picture-uploader",
72
- action: "#",
73
- style: F({ width: e.imgSize.width * e.zoom + "px", height: e.imgSize.height * e.zoom + "px" }),
74
- "show-file-list": !1,
75
- multiple: !1,
76
- "auto-upload": !1,
77
- accept: "image/jpeg,image/jpg,image/gif,image/png",
78
- "on-change": k
79
- }, {
80
- default: s(() => {
81
- var o;
82
- return [
83
- L(e.$slots, "default", {
84
- value: (o = e.modelValue) == null ? void 0 : o.fileId
85
- }, () => {
86
- var v, I;
87
- return [
88
- (v = e.modelValue) != null && v.fileId ? (d(), p("div", x, [
89
- t(i(j), {
90
- class: "picture",
91
- src: i(S)((I = e.modelValue) == null ? void 0 : I.fileId)
92
- }, {
93
- error: s(() => a[2] || (a[2] = [
94
- n("div", { style: { display: "none" } }, null, -1)
95
- ])),
96
- placeholder: s(() => a[3] || (a[3] = [
97
- n("div", { class: "image-slot" }, [
98
- M("Loading"),
99
- n("span", { class: "dot" }, "...")
100
- ], -1)
101
- ])),
102
- _: 1
103
- }, 8, ["src"]),
104
- n("span", {
105
- class: "upload-actions",
106
- onClick: w(E, ["stop"])
107
- }, [
108
- e.showDelete ? (d(), p("span", {
109
- key: 0,
110
- class: "upload-delete",
111
- onClick: w(C, ["stop"])
112
- }, [
113
- t(i(g), {
114
- size: 20,
115
- color: "#ff1e1e"
116
- }, {
117
- default: s(() => [
118
- t(i(G))
119
- ]),
120
- _: 1
121
- })
122
- ])) : $("", !0)
123
- ])
124
- ])) : (d(), b(i(g), {
125
- key: 1,
126
- class: "picture-uploader-icon",
127
- size: 20
66
+ return B(() => {
67
+ var i;
68
+ const e = (i = N()) == null ? void 0 : i.appContext.app;
69
+ e && e.directive("loading", S);
70
+ }), (e, i) => (d(), p(F, null, [
71
+ D((d(), p("div", q, [
72
+ a(t(A), {
73
+ class: "picture-uploader",
74
+ action: "#",
75
+ style: L({ width: e.imgSize.width * e.zoom + "px", height: e.imgSize.height * e.zoom + "px" }),
76
+ "show-file-list": !1,
77
+ multiple: !1,
78
+ "auto-upload": !1,
79
+ accept: "image/jpeg,image/jpg,image/gif,image/png",
80
+ "on-change": C
81
+ }, {
82
+ default: o(() => {
83
+ var l;
84
+ return [
85
+ M(e.$slots, "default", {
86
+ value: (l = e.modelValue) == null ? void 0 : l.fileId
87
+ }, () => {
88
+ var r, v;
89
+ return [
90
+ (r = e.modelValue) != null && r.fileId ? (d(), p("div", H, [
91
+ a(t(G), {
92
+ class: "picture",
93
+ src: t(w)((v = e.modelValue) == null ? void 0 : v.fileId)
128
94
  }, {
129
- default: s(() => [
130
- t(i(R))
131
- ]),
95
+ error: o(() => i[2] || (i[2] = [
96
+ n("div", { style: { display: "none" } }, null, -1)
97
+ ])),
98
+ placeholder: o(() => i[3] || (i[3] = [
99
+ n("div", { class: "image-slot" }, [
100
+ $("Loading"),
101
+ n("span", { class: "dot" }, "...")
102
+ ], -1)
103
+ ])),
132
104
  _: 1
133
- }))
134
- ];
135
- })
136
- ];
137
- }),
138
- _: 3
139
- }, 8, ["style"])
140
- ])), [
141
- [l, m.value]
105
+ }, 8, ["src"]),
106
+ n("span", {
107
+ class: "upload-actions",
108
+ onClick: I(E, ["stop"])
109
+ }, [
110
+ e.showDelete ? (d(), p("span", {
111
+ key: 0,
112
+ class: "upload-delete",
113
+ onClick: I(k, ["stop"])
114
+ }, [
115
+ a(t(c), {
116
+ size: 20,
117
+ color: "#ff1e1e"
118
+ }, {
119
+ default: o(() => [
120
+ a(t(R))
121
+ ]),
122
+ _: 1
123
+ })
124
+ ])) : b("", !0)
125
+ ])
126
+ ])) : (d(), P(t(c), {
127
+ key: 1,
128
+ class: "picture-uploader-icon",
129
+ size: 20
130
+ }, {
131
+ default: o(() => [
132
+ a(t(Y))
133
+ ]),
134
+ _: 1
135
+ }))
136
+ ];
137
+ })
138
+ ];
139
+ }),
140
+ _: 3
141
+ }, 8, ["style"])
142
+ ])), [
143
+ [t(S), u.value]
144
+ ]),
145
+ a(t(x), {
146
+ modelValue: m.value,
147
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => m.value = l),
148
+ "show-close": !1
149
+ }, {
150
+ header: o(() => [
151
+ a(t(c), {
152
+ size: 40,
153
+ color: "#a4a4a4",
154
+ class: "pull-right marginB6",
155
+ onClick: i[0] || (i[0] = (l) => m.value = !1)
156
+ }, {
157
+ default: o(() => [
158
+ a(t(_))
159
+ ]),
160
+ _: 1
161
+ })
142
162
  ]),
143
- t(i(A), {
144
- modelValue: u.value,
145
- "onUpdate:modelValue": a[1] || (a[1] = (o) => u.value = o),
146
- "show-close": !1
147
- }, {
148
- header: s(() => [
149
- t(i(g), {
150
- size: 40,
151
- color: "#a4a4a4",
152
- class: "pull-right marginB6",
153
- onClick: a[0] || (a[0] = (o) => u.value = !1)
154
- }, {
155
- default: s(() => [
156
- t(i(Y))
157
- ]),
158
- _: 1
159
- })
160
- ]),
161
- default: s(() => [
162
- n("img", {
163
- style: { width: "100%" },
164
- src: z.value,
165
- alt: "Preview Image"
166
- }, null, 8, H)
167
- ]),
168
- _: 1
169
- }, 8, ["modelValue"])
170
- ], 64);
171
- };
163
+ default: o(() => [
164
+ n("img", {
165
+ style: { width: "100%" },
166
+ src: z.value,
167
+ alt: "Preview Image"
168
+ }, null, 8, J)
169
+ ]),
170
+ _: 1
171
+ }, 8, ["modelValue"])
172
+ ], 64));
172
173
  }
173
174
  });
174
175
  export {
175
- re as default
176
+ de as default
176
177
  };
package/es/index.js CHANGED
@@ -1,18 +1,31 @@
1
1
  import { makeInstaller as e } from "./utils/install.js";
2
- import o from "./installs.js";
3
- import { YaheeInput as f } from "./input/index.js";
4
- import { YaheeComprehensiveSearch as x } from "./comprehensive-search/index.js";
5
- import { YaheeCopy as l } from "./copy/index.js";
6
- import { YaheeImageUpload as s } from "./image-upload/index.js";
7
- import { YaheeAnnexUpload as d } from "./annex-upload/index.js";
8
- import { YaheeOperationLog as c } from "./operation-log/index.js";
9
- const p = e([...o]);
2
+ import r from "./installs.js";
3
+ import { config as t } from "./utils/config.js";
4
+ import { YaheeInput as l } from "./input/index.js";
5
+ import { YaheeComprehensiveSearch as s } from "./comprehensive-search/index.js";
6
+ import { YaheeCopy as d } from "./copy/index.js";
7
+ import { YaheeImageUpload as c } from "./image-upload/index.js";
8
+ import { YaheeAnnexUpload as I } from "./annex-upload/index.js";
9
+ import { YaheeOperationLog as y } from "./operation-log/index.js";
10
+ import { YaheeCountryPlatformShopCondition as S } from "./country-platform-shop-condition/index.js";
11
+ import { YaheeLeftCondition as b } from "./left-condition/index.js";
12
+ import { YaheeLeftConditionEnum as v } from "./left-condition-enum/index.js";
13
+ import { YaheeDropDownCondition as A } from "./drop-down-condition/index.js";
14
+ const { setConfig: n } = t(), m = e([...r]);
15
+ function i(o) {
16
+ n(o);
17
+ }
10
18
  export {
11
- d as YaheeAnnexUpload,
12
- x as YaheeComprehensiveSearch,
13
- l as YaheeCopy,
14
- s as YaheeImageUpload,
15
- f as YaheeInput,
16
- c as YaheeOperationLog,
17
- p as default
19
+ I as YaheeAnnexUpload,
20
+ s as YaheeComprehensiveSearch,
21
+ d as YaheeCopy,
22
+ S as YaheeCountryPlatformShopCondition,
23
+ A as YaheeDropDownCondition,
24
+ c as YaheeImageUpload,
25
+ l as YaheeInput,
26
+ b as YaheeLeftCondition,
27
+ v as YaheeLeftConditionEnum,
28
+ y as YaheeOperationLog,
29
+ m as default,
30
+ i as useGlobalConfig
18
31
  };
package/es/installs.js CHANGED
@@ -1,17 +1,25 @@
1
- import { YaheeInput as e } from "./input/index.js";
2
- import { YaheeComprehensiveSearch as o } from "./comprehensive-search/index.js";
1
+ import { YaheeInput as o } from "./input/index.js";
2
+ import { YaheeComprehensiveSearch as e } from "./comprehensive-search/index.js";
3
3
  import { YaheeCopy as r } from "./copy/index.js";
4
- import { YaheeImageUpload as a } from "./image-upload/index.js";
5
- import { YaheeOperationLog as m } from "./operation-log/index.js";
6
- import { YaheeAnnexUpload as p } from "./annex-upload/index.js";
7
- const l = [
8
- e,
4
+ import { YaheeImageUpload as m } from "./image-upload/index.js";
5
+ import { YaheeOperationLog as t } from "./operation-log/index.js";
6
+ import { YaheeAnnexUpload as i } from "./annex-upload/index.js";
7
+ import { YaheeLeftCondition as a } from "./left-condition/index.js";
8
+ import { YaheeLeftConditionEnum as p } from "./left-condition-enum/index.js";
9
+ import { YaheeDropDownCondition as n } from "./drop-down-condition/index.js";
10
+ import { YaheeCountryPlatformShopCondition as f } from "./country-platform-shop-condition/index.js";
11
+ const x = [
9
12
  o,
13
+ e,
10
14
  r,
11
- a,
12
15
  m,
13
- p
16
+ t,
17
+ i,
18
+ a,
19
+ p,
20
+ n,
21
+ f
14
22
  ];
15
23
  export {
16
- l as default
24
+ x as default
17
25
  };
@@ -0,0 +1,7 @@
1
+ import { withInstall as t } from "../utils/install.js";
2
+ import o from "./left-condition.vue.js";
3
+ const e = t(o);
4
+ export {
5
+ e as YaheeLeftCondition,
6
+ e as default
7
+ };