ElPagination控制台报错
来源:7-3 用户列表分页展示-2
慕码人5437048
2022-03-26
加入这段代码后,控制台报错,虽然部影响使用,但是心里难受
<div class="footer">
<el-pagination
v-model:currentPage="page"
v-model:page-size="pageNum"
:page-sizes="[2,10,20,30]"
small="small"
layout="total, sizes, prev, pager, next"
:total="userPage.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
报错内容如下
error.mjs?8afb:16 ElementPlusError: [ElPagination] 你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档
at debugWarn (error.mjs?8afb:15:1)
at Proxy.eval (pagination.mjs?dd92:186:1)
at renderComponentRoot (runtime-core.esm-bundler.js?5c40:464:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?5c40:4332:1)
at ReactiveEffect.run (reactivity.esm-bundler.js?a1e9:160:1)
at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4458:1)
at mountComponent (runtime-core.esm-bundler.js?5c40:4241:1)
at processComponent (runtime-core.esm-bundler.js?5c40:4199:1)
at patch (runtime-core.esm-bundler.js?5c40:3791:1)
at mountChildren (runtime-core.esm-bundler.js?5c40:3987:1)
EL的版本如下
"dependencies": {
"axios": "^0.24.0",
"core-js": "^3.6.5",
"css-color-function": "^1.3.3",
"dayjs": "^1.10.6",
"element-plus": "^2.1.4",
"file-saver": "^2.0.5",
"md5": "^2.3.0",
"qs": "^6.10.3",
"rgb-hex": "^4.0.0",
"screenfull": "^5.1.0",
"vue": "^3.2.8",
"vue-i18n": "^9.2.0-beta.26",
"vue-router": "^4.0.11",
"vue3-print-nb": "^0.1.4",
"vuex": "^4.0.2",
"xlsx": "^0.17.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"svg-sprite-loader": "^6.0.9",
"vue-cli-plugin-element-plus": "~0.0.13"
},
写回答
1回答
-
Sunday
2022-03-26
你好
这个是你的 element-plus 升级到 2.x 版本之后,更新的最新语法的原因。
具体确实需要参考下对应的文档才可以:
00