我有下表<table class="table-auto w-full"> <tbody> <tr v-for="items in planItems" :key="items.id"> <td class="border px-4 py-2">{{ items }}</td> </tr> </tbody></table>我正在遍歷所有項目,我有以下內容<script>export default { name: "PlanItem", props: { planIcon: { type: String, required: false }, planIconAlt: { type: String, required: false }, planName: String, planPrice: String, items: Array, planOrderLink: String }, data() { return { planItems: this.items }; }};</script>并在傳遞組件時執行以下操作items="[1GB]",但是,我的輸出是這樣的我究竟做錯了什么?
- 2 回答
- 0 關注
- 143 瀏覽
添加回答
舉報
0/150
提交
取消