⬆️ Upgrade(custom): upgrade s3 package

This commit is contained in:
Kuingsmile
2026-01-04 17:49:15 +08:00
parent f506daaa71
commit 4d074e8ed2
5 changed files with 55 additions and 61 deletions

View File

@@ -10,13 +10,12 @@ import type { IConfig } from 'piclist'
import { onBeforeMount, onMounted } from 'vue'
import UIServiceProvider from '@/components/ui/UIServiceProvider.vue'
import { useAppStore } from '@/hooks/useAppStore'
import { useATagClick } from '@/hooks/useATagClick'
import { useStore } from '@/hooks/useStore'
import { getConfig } from '@/utils/dataSender'
import { pageReloadCount } from '@/utils/global'
import { useAppStore } from './hooks/useAppStore'
useATagClick()
const store = useStore()
@@ -40,7 +39,7 @@ onMounted(async () => {
<script lang="ts">
export default {
name: 'PicGoApp',
name: 'PicList',
}
</script>

View File

@@ -75,7 +75,6 @@ const showConfirm = (options: ConfirmOptions): Promise<boolean> => {
}
onMounted(() => {
// Initialize message service
const { setMessageService } = useMessage()
if (messageRef.value) {
setMessageService({

View File

@@ -11,41 +11,37 @@ interface MessageService {
const messageServiceRef = ref<MessageService | null>(null)
const msgHelper = (
message: string,
type: 'success' | 'error' | 'warning' | 'info',
options?: Partial<MessageOptions>,
) => {
if (messageServiceRef.value) {
return messageServiceRef.value[type](message, options)
}
console.warn('Message service not initialized')
return ''
}
export function useMessage() {
const setMessageService = (service: MessageService) => {
messageServiceRef.value = service
}
const success = (message: string, options?: Partial<MessageOptions>) => {
if (messageServiceRef.value) {
return messageServiceRef.value.success(message, options)
}
console.warn('Message service not initialized')
return ''
return msgHelper(message, 'success', options)
}
const error = (message: string, options?: Partial<MessageOptions>) => {
if (messageServiceRef.value) {
return messageServiceRef.value.error(message, options)
}
console.warn('Message service not initialized')
return ''
return msgHelper(message, 'error', options)
}
const warning = (message: string, options?: Partial<MessageOptions>) => {
if (messageServiceRef.value) {
return messageServiceRef.value.warning(message, options)
}
console.warn('Message service not initialized')
return ''
return msgHelper(message, 'warning', options)
}
const info = (message: string, options?: Partial<MessageOptions>) => {
if (messageServiceRef.value) {
return messageServiceRef.value.info(message, options)
}
console.warn('Message service not initialized')
return ''
return msgHelper(message, 'info', options)
}
return {