-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayground.html
42 lines (38 loc) · 1003 Bytes
/
playground.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Playground</title>
</head>
<body>
<div id="app">
<ar-records from='api'>
<template #artifact="{ artifact, index }">
{{ index+1 }}.) {{ artifact }}
</template>
</ar-records>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vuex"></script>
<script src="https://unpkg.com/[email protected]/dist/axios.js"></script>
<script src="./dist/artifacts.js"></script>
<script>
Vue.use(Artifacts);
var store = new Vuex.Store({
modules: {
api: Artifacts.postgrestModuleFactory({ namespaced: true })
}
});
var app = new Vue({
el: '#app',
store: store
})
app.$store.commit({
type: 'api/addObjects',
objects: [{ id: '1', hallo: 'Welt' }]
})
</script>
</body>
</html>