-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathindex.html
executable file
·53 lines (49 loc) · 1.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>vuesmarttable</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.css" />
<style>
.smart-table {
margin: 25px;
}
</style>
</head>
<body>
<input type="text" v-model="search"/>
<!--smart-table
:auto-load="true"
body-path="results"
id-col="id.value"
table-classes="ui celled table unstackable"
endpoint="http://api.randomuser.me/?page=1&results=2&seed=abc"
:header="[
{key: 'name.first', label: 'name'},
{key: 'name.last', label: 'surname'},
{key: 'gender'},
{key: 'phone+cell', label: 'contacts'},
{key: 'picture.thumbnail', label: 'avatar'},
{key: 'nat', label: 'nationality'}
]"
:order-by="['name.first', 'name.last']"
:editable="['name.first', 'name.last', 'picture.thumbnail']"
:can-filter-by="['name.first', 'name.last']"
v-ref:smart>
<plain-text col="name.first" :multiline="true"></plain-text>
<src2img col="picture.thumbnail"></src2img>
<contacts col="phone+cell"></contacts>
<fontawesome col="gender"></fontawesome>
<nationality col="nat"></nationality>
</smart-table-->
<button @click="add">add</button>
<button @click="remove">remove</button>
<smart-table
:body="[{hello:'world'},{hello:'to you', world:'hello'}]"
:order-by="['hello', 'world']"
v-ref:ut>
</smart-table>
<!-- built files will be auto injected -->
</body>
</html>