zoukankan      html  css  js  c++  java
  • 分页

    <div> 

      <p>
                <!-- 来写我们分页的展示效果 -->
                <!-- 作用:是用来告诉前端自己的第几页 -->

                <button @click="first_page()">首页</button>
                <button @click="up_page()">上一页</button>
                <button v-for="p in page_list" :key="p" @click="get_page(p)">{{p}}</button>
                <button @click="down_page()">下一页</button>
                <button @click="last_page()">尾页</button>                
           </p>

    </div>

    get_page(p){
                console.log(p)
                this.p = p
                this.get_info()

            },
            first_page(){
                this.p = 1
                this.get_info()
            },
            up_page(){
                if (this.p>1){
                    this.p -= 1
                    this.get_info()
                }else{
                    this.p = 1
                    this.get_info()
                }
            },
            down_page(){
                if(this.p>=this.all_page){
                    this.p=this.all_page
                    this.get_info()
                }else{
                    this.p += 1
                    this.get_info()
                }
            },
            last_page(){
                this.p = this.all_page
                this.get_info()
            }
  • 相关阅读:
    s s r 多用户 简单配置
    iptables vsftp timeout
    透明控件的通用解决方案
    一个带有可选自定义框架的透明对话框类
    把你的框架窗口一个影子
    WinForms形成皮肤
    WPF加载启动画面
    酷,半透明和形状对话框与标准的控制Windows 2000及以上
    在MFC应用程序中创建web风格的GUI
    画在WinForms控制
  • 原文地址:https://www.cnblogs.com/ZS1314/p/12165445.html
Copyright © 2011-2022 走看看