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.
- package/es/annex-upload/annex-upload.vue.js +6 -6
- package/es/api/server.js +13 -0
- package/es/api/tool.js +69 -0
- package/es/comprehensive-search/comprehensive-search.vue.js +1 -1
- package/es/image-upload/image-upload.vue.js +125 -124
- package/es/index.js +21 -16
- package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
- package/es/operation-log/operation-log-content.vue.js +6 -6
- package/es/operation-log/operation-log-form.vue.js +2 -2
- package/es/operation-log/operation-log-form.vue2.js +17 -17
- package/es/operation-log/operation-log.vue.js +50 -49
- package/es/packages/components/api/log/index.js +15 -0
- package/es/packages/components/api/log-server.js +17 -21
- package/es/packages/components/api/server.js +19 -0
- package/es/packages/components/api/tool.js +57 -0
- package/es/packages/components/api/{requestTools.js → upload-server.js} +13 -10
- package/es/packages/components/hooks/useClipboard.js +16 -14
- package/es/packages/components/hooks/useImport.js +14 -12
- package/es/packages/components/hooks/useUpload.js +9 -9
- package/es/utils/config.js +19 -0
- package/es/utils/const.js +19 -0
- package/es/utils/translate.js +33 -31
- package/package.json +1 -1
- package/types/hooks/useClipboard.d.ts +7 -0
- package/types/hooks/useImg.d.ts +10 -0
- package/types/hooks/useImgPath.d.ts +5 -0
- package/types/hooks/useImport.d.ts +11 -0
- package/types/hooks/useUpload.d.ts +12 -0
- package/types/index.d.ts +6 -1204
- package/types/src/annex-upload/annex-upload.d.ts +30 -0
- package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
- package/types/src/annex-upload/index.d.ts +123 -0
- package/types/src/annex-upload/mimeType.d.ts +2 -0
- package/types/src/api/server.d.ts +6 -0
- package/types/src/api/tool.d.ts +6 -0
- package/types/src/api/types.d.ts +17 -0
- package/types/src/components.d.ts +6 -0
- package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
- package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +33 -0
- package/types/src/comprehensive-search/index.d.ts +36 -0
- package/types/src/copy/copy.d.ts +12 -0
- package/types/src/copy/copy.vue.d.ts +21 -0
- package/types/src/copy/index.d.ts +32 -0
- package/types/src/image-upload/image-upload.d.ts +26 -0
- package/types/src/image-upload/image-upload.vue.d.ts +43 -0
- package/types/src/image-upload/index.d.ts +94 -0
- package/types/src/index.d.ts +7 -0
- package/types/src/input/index.d.ts +16 -0
- package/types/src/input/input.d.ts +18 -0
- package/types/src/input/input.vue.d.ts +14 -0
- package/types/src/installs.d.ts +278 -0
- package/types/src/operation-log/index.d.ts +9 -0
- package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
- package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
- package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
- package/types/src/operation-log/operation-log.d.ts +11 -0
- package/types/src/operation-log/operation-log.vue.d.ts +6 -0
- package/types/src/static/CommonObject.d.ts +18 -0
- package/types/src/static/CommonVariables.d.ts +4 -0
- package/types/src/utils/config.d.ts +8 -0
- package/types/src/utils/const.d.ts +19 -0
- package/types/src/utils/functions.d.ts +1 -0
- package/types/src/utils/install.d.ts +8 -0
- package/types/src/utils/storage.d.ts +18 -0
- package/types/src/utils/style.d.ts +19 -0
- package/types/src/utils/to-kebab-case.d.ts +1 -0
- package/types/src/utils/translate.d.ts +5 -0
- package/types/src/utils/typescript.d.ts +5 -0
- package/es/packages/components/api/remarkApi.js +0 -15
- package/es/packages/components/api/requestRemark.js +0 -47
- package/lib/_virtual/_commonjsHelpers.js +0 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
- package/lib/_virtual/dayjs.min.js +0 -1
- package/lib/_virtual/lodash.js +0 -1
- package/lib/annex-upload/annex-upload.vue.js +0 -1
- package/lib/annex-upload/annex-upload.vue2.js +0 -1
- package/lib/annex-upload/index.js +0 -1
- package/lib/annex-upload/mimeType.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
- package/lib/comprehensive-search/index.js +0 -1
- package/lib/copy/copy.vue.js +0 -1
- package/lib/copy/copy.vue2.js +0 -1
- package/lib/copy/index.js +0 -1
- package/lib/image-upload/image-upload.vue.js +0 -1
- package/lib/image-upload/image-upload.vue2.js +0 -1
- package/lib/image-upload/index.js +0 -1
- package/lib/index.js +0 -1
- package/lib/input/index.js +0 -1
- package/lib/input/input.vue.js +0 -1
- package/lib/input/input.vue2.js +0 -1
- package/lib/installs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +0 -3
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +0 -1
- package/lib/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +0 -1
- 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
- package/lib/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +0 -27
- package/lib/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +0 -1
- package/lib/operation-log/index.js +0 -1
- package/lib/operation-log/operation-log-content.vue.js +0 -1
- package/lib/operation-log/operation-log-content.vue2.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue2.js +0 -1
- package/lib/operation-log/operation-log-form.vue.js +0 -1
- package/lib/operation-log/operation-log-form.vue2.js +0 -1
- package/lib/operation-log/operation-log.vue.js +0 -1
- package/lib/operation-log/operation-log.vue2.js +0 -1
- package/lib/packages/components/api/log-server.js +0 -1
- package/lib/packages/components/api/remarkApi.js +0 -1
- package/lib/packages/components/api/requestRemark.js +0 -1
- package/lib/packages/components/api/requestTools.js +0 -1
- package/lib/packages/components/assets/images/errorimg.png.js +0 -1
- package/lib/packages/components/assets/images/excel.png.js +0 -1
- package/lib/packages/components/assets/images/file-word.png.js +0 -1
- package/lib/packages/components/assets/images/pdf.png.js +0 -1
- package/lib/packages/components/assets/images/ppt.png.js +0 -1
- package/lib/packages/components/assets/images/vue.svg.js +0 -1
- package/lib/packages/components/hooks/useClipboard.js +0 -1
- package/lib/packages/components/hooks/useImg.js +0 -1
- package/lib/packages/components/hooks/useImgPath.js +0 -1
- package/lib/packages/components/hooks/useImport.js +0 -1
- package/lib/packages/components/hooks/useUpload.js +0 -1
- package/lib/utils/install.js +0 -1
- package/lib/utils/storage.js +0 -1
- package/lib/utils/translate.js +0 -1
- /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
|
|
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(
|
|
33
|
-
const l =
|
|
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(),
|
|
39
|
-
t.push(
|
|
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(
|
|
58
|
+
}) : l.uploadType === "import" && M(e.file, (t) => {
|
|
59
59
|
e.onProgress(t);
|
|
60
60
|
}).then((t) => {
|
|
61
61
|
e.onSuccess(t);
|
package/es/api/server.js
ADDED
|
@@ -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.
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { useIsImg as
|
|
4
|
-
import { ElUpload as
|
|
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
|
|
15
|
-
const q = { class: "yahee-image-upload" },
|
|
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
|
-
},
|
|
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
|
|
35
|
-
if (!
|
|
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 (
|
|
39
|
+
if (s.limitFileSize) {
|
|
40
40
|
let l = e.size;
|
|
41
|
-
if (
|
|
42
|
-
h.error(`图片大小不能超过 ${
|
|
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
|
-
|
|
47
|
-
const
|
|
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",
|
|
52
|
+
f("update:modelValue", r), f("change", {
|
|
53
53
|
fileName: e.name,
|
|
54
54
|
fileId: l[0],
|
|
55
55
|
index: 0
|
|
56
|
-
}),
|
|
56
|
+
}), u.value = !1;
|
|
57
57
|
}).catch((l) => {
|
|
58
|
-
h.error("update image error", l),
|
|
58
|
+
h.error("update image error", l), u.value = !1;
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, k = () => {
|
|
61
61
|
f("update:modelValue", "");
|
|
62
|
-
}, z =
|
|
62
|
+
}, z = g(""), m = g(!1), E = () => {
|
|
63
63
|
var e;
|
|
64
|
-
z.value =
|
|
64
|
+
z.value = w((e = s.modelValue) == null ? void 0 : e.fileId, !0), m.value = !0;
|
|
65
65
|
};
|
|
66
|
-
return (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
130
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
176
|
+
de as default
|
|
176
177
|
};
|
package/es/index.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { makeInstaller as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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:
|
|
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,
|
|
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(
|
|
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(
|
|
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:/工作/项目代码/
|
|
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-
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a1609bbd"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|