diff --git a/src/assets/styles/antd.scss b/src/assets/styles/antd.scss index af33e3cd..d9dc2405 100644 --- a/src/assets/styles/antd.scss +++ b/src/assets/styles/antd.scss @@ -21,10 +21,8 @@ } .ant-dropdown-menu { box-shadow: $boxShadow; - border: 1px solid $borderColor; } .ant-dropdown-menu-item { - transition: none; &:hover { background-color: rgba($color: $themeColor, $alpha: .2); diff --git a/src/components/ColorPicker/index.vue b/src/components/ColorPicker/index.vue index f363787a..f262bb75 100644 --- a/src/components/ColorPicker/index.vue +++ b/src/components/ColorPicker/index.vue @@ -57,7 +57,7 @@ > -
最近使用:
+
最近使用:
= { async [ActionTypes.INIT_SNAPSHOT_DATABASE]({ commit, state }) { - const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray() + const snapshots: Snapshot[] = await snapshotDB.snapshots.orderBy('id').toArray() const lastSnapshot = snapshots.slice(-1)[0] if (lastSnapshot) { - db.snapshots.clear() + snapshotDB.snapshots.clear() } const newFirstSnapshot = { index: state.slideIndex, slides: state.slides, } - await db.snapshots.add(newFirstSnapshot) + await snapshotDB.snapshots.add(newFirstSnapshot) commit(MutationTypes.SET_SNAPSHOT_CURSOR, 0) commit(MutationTypes.SET_SNAPSHOT_LENGTH, 1) }, async [ActionTypes.ADD_SNAPSHOT]({ state, commit }) { - const allKeys = await db.snapshots.orderBy('id').keys() + const allKeys = await snapshotDB.snapshots.orderBy('id').keys() let needDeleteKeys: IndexableTypeArray = [] @@ -35,7 +35,7 @@ export const actions: ActionTree = { index: state.slideIndex, slides: state.slides, } - await db.snapshots.add(snapshot) + await snapshotDB.snapshots.add(snapshot) let snapshotLength = allKeys.length - needDeleteKeys.length + 1 @@ -44,10 +44,10 @@ export const actions: ActionTree = { snapshotLength-- } if (snapshotLength >= 2) { - db.snapshots.update(allKeys[snapshotLength - 2] as number, { index: state.slideIndex }) + snapshotDB.snapshots.update(allKeys[snapshotLength - 2] as number, { index: state.slideIndex }) } - await db.snapshots.bulkDelete(needDeleteKeys) + await snapshotDB.snapshots.bulkDelete(needDeleteKeys) commit(MutationTypes.SET_SNAPSHOT_CURSOR, snapshotLength - 1) commit(MutationTypes.SET_SNAPSHOT_LENGTH, snapshotLength) @@ -57,7 +57,7 @@ export const actions: ActionTree = { if (state.snapshotCursor <= 0) return const snapshotCursor = state.snapshotCursor - 1 - const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray() + const snapshots: Snapshot[] = await snapshotDB.snapshots.orderBy('id').toArray() const snapshot = snapshots[snapshotCursor] const { index, slides } = snapshot @@ -71,7 +71,7 @@ export const actions: ActionTree = { if (state.snapshotCursor >= state.snapshotLength - 1) return const snapshotCursor = state.snapshotCursor + 1 - const snapshots: Snapshot[] = await db.snapshots.orderBy('id').toArray() + const snapshots: Snapshot[] = await snapshotDB.snapshots.orderBy('id').toArray() const snapshot = snapshots[snapshotCursor] const { index, slides } = snapshot diff --git a/src/utils/database.ts b/src/utils/database.ts index 5f3955fe..2afc254f 100644 --- a/src/utils/database.ts +++ b/src/utils/database.ts @@ -18,4 +18,4 @@ class SnapshotDatabase extends Dexie { } } -export default new SnapshotDatabase() \ No newline at end of file +export const snapshotDB = new SnapshotDatabase() \ No newline at end of file diff --git a/src/views/Editor/Canvas/ElementCreateSelection.vue b/src/views/Editor/Canvas/ElementCreateSelection.vue index 66a20fa3..2dcfc78c 100644 --- a/src/views/Editor/Canvas/ElementCreateSelection.vue +++ b/src/views/Editor/Canvas/ElementCreateSelection.vue @@ -15,7 +15,7 @@ > \ No newline at end of file diff --git a/src/views/Editor/Canvas/SlideBackground.vue b/src/views/Editor/Canvas/ViewportBackground.vue similarity index 91% rename from src/views/Editor/Canvas/SlideBackground.vue rename to src/views/Editor/Canvas/ViewportBackground.vue index f8934ab6..8d3beb41 100644 --- a/src/views/Editor/Canvas/SlideBackground.vue +++ b/src/views/Editor/Canvas/ViewportBackground.vue @@ -1,6 +1,6 @@