-
-
Notifications
You must be signed in to change notification settings - Fork 219
Some type definitions are not available in template blocks #616
Copy link
Copy link
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels