2025/9/26/1:02
This commit is contained in:
26
miniprogram/pages/articledetail/articledetail.ts
Normal file
26
miniprogram/pages/articledetail/articledetail.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
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){
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user