forked from coldemo/gallery.code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue-at.js
More file actions
36 lines (33 loc) · 930 Bytes
/
vue-at.js
File metadata and controls
36 lines (33 loc) · 930 Bytes
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
// await loadJs('https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js')
await loadJs('https://unpkg.com/[email protected]/dist/vue.min.js')
// await loadJs('https://unpkg.com/vue-at')
await loadJsForceUmd({
url: 'https://unpkg.com/[email protected]/dist/vue-at.js',
name: 'VueAt',
})
appendCss(`
.container { padding: 20px }
.editor { margin-top:20px; padding:4px 8px; height:120px; border:solid 1px gray; white-space:pre-wrap }
`)
let App = {
components: { At: VueAt },
template: `
<div class="container">
<h1>Vue At</h1>
<a target="_blank" href="https://github.com/fritx/vue-at">
https://github.com/fritx/vue-at
</a>
<at :members="members" v-model="input">
<div class="editor" contenteditable></div>
</at>
</div>
`,
data() {
return {
members: [
'fritx', 'linguokang', 'huangruichang'
],
input: '@fritx @huangruichang '
}
}
}