- html>
- <html lang="en">
-
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Documenttitle>
- <script src="cdn.jsdelivr.net_npm_vue@2_dist_vue.js">script>
- <script src="https://unpkg.com/axios@1.5.0/dist/axios.min.js">script>
-
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
-
- <script src="https://unpkg.com/element-ui/lib/index.js">script>
-
- head>
-
- <body>
- <div id="app">
- <template>
- <el-table :data="tableData" style="width: 100%">
- <el-table-column label="日期" width="180">
- <template slot-scope="scope">
- <span style="margin-left: 10px">{{ scope.row.date }}span>
- template>
- el-table-column>
- <el-table-column label="姓名" width="180">
- <template slot-scope="scope">
- <div slot="reference" class="name-wrapper">
- {{ scope.row.name }}
- div>
- template>
- el-table-column>
- <el-table-column prop="address" label="地址">
- <template slot-scope="scope">
- <span style="margin-left: 10px">{{ scope.row.address }}span>
- template>
- el-table-column>
- <el-table-column label="操作">
- <template slot-scope="scope">
- <el-button size="mini" @click="handleEdit(scope.$index, scope.row)" type="info">编辑el-button>
- <el-button size="mini" type="danger"
- @click="handleDelete(scope.$index, scope.row)">删除el-button>
- template>
- el-table-column>
- el-table>
- template>
-
- <div class="block">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="currentPage4"
- :page-sizes="[10, 20, 30, 40]"
- :page-size="100"
- layout="total, sizes, prev, pager, next, jumper"
- :total="40">
- el-pagination>
- div>
- div>
- <script>
- new Vue({
- el: "#app",
- data: {
- currentPage1: 5,
- currentPage2: 5,
- currentPage3: 5,
- currentPage4: 1,
- tableData: [{
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }, {
- date: '2016-05-04',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1517 弄'
- }, {
- date: '2016-05-01',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1519 弄'
- }, {
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1516 弄'
- }]
- },
- methods: {
- handleEdit(index, row) {
- console.log(index, row);
- },
- handleDelete(index, row) {
- console.log(index, row);
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- }
- }
- });
- script>
- body>
-
- html>
- html>
- <html lang="en" style="height: 100%;">
-
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Documenttitle>
- <script src="cdn.jsdelivr.net_npm_vue@2_dist_vue.js">script>
- <script src="https://unpkg.com/axios@1.5.0/dist/axios.min.js">script>
-
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
-
- <script src="https://unpkg.com/element-ui/lib/index.js">script>
-
- <style>
- .el-header,
- .el-footer {
- background-color: #B3C0D1;
- color: #333;
- text-align: center;
- line-height: 60px;
- }
-
- .el-aside {
- background-color: #D3DCE6;
- color: #333;
- text-align: center;
- line-height: 200px;
- }
-
- .el-main {
- background-color: #E9EEF3;
- color: #333;
- text-align: center;
- line-height: 160px;
- }
-
- body>.el-container {
- margin-bottom: 40px;
- }
-
- .el-container:nth-child(5) .el-aside,
- .el-container:nth-child(6) .el-aside {
- line-height: 260px;
- }
-
- .el-container:nth-child(7) .el-aside {
- line-height: 320px;
- }
- style>
- head>
-
- <body style="height: 100%; overflow: hidden;">
- <div id="app" style="height: 100%;">
- <el-container style="height: 100%;">
- <el-header>Headerel-header>
- <el-container>
- <el-aside>
- <el-menu background-color="#D3DCE6" text-color="#333">
- <el-submenu index="1">
- <template>
- <span slot="title">导航一span>
- template>
- <el-menu-item index="1-1">
- <a href="index.html" target="right">1-1a>el-menu-item>
- <el-menu-item index="1-2">
- <a href="index.html" target="right">1-2a>el-menu-item>
- <el-menu-item index="1-3">
- <a href="index.html" target="right">1-3a>el-menu-item>
- el-submenu>
- <el-menu-item index="2">
- <span slot="title">导航二span>
- el-menu-item>
- <el-submenu index="3">
- <template>
- <span slot="title">导航三span>
- template>
- <el-menu-item index="3-1">3-1el-menu-item>
- <el-menu-item index="3-2">3-2el-menu-item>
- <el-menu-item index="3-3">3-3el-menu-item>
- el-submenu>
- el-menu>
- el-aside>
- <el-container>
- <el-main style="overflow: hidden;">
- <iframe name="right" width="100%" height="100%" frameborder="0">
- iframe>
- el-main>
- el-container>
- el-container>
- <el-footer>Footerel-footer>
- el-container>
- div>
- <script>
- new Vue({
- el: "#app",
- data: {
-
- },
- methods: {
-
- }
- });
- script>
- body>
-
- html>