| 12345678910111213141516171819202122232425262728293031323334353637 |
- <template>
- <div>
- <el-pagination v-model:current-page="currentPage" :page-size="100" background layout="total, prev, pager, next"
- :total="1000" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
- </div>
- </template>
- <script>
- import { ref, onMounted, watch, toRefs } from 'vue';
- import { ElMessage } from 'element-plus';
- export default {
- props: {
- },
- setup() {
- function reload() {
- }
- function handleSizeChange(e) {
- console.log(e, 'size');
- }
- function handleCurrentChange(e) {
- console.log(e, 'current');
- }
- onMounted(() => {
- reload()
- })
- return {
- reload,//初始化组件
- handleCurrentChange,
- handleSizeChange,
- }
- }
- }
- </script>
- <style lang="scss" scoped></style>
|