yahee-components 0.0.8 → 0.0.10

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 (173) hide show
  1. package/es/annex-upload/annex-upload.vue.js +6 -6
  2. package/es/api/server.js +13 -0
  3. package/es/api/tool.js +69 -0
  4. package/es/comprehensive-search/comprehensive-search.vue.js +1 -1
  5. package/es/image-upload/image-upload.vue.js +125 -124
  6. package/es/index.js +21 -16
  7. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
  8. package/es/operation-log/operation-log-content.vue.js +6 -6
  9. package/es/operation-log/operation-log-form.vue.js +2 -2
  10. package/es/operation-log/operation-log-form.vue2.js +17 -17
  11. package/es/operation-log/operation-log.vue.js +50 -49
  12. package/es/packages/components/api/log/index.js +15 -0
  13. package/es/packages/components/api/log-server.js +17 -21
  14. package/es/packages/components/api/server.js +19 -0
  15. package/es/packages/components/api/tool.js +57 -0
  16. package/es/packages/components/api/{requestTools.js → upload-server.js} +13 -10
  17. package/es/packages/components/hooks/useClipboard.js +16 -14
  18. package/es/packages/components/hooks/useImport.js +14 -12
  19. package/es/packages/components/hooks/useUpload.js +9 -9
  20. package/es/utils/config.js +19 -0
  21. package/es/utils/const.js +19 -0
  22. package/es/utils/translate.js +33 -31
  23. package/package.json +1 -1
  24. package/types/hooks/useClipboard.d.ts +7 -0
  25. package/types/hooks/useImg.d.ts +10 -0
  26. package/types/hooks/useImgPath.d.ts +5 -0
  27. package/types/hooks/useImport.d.ts +11 -0
  28. package/types/hooks/useUpload.d.ts +12 -0
  29. package/types/index.d.ts +6 -1204
  30. package/types/src/annex-upload/annex-upload.d.ts +30 -0
  31. package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
  32. package/types/src/annex-upload/index.d.ts +123 -0
  33. package/types/src/annex-upload/mimeType.d.ts +2 -0
  34. package/types/src/api/server.d.ts +6 -0
  35. package/types/src/api/tool.d.ts +6 -0
  36. package/types/src/api/types.d.ts +17 -0
  37. package/types/src/components.d.ts +6 -0
  38. package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
  39. package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +33 -0
  40. package/types/src/comprehensive-search/index.d.ts +36 -0
  41. package/types/src/copy/copy.d.ts +12 -0
  42. package/types/src/copy/copy.vue.d.ts +21 -0
  43. package/types/src/copy/index.d.ts +32 -0
  44. package/types/src/image-upload/image-upload.d.ts +26 -0
  45. package/types/src/image-upload/image-upload.vue.d.ts +43 -0
  46. package/types/src/image-upload/index.d.ts +94 -0
  47. package/types/src/index.d.ts +7 -0
  48. package/types/src/input/index.d.ts +16 -0
  49. package/types/src/input/input.d.ts +18 -0
  50. package/types/src/input/input.vue.d.ts +14 -0
  51. package/types/src/installs.d.ts +278 -0
  52. package/types/src/operation-log/index.d.ts +9 -0
  53. package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
  54. package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
  55. package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
  56. package/types/src/operation-log/operation-log.d.ts +11 -0
  57. package/types/src/operation-log/operation-log.vue.d.ts +6 -0
  58. package/types/src/static/CommonObject.d.ts +18 -0
  59. package/types/src/static/CommonVariables.d.ts +4 -0
  60. package/types/src/utils/config.d.ts +8 -0
  61. package/types/src/utils/const.d.ts +19 -0
  62. package/types/src/utils/functions.d.ts +1 -0
  63. package/types/src/utils/install.d.ts +8 -0
  64. package/types/src/utils/storage.d.ts +18 -0
  65. package/types/src/utils/style.d.ts +19 -0
  66. package/types/src/utils/to-kebab-case.d.ts +1 -0
  67. package/types/src/utils/translate.d.ts +5 -0
  68. package/types/src/utils/typescript.d.ts +5 -0
  69. package/es/packages/components/api/remarkApi.js +0 -15
  70. package/es/packages/components/api/requestRemark.js +0 -47
  71. package/lib/_virtual/_commonjsHelpers.js +0 -1
  72. package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
  73. package/lib/_virtual/dayjs.min.js +0 -1
  74. package/lib/_virtual/lodash.js +0 -1
  75. package/lib/annex-upload/annex-upload.vue.js +0 -1
  76. package/lib/annex-upload/annex-upload.vue2.js +0 -1
  77. package/lib/annex-upload/index.js +0 -1
  78. package/lib/annex-upload/mimeType.js +0 -1
  79. package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
  80. package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
  81. package/lib/comprehensive-search/index.js +0 -1
  82. package/lib/copy/copy.vue.js +0 -1
  83. package/lib/copy/copy.vue2.js +0 -1
  84. package/lib/copy/index.js +0 -1
  85. package/lib/image-upload/image-upload.vue.js +0 -1
  86. package/lib/image-upload/image-upload.vue2.js +0 -1
  87. package/lib/image-upload/index.js +0 -1
  88. package/lib/index.js +0 -1
  89. package/lib/input/index.js +0 -1
  90. package/lib/input/input.vue.js +0 -1
  91. package/lib/input/input.vue2.js +0 -1
  92. package/lib/installs.js +0 -1
  93. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +0 -3
  94. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +0 -1
  95. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +0 -1
  96. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +0 -1
  97. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +0 -1
  98. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +0 -1
  99. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +0 -1
  100. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +0 -2
  101. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +0 -1
  102. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +0 -2
  103. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +0 -1
  104. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +0 -1
  105. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +0 -1
  106. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +0 -1
  107. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +0 -1
  108. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +0 -1
  109. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +0 -1
  110. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +0 -1
  111. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +0 -1
  112. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -1
  113. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -1
  114. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +0 -1
  115. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +0 -1
  116. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +0 -1
  117. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +0 -1
  118. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +0 -1
  119. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +0 -1
  120. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
  121. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +0 -1
  122. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -1
  123. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +0 -1
  124. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +0 -2
  125. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +0 -1
  126. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +0 -1
  127. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +0 -1
  128. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +0 -1
  129. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +0 -1
  130. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +0 -1
  131. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +0 -1
  132. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -1
  133. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +0 -1
  134. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +0 -1
  135. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -1
  136. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -1
  137. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -1
  138. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +0 -1
  139. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +0 -1
  140. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +0 -1
  141. package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +0 -1
  142. package/lib/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +0 -1
  143. 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
  144. package/lib/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +0 -27
  145. package/lib/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +0 -1
  146. package/lib/operation-log/index.js +0 -1
  147. package/lib/operation-log/operation-log-content.vue.js +0 -1
  148. package/lib/operation-log/operation-log-content.vue2.js +0 -1
  149. package/lib/operation-log/operation-log-dialog.vue.js +0 -1
  150. package/lib/operation-log/operation-log-dialog.vue2.js +0 -1
  151. package/lib/operation-log/operation-log-form.vue.js +0 -1
  152. package/lib/operation-log/operation-log-form.vue2.js +0 -1
  153. package/lib/operation-log/operation-log.vue.js +0 -1
  154. package/lib/operation-log/operation-log.vue2.js +0 -1
  155. package/lib/packages/components/api/log-server.js +0 -1
  156. package/lib/packages/components/api/remarkApi.js +0 -1
  157. package/lib/packages/components/api/requestRemark.js +0 -1
  158. package/lib/packages/components/api/requestTools.js +0 -1
  159. package/lib/packages/components/assets/images/errorimg.png.js +0 -1
  160. package/lib/packages/components/assets/images/excel.png.js +0 -1
  161. package/lib/packages/components/assets/images/file-word.png.js +0 -1
  162. package/lib/packages/components/assets/images/pdf.png.js +0 -1
  163. package/lib/packages/components/assets/images/ppt.png.js +0 -1
  164. package/lib/packages/components/assets/images/vue.svg.js +0 -1
  165. package/lib/packages/components/hooks/useClipboard.js +0 -1
  166. package/lib/packages/components/hooks/useImg.js +0 -1
  167. package/lib/packages/components/hooks/useImgPath.js +0 -1
  168. package/lib/packages/components/hooks/useImport.js +0 -1
  169. package/lib/packages/components/hooks/useUpload.js +0 -1
  170. package/lib/utils/install.js +0 -1
  171. package/lib/utils/storage.js +0 -1
  172. package/lib/utils/translate.js +0 -1
  173. /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
@@ -8,7 +8,7 @@ import "element-plus/theme-chalk/src/message.scss";
8
8
  import "element-plus/theme-chalk/src/upload.scss";
9
9
  import "element-plus/theme-chalk/src/progress.scss";
10
10
  import "element-plus/theme-chalk/src/button.scss";
11
- import { MimeType as T } from "./mimeType.js";
11
+ import { MimeType as w } from "./mimeType.js";
12
12
  import { M2 as a } from "../utils/translate.js";
13
13
  const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip" }, I = { key: 0 }, le = /* @__PURE__ */ C({
14
14
  name: "AnnexUpload",
@@ -29,14 +29,14 @@ const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip
29
29
  showTips: { type: Boolean, default: !0 }
30
30
  },
31
31
  emits: ["update:modelValue", "change", "success", "remove"],
32
- setup(w, { expose: $, emit: U }) {
33
- const l = w, o = U;
32
+ setup(T, { expose: $, emit: U }) {
33
+ const l = T, o = U;
34
34
  function V(e) {
35
35
  if (l.accept && l.checkRealType) {
36
36
  const t = [];
37
37
  for (let i of l.accept.split(","))
38
- if (i = i.toLowerCase(), T.get(i) !== void 0)
39
- t.push(T.get(i));
38
+ if (i = i.toLowerCase(), w.get(i) !== void 0)
39
+ t.push(w.get(i));
40
40
  else
41
41
  return p.error(a(`文件类型错误,支持文件类型为: ${l.accept}!`)), !1;
42
42
  if (t.join().indexOf(e.type) === -1)
@@ -55,7 +55,7 @@ const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip
55
55
  e.onSuccess(t);
56
56
  }).catch(() => {
57
57
  e.onError();
58
- }) : l.uploadType === "import" && M(l.fileType, e.file, (t) => {
58
+ }) : l.uploadType === "import" && M(e.file, (t) => {
59
59
  e.onProgress(t);
60
60
  }).then((t) => {
61
61
  e.onSuccess(t);
@@ -0,0 +1,13 @@
1
+ import t from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js";
2
+ import { handleChangeRequestHeader as a, handleConfigureAuth as n, handleAuthError as u, handleGeneralError as o, handleNetworkError as s } from "./tool.js";
3
+ t.interceptors.request.use((e) => {
4
+ let r = a(e);
5
+ return r = n(r), r;
6
+ });
7
+ t.defaults.withCredentials = !0;
8
+ t.interceptors.response.use(
9
+ (e) => e.status !== 200 ? Promise.reject(e.data) : (u(e.data.errno), o(e.data.status, e.data.msg), e),
10
+ (e) => {
11
+ s(e.response.status), Promise.reject(e.response);
12
+ }
13
+ );
package/es/api/tool.js ADDED
@@ -0,0 +1,69 @@
1
+ import { ElMessage as n, ElMessageBox as s } from "element-plus";
2
+ import "element-plus/theme-chalk/src/base.scss";
3
+ import "element-plus/theme-chalk/src/badge.scss";
4
+ import "element-plus/theme-chalk/src/message.scss";
5
+ import "element-plus/theme-chalk/src/message-box.scss";
6
+ import "element-plus/theme-chalk/src/button.scss";
7
+ import "element-plus/theme-chalk/src/input.scss";
8
+ import "element-plus/theme-chalk/src/overlay.scss";
9
+ import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js";
10
+ const i = "https://plmerp.yaheecloud.com/api/plm/product-dev/", N = (e) => ({
11
+ ...e,
12
+ baseURL: i,
13
+ timeout: 2e4
14
+ }), R = (e) => {
15
+ const o = new l(e.headers);
16
+ return {
17
+ ...e,
18
+ headers: o
19
+ };
20
+ };
21
+ let t = !1;
22
+ const U = (e) => {
23
+ const o = {
24
+ 400: "错误的请求",
25
+ // token 失效
26
+ 403: "拒绝访问",
27
+ 404: "请求错误,未找到该资源",
28
+ 405: "请求方法未允许",
29
+ 408: "请求超时",
30
+ 500: "服务器端出错",
31
+ 501: "网络未实现",
32
+ 502: "网络错误",
33
+ 503: "服务不可用",
34
+ 504: "网络超时",
35
+ 505: "http版本不支持该请求"
36
+ };
37
+ switch (e) {
38
+ case 401:
39
+ window.location.href = `https://portal.yaheecloud.com//Latest/Account/LogOn?returnUrl=${encodeURIComponent(window.location.href)}`;
40
+ break;
41
+ case 403:
42
+ t || (t = !0, s.alert("对不起,您没有权限进行当前操作!").finally(() => {
43
+ t = !1;
44
+ }));
45
+ break;
46
+ default:
47
+ e && n.error(o[e] ?? `其他连接错误 --${e}`);
48
+ }
49
+ };
50
+ var a = /* @__PURE__ */ ((e) => (e[e.AuthInvalid = 10031] = "AuthInvalid", e[e.AuthTooLong = 10032] = "AuthTooLong", e[e.UserHasNoRole = 10033] = "UserHasNoRole", e[e.UserNotRegistered = 10034] = "UserNotRegistered", e[e.ThirdPlatformUser = 10035] = "ThirdPlatformUser", e[e.NoRelatedEmployee = 10036] = "NoRelatedEmployee", e[e.CountInvalid = 10037] = "CountInvalid", e[e.CountNotFound = 10038] = "CountNotFound", e))(a || {});
51
+ const C = (e) => e in {
52
+ 10031: "登录失效,需要重新登录",
53
+ // token 失效
54
+ 10032: "您太久没登录,请重新登录~",
55
+ // token 过期
56
+ 10033: "账户未绑定角色,请联系管理员绑定角色",
57
+ 10034: "该用户未注册,请联系管理员注册用户",
58
+ 10035: "code 无法获取对应第三方平台用户",
59
+ 10036: "该账户未关联员工,请联系管理员做关联",
60
+ 10037: "账号已无效",
61
+ 10038: "账号未找到"
62
+ } ? (n.error(a[e]), !1) : !0, v = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
63
+ export {
64
+ C as handleAuthError,
65
+ N as handleChangeRequestHeader,
66
+ R as handleConfigureAuth,
67
+ v as handleGeneralError,
68
+ U as handleNetworkError
69
+ };
@@ -21,7 +21,7 @@ import "element-plus/theme-chalk/src/config-provider.scss";
21
21
  import "element-plus/theme-chalk/src/badge.scss";
22
22
  import "element-plus/theme-chalk/src/message.scss";
23
23
  import { Search as le } from "@element-plus/icons-vue";
24
- import ae from "../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";
24
+ import ae from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
25
25
  const oe = { class: "yahee-comporehensive-search" }, te = {
26
26
  key: 0,
27
27
  class: "search-type-checkbox"
@@ -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,23 @@
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]);
1
+ import { makeInstaller as o } from "./utils/install.js";
2
+ import r from "./installs.js";
3
+ import { config as t } from "./utils/config.js";
4
+ import { YaheeInput as x } from "./input/index.js";
5
+ import { YaheeComprehensiveSearch as Y } from "./comprehensive-search/index.js";
6
+ import { YaheeCopy as g } from "./copy/index.js";
7
+ import { YaheeImageUpload as u } from "./image-upload/index.js";
8
+ import { YaheeAnnexUpload as I } from "./annex-upload/index.js";
9
+ import { YaheeOperationLog as b } from "./operation-log/index.js";
10
+ const { setConfig: a } = t(), f = o([...r]);
11
+ function i(e) {
12
+ a(e);
13
+ }
10
14
  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
15
+ I as YaheeAnnexUpload,
16
+ Y as YaheeComprehensiveSearch,
17
+ g as YaheeCopy,
18
+ u as YaheeImageUpload,
19
+ x as YaheeInput,
20
+ b as YaheeOperationLog,
21
+ f as default,
22
+ i as useGlobalConfig
18
23
  };
@@ -0,0 +1,38 @@
1
+ import o from "./lib/axios.js";
2
+ const {
3
+ Axios: e,
4
+ AxiosError: a,
5
+ CanceledError: s,
6
+ isCancel: t,
7
+ CancelToken: i,
8
+ VERSION: l,
9
+ all: n,
10
+ Cancel: d,
11
+ isAxiosError: x,
12
+ spread: C,
13
+ toFormData: c,
14
+ AxiosHeaders: m,
15
+ HttpStatusCode: p,
16
+ formToJSON: A,
17
+ getAdapter: f,
18
+ mergeConfig: E
19
+ } = o;
20
+ export {
21
+ e as Axios,
22
+ a as AxiosError,
23
+ m as AxiosHeaders,
24
+ d as Cancel,
25
+ i as CancelToken,
26
+ s as CanceledError,
27
+ p as HttpStatusCode,
28
+ l as VERSION,
29
+ n as all,
30
+ o as default,
31
+ A as formToJSON,
32
+ f as getAdapter,
33
+ x as isAxiosError,
34
+ t as isCancel,
35
+ E as mergeConfig,
36
+ C as spread,
37
+ c as toFormData
38
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as h, computed as d, openBlock as i, createElementBlock as n, createElementVNode as e, normalizeClass as u, toDisplayString as s, createVNode as f, unref as o, withCtx as m } from "vue";
2
2
  import c from "../packages/components/hooks/useImgPath.js";
3
- import { ElImage as g, ElIcon as N } from "element-plus";
3
+ import { ElImage as N, ElIcon as g } from "element-plus";
4
4
  import "element-plus/theme-chalk/src/base.scss";
5
5
  import "element-plus/theme-chalk/src/image.scss";
6
6
  import "element-plus/theme-chalk/src/image-viewer.scss";
@@ -29,18 +29,18 @@ const v = { key: 0 }, x = {
29
29
  }
30
30
  },
31
31
  id: {
32
- type: String,
33
- default: ""
32
+ type: Number,
33
+ default: 0
34
34
  }
35
35
  },
36
36
  setup(t) {
37
37
  const l = t, a = d(() => l.info.Notes.replace(/\n/g, "<br/>")), r = d(() => l.info.Notes.includes("http") ? l.info.Title.split(".")[0] : l.info.Title);
38
- return (M, S) => (i(), n("div", null, [
38
+ return (M, V) => (i(), n("div", null, [
39
39
  e("div", {
40
40
  class: u(["fontsize-15 paddingB10 text-color-primary", t.id == t.info.CreatedBy ? "d-flex" : ""])
41
41
  }, s(r.value), 3),
42
42
  t.info.Notes.includes(".jpg") && t.info.Notes.startsWith("http") ? (i(), n("div", v, [
43
- f(o(g), {
43
+ f(o(N), {
44
44
  class: "img",
45
45
  src: t.info.Notes,
46
46
  "preview-src-list": [t.info.Notes]
@@ -78,7 +78,7 @@ const v = { key: 0 }, x = {
78
78
  target: "_blank"
79
79
  }, s(t.info.Title), 9, j)
80
80
  ])) : t.info.Notes.includes("http") ? (i(), n("div", D, [
81
- f(o(N), { size: "40" }, {
81
+ f(o(g), { size: "40" }, {
82
82
  default: m(() => [
83
83
  f(o(k))
84
84
  ]),
@@ -1,7 +1,7 @@
1
1
  import o from "./operation-log-form.vue2.js";
2
- import "E:/工作/项目代码/yaheecomponents/packages/components/src/operation-log/operation-log-form.vue?vue&type=style&index=0&scoped=a74073a7&lang.scss";
2
+ import "E:/工作/项目代码/common_componentsweb/packages/components/src/operation-log/operation-log-form.vue?vue&type=style&index=0&scoped=a1609bbd&lang.scss";
3
3
  import r from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a74073a7"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a1609bbd"]]);
5
5
  export {
6
6
  p as default
7
7
  };