@chenghongyu/xpt-file-viewer 1.1.0
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/.vscode/extensions.json +3 -0
- package/README.md +5 -0
- package/auto-imports.d.ts +12 -0
- package/components.d.ts +45 -0
- package/dist.zip +0 -0
- package/index.html +13 -0
- package/package.json +100 -0
- package/presets/eslint/.eslintrc-auto-import.json +462 -0
- package/presets/plugins/html.ts +14 -0
- package/presets/shared/env.ts +46 -0
- package/presets/shared/resolvers.ts +29 -0
- package/presets/tov.ts +132 -0
- package/presets/types/auto-imports.d.ts +806 -0
- package/presets/types/components.d.ts +164 -0
- package/presets/types/env.d.ts +17 -0
- package/public/favicon.svg +1 -0
- package/public/icons.svg +24 -0
- package/public/testfile/README.md +5 -0
- package/public/testfile/useFileContextMenu.js +74 -0
- package/public/testfile//345/217/221/347/245/250.pdf +0 -0
- package/public/testfile//346/216/245/346/224/266/345/207/275.docx +0 -0
- package/public/testfile//350/247/204/346/240/274/345/236/213/345/217/2671.txt +263 -0
- package/public/testfile//350/247/206/351/242/2211.mp4 +0 -0
- package/public/testfile//351/237/263/351/242/2211.mp3 +0 -0
- package/src/App.vue +8 -0
- package/src/api/admin/admin-2fa.js +18 -0
- package/src/api/admin/admin-download-log.js +37 -0
- package/src/api/admin/admin-login-log.js +9 -0
- package/src/api/admin/admin-permission.js +9 -0
- package/src/api/admin/admin-setting.js +121 -0
- package/src/api/admin/admin-share.js +20 -0
- package/src/api/admin/admin-short-link.js +49 -0
- package/src/api/admin/admin-sso.js +38 -0
- package/src/api/admin/admin-storage.js +189 -0
- package/src/api/admin/admin-user.js +61 -0
- package/src/api/home/common.js +9 -0
- package/src/api/home/file-operator.js +89 -0
- package/src/api/home/home.js +87 -0
- package/src/api/home/install.js +18 -0
- package/src/api/home/login.js +9 -0
- package/src/api/home/only-office.js +10 -0
- package/src/api/home/share.js +115 -0
- package/src/api/home/user.js +74 -0
- package/src/api/tools/tools-115.js +17 -0
- package/src/api/tools/tools-gd.js +13 -0
- package/src/api/tools/tools-s3.js +25 -0
- package/src/api/tools/tools-sharepoint.js +19 -0
- package/src/assets/hero.png +0 -0
- package/src/assets/icons/401.svg +1 -0
- package/src/assets/icons/403.svg +45 -0
- package/src/assets/icons/404.svg +1 -0
- package/src/assets/icons/500.svg +1 -0
- package/src/assets/icons/admin-login.svg +1 -0
- package/src/assets/icons/document.svg +1 -0
- package/src/assets/icons/empty.svg +145 -0
- package/src/assets/icons/file-type-apk.svg +1 -0
- package/src/assets/icons/file-type-archive.svg +1 -0
- package/src/assets/icons/file-type-audio.svg +1 -0
- package/src/assets/icons/file-type-back.svg +1 -0
- package/src/assets/icons/file-type-css.svg +1 -0
- package/src/assets/icons/file-type-deb.svg +1 -0
- package/src/assets/icons/file-type-dll.svg +1 -0
- package/src/assets/icons/file-type-doc.svg +1 -0
- package/src/assets/icons/file-type-document.svg +1 -0
- package/src/assets/icons/file-type-docx.svg +1 -0
- package/src/assets/icons/file-type-exe.svg +1 -0
- package/src/assets/icons/file-type-expression.svg +1 -0
- package/src/assets/icons/file-type-file.svg +1 -0
- package/src/assets/icons/file-type-folder.svg +1 -0
- package/src/assets/icons/file-type-html.svg +1 -0
- package/src/assets/icons/file-type-image.svg +1 -0
- package/src/assets/icons/file-type-java.svg +1 -0
- package/src/assets/icons/file-type-js.svg +1 -0
- package/src/assets/icons/file-type-less.svg +1 -0
- package/src/assets/icons/file-type-md.svg +1 -0
- package/src/assets/icons/file-type-office.svg +1 -0
- package/src/assets/icons/file-type-pdf.svg +1 -0
- package/src/assets/icons/file-type-php.svg +1 -0
- package/src/assets/icons/file-type-ppt.svg +1 -0
- package/src/assets/icons/file-type-pptx.svg +1 -0
- package/src/assets/icons/file-type-py.svg +1 -0
- package/src/assets/icons/file-type-rb.svg +1 -0
- package/src/assets/icons/file-type-root.svg +1 -0
- package/src/assets/icons/file-type-rpm.svg +1 -0
- package/src/assets/icons/file-type-rust.svg +1 -0
- package/src/assets/icons/file-type-script.svg +1 -0
- package/src/assets/icons/file-type-text.svg +1 -0
- package/src/assets/icons/file-type-three3d.svg +5 -0
- package/src/assets/icons/file-type-vbs.svg +1 -0
- package/src/assets/icons/file-type-video.svg +1 -0
- package/src/assets/icons/file-type-xls.svg +1 -0
- package/src/assets/icons/file-type-xlsx.svg +1 -0
- package/src/assets/icons/file-type-xml.svg +1 -0
- package/src/assets/icons/file-type-yaml.svg +1 -0
- package/src/assets/icons/file-upload.svg +1 -0
- package/src/assets/icons/github.svg +1 -0
- package/src/assets/icons/install-step.svg +40 -0
- package/src/assets/icons/reset-password.svg +1 -0
- package/src/assets/icons/storage-aliyun.svg +1 -0
- package/src/assets/icons/storage-baidu.svg +1 -0
- package/src/assets/icons/storage-doge-cloud.svg +207 -0
- package/src/assets/icons/storage-ftp.svg +13 -0
- package/src/assets/icons/storage-google-drive.svg +8 -0
- package/src/assets/icons/storage-huawei.svg +1 -0
- package/src/assets/icons/storage-local.svg +11 -0
- package/src/assets/icons/storage-minio.svg +1 -0
- package/src/assets/icons/storage-onedrive-china.svg +18 -0
- package/src/assets/icons/storage-onedrive.svg +4 -0
- package/src/assets/icons/storage-open115.svg +23 -0
- package/src/assets/icons/storage-qiniu.svg +1 -0
- package/src/assets/icons/storage-s3.svg +5 -0
- package/src/assets/icons/storage-sftp.svg +13 -0
- package/src/assets/icons/storage-sharepoint-china.svg +23 -0
- package/src/assets/icons/storage-sharepoint.svg +1 -0
- package/src/assets/icons/storage-tencent.svg +9 -0
- package/src/assets/icons/storage-ufile.svg +14 -0
- package/src/assets/icons/storage-upyun.svg +1 -0
- package/src/assets/icons/storage-webdav.svg +1 -0
- package/src/assets/icons/upload.svg +50 -0
- package/src/assets/icons/zfile-basic.svg +17 -0
- package/src/assets/icons/zfile-horizontal.svg +16 -0
- package/src/assets/icons/zfile.svg +1 -0
- package/src/assets/vite.svg +1 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/HelloWorld.vue +319 -0
- package/src/components/common/QrCodePreview.vue +118 -0
- package/src/components/common/dialog/ZDialog.vue +171 -0
- package/src/components/common/dialog/types.ts +19 -0
- package/src/components/common/dialog/useDialog.ts +18 -0
- package/src/components/common/dialog/useDialogWithForm.ts +21 -0
- package/src/components/copy.vue +133 -0
- package/src/components/file/preview/AudioPlayer.vue +333 -0
- package/src/components/file/preview/CopyCode.vue +47 -0
- package/src/components/file/preview/FileGallery.vue +199 -0
- package/src/components/file/preview/ImageViewer.vue +432 -0
- package/src/components/file/preview/KkFileViewer.vue +86 -0
- package/src/components/file/preview/KkFileViewerDialog.vue +42 -0
- package/src/components/file/preview/MarkdownViewer.vue +102 -0
- package/src/components/file/preview/MarkdownViewerAsyncLoading.vue +17 -0
- package/src/components/file/preview/MarkdownViewerDialogAsyncLoading.vue +12 -0
- package/src/components/file/preview/OfficeViewer.vue +76 -0
- package/src/components/file/preview/OfficeViewerDialog.vue +55 -0
- package/src/components/file/preview/PdfViewer.vue +157 -0
- package/src/components/file/preview/PdfViewerDialog.vue +41 -0
- package/src/components/file/preview/TextViewer.vue +232 -0
- package/src/components/file/preview/TextViewerAsyncLoading.vue +22 -0
- package/src/components/file/preview/TextViewerDialog.vue +53 -0
- package/src/components/file/preview/Three3dPreview.vue +114 -0
- package/src/components/file/preview/Three3dPreviewDialog.vue +50 -0
- package/src/components/file/preview/VideoPlayer.vue +341 -0
- package/src/components/file/preview/VideoPlayerAsyncLoading.vue +45 -0
- package/src/components/file/preview/VideoPlayerDialog.vue +51 -0
- package/src/components/file/selectFolder/SelectFolder.vue +208 -0
- package/src/components/file/selectFolder/index.ts +50 -0
- package/src/components/file/selectFolder/types.ts +5 -0
- package/src/components/fileReview/AudioPlayer-copy.vue +333 -0
- package/src/components/fileReview/PdfViewer-copy.vue +157 -0
- package/src/components/fileReview/TextViewer-copy.vue +44 -0
- package/src/components/fileReview/VideoPlayer-copy.vue +341 -0
- package/src/components/messageBox/confirm/confirm.vue +137 -0
- package/src/components/messageBox/confirm/index.ts +27 -0
- package/src/components/messageBox/confirm/types.ts +15 -0
- package/src/components/messageBox/messageBox.ts +9 -0
- package/src/components/messageBox/prompt/index.ts +27 -0
- package/src/components/messageBox/prompt/prompt.vue +178 -0
- package/src/components/messageBox/prompt/types.ts +24 -0
- package/src/components/vue-codemirror/editor.vue +212 -0
- package/src/components/vue-codemirror/encodings.ts +27 -0
- package/src/components/vue-codemirror/index.vue +380 -0
- package/src/components/vue-codemirror/lang-code/cpp/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/css/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/dockerfile/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/erlang/index.ts +6 -0
- package/src/components/vue-codemirror/lang-code/go/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/html/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/java/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/javascript/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/json/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/jsx/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/lua/index.ts +6 -0
- package/src/components/vue-codemirror/lang-code/markdown/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/mysql/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/nginx/index.ts +6 -0
- package/src/components/vue-codemirror/lang-code/perl/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/pgsql/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/php/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/powershell/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/python/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/r/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/ruby/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/rust/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/shell/index.ts +5 -0
- package/src/components/vue-codemirror/lang-code/sql/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/stylus/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/swift/index.ts +4 -0
- package/src/components/vue-codemirror/lang-code/toml/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/tsx/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/typescript/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/vb/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/vbscript/index.ts +3 -0
- package/src/components/vue-codemirror/lang-code/xml/index.ts +2 -0
- package/src/components/vue-codemirror/lang-code/yaml/index.ts +3 -0
- package/src/components/vue-codemirror/languages.ts +8 -0
- package/src/components/vue-codemirror/themes.ts +5 -0
- package/src/components/vue-codemirror/toolbar.vue +183 -0
- package/src/components/vue-codemirror/types.ts +12 -0
- package/src/components.d.ts +49 -0
- package/src/composables/admin/layout/admin-layout.js +53 -0
- package/src/composables/admin/link/useLinkSetting.js +16 -0
- package/src/composables/admin/sso/baseSsoConfig.js +54 -0
- package/src/composables/admin/sso/useSsoConfig.js +176 -0
- package/src/composables/admin/storage/storage-copy.js +89 -0
- package/src/composables/admin/storage/storage-filter.js +64 -0
- package/src/composables/admin/storage/storage-list.js +202 -0
- package/src/composables/admin/storage/storage-password.js +101 -0
- package/src/composables/admin/storage/storage-readme.js +102 -0
- package/src/composables/admin/storage/utils/open115-util.js +61 -0
- package/src/composables/admin/useAdminSetting.js +60 -0
- package/src/composables/admin/useClientInfo.js +20 -0
- package/src/composables/admin/user/user-copy.js +79 -0
- package/src/composables/file/useBatchOperatorResult.js +19 -0
- package/src/composables/file/useFileContextMenu.js +74 -0
- package/src/composables/file/useFileData.js +243 -0
- package/src/composables/file/useFileLink.js +175 -0
- package/src/composables/file/useFileLoading.js +41 -0
- package/src/composables/file/useFileLongPressEvent.js +71 -0
- package/src/composables/file/useFileOperator.js +347 -0
- package/src/composables/file/useFilePreview.js +99 -0
- package/src/composables/file/useFilePwd.js +138 -0
- package/src/composables/file/useFileSelect.js +105 -0
- package/src/composables/file/useFileShare.js +39 -0
- package/src/composables/file/useFileUpload.js +1045 -0
- package/src/composables/file/useKkFileViewDialog.js +24 -0
- package/src/composables/file/useOfficeViewerDialog.js +20 -0
- package/src/composables/file/usePdfViewerDialog.js +22 -0
- package/src/composables/file/useShareActions.js +94 -0
- package/src/composables/file/useShareTableOperator.js +84 -0
- package/src/composables/file/useTableOperator.js +211 -0
- package/src/composables/file/useTextViewerDialog.js +22 -0
- package/src/composables/file/useThree3dPreviewDialog.js +23 -0
- package/src/composables/file/useVideoPlayerDialog.js +19 -0
- package/src/composables/header/useHeaderBreadcrumb.js +111 -0
- package/src/composables/header/useHeaderStorageList.js +150 -0
- package/src/composables/header/useSetting.js +58 -0
- package/src/composables/share/useShareData.js +178 -0
- package/src/composables/useDarks.ts +4 -0
- package/src/composables/useRouterData.js +41 -0
- package/src/constant/index.js +193 -0
- package/src/http/index.js +153 -0
- package/src/http/request.js +31 -0
- package/src/main.ts +23 -0
- package/src/stores/file-data.ts +108 -0
- package/src/stores/global-config.ts +115 -0
- package/src/stores/storage-config.ts +123 -0
- package/src/style.css +296 -0
- package/src/styles/admin.scss +91 -0
- package/src/styles/code-editor-variables.scss +52 -0
- package/src/styles/element-plus.scss +22 -0
- package/src/styles/error-page.css +26 -0
- package/src/styles/main.css +142 -0
- package/src/styles/tailwind/index.scss +33 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/models/base.ts +34 -0
- package/src/utils/models/file.ts +95 -0
- package/src/utils/models/path.ts +117 -0
- package/src/utils/models/qrcode.ts +21 -0
- package/src/utils/models/time.ts +132 -0
- package/src/utils/models/util.ts +42 -0
- package/src/utils/models/window.ts +14 -0
- package/stats.html +4950 -0
- package/tsconfig.app.json +16 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +57 -0
package/src/style.css
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--text: #6b6375;
|
|
3
|
+
--text-h: #08060d;
|
|
4
|
+
--bg: #fff;
|
|
5
|
+
--border: #e5e4e7;
|
|
6
|
+
--code-bg: #f4f3ec;
|
|
7
|
+
--accent: #aa3bff;
|
|
8
|
+
--accent-bg: rgba(170, 59, 255, 0.1);
|
|
9
|
+
--accent-border: rgba(170, 59, 255, 0.5);
|
|
10
|
+
--social-bg: rgba(244, 243, 236, 0.5);
|
|
11
|
+
--shadow:
|
|
12
|
+
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
|
|
13
|
+
|
|
14
|
+
--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
15
|
+
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
16
|
+
--mono: ui-monospace, Consolas, monospace;
|
|
17
|
+
|
|
18
|
+
font: 18px/145% var(--sans);
|
|
19
|
+
letter-spacing: 0.18px;
|
|
20
|
+
color-scheme: light dark;
|
|
21
|
+
color: var(--text);
|
|
22
|
+
background: var(--bg);
|
|
23
|
+
font-synthesis: none;
|
|
24
|
+
text-rendering: optimizeLegibility;
|
|
25
|
+
-webkit-font-smoothing: antialiased;
|
|
26
|
+
-moz-osx-font-smoothing: grayscale;
|
|
27
|
+
|
|
28
|
+
@media (max-width: 1024px) {
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (prefers-color-scheme: dark) {
|
|
34
|
+
:root {
|
|
35
|
+
--text: #9ca3af;
|
|
36
|
+
--text-h: #f3f4f6;
|
|
37
|
+
--bg: #16171d;
|
|
38
|
+
--border: #2e303a;
|
|
39
|
+
--code-bg: #1f2028;
|
|
40
|
+
--accent: #c084fc;
|
|
41
|
+
--accent-bg: rgba(192, 132, 252, 0.15);
|
|
42
|
+
--accent-border: rgba(192, 132, 252, 0.5);
|
|
43
|
+
--social-bg: rgba(47, 48, 58, 0.5);
|
|
44
|
+
--shadow:
|
|
45
|
+
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#social .button-icon {
|
|
49
|
+
filter: invert(1) brightness(2);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
body {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h1,
|
|
58
|
+
h2 {
|
|
59
|
+
font-family: var(--heading);
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
color: var(--text-h);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
h1 {
|
|
65
|
+
font-size: 56px;
|
|
66
|
+
letter-spacing: -1.68px;
|
|
67
|
+
margin: 32px 0;
|
|
68
|
+
@media (max-width: 1024px) {
|
|
69
|
+
font-size: 36px;
|
|
70
|
+
margin: 20px 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
h2 {
|
|
74
|
+
font-size: 24px;
|
|
75
|
+
line-height: 118%;
|
|
76
|
+
letter-spacing: -0.24px;
|
|
77
|
+
margin: 0 0 8px;
|
|
78
|
+
@media (max-width: 1024px) {
|
|
79
|
+
font-size: 20px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
p {
|
|
83
|
+
margin: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
code,
|
|
87
|
+
.counter {
|
|
88
|
+
font-family: var(--mono);
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
border-radius: 4px;
|
|
91
|
+
color: var(--text-h);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
code {
|
|
95
|
+
font-size: 15px;
|
|
96
|
+
line-height: 135%;
|
|
97
|
+
padding: 4px 8px;
|
|
98
|
+
background: var(--code-bg);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.counter {
|
|
102
|
+
font-size: 16px;
|
|
103
|
+
padding: 5px 10px;
|
|
104
|
+
border-radius: 5px;
|
|
105
|
+
color: var(--accent);
|
|
106
|
+
background: var(--accent-bg);
|
|
107
|
+
border: 2px solid transparent;
|
|
108
|
+
transition: border-color 0.3s;
|
|
109
|
+
margin-bottom: 24px;
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
border-color: var(--accent-border);
|
|
113
|
+
}
|
|
114
|
+
&:focus-visible {
|
|
115
|
+
outline: 2px solid var(--accent);
|
|
116
|
+
outline-offset: 2px;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.hero {
|
|
121
|
+
position: relative;
|
|
122
|
+
|
|
123
|
+
.base,
|
|
124
|
+
.framework,
|
|
125
|
+
.vite {
|
|
126
|
+
inset-inline: 0;
|
|
127
|
+
margin: 0 auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.base {
|
|
131
|
+
width: 170px;
|
|
132
|
+
position: relative;
|
|
133
|
+
z-index: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.framework,
|
|
137
|
+
.vite {
|
|
138
|
+
position: absolute;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.framework {
|
|
142
|
+
z-index: 1;
|
|
143
|
+
top: 34px;
|
|
144
|
+
height: 28px;
|
|
145
|
+
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
|
|
146
|
+
scale(1.4);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.vite {
|
|
150
|
+
z-index: 0;
|
|
151
|
+
top: 107px;
|
|
152
|
+
height: 26px;
|
|
153
|
+
width: auto;
|
|
154
|
+
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
|
|
155
|
+
scale(0.8);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
#app {
|
|
160
|
+
width: 1126px;
|
|
161
|
+
max-width: 100%;
|
|
162
|
+
margin: 0 auto;
|
|
163
|
+
text-align: center;
|
|
164
|
+
/* border-inline: 1px solid var(--border); */
|
|
165
|
+
/* min-height: 100svh; */
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
box-sizing: border-box;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#center {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
gap: 25px;
|
|
175
|
+
place-content: center;
|
|
176
|
+
place-items: center;
|
|
177
|
+
flex-grow: 1;
|
|
178
|
+
|
|
179
|
+
@media (max-width: 1024px) {
|
|
180
|
+
padding: 32px 20px 24px;
|
|
181
|
+
gap: 18px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
#next-steps {
|
|
186
|
+
display: flex;
|
|
187
|
+
border-top: 1px solid var(--border);
|
|
188
|
+
text-align: left;
|
|
189
|
+
|
|
190
|
+
& > div {
|
|
191
|
+
flex: 1 1 0;
|
|
192
|
+
padding: 32px;
|
|
193
|
+
@media (max-width: 1024px) {
|
|
194
|
+
padding: 24px 20px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.icon {
|
|
199
|
+
margin-bottom: 16px;
|
|
200
|
+
width: 22px;
|
|
201
|
+
height: 22px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@media (max-width: 1024px) {
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#docs {
|
|
211
|
+
border-right: 1px solid var(--border);
|
|
212
|
+
|
|
213
|
+
@media (max-width: 1024px) {
|
|
214
|
+
border-right: none;
|
|
215
|
+
border-bottom: 1px solid var(--border);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
#next-steps ul {
|
|
220
|
+
list-style: none;
|
|
221
|
+
padding: 0;
|
|
222
|
+
display: flex;
|
|
223
|
+
gap: 8px;
|
|
224
|
+
margin: 32px 0 0;
|
|
225
|
+
|
|
226
|
+
.logo {
|
|
227
|
+
height: 18px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
a {
|
|
231
|
+
color: var(--text-h);
|
|
232
|
+
font-size: 16px;
|
|
233
|
+
border-radius: 6px;
|
|
234
|
+
background: var(--social-bg);
|
|
235
|
+
display: flex;
|
|
236
|
+
padding: 6px 12px;
|
|
237
|
+
align-items: center;
|
|
238
|
+
gap: 8px;
|
|
239
|
+
text-decoration: none;
|
|
240
|
+
transition: box-shadow 0.3s;
|
|
241
|
+
|
|
242
|
+
&:hover {
|
|
243
|
+
box-shadow: var(--shadow);
|
|
244
|
+
}
|
|
245
|
+
.button-icon {
|
|
246
|
+
height: 18px;
|
|
247
|
+
width: 18px;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@media (max-width: 1024px) {
|
|
252
|
+
margin-top: 20px;
|
|
253
|
+
flex-wrap: wrap;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
|
|
256
|
+
li {
|
|
257
|
+
flex: 1 1 calc(50% - 8px);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
a {
|
|
261
|
+
width: 100%;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
#spacer {
|
|
269
|
+
height: 88px;
|
|
270
|
+
border-top: 1px solid var(--border);
|
|
271
|
+
@media (max-width: 1024px) {
|
|
272
|
+
height: 48px;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ticks {
|
|
277
|
+
position: relative;
|
|
278
|
+
width: 100%;
|
|
279
|
+
|
|
280
|
+
&::before,
|
|
281
|
+
&::after {
|
|
282
|
+
content: '';
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: -4.5px;
|
|
285
|
+
border: 5px solid transparent;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&::before {
|
|
289
|
+
left: 0;
|
|
290
|
+
border-left-color: var(--border);
|
|
291
|
+
}
|
|
292
|
+
&::after {
|
|
293
|
+
right: 0;
|
|
294
|
+
border-right-color: var(--border);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
$admin-form-item__content-max-width: 768px;
|
|
2
|
+
|
|
3
|
+
.z-admin-body-wrapper {
|
|
4
|
+
@apply p-4 h-full sm:h-auto overflow-auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.z-admin-form {
|
|
8
|
+
.el-form-item {
|
|
9
|
+
@apply border-b border-gray-200;
|
|
10
|
+
|
|
11
|
+
.el-form-item__label {
|
|
12
|
+
@apply font-medium;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.el-form-item__content {
|
|
16
|
+
max-width: $admin-form-item__content-max-width;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.el-form-item--large {
|
|
21
|
+
padding-bottom: 22px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.el-form-item--large:first-child {
|
|
25
|
+
margin-top: 28px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.el-form-item--default, .el-form-item--small, .el-form-item--mini {
|
|
29
|
+
padding-bottom: 18px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.el-form-item--default:first-child,
|
|
33
|
+
.el-form-item--small:first-child,
|
|
34
|
+
.el-form-item--mini:first-child {
|
|
35
|
+
margin-top: 24px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.el-form-item {
|
|
40
|
+
.el-form-item__content {
|
|
41
|
+
max-width: $admin-form-item__content-max-width;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.z-admin-search-from {
|
|
46
|
+
@apply mb-2;
|
|
47
|
+
.el-form-item {
|
|
48
|
+
@apply w-full;
|
|
49
|
+
|
|
50
|
+
.el-input, .el-select, .el-date-editor {
|
|
51
|
+
@apply w-full;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.z-admin-search-from-row {
|
|
56
|
+
@apply w-full;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 表单中的表格上方按钮区
|
|
61
|
+
.z-admin-form-table-tools {
|
|
62
|
+
@apply w-full;
|
|
63
|
+
.el-button {
|
|
64
|
+
@apply max-md:w-full mb-2;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 表格上方按钮区 (搜索类表格页的操作区)
|
|
69
|
+
.z-admin-table-tools {
|
|
70
|
+
@apply mb-2 w-full
|
|
71
|
+
max-md:border-t-2
|
|
72
|
+
max-md:border-dashed
|
|
73
|
+
max-md:mt-2
|
|
74
|
+
max-md:flex
|
|
75
|
+
max-md:flex-col;
|
|
76
|
+
.el-button {
|
|
77
|
+
@media (max-width: 767px) {
|
|
78
|
+
margin-left: 0 !important;
|
|
79
|
+
width: 100%;
|
|
80
|
+
margin-top: 8px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.z-btn-primary {
|
|
86
|
+
@apply text-blue-400 w-4 h-4 inline cursor-pointer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.z-btn-danger {
|
|
90
|
+
@apply text-red-400 w-4 h-4 inline cursor-pointer;
|
|
91
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
// layout
|
|
4
|
+
$navbar-height: 3rem;
|
|
5
|
+
$banner-height: 25rem;
|
|
6
|
+
$footbar-height: 4rem;
|
|
7
|
+
$container-width: 960px;
|
|
8
|
+
$mobile-width: 420px;
|
|
9
|
+
|
|
10
|
+
// colors
|
|
11
|
+
$white: #ffffff;
|
|
12
|
+
$black: #000000;
|
|
13
|
+
$widget-primary: #0075ff;
|
|
14
|
+
$npm-primary: #bb161b;
|
|
15
|
+
$github-dimmed: #22272e;
|
|
16
|
+
$github-attention: #c69026;
|
|
17
|
+
$github-text-primary: #0366d6;
|
|
18
|
+
$github-sponsor-primary: rgb(234, 74, 170);
|
|
19
|
+
$twitter-primary: #1d9bf0;
|
|
20
|
+
$twitter-dimmed: #0c7abf;
|
|
21
|
+
|
|
22
|
+
// theme
|
|
23
|
+
$header-bg: var(--theme-header);
|
|
24
|
+
$banner-bg: var(--theme-banner);
|
|
25
|
+
$body-bg: var(--theme-body);
|
|
26
|
+
$border-color: var(--theme-border);
|
|
27
|
+
|
|
28
|
+
$link-color: var(--link-color);
|
|
29
|
+
$text-color: var(--text-color);
|
|
30
|
+
$text-secondary: var(--text-secondary);
|
|
31
|
+
$text-disabled: var(--text-disabled);
|
|
32
|
+
$text-divider: var(--text-divider);
|
|
33
|
+
|
|
34
|
+
// sizes
|
|
35
|
+
$xs-radius: 1px;
|
|
36
|
+
$sm-radius: 2px;
|
|
37
|
+
$lg-radius: 4px;
|
|
38
|
+
|
|
39
|
+
// times
|
|
40
|
+
$transition-time: 0.15s;
|
|
41
|
+
|
|
42
|
+
// gaps
|
|
43
|
+
$gap: 1rem; // ~14px
|
|
44
|
+
$sm-gap: $gap * 0.618; // ~8.6px
|
|
45
|
+
$xs-gap: math.div($sm-gap, 2); // ~4.4px
|
|
46
|
+
$lg-gap: $sm-gap * 2; // ~17px
|
|
47
|
+
|
|
48
|
+
// fonts
|
|
49
|
+
$font-size-small: 12px;
|
|
50
|
+
$font-size-base: 14px;
|
|
51
|
+
$font-size-large: 18px;
|
|
52
|
+
$font-size-huge: 22px;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.el-form--inline {
|
|
2
|
+
.el-form-item {
|
|
3
|
+
& > .el-input, .el-cascader, .el-select, .el-autocomplete {
|
|
4
|
+
width: 200px;
|
|
5
|
+
}
|
|
6
|
+
& > .el-date-editor {
|
|
7
|
+
width: 300px;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.el-form {
|
|
13
|
+
.el-form-item {
|
|
14
|
+
.el-radio-group {
|
|
15
|
+
@apply w-full;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.el-form-item-tips {
|
|
19
|
+
@apply empty:mt-0 mt-2 text-sm w-full text-gray-400;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.error-body {
|
|
2
|
+
@apply flex flex-wrap h-screen text-center justify-around items-center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.err-code {
|
|
6
|
+
@apply text-7xl mb-5;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.err-content {
|
|
10
|
+
@apply text-2xl h-10;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.err-cover {
|
|
14
|
+
@apply h-auto max-w-full max-h-full w-[600px] mx-24;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.error-desc {
|
|
18
|
+
@apply font-bold flex-1 w-72;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.error-btn {
|
|
22
|
+
@apply rounded-lg transition text-xl mt-8 px-5 py-3 active:scale-90 active:transform;
|
|
23
|
+
--tw-shadow-color: 8, 145, 178;
|
|
24
|
+
--tw-shadow: 0 4px 6px -1px rgba(var(--tw-shadow-color), 0.1), 0 2px 4px -1px rgba(var(--tw-shadow-color), 0.06);
|
|
25
|
+
box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, var(--tw-shadow);
|
|
26
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
@import './element-plus.scss';
|
|
2
|
+
@import './admin.scss';
|
|
3
|
+
@import './error-page.css';
|
|
4
|
+
|
|
5
|
+
html,
|
|
6
|
+
body,
|
|
7
|
+
#app {
|
|
8
|
+
/*font-family: "Helvetica Neue", "Segoe UI", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;*/
|
|
9
|
+
font-family: inherit;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
color: var(--el-text-color-primary);
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
height: 100%;
|
|
17
|
+
width: 100%;
|
|
18
|
+
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.prose {
|
|
24
|
+
scroll-behavior: smooth;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#nprogress {
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#nprogress .bar {
|
|
32
|
+
@apply bg-blue-500 bg-opacity-75;
|
|
33
|
+
|
|
34
|
+
position: fixed;
|
|
35
|
+
z-index: 1031;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 2px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* 全局滚动条
|
|
45
|
+
*/
|
|
46
|
+
::-webkit-scrollbar {
|
|
47
|
+
width: 11px;
|
|
48
|
+
height: 11px;
|
|
49
|
+
background-color: rgb(246, 247, 248);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
::-webkit-scrollbar-thumb {
|
|
53
|
+
background-color: rgb(233, 236, 239);
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
::-webkit-scrollbar-track {
|
|
58
|
+
background-color: rgb(246, 247, 248);
|
|
59
|
+
border-radius: 10px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/*.icon {*/
|
|
64
|
+
/* width: 1em;*/
|
|
65
|
+
/* height: 1em;*/
|
|
66
|
+
/* vertical-align: -0.15em;*/
|
|
67
|
+
/* fill: currentColor;*/
|
|
68
|
+
/* overflow: hidden;*/
|
|
69
|
+
/*}*/
|
|
70
|
+
|
|
71
|
+
.dragging-over *{
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#v3-img-preview-container-id .v-images-wrap .arrow .icon {
|
|
76
|
+
display: initial;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
#v3-img-preview-container-id .img-container .img-content {
|
|
81
|
+
max-width: 95%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media screen and (max-width: 500px) {
|
|
85
|
+
#v3-img-preview-container-id .v3-img-preview-toolbar {
|
|
86
|
+
bottom: 20%;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media screen and (max-width: 500px) {
|
|
91
|
+
.el-message {
|
|
92
|
+
min-width: calc(100% - 30px) !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media screen and (max-width: 500px) {
|
|
97
|
+
.el-message-box{
|
|
98
|
+
width: calc(100% - 30px) !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/* 所有 dialog 不显示本身的滚动条,需内部容器自实现滚动 */
|
|
104
|
+
.el-overlay-dialog {
|
|
105
|
+
overflow: hidden !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media screen and (max-width: 500px) {
|
|
109
|
+
/* 移动端 所有 dialog 最小宽度 90%(默认为 50%,不适合移动端) */
|
|
110
|
+
.el-dialog {
|
|
111
|
+
min-width: 90%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* 黑暗模式适配 */
|
|
116
|
+
/*html.dark {*/
|
|
117
|
+
/* height: 100%;*/
|
|
118
|
+
/* width: 100%;*/
|
|
119
|
+
/* margin: unset;*/
|
|
120
|
+
/* overflow: hidden;*/
|
|
121
|
+
/* color: #e5e7eb;*/
|
|
122
|
+
/* !*background: #121212;*!*/
|
|
123
|
+
/*}*/
|
|
124
|
+
|
|
125
|
+
/*html.dark ::-webkit-scrollbar,*/
|
|
126
|
+
/*html.dark ::-webkit-scrollbar-track {*/
|
|
127
|
+
/* background-color: #212529;*/
|
|
128
|
+
/*}*/
|
|
129
|
+
|
|
130
|
+
/*html.dark ::-webkit-scrollbar-thumb {*/
|
|
131
|
+
/* background-color: #343a40;*/
|
|
132
|
+
/*}*/
|
|
133
|
+
/*@import 'element-plus/theme-chalk/dark/css-vars.css';*/
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
.zfile-logo-css {
|
|
137
|
+
visibility: hidden;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.zfile-code {
|
|
141
|
+
@apply bg-gray-100 text-gray-800 px-2 py-1 rounded-lg select-all;
|
|
142
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
// 分割线
|
|
6
|
+
.divider {
|
|
7
|
+
@apply block h-[1px] w-full my-1 border-t
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 链接
|
|
11
|
+
.link {
|
|
12
|
+
@apply text-blue-500 hover:text-blue-600
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.code {
|
|
16
|
+
font-size: 90%;
|
|
17
|
+
margin: 0 2px;
|
|
18
|
+
border-radius: 3px;
|
|
19
|
+
word-break: break-word;
|
|
20
|
+
background-size: 20px 20px;
|
|
21
|
+
white-space: pre-wrap;
|
|
22
|
+
padding: 2px 5px;
|
|
23
|
+
color: #c0254e;
|
|
24
|
+
background-color: rgba(27,31,35,.05);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hidden-important {
|
|
28
|
+
@apply hidden #{!important};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.badge-blue {
|
|
32
|
+
@apply px-2 py-0.5 rounded-full text-xs font-medium bg-blue-500 text-white my-auto ml-1;
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const isEmpty = (obj: any): boolean => {
|
|
2
|
+
return typeof obj === "undefined" || obj === null || obj === "";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const strIsEmpty = (str: string | null | undefined): boolean => {
|
|
6
|
+
return !str || str.length === 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const strIsNotEmpty = (str: string | null | undefined): boolean => {
|
|
10
|
+
return !strIsEmpty(str);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const convertStr = (value: string): boolean | null | any[] | string => {
|
|
14
|
+
if (value === "true") {
|
|
15
|
+
return true;
|
|
16
|
+
} else if (value === "false") {
|
|
17
|
+
return false;
|
|
18
|
+
} else if (value === "null") {
|
|
19
|
+
return null;
|
|
20
|
+
} else if (value === "[]") {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const getSize = (obj: any): number => {
|
|
27
|
+
if (isEmpty(obj)) {
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(obj)) {
|
|
31
|
+
return obj.length;
|
|
32
|
+
}
|
|
33
|
+
return Object.keys(obj).length;
|
|
34
|
+
}
|