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