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() {
Vue.nextTick(() => {
this.$nextTick(() => {
this.applySize();
});

View file

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

View file

@ -1,6 +1,6 @@
<template>
<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>
</template>
@ -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(() => {

View file

@ -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);

View file

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

View file

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

View file

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

View file

@ -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';

View file

@ -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',