File tree Expand file tree Collapse file tree 11 files changed +68
-65
lines changed Expand file tree Collapse file tree 11 files changed +68
-65
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
2929``` html
3030<template >
3131 <div id =" app" >
32- <Particles
32+ <vue-particles
3333 id =" tsparticles"
3434 :particlesInit =" particlesInit"
3535 :particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838
3939 <!-- or -->
4040
41- <Particles
41+ <vue-particles
4242 id =" tsparticles"
4343 :particlesInit =" particlesInit"
4444 :particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change 11{
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+ }
1526 ]
16- }
27+ ]
28+ }
Original file line number Diff line number Diff line change 4444 "babel-loader" : " ^8.3.0" ,
4545 "eslint" : " ^8.44.0" ,
4646 "eslint-config-prettier" : " ^8.8.0" ,
47+ "fork-ts-checker-webpack-plugin" : " ^8.0.0" ,
4748 "postcss" : " ^8.4.26" ,
4849 "prettier" : " ^3.0.0" ,
4950 "rollup" : " ^2.79.1" ,
Original file line number Diff line number Diff line change 11import vue from 'rollup-plugin-vue' ;
2- import typescript from 'rollup-plugin-typescript ' ;
2+ import typescript from 'rollup-plugin-typescript2 ' ;
33import json from '@rollup/plugin-json' ;
44import { terser } from 'rollup-plugin-terser' ;
55
Original file line number Diff line number Diff line change 11<template >
22 <div id =" app" >
33 <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" />
55 </div >
66</template >
77
88<script lang="ts">
99import { Vue } from " vue-property-decorator" ;
1010import type { Engine } from " tsparticles-engine" ;
1111import { 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" ;
1713
1814export default class App extends Vue {
19- options = basic ;
15+ options = configs . basic ;
2016
2117 async particlesInit(engine : Engine ) {
2218 await loadFull (engine );
Original file line number Diff line number Diff line change 11import Vue from 'vue'
22import App from './App.vue'
3+ import Particles from "vue2-particles" ;
34
45Vue . config . productionTip = false
56
7+
8+ Vue . use ( Particles ) ;
9+
610new Vue ( {
711 render : h => h ( App ) ,
812} ) . $mount ( '#app' )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
2929``` html
3030<template >
3131 <div id =" app" >
32- <Particles
32+ <vue-particles
3333 id =" tsparticles"
3434 :particlesInit =" particlesInit"
3535 :particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838
3939 <!-- or -->
4040
41- <Particles
41+ <vue-particles
4242 id =" tsparticles"
4343 :particlesInit =" particlesInit"
4444 :particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import Vue from "vue";
22import particles from "./Particles.vue" ;
33
44const VueParticles = {
5- install : ( vue : typeof Vue , options : unknown ) => {
5+ install : ( vue : typeof Vue ) => {
66 vue . component ( "Particles" , particles ) ;
7+ vue . component ( "vue-particles" , particles ) ;
78 } ,
89} ;
910
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Vue.use(Particles);
2929``` html
3030<template >
3131 <div id =" app" >
32- <Particles
32+ <vue-particles
3333 id =" tsparticles"
3434 :particlesInit =" particlesInit"
3535 :particlesLoaded =" particlesLoaded"
@@ -38,7 +38,7 @@ Vue.use(Particles);
3838
3939 <!-- or -->
4040
41- <Particles
41+ <vue-particles
4242 id =" tsparticles"
4343 :particlesInit =" particlesInit"
4444 :particlesLoaded =" particlesLoaded"
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import Vue from "vue";
22import particles from "./Particles.vue" ;
33
44const VueParticles = {
5- install : ( vue : typeof Vue , options : unknown ) => {
5+ install : ( vue : typeof Vue ) => {
66 vue . component ( "Particles" , particles ) ;
7+ vue . component ( "vue-particles" , particles ) ;
78 } ,
89} ;
910
You can’t perform that action at this time.
0 commit comments