first commit
This commit is contained in:
24
陈海波/投标平台/admin_v2/src/application/components/HelloWorld.tsx
Normal file
24
陈海波/投标平台/admin_v2/src/application/components/HelloWorld.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user