Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>iview example</title>
    <link rel="stylesheet" type="text/css" href="http://unpkg.com/iview/dist/styles/iview.css">
    <script type="text/javascript" src="http://vuejs.org/js/vue.min.js"></script>
    <script type="text/javascript" src="https://unpkg.com/iview@2.8.0/dist/iview.min.js"></script>
</head>
<body>
<div id="app">
    <i-button @click="data1 = []">Click me!</i-button>
    <i-table :columns="columns1" :height="200" :data="data1"></i-table>
</div>
<script>
    a = new Vue({
        el: '#app',
        data() {
          return {
            columns1: [
              {
                title: 'Name',
                key: 'name'
              },
              {
                title: 'Age',
                key: 'age'
              },
              {
                title: 'Address',
                key: 'address'
              }
            ],
            data1: [
              {
                name: 'John Brown',
                age: 18,
                address: 'New York No. 1 Lake Park',
                date: '2016-10-03'
              },
              {
                name: 'Jim Green',
                age: 24,
                address: 'London No. 1 Lake Park',
                date: '2016-10-01'
              },
              {
                name: 'Joe Black',
                age: 30,
                address: 'Sydney No. 1 Lake Park',
                date: '2016-10-02'
              },
              {
                name: 'Jon Snow',
                age: 26,
                address: 'Ottawa No. 2 Lake Park',
                date: '2016-10-04'
              }
            ],
          }
        }
    })
  </script>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers