-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d306db8
Showing
15 changed files
with
12,896 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-3" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# vue-canvas-nest | ||
|
||
> A Vue.js component for canvas-nest | ||
## Install | ||
|
||
``` bash | ||
# install dependencies | ||
npm install | ||
|
||
# or use yarn | ||
yarn add vue-canvas-nest | ||
``` | ||
|
||
## Usage | ||
|
||
### Registe component | ||
```js | ||
import vueCanvasNest from 'vue-canvas-nest' | ||
export default { | ||
components: { vueCanvasNest } | ||
} | ||
|
||
``` | ||
|
||
### How to use | ||
|
||
#### Simply use: | ||
```html | ||
<vue-canvas-nest></vue-canvas-nest> | ||
``` | ||
|
||
#### With config: | ||
```html | ||
<vue-canvas-nest :config="{color:'255,0,0', count: 88}"></vue-canvas-nest> | ||
``` | ||
|
||
## Contributors | ||
- [ZYSzys](https://github.com/ZYSzys) | ||
|
||
## Thanks | ||
- [canvas-nest.js](https://github.com/hustcc/canvas-nest.js) | ||
|
||
## License | ||
|
||
The plugin is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template> | ||
<div id="app"> | ||
<img src="./assets/logo.png"> | ||
<vue-canvas-nest :config="config"/> | ||
<h1>{{ msg }}</h1> | ||
<h2>Essential Links</h2> | ||
<ul> | ||
<li><a href="https://vuejs.org" target="_blank">Core Docs</a></li> | ||
<li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li> | ||
<li><a href="https://chat.vuejs.org" target="_blank">Community Chat</a></li> | ||
<li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li> | ||
</ul> | ||
<h2>Ecosystem</h2> | ||
<ul> | ||
<li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li> | ||
<li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li> | ||
<li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li> | ||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li> | ||
</ul> | ||
|
||
</div> | ||
</template> | ||
<script> | ||
import vueCanvasNest from './components/vueCanvasNest' | ||
export default { | ||
name: 'app', | ||
components: { vueCanvasNest }, | ||
data() { | ||
return { | ||
msg: 'Welcome to Your Vue.js App', | ||
config: { | ||
color: '0,0,255', | ||
count: 188, | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
<style> | ||
#app { | ||
font-family: 'Avenir', Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
h1, | ||
h2 { | ||
font-weight: normal; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
li { | ||
display: inline-block; | ||
margin: 0 10px; | ||
} | ||
a { | ||
color: #42b983; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="vue-canvas-nest-element" style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index: -1;"> | ||
</div> | ||
</template> | ||
<script> | ||
import CanvasNest from 'canvas-nest.js'; | ||
export default { | ||
name: 'vueCanvasNest', | ||
props: { | ||
config: { | ||
type: Object, | ||
default () { | ||
return { | ||
color: '255,0,0', | ||
count: 88, | ||
} | ||
} | ||
} | ||
}, | ||
data() { | ||
return { | ||
cn: '' | ||
} | ||
}, | ||
mounted() { | ||
const el = document.querySelector('.vue-canvas-nest-element') | ||
this.cn = new CanvasNest(el, this.config) | ||
}, | ||
beforeDestroy() { | ||
this.cn.destroy() | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Vue from 'vue' | ||
import App from './App.vue' | ||
|
||
new Vue({ | ||
el: '#app', | ||
render: h => h(App) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>vue-canvas-nest</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="/dist/build.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.