Details are as follows:
auto-import.d.ts:
import { UnwrapRef } from 'vue'
declare module 'vue' {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly PAGE_SIZE: UnwrapRef<typeof import('../constants/common')['PAGE_SIZE']>
}
}
code:
<el-pagination v-model:current-page="pagination.page"
v-model:pageSize="pagination.pageSize"
:total="pagination.total"
:pager-count="5"
size="small"
layout="sizes, prev, pager, next"
:page-sizes="PAGE_SIZE"
@current-change="loadData"
@size-change="loadData" />
When declared with declare module ‘vue’, PAGE_SIZE will report a type error in the template, but it will return to normal when manually replaced with declare module ‘@vue-runtime-core’. Can this be selected in configuration items?
Details are as follows:
auto-import.d.ts:
code:
When declared with
declare module ‘vue’, PAGE_SIZE will report a type error in the template, but it will return to normal when manually replaced withdeclare module ‘@vue-runtime-core’. Can this be selected in configuration items?