File tree Expand file tree Collapse file tree 3 files changed +363
-272
lines changed Expand file tree Collapse file tree 3 files changed +363
-272
lines changed Original file line number Diff line number Diff line change 7
7
< div id ="react-app "> </ div >
8
8
9
9
< div id ="vue-app ">
10
- < div v-for ="list of lists " class ="box ">
10
+ < div v-for ="list of lists " class ="box " :key =" list.title " >
11
11
< h1 > {{ list.title }}</ h1 >
12
12
13
13
< pre > {{ list.items }}</ pre >
14
14
15
- < sortable class ="container " :options ="sortableOptions " v-model ="list.items ">
15
+ < i- sortable class ="container " :options ="sortableOptions " v-model ="list.items ">
16
16
< div v-for ="(item, index) of list.items " :key ="index " disabled ="!!(index % 2) " :id ="`item-${index}-${item}` " class ="item card ">
17
17
< div class ="card-content "> {{ index }}. {{ item }}</ div >
18
18
</ div >
19
- </ sortable >
19
+ </ i- sortable>
20
20
</ div >
21
21
22
22
< pre > [ {{ tags.join(', ') }} ]</ pre >
23
23
24
- < swappable class ="tags " v-model ="tags " :options ="swappableOptions ">
25
- < div v-for ="tag of tags " :id ="'tag-' + tag " class ="tag is-info is-large "> {{ tag }}</ div >
26
- </ swappable >
24
+ < i- swappable class ="tags " v-model ="tags " :options ="swappableOptions ">
25
+ < div v-for ="tag of tags " :id ="'tag-' + tag " class ="tag is-info is-large " :key =" tag " > {{ tag }}</ div >
26
+ </ i- swappable>
27
27
28
28
</ div >
29
29
Original file line number Diff line number Diff line change 1
1
import '@interactjs/vue'
2
2
import interact from '@interactjs/interactjs'
3
- import { createApp } from 'vue'
3
+ import { createApp } from 'vue/dist/vue.esm-bundler '
4
4
5
5
import { getData , sortableOptions , swappableOptions } from './shared.js'
6
6
7
- createApp ( {
8
- components : {
9
- ...interact . vue . components ,
10
- } ,
7
+ const app = createApp ( {
11
8
data ( ) {
12
9
return {
13
10
...getData ( ) ,
14
11
sortableOptions,
15
12
swappableOptions,
16
13
}
17
14
} ,
18
- } ) . mount ( '#vue-app' )
15
+ } )
16
+
17
+ app . use ( interact . vue )
18
+ app . mount ( '#vue-app' )
You can’t perform that action at this time.
0 commit comments