26 lines
407 B
TypeScript
26 lines
407 B
TypeScript
|
|
Component({
|
||
|
|
data: {
|
||
|
|
|
||
|
|
},
|
||
|
|
lifetimes: {
|
||
|
|
attached() {
|
||
|
|
// 组件被挂载时执行
|
||
|
|
const id = this.properties.id; // 从 properties 获取
|
||
|
|
this.getCardDetail(id);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
properties: {
|
||
|
|
id: {
|
||
|
|
type: String,
|
||
|
|
value: ''
|
||
|
|
}
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
getCardDetail(id: string) {
|
||
|
|
console.log("切换到:", id);
|
||
|
|
},
|
||
|
|
getArticleComments(id:string){
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|