File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 144
144
text-align : center ;
145
145
}
146
146
147
- # particles-js {
147
+ . particles-js {
148
148
background-image : url (" ./assets/sky.jpg" );
149
149
background-size : cover ;
150
150
position : absolute ;
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div
3
- id =" particles-js"
3
+ class =" particles-js"
4
+ :id =" id"
4
5
:color =" color"
5
6
:particleOpacity =" particleOpacity"
6
7
:linesColor =" linesColor"
22
23
/* eslint-disable */
23
24
export default {
24
25
name: ' vue-particles' ,
26
+ data : function () {
27
+ return {
28
+ id: ' particles-instance-' + Math .floor (Math .random () * 5000 )
29
+ }
30
+ },
25
31
props: {
26
32
color: {
27
33
type: String ,
125
131
clickEffect,
126
132
clickMode
127
133
) {
128
- particlesJS (' particles-js ' , {
134
+ particlesJS (this . id , {
129
135
" particles" : {
130
136
" number" : {
131
137
" value" : particlesNumber,
You can’t perform that action at this time.
0 commit comments