Mobile projects need to have a pull-up, load, pull-down and refresh function, which can be done through mint-ui.
if there are multiple pages, there will be more duplicate code, so you want to make it into a component, pass in the rendered content, and accept
when the paging component pulls down or up, it wants to request data by calling the corresponding method in the slot area (that is, the component where the incoming data resides), and ask various experts how to implement
call paginator
<template>
<div id="app">
<paginator>
<ol>
<h1>pupil</h1>
</ol>
</paginator>
</div>
</template>
<script>
import paginator from "./pages/paginator.vue"
export default {
components: {
paginator
},
methods: {
show () {
alert("show")
}
}
}
</script>
declare paginator
<template>
<div>
temp
<slot ref="one"></slot>
<button @click="father"></button>
</div>
</template>
<script>
export default {
methods: {
father () {
console.log("father")
}
}
}
</script>