introduce lint for client

Resolve #7998
This commit is contained in:
syuilo
2021-11-18 23:32:43 +09:00
parent c850cef711
commit 73b5c12927
40 changed files with 817 additions and 153 deletions

View File

@ -33,11 +33,25 @@ export default defineComponent({
ctx: null,
};
},
unmounted() {
window.cancelAnimationFrame(this.anim);
},
mounted() {
this.ctx = this.$refs.canvas.getContext('2d');
new ResizeObserver(this.resize).observe(this.$refs.content);
this.resize();
this.tick();
},
updated() {
this.resize();
},
methods: {
createSparkles(w, h, count) {
var holder = [];
const holder = [];
for (var i = 0; i < count; i++) {
for (let i = 0; i < count; i++) {
const color = '#' + ('000000' + Math.floor(Math.random() * 16777215).toString(16)).slice(-6);
@ -143,20 +157,6 @@ export default defineComponent({
}
},
},
mounted() {
this.ctx = this.$refs.canvas.getContext('2d');
new ResizeObserver(this.resize).observe(this.$refs.content);
this.resize();
this.tick();
},
updated() {
this.resize();
},
destroyed() {
window.cancelAnimationFrame(this.anim);
},
});
</script>