feat: 图标支持根据语言上传对应图标

This commit is contained in:
TsMask
2023-12-04 16:54:49 +08:00
parent c16a1675f0
commit 96d6cfcfa2
7 changed files with 188 additions and 147 deletions

View File

@@ -1,13 +1,15 @@
<script lang="ts" setup>
import { Modal, message } from 'ant-design-vue/lib';
import { onMounted, reactive } from 'vue';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { transferHelpDoc } from '@/api/index';
import { transferStaticFile } from '@/api/index';
import { uploadFileChunk } from '@/api/tool/file';
import { FileType } from 'ant-design-vue/lib/upload/interface';
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
import { useRouter } from 'vue-router';
const appStore = useAppStore();
const router = useRouter();
const { t, currentLocale, optionsLocale } = useI18n();
@@ -79,9 +81,10 @@ function fnSave() {
// 发送请求
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
transferHelpDoc({
transferStaticFile({
language: state.language,
uploadPath: state.filePath,
staticPath: appStore.helpDoc,
}).then(res => {
state.loading = false;
hide();