zoukankan      html  css  js  c++  java
  • vue之templete模板

    1.templete里要用data里的数据的话,不要加this.

    2.按理说Js是写在<script></script>标签体内的。但是Vue的templete模板中对所有的数据绑定,都提供了完全的js支持。

    代码示例如下:

    强调"tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"-->
    <el-table :data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)" style=" 100%" max-height="400">
              <el-table-column label="姓名" prop="name"></el-table-column>-->
              <el-table-column label="id" prop="id"></el-table-column>
              <el-table-column label="ownerId" prop="ownerId"></el-table-column>
              <el-table-column label="userId" prop="userId"></el-table-column>
              <el-table-column label="status" prop="status"></el-table-column>
              <el-table-column label="domId" prop="domId"></el-table-column>
              <el-table-column label="管理员" prop="isAdmin"></el-table-column>
              <el-table-column fixed="right" label="操作" width="120">
                <template slot-scope="scope">
                  <el-button
                    @click="dialogFormVisible1 = true;row=scope.$index;onejilu=scope.row"
                    type="text"
                    size="small"
                  >移除</el-button>
                </template>
              </el-table-column>
     </el-table>

    data() {
    return {
      tableData: [], //table的data
      currentPage:1, //初始页
      pagesize:5, // 初始每页的数据
      };
    },

     
  • 相关阅读:
    poj3181(Dollar Dayz)
    poj3666(Making the Grade)
    poj2392(Space Elevator)
    hdu5288(OO’s Sequence)
    hdu5289(Assignment)
    快学scala
    Spark Checkpointing
    Spark Performance Tuning (性能调优)
    Spark Memory Tuning (内存调优)
    Sparkstreaming and Kafka
  • 原文地址:https://www.cnblogs.com/yanl55555/p/11962202.html
Copyright © 2011-2022 走看看