-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
104 lines (100 loc) · 2.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Loader</title>
<meta
name="keywords"
content="yfill,series,loader,amd,umd,script"
/>
<meta
name="description"
content="A loader that loads modules asynchronously on demand"
/>
<script src="https://yfill.cn/docs/common/js/head.js"></script>
<script>var repository = 'https://github.com/Yfill/loader';</script>
<script>Theme.run({ mode: 'dark' });</script>
<script src="./dist/index.js"></script>
</head>
<body
background-color-0
font-color-0
>
<script src="https://yfill.cn/docs/common/js/body.js"></script>
<h2>Example effect</h2>
<style>
.people-group {
display: flex;
align-items: center;
}
.people {
border-width: 1px;
border-style: solid;
padding: 10px 20px;
border-radius: 6px;
margin: 0 20px 20px 0;
cursor: move;
user-select: none;
}
</style>
<div id="template">
<h3>Vue-multiselect</h3>
<multiselect
v-model="value"
:options="options"
></multiselect>
<h3>Vue.Draggable(dragging: {{drag}})</h3>
<vue-draggable
v-model="myArray"
group="people"
class="people-group"
@start="drag=true"
@end="drag=false"
>
<div
class="people"
v-for="element in myArray"
border-color-0
:key="element.id"
>{{element.name}}</div>
</vue-draggable>
</div>
<script>
var loader = Loader.create({
libAliasMap: {
'vue-multiselect': [
'vue-multiselect/dist/vue-multiselect.min.js',
'vue-multiselect/dist/vue-multiselect.min.css'
]
}
});
var loadCom = loader.vueComponentLoad;
loader('[email protected]').then(function (Vue) {
Vue.use(loader);
new Vue({
components: {
Multiselect: loadCom('vue-multiselect'),
VueDraggable: loadCom('vuedraggable')
},
data: function() {
return {
drag: false,
value: null,
options: ['list', 'of', 'options'],
myArray: [
{ id: '1', name: 'Tom' },
{ id: '2', name: 'Jerry' },
{ id: '3', name: 'Carry' },
]
}
},
created: function () {
this.$loader('dayjs').then(function(dayjs){
console.log(dayjs().toString());
});
}
}).$mount('#template');
})
</script>
</body>
</html>