Created
January 9, 2018 02:13
-
-
Save anonymous/e04e86c9e99d4d1e97bf327769acd345 to your computer and use it in GitHub Desktop.
iview example // source http://jsbin.com/soqogagiqu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> | |
<script id="jsbin-source-html" type="text/html"><!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> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment