This commit is contained in:
weipengfei 2024-06-08 17:30:44 +08:00
parent a56328a02f
commit f3d602a5a4
1 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import Vditor from 'vditor'; import Vditor from 'vditor';
import 'vditor/dist/index.css'; import 'vditor/dist/index.css';
import useUserStore from '@/stores/modules/user' import useUserStore from '@/stores/modules/user';
import configs from '@/config'
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
@ -24,7 +25,7 @@ onMounted(() => {
upload: { upload: {
accept: 'image/*,.mp3, .wav, .rar', accept: 'image/*,.mp3, .wav, .rar',
headers:{Token:userStore.token}, headers:{Token:userStore.token},
url: 'http://127.0.0.1:8787/admin/upload/image', url: `${configs.baseUrl}${configs.urlPrefix}/upload/image`,
multiple:false, multiple:false,
fieldName:'file', fieldName:'file',
filename (name) { filename (name) {