File tree 11 files changed +68
-65
lines changed
11 files changed +68
-65
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
29
29
``` html
30
30
<template >
31
31
<div id =" app" >
32
- <Particles
32
+ <vue-particles
33
33
id =" tsparticles"
34
34
:particlesInit =" particlesInit"
35
35
:particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
38
38
39
39
<!-- or -->
40
40
41
- <Particles
41
+ <vue-particles
42
42
id =" tsparticles"
43
43
:particlesInit =" particlesInit"
44
44
:particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change 1
1
{
2
- "plugins" : [
3
- [
4
- " @babel/proposal-decorators" ,
5
- {
6
- "legacy" : true
7
- }
8
- ],
9
- [
10
- " @babel/proposal-class-properties" ,
11
- {
12
- "loose" : true
13
- }
14
- ]
2
+ "plugins" : [
3
+ [
4
+ " @babel/proposal-decorators" ,
5
+ {
6
+ "legacy" : true
7
+ }
8
+ ],
9
+ [
10
+ " @babel/proposal-class-properties" ,
11
+ {
12
+ "loose" : true
13
+ }
14
+ ],
15
+ [
16
+ " @babel/plugin-transform-private-methods" ,
17
+ {
18
+ "loose" : true
19
+ }
20
+ ],
21
+ [
22
+ " @babel/plugin-transform-private-property-in-object" ,
23
+ {
24
+ "loose" : true
25
+ }
15
26
]
16
- }
27
+ ]
28
+ }
Original file line number Diff line number Diff line change 44
44
"babel-loader" : " ^8.3.0" ,
45
45
"eslint" : " ^8.44.0" ,
46
46
"eslint-config-prettier" : " ^8.8.0" ,
47
+ "fork-ts-checker-webpack-plugin" : " ^8.0.0" ,
47
48
"postcss" : " ^8.4.26" ,
48
49
"prettier" : " ^3.0.0" ,
49
50
"rollup" : " ^2.79.1" ,
Original file line number Diff line number Diff line change 1
1
import vue from 'rollup-plugin-vue' ;
2
- import typescript from 'rollup-plugin-typescript ' ;
2
+ import typescript from 'rollup-plugin-typescript2 ' ;
3
3
import json from '@rollup/plugin-json' ;
4
4
import { terser } from 'rollup-plugin-terser' ;
5
5
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" >
3
3
<img alt =" Vue logo" src =" ./assets/logo.png" />
4
- <Particles id =" tsparticles" :options =" options" :particlesInit =" particlesInit" />
4
+ <vue-particles id =" tsparticles" :options =" options" :particlesInit =" particlesInit" />
5
5
</div >
6
6
</template >
7
7
8
8
<script lang="ts">
9
9
import { Vue } from " vue-property-decorator" ;
10
10
import type { Engine } from " tsparticles-engine" ;
11
11
import { loadFull } from " tsparticles" ;
12
- import { basic } from " tsparticles-demo-configs" ;
13
-
14
- import Particles from " vue2-particles" ;
15
-
16
- Vue .use (Particles );
12
+ import configs from " tsparticles-demo-configs" ;
17
13
18
14
export default class App extends Vue {
19
- options = basic ;
15
+ options = configs . basic ;
20
16
21
17
async particlesInit(engine : Engine ) {
22
18
await loadFull (engine );
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
import App from './App.vue'
3
+ import Particles from "vue2-particles" ;
3
4
4
5
Vue . config . productionTip = false
5
6
7
+
8
+ Vue . use ( Particles ) ;
9
+
6
10
new Vue ( {
7
11
render : h => h ( App ) ,
8
12
} ) . $mount ( '#app' )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
29
29
``` html
30
30
<template >
31
31
<div id =" app" >
32
- <Particles
32
+ <vue-particles
33
33
id =" tsparticles"
34
34
:particlesInit =" particlesInit"
35
35
:particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
38
38
39
39
<!-- or -->
40
40
41
- <Particles
41
+ <vue-particles
42
42
id =" tsparticles"
43
43
:particlesInit =" particlesInit"
44
44
:particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import Vue from "vue";
2
2
import particles from "./Particles.vue" ;
3
3
4
4
const VueParticles = {
5
- install : ( vue : typeof Vue , options : unknown ) => {
5
+ install : ( vue : typeof Vue ) => {
6
6
vue . component ( "Particles" , particles ) ;
7
+ vue . component ( "vue-particles" , particles ) ;
7
8
} ,
8
9
} ;
9
10
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
29
29
``` html
30
30
<template >
31
31
<div id =" app" >
32
- <Particles
32
+ <vue-particles
33
33
id =" tsparticles"
34
34
:particlesInit =" particlesInit"
35
35
:particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
38
38
39
39
<!-- or -->
40
40
41
- <Particles
41
+ <vue-particles
42
42
id =" tsparticles"
43
43
:particlesInit =" particlesInit"
44
44
:particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import Vue from "vue";
2
2
import particles from "./Particles.vue" ;
3
3
4
4
const VueParticles = {
5
- install : ( vue : typeof Vue , options : unknown ) => {
5
+ install : ( vue : typeof Vue ) => {
6
6
vue . component ( "Particles" , particles ) ;
7
+ vue . component ( "vue-particles" , particles ) ;
7
8
} ,
8
9
} ;
9
10
You can’t perform that action at this time.
0 commit comments