How to use the vue-typed.Virtual function in vue-typed

To help you get started, we’ve selected a few vue-typed 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 vue-typed / vue-typed-ui / demo / src / docs / components / button / index.ts View on Github external
import { Options, Virtual } from 'vue-typed';
import * as Vue from 'vue'

@Options({
	template: require('./view.pug')()
})
export class Button extends Virtual() {

	status: string = 'Click some buttons test Aha'
	counter: number = 0;
	disabled: boolean = true

	setDisable() {
		alert('I disable my self')
		this.disabled = true
	}

	updateStatus(status) {
		this.counter++;
		this.status = status + ' ' + this.counter + ' times';
	}

	loading() {
github vue-typed / vue-typed-ui / demo / src / docs / modules / alert / index.ts View on Github external
import { Options, Virtual } from 'vue-typed';
import * as Vue from 'vue'

@Options({
	template: require('./view.pug')()
})
export class Alert extends Virtual() {

	sample1() {
		this.$ui.alert("Here's a message!")
	}

	sample2() {
		this.$ui.alert("Here's a message!", "It's pretty, isn't it?")
	}

	sample3() {
		this.$ui.alert("Good job!", "You clicked the button!", "success")
	}

	sample4() {
		this.$ui.alert({
			title: "Are you sure?",
github vue-typed / vue-typed-ui / demo / src / docs / components / checkbox / index.ts View on Github external
import { Options, Virtual } from 'vue-typed';
import * as Vue from 'vue'

@Options({
	template: require('./view.pug')()
})
export class Checkbox extends Virtual()  {

	checked: boolean = true
	enabledToggle = false;
	checkedVal: string = "yes"
	checkedNames: Array = ['John']

	get checkedStatus() {
		return this.checked ? 'Uncheck me please!' : 'Check me please!'
	}

	get enabledToggleText() {
		return this.enabledToggle ? 'Disable me!' : 'Enable me!'
	} 

	get enabledToggleStatus() {
		return this.enabledToggle ? "I'm enable :)" : "I'm disable :("
github vue-typed / vue-typed-ui / demo / src / docs / components / modal / standard / index.ts View on Github external
import { Options, Virtual } from 'vue-typed';
import * as Vue from 'vue'

@Options({
	template: require('./view.pug')()
})
export class Modal extends Virtual()  {
	show() {
		this.$ui.modal('modal').show()
	}

	approved(e) {
		alert('Yes! Approved!');
	}

	denied(e) {
		alert('Oh no! Don\'t deny me please...');
		e.result= false;
		return false;
	}
}
github vue-typed / vue-typed-ui / demo / src / docs / modules / loading / index.ts View on Github external
import { Options, Virtual } from 'vue-typed';
import * as Vue from 'vue'

@Options({
	template: require('./view.pug')()
})
export class Loading extends Virtual()  {

	loading = undefined

	start() {
		this.loading = this.$ui.loading('#segment-1')
	}

	stop() {
		if (this.loading) this.loading.stop()
	}
}

vue-typed

Sets of ECMAScript / Typescript decorators that helps you write Vue component easily.

MIT
Latest version published 7 years ago

Package Health Score

45 / 100
Full package analysis

Popular vue-typed functions