// // CardData.swift // copinism // // Created by 黄仕杰 on 2024/6/4. // import SwiftUI //class CardDataModel: ObservableObject { // @Published var activeId: Int = 0 // 选中的 id // var cardDatas: [CardData] = [] //} struct CardData: Identifiable { let id: Int let name: String let image: URL let total: Int init(id: Int, name: String, image: URL , total: Int = 0) { self.id = id self.name = name self.image = image self.total = total } }