This commit is contained in:
syuilo 2018-02-18 18:40:24 +09:00
parent c0a7cefe46
commit 51a0cc6435
9 changed files with 12 additions and 12 deletions

View file

@ -29,7 +29,7 @@ export default define({
}; };
}, },
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
this.applySize(); this.applySize();
}); });

View file

@ -47,7 +47,7 @@ export default define({
}; };
}, },
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
this.set(); this.set();
}); });

View file

@ -1,6 +1,6 @@
<template> <template>
<div class="context-menu" :style="{ left: `${x}px`, top: `${y}px` }" @contextmenu.prevent="() => {}"> <div class="context-menu" :style="{ left: `${x}px`, top: `${y}px` }" @contextmenu.prevent="() => {}">
<me-nu :menu="menu" @x="click"/> <context-menu-menu :menu="menu" @x="click"/>
</div> </div>
</template> </template>
@ -8,12 +8,8 @@
import Vue from 'vue'; import Vue from 'vue';
import * as anime from 'animejs'; import * as anime from 'animejs';
import contains from '../../../common/scripts/contains'; import contains from '../../../common/scripts/contains';
import meNu from './context-menu-menu.vue';
export default Vue.extend({ export default Vue.extend({
components: {
'me-nu': meNu
},
props: ['x', 'y', 'menu'], props: ['x', 'y', 'menu'],
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {

View file

@ -31,6 +31,7 @@ import drive from './drive.vue';
import driveFile from './drive-file.vue'; import driveFile from './drive-file.vue';
import driveFolder from './drive-folder.vue'; import driveFolder from './drive-folder.vue';
import driveNavFolder from './drive-nav-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', ui);
Vue.component('mk-ui-header', uiHeader); 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-file', driveFile);
Vue.component('mk-drive-folder', driveFolder); Vue.component('mk-drive-folder', driveFolder);
Vue.component('mk-drive-nav-folder', driveNavFolder); Vue.component('mk-drive-nav-folder', driveNavFolder);
Vue.component('context-menu-menu', contextMenuMenu);

View file

@ -43,7 +43,9 @@ export default Vue.extend({
}, },
mounted() { mounted() {
if (this.default) this.text = this.default; if (this.default) this.text = this.default;
(this.$refs.text as any).focus(); this.$nextTick(() => {
(this.$refs.text as any).focus();
});
}, },
methods: { methods: {
ok() { ok() {

View file

@ -28,7 +28,7 @@ export default Vue.extend({
}; };
}, },
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
(this.$refs.form as any).focus(); (this.$refs.form as any).focus();
}); });
}, },

View file

@ -82,7 +82,7 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
this.autocomplete = new Autocomplete(this.$refs.text); this.autocomplete = new Autocomplete(this.$refs.text);
this.autocomplete.attach(); this.autocomplete.attach();

View file

@ -84,7 +84,7 @@ export default Vue.extend({
}, },
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
const main = this.$refs.main as any; const main = this.$refs.main as any;
main.style.top = '15%'; main.style.top = '15%';
main.style.left = (window.innerWidth / 2) - (main.offsetWidth / 2) + 'px'; main.style.left = (window.innerWidth / 2) - (main.offsetWidth / 2) + 'px';

View file

@ -11,7 +11,7 @@ import * as anime from 'animejs';
export default Vue.extend({ export default Vue.extend({
props: ['notification'], props: ['notification'],
mounted() { mounted() {
Vue.nextTick(() => { this.$nextTick(() => {
anime({ anime({
targets: this.$el, targets: this.$el,
bottom: '0px', bottom: '0px',