103 次瀏覽
使用 ember-localstorage 介面卡。App.store = DS.Store.create({ revision: 11, adapter: DS.LSAdapter.create() });示例您需要定義打算用於客戶端儲存的介面卡 - App.Store = DS.SyncStore.extend({ revision: 10, adapter: DS.IndexedDB.adapter({ mappings: { person: App.Person, persons: App.Person, contact: App.Contact, contacts: App.Contact } }) });