Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<style lang="less"></style>
<style lang="less"></style>
<style lang="less"></style>
v-decorator="decorator"
:dataSource="dataSource"
:Entitie="Entitie"
/>
<template>
${CreateChildrenTemplate(item)}
</template>
`,
})
class FieldItem extends Vue {
@Inject('FieldsChangeSubject')
private FieldsChange: Subject<{
props: any;
fields: any;
form: WrappedFormUtils;
}>;
@Prop() private display: any;
@Prop() private disabled: any;
@Prop() private decoratorOptions: any;
FieldsChangeSubscription: Subscription;
Entitie = item;
loadData = false;
spinning = false;
dataSource = [];
// 计算属性的 getter
get decorator() {
const options = lodash.merge({}, item.options, this.decoratorOptions);
<style lang="less"></style>
}
}
})
export default class BasicPropertyClass extends Vue {
@Ref() readonly anotherComponent!: HTMLElement
@Model('change', { type: Boolean }) readonly checked!: boolean
/**
* My foo
*/
@Prop({ type: Boolean, default: false }) foo: any
@Provide() foa = 'foo'
@Provide('bar') baz = 'bar'
@Inject() readonly foai!: string
@Inject('bar') readonly bari!: string
@Inject({ from: 'optional', default: 'default' }) readonly optional!: string
@Inject(symbol) readonly bazi!: string
/**
* My msg
*/
msg = 'Vetur means "Winter" in icelandic.' //foo
/**
* My count
*/
get count () {
return this.$store.state.count
}
/**
})
export default class BasicPropertyClass extends Vue {
@Ref() readonly anotherComponent!: HTMLElement
@Model('change', { type: Boolean }) readonly checked!: boolean
/**
* My foo
*/
@Prop({ type: Boolean, default: false }) foo: any
@Provide() foa = 'foo'
@Provide('bar') baz = 'bar'
@Inject() readonly foai!: string
@Inject('bar') readonly bari!: string
@Inject({ from: 'optional', default: 'default' }) readonly optional!: string
@Inject(symbol) readonly bazi!: string
/**
* My msg
*/
msg = 'Vetur means "Winter" in icelandic.' //foo
/**
* My count
*/
get count () {
return this.$store.state.count
}
/**
* My greeting
*/
AxisWebService,
InvalidDeviceIconEvent,
} from '../services';
import { Heartbeats } from './heartbeats';
@Component({
name: 'device',
components: {
Heartbeats,
}
})
export default class Device extends Vue {
@Prop({ type: Model })
private readonly device: Model;
@Inject(ANALYTICS_SERVICE)
private readonly analyticsService: AnalyticsService;
@Inject(AXIS_WEB_SERVICE)
private readonly axisWebService: AxisWebService;
public isIconAvailableOnAxisWeb = true;
public get iconUrl(): string {
this.isIconAvailableOnAxisWeb = true;
return this.axisWebService.iconUrl(this.device.modelNumber);;
}
public get timestamps(): Date[] {
return this.$store.state.heartbeats[this.device.macAddress];
}
export const MENUBARITEM_KEY = '@hscmap/vue-menu/menubaritem'
@Component({
components: { XMenu: Menu },
provide() { return { [MENUBARITEM_KEY]: this } }
})
export class MenubaritemType extends Vue {
@Prop({ type: String, required: true })
private label!: string
@Inject(MENUBAR_KEY)
private menubar!: MenubarType
@Inject(MENU_STYLE_KEY)
private menuStyle!: MenuStyle
private hover = false
private isOpen = false
mounted() {
this.menu().$on(MenuCloseEvent.type, (e: MenuCloseEvent) => {
this.isOpen = false
e.fromChild && this.menubar.deactivate()
})
this.menubar.$on(MenubaritemActivateEvent.type, (e: MenubaritemActivateEvent) => {
if (this != e.menubaritem) {
const menu = this.menu()
menu && menu.close(false)
}
})