From e82864d4fc63334560fbb2c324f180cb6d9cd3d6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 18 Feb 2018 18:40:24 +0900 Subject: [PATCH] wip --- src/web/app/common/views/components/widgets/slideshow.vue | 2 +- src/web/app/common/views/components/widgets/tips.vue | 2 +- src/web/app/desktop/views/components/context-menu.vue | 6 +----- src/web/app/desktop/views/components/index.ts | 2 ++ src/web/app/desktop/views/components/input-dialog.vue | 4 +++- src/web/app/desktop/views/components/post-form-window.vue | 2 +- src/web/app/desktop/views/components/post-form.vue | 2 +- src/web/app/desktop/views/components/window.vue | 2 +- src/web/app/mobile/views/components/notify.vue | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/web/app/common/views/components/widgets/slideshow.vue b/src/web/app/common/views/components/widgets/slideshow.vue index a200aa061d..1692cbc397 100644 --- a/src/web/app/common/views/components/widgets/slideshow.vue +++ b/src/web/app/common/views/components/widgets/slideshow.vue @@ -29,7 +29,7 @@ export default define({ }; }, mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { this.applySize(); }); diff --git a/src/web/app/common/views/components/widgets/tips.vue b/src/web/app/common/views/components/widgets/tips.vue index f38ecfe441..28857f5542 100644 --- a/src/web/app/common/views/components/widgets/tips.vue +++ b/src/web/app/common/views/components/widgets/tips.vue @@ -47,7 +47,7 @@ export default define({ }; }, mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { this.set(); }); diff --git a/src/web/app/desktop/views/components/context-menu.vue b/src/web/app/desktop/views/components/context-menu.vue index 3ba475e111..9238b42460 100644 --- a/src/web/app/desktop/views/components/context-menu.vue +++ b/src/web/app/desktop/views/components/context-menu.vue @@ -1,6 +1,6 @@ @@ -8,12 +8,8 @@ import Vue from 'vue'; import * as anime from 'animejs'; import contains from '../../../common/scripts/contains'; -import meNu from './context-menu-menu.vue'; export default Vue.extend({ - components: { - 'me-nu': meNu - }, props: ['x', 'y', 'menu'], mounted() { this.$nextTick(() => { diff --git a/src/web/app/desktop/views/components/index.ts b/src/web/app/desktop/views/components/index.ts index 1e4bd96a19..2ec368cf11 100644 --- a/src/web/app/desktop/views/components/index.ts +++ b/src/web/app/desktop/views/components/index.ts @@ -31,6 +31,7 @@ import drive from './drive.vue'; import driveFile from './drive-file.vue'; import driveFolder from './drive-folder.vue'; import driveNavFolder from './drive-nav-folder.vue'; +import contextMenuMenu from './context-menu-menu.vue'; Vue.component('mk-ui', ui); Vue.component('mk-ui-header', uiHeader); @@ -63,3 +64,4 @@ Vue.component('mk-drive', drive); Vue.component('mk-drive-file', driveFile); Vue.component('mk-drive-folder', driveFolder); Vue.component('mk-drive-nav-folder', driveNavFolder); +Vue.component('context-menu-menu', contextMenuMenu); diff --git a/src/web/app/desktop/views/components/input-dialog.vue b/src/web/app/desktop/views/components/input-dialog.vue index c00b1d4c14..99a9df1062 100644 --- a/src/web/app/desktop/views/components/input-dialog.vue +++ b/src/web/app/desktop/views/components/input-dialog.vue @@ -43,7 +43,9 @@ export default Vue.extend({ }, mounted() { if (this.default) this.text = this.default; - (this.$refs.text as any).focus(); + this.$nextTick(() => { + (this.$refs.text as any).focus(); + }); }, methods: { ok() { diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue index 8647a8d2dd..4427f59829 100644 --- a/src/web/app/desktop/views/components/post-form-window.vue +++ b/src/web/app/desktop/views/components/post-form-window.vue @@ -28,7 +28,7 @@ export default Vue.extend({ }; }, mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { (this.$refs.form as any).focus(); }); }, diff --git a/src/web/app/desktop/views/components/post-form.vue b/src/web/app/desktop/views/components/post-form.vue index 456f0de821..f117f8cc5e 100644 --- a/src/web/app/desktop/views/components/post-form.vue +++ b/src/web/app/desktop/views/components/post-form.vue @@ -82,7 +82,7 @@ export default Vue.extend({ } }, mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { this.autocomplete = new Autocomplete(this.$refs.text); this.autocomplete.attach(); diff --git a/src/web/app/desktop/views/components/window.vue b/src/web/app/desktop/views/components/window.vue index 08e28007a7..7f7f778131 100644 --- a/src/web/app/desktop/views/components/window.vue +++ b/src/web/app/desktop/views/components/window.vue @@ -84,7 +84,7 @@ export default Vue.extend({ }, mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { const main = this.$refs.main as any; main.style.top = '15%'; main.style.left = (window.innerWidth / 2) - (main.offsetWidth / 2) + 'px'; diff --git a/src/web/app/mobile/views/components/notify.vue b/src/web/app/mobile/views/components/notify.vue index d3e09e450b..6d4a481dbe 100644 --- a/src/web/app/mobile/views/components/notify.vue +++ b/src/web/app/mobile/views/components/notify.vue @@ -11,7 +11,7 @@ import * as anime from 'animejs'; export default Vue.extend({ props: ['notification'], mounted() { - Vue.nextTick(() => { + this.$nextTick(() => { anime({ targets: this.$el, bottom: '0px',