Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
lisonge authored Mar 26, 2024
2 parents edc3b45 + a4021e5 commit afc13df
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/components/DraggableCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ onUnmounted(() => {
endMove();
});
watch(target, (newValue, oldvalue) => {
watch(target, (newValue, oldValue) => {
if (newValue) {
newValue.addEventListener('pointerdown', startMove);
newValue.addEventListener('pointerup', endMove);
}
if (oldvalue) {
oldvalue.removeEventListener('pointerdown', startMove);
oldvalue.removeEventListener('pointerup', endMove);
if (oldValue) {
oldValue.removeEventListener('pointerdown', startMove);
oldValue.removeEventListener('pointerup', endMove);
}
});
onUnmounted(() => {
Expand Down
10 changes: 5 additions & 5 deletions src/utils/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useAutoWrapWidthColumn } from './size';
import { importTimeStorage } from './storage';
import type { Snapshot } from './types';

export const renderDveice = (row: Snapshot) => {
export const renderDevice = (row: Snapshot) => {
return `${getDevice(row).manufacturer} Android${
getDevice(row).release || `13`
}`;
Expand Down Expand Up @@ -52,10 +52,10 @@ export const useSnapshotColumns = () => {
filterMultiple: true,
minWidth: 100,
filter(value, row) {
return renderDveice(row).includes(value.toString());
return renderDevice(row).includes(value.toString());
},
render(row) {
return renderDveice(row);
return renderDevice(row);
},
});
const appNameCol = useAutoWrapWidthColumn<Snapshot>({
Expand Down Expand Up @@ -132,7 +132,7 @@ export const useSnapshotColumns = () => {
},
});

const reseColWidth = () => {
const resetColWidth = () => {
deviceCol.width = void 0;
appNameCol.width = void 0;
appIdCol.width = void 0;
Expand All @@ -148,6 +148,6 @@ export const useSnapshotColumns = () => {
appVersionCodeCol,
appVersionNameCol,
activityIdCol,
reseColWidth,
resetColWidth,
};
};
4 changes: 2 additions & 2 deletions src/views/DevicePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const {
ctimeCol,
appVersionCodeCol,
appVersionNameCol,
reseColWidth,
resetColWidth,
} = useSnapshotColumns();
const handleSorterChange = (sorter: SortState) => {
if (sorter.columnKey == ctimeCol.key) {
Expand Down Expand Up @@ -184,7 +184,7 @@ const pagination = shallowReactive<PaginationProps>({
pagination.page = 1;
},
});
watch(pagination, reseColWidth);
watch(pagination, resetColWidth);
const showSubsModel = shallowRef(false);
const subsText = shallowRef(``);
Expand Down
12 changes: 6 additions & 6 deletions src/views/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
shallowSnapshotStorage,
snapshotStorage,
} from '@/utils/storage';
import { renderDveice, useSnapshotColumns } from '@/utils/table';
import { renderDevice, useSnapshotColumns } from '@/utils/table';
import { useTask } from '@/utils/task';
import type { Snapshot } from '@/utils/types';
import { githubUrlToSelfUrl } from '@/utils/url';
Expand Down Expand Up @@ -77,7 +77,7 @@ const filterSnapshots = computed(() => {
});
});
const importLoacl = useTask(async () => {
const importLocal = useTask(async () => {
await importFromLocal();
await updateSnapshots();
});
Expand All @@ -91,12 +91,12 @@ const {
deviceCol,
appVersionCodeCol,
appVersionNameCol,
reseColWidth,
resetColWidth,
} = useSnapshotColumns();
watchEffect(() => {
const set = filterSnapshots.value.reduce(
(p, c) => (p.add(renderDveice(c)), p),
(p, c) => (p.add(renderDevice(c)), p),
new Set<string>(),
);
if (set.size <= 1) {
Expand Down Expand Up @@ -175,7 +175,7 @@ const pagination = shallowReactive<PaginationProps>({
pagination.page = 1;
},
});
watch(pagination, reseColWidth);
watch(pagination, resetColWidth);
const handleSorterChange = (sorter: SortState) => {
[ctimeCol, mtimeCol].forEach((c) => {
Expand Down Expand Up @@ -377,7 +377,7 @@ const settingsDlgShow = shallowRef(false);
</NButton>
</template>
<NSpace vertical>
<NButton @click="importLoacl.invoke" :loading="importLoacl.loading">
<NButton @click="importLocal.invoke" :loading="importLocal.loading">
导入本地文件
</NButton>
<NButton @click="showModal = true" :loading="importNetwork.loading">
Expand Down

0 comments on commit afc13df

Please sign in to comment.