0
export default [
{
user:{
id: '1',
person: 'Theodore Roosevelt',
text: 'Believe you can and you\'re halfway there',
icon:'man'
}
},
{
user:{
id: '2',
person: 'Normale',
text: 'Change your thoughts and you change your world.',
icon:'woman'
}
}, {
user:{
id: '3',
person: 'Thlt',
text: 'Believe you can and you\'re halfway there',
icon:'man'
}
}]
上面的代碼是離子工具中數據文件夾下的ts文件。
我想在id
的基礎上通過點擊每個條目前面的刪除按鈕從這個數組中刪除一個條目。 我是新來的離子。我試圖.slice沒有工作如何刪除角2和離子json中的對象
表明您已經嘗試了什麼 – Sajeetharan