fix: 修复类型导致打包失败
This commit is contained in:
parent
3e51a72e3b
commit
d64cfc99d9
@ -36,9 +36,9 @@ const props = defineProps({
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'close'])
|
||||
|
||||
const limit = ref(16)
|
||||
const icons = ref([])
|
||||
const total = ref(0)
|
||||
const limit = ref<number>(16)
|
||||
const icons = ref<Array<string>>([])
|
||||
const total = ref<number>(0)
|
||||
function getIcons(page = 1) {
|
||||
const start = (page - 1) * limit.value
|
||||
const end = start + limit.value
|
||||
@ -49,11 +49,11 @@ onMounted(() => {
|
||||
getIcons()
|
||||
total.value = constIcons.length
|
||||
})
|
||||
const handleNext = value => {
|
||||
const handleNext = (value: number) => {
|
||||
getIcons(value)
|
||||
}
|
||||
|
||||
const handlePrev = value => {
|
||||
const handlePrev = (value: number) => {
|
||||
getIcons(value)
|
||||
}
|
||||
const selectIcon = (icon: string) => {
|
||||
|
@ -56,7 +56,7 @@ actionApi.value = baseURL + props.action
|
||||
const token = ref<string>()
|
||||
token.value = 'Bearer ' + getAuthToken()
|
||||
|
||||
const handleSuccess = (response: any, uploadFile) => {
|
||||
const handleSuccess = (response: any) => {
|
||||
if (response.code === Code.SUCCESS) {
|
||||
emits('update:modelValue', response.data.path)
|
||||
} else {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { User } from '/admin/types/user'
|
||||
import http from '/admin/support/http'
|
||||
import { rememberAuthToken, removeAuthToken } from '/admin/support/helper'
|
||||
import Message from '/admin/support/message'
|
||||
import router from '/admin/router'
|
||||
import { Permission } from '/admin/types/permission'
|
||||
import { User } from '/admin/types/User'
|
||||
import { Permission } from '/admin/types/Permission'
|
||||
|
||||
export const useUserStore = defineStore('UserStore', {
|
||||
state: (): User => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { Permission } from '/admin/types/permission'
|
||||
import { Permission } from '/admin/types/Permission'
|
||||
import { MenuType } from '/admin/enum/app'
|
||||
import { Menu } from '/admin/types/Menu'
|
||||
import { constantRoutes } from '/admin/router'
|
||||
|
@ -1,6 +1,5 @@
|
||||
// login user type
|
||||
|
||||
import { Permission } from './permission'
|
||||
import { Permission } from './Permission'
|
||||
|
||||
export interface User {
|
||||
id: number
|
||||
|
Loading…
x
Reference in New Issue
Block a user