How to use the vue-property-decorator.Vue.nextTick function in vue-property-decorator

To help you get started, we’ve selected a few vue-property-decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sogehige / sogeBot / src / panel / views / settings / components / interface / wof-textarea.vue View on Github external
onEditationChange(val, old) {
    if (val) {
      // focus textarea and set height
      this.height = (this.$refs.div as HTMLElement).clientHeight;
      Vue.nextTick(() => {
        (this.$refs.textarea as HTMLElement).focus();
      });
    } else {
      // texteare unfocused, set height of div
      this.height = (this.$refs.textarea as HTMLElement).clientHeight;
    }
  }
}
github sascha245 / vue-threejs-composer / src / components / Scene.ts View on Github external
public async onActivate() {
    const scene = new ThreeScene();
    scene.name = this.name;
    this.m_scene.set(scene);
    this.m_active = true;
    await Vue.nextTick();
    this.$emit("loaded");
  }
  public async onUnload() {
github leek-wars / leek-wars-client / src / component / fight / fight.vue View on Github external
resize() {
			Vue.nextTick(() => {
				const RATIO = 1.7
				const reference = document.querySelector(LeekWars.flex ? '.app-center' : '.app-wrapper') as HTMLElement
				const offset = LeekWars.flex ? 40 + 24 : 24
				if (reference) {
					if (!LeekWars.mobile) {
						const height = Math.min(window.innerHeight - 128, Math.round((reference.offsetWidth - offset) / RATIO))
						this.playerWidth = Math.round(height * RATIO)
						this.playerHeight = height
					} else {
						this.playerWidth = window.innerWidth
						this.playerHeight = this.playerWidth / RATIO
					}
				}
			})
		}
github leek-wars / leek-wars-client / src / component / editor / ai-view.vue View on Github external
public selectHint(index: number) {
			this.selectedCompletion = index
			this.selectedHint = this.hints[index]
			Vue.nextTick(() => {
				const hints = this.$refs.hints as HTMLElement
				const hintList = (this.$refs.hintDialog as HTMLElement).querySelectorAll('.hint') as any
				const posIndex = Math.max(0, Math.round(index - (hints.offsetHeight / hintList[index].offsetHeight) / 2 + 1))
				if (hintList[posIndex]) {
					hints.scrollTo(0, -2 + hintList[posIndex].offsetTop)
				}
			})
		}
		public pick() {
github leek-wars / leek-wars-client / src / component / editor / editor-page.vue View on Github external
openNewFolder() {
			this.newFolderName = ''
			this.newFolderDialog = true
			Vue.nextTick(() => {
				(this.$refs.newFolderInput as HTMLElement).focus()
			})
		}
		newAI(v2: boolean, name: string) {
github leek-wars / leek-wars-client / src / component / editor / editor-page.vue View on Github external
jump(ai: AI, line: number) {
			if (ai !== this.currentAI) {
				this.$router.push('/editor/' + ai.id)
			}
			Vue.nextTick(() => {
				const editor = (this.$refs.editors as AIView[]).find(e => e.ai === ai)
				if (editor) { editor.scrollToLine(line - 1) }
			})
		}
		load(ai: AI) {
github sascha245 / vue-threejs-composer / src / components / AssetBundle.ts View on Github external
private async onUnload(): Promise {
    this.m_active = false;
    await Vue.nextTick();
  }
github sascha245 / vue-threejs-composer / src / components / AssetBundle.ts View on Github external
private async onLoad(): Promise {
    this.m_active = true;

    const bundles = this.getBundles(this.dependencies);
    const deps = this.m_bundle.registerDependencies(bundles);

    await Vue.nextTick();
    await deps;
  }
github leek-wars / leek-wars-client / src / component / editor / editor-page.vue View on Github external
openNewAI(v2: boolean) {
			this.newAIName = ''
			if (v2) {
				this.newAIv2Dialog = true
				Vue.nextTick(() => {
					(this.$refs.newAIInputv2 as HTMLElement).focus()
				})
			} else {
				this.newAIDialog = true
				Vue.nextTick(() => {
					(this.$refs.newAIInput as HTMLElement).focus()
				})
			}
		}
		openNewFolder() {
github monitoror / monitoror / ui / src / App.vue View on Github external
private async mounted() {
      await Vue.nextTick()

      window.addEventListener('online', this.dispatchUpdateNetworkState)
      window.addEventListener('offline', this.dispatchUpdateNetworkState)

      this.taskRunnerInterval = setInterval(() => {
        this.$store.dispatch('runTasks')
      }, 50)

      await this.$store.dispatch('init')
    }