直接在官网拷贝代码
<template>
<el-pagination background layout="prev, pager, next" :total="1000" />
</template>
结果渲染不显示,空白的。关键是没任何报错。
这怎么解决的?
main.js是正常的
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
const app = createApp(App);
app.use(ElementPlus, { locale: zhCn }).use(store).use(router).mount("#app");
可能是样式文件没有被加载,确保在项目中导入了 Element-Plus 的样式文件。在 main.js 中添加以下代码: