Files
PrivateProject/陈海波/投标平台/admin_v2/src/application/components/HelloWorld.tsx
2024-09-27 01:28:38 +08:00

24 lines
544 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Component, Vue, Prop } from 'vue-property-decorator';
@Component
export default class HelloWorld extends Vue {
@Prop({ default: 'default value' }) public readonly msg!: string;
private mounted() {
// console.log(...this.$slots.default)
}
private showAlert() {
alert("showAlert")
}
private render() {
return (
<div class="hello">
<h1>{this.msg}</h1>
{this.$slots.default}
<h2 onclick={()=>this.showAlert()}>HelloWorld组件点击事件{this.msg}</h2>
</div>
)
}
}