Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在Vue JS中使用元素ui进行分页?_Javascript_Laravel_Vue.js - Fatal编程技术网

Javascript 如何在Vue JS中使用元素ui进行分页?

Javascript 如何在Vue JS中使用元素ui进行分页?,javascript,laravel,vue.js,Javascript,Laravel,Vue.js,如何使此布局=上一页、寻呼机、下一个工作后端。我需要在下一页和上一页中输入值。我查阅了文件,但什么也没有得到 <el-pagination @current-change="handleCurrentChange" :current-page="current_page" :page-size="per_page" layout="prev, pager, next" :total="total"> </el-pagination> <script> da

如何使此布局=上一页、寻呼机、下一个工作后端。我需要在下一页和上一页中输入值。我查阅了文件,但什么也没有得到

<el-pagination
@current-change="handleCurrentChange"
:current-page="current_page"
:page-size="per_page"
layout="prev, pager, next"
:total="total">
</el-pagination>

 <script>
data() {
return {
        per_page: null,
        current_page: null,
        total: null,
        next_page_url: null,

    }
  },
created(){
  this.fetchPost();
},
methods: {
    fetchPost() {
    axios.get('/' + this.$route.params.trans + '/adminGetPosts')
    .then(({data}) => {
        this.posts = data.data
        this.current_page= data.current_page
        this.per_page = data.per_page
        this.total = data.total
        this.next_page_url = data.next_page_url
    })
    },
 </script>

文件上写的很清楚。 layout=上一页,寻呼机,下一页是页面布局。 例如:

新Vue.$mount'app' @导入url//unpkg.com/element-ui/lib/theme-default/index.css; 页数较少时的效果 大于 7.页时的效果
文件上写的很清楚。 layout=上一页,寻呼机,下一页是页面布局。 例如:

新Vue.$mount'app' @导入url//unpkg.com/element-ui/lib/theme-default/index.css; 页数较少时的效果 大于 7.页时的效果
但是如果我单击next,它不会改变第2页的数据。当前页面和总计已运行良好。但上一页和下一页不适用于后端。但如果我单击下一页,它不会更改数据页2。当前页面和总计已运行良好。但上一个和下一个不适用于后端。您忘记在方法部分实现handleCurrentChange处理程序您忘记在方法部分实现handleCurrentChange处理程序