vue =>ts


//components
import eader from "./header.vue";
@Component({
components: {
eader
}
})
export default class eader extends Vue {

//prop

@Prop() private msg!: string;

//data
activeIndex2: string = "1";
//methods:
public handleSelect(key, keyPath) {
console.log(key, keyPath);
}
handleSelect():void {
console.log(key, keyPath);
} -----------不能有符号
// 声明周期钩子
mounted () {
this.greet()
}

// 计算属性
get computedMsg () {
return 'computed ' + this.msg
}

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2023-03-18
  • 2022-03-10
  • 2021-10-24
  • 2022-12-23
  • 2023-02-23
  • 2022-12-23
相关资源
相似解决方案