Skip to content

Commit

Permalink
fix(app): downgrade vue
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Sep 25, 2024
1 parent fa3f6e9 commit fe17a37
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 35 deletions.
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"date-fns-tz": "^1.3.6",
"tippy.js": "^6.3.7",
"vite": "^5.4.8",
"vue": "^3.5.8",
"vue": "3.2.12",
"vue-router": "^4.4.5"
},
"devDependencies": {
Expand Down
48 changes: 24 additions & 24 deletions packages/app/src/components/table/c-table-page.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
<script setup lang="ts">
import { toRefs, computed } from 'vue';
import IconLeft from '~icons/mdi/chevron-left';
import IconRight from '~icons/mdi/chevron-right';
const props = defineProps<{
isMobile?: boolean;
pageView?: number;
current: number;
first: number;
last: number;
pageSize: number;
nextPage: () => void;
prePage: () => void;
goPage: (page: number) => void;
}>();
const { isMobile: _isMobile, pageView: _pageView, current, first, last } = toRefs(props);
const pageView = computed(() => _pageView?.value ?? 5);
const isMobile = computed(() => _isMobile?.value ?? false);
</script>

<template>
<div v-if="isMobile" class="mb-2 grid grid-cols-2 gap-2">
<c-button padding="p-2" @click="prePage" :disable="current <= first"
Expand Down Expand Up @@ -77,27 +101,3 @@
></c-button>
</div>
</template>

<script setup lang="ts">
import { toRefs, computed } from 'vue';
import IconLeft from '~icons/mdi/chevron-left';
import IconRight from '~icons/mdi/chevron-right';
const props = defineProps<{
isMobile?: boolean;
pageView?: number;
current: number;
first: number;
last: number;
pageSize: number;
nextPage: () => void;
prePage: () => void;
goPage: (page: number) => void;
}>();
const { isMobile: _isMobile, pageView: _pageView, current, first, last } = toRefs(props);
const pageView = computed(() => _pageView?.value ?? 5);
const isMobile = computed(() => _isMobile?.value ?? false);
</script>
4 changes: 2 additions & 2 deletions packages/cli/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ export function createCPanyRoutePlugin(
...contests.map((contest) => {
// In dev server, use relative path
// In build, use absolute path
const path = contestVirtualComponentPath(contest.path, option.dev);
const path = contestVirtualComponentPath(contest.path, false);
return `{ path: \`${contest.path}\`, component: () => import(\`${path}\`), meta: { title: \`${contest.name} - CPany\` } },`;
}),
...users.map((user) => {
const path = userVirtualComponentPath(user.name, option.dev);
const path = userVirtualComponentPath(user.name, false);
return `{ path: \`/user/${user.name}\`, component: () => import(\`${path}\`), meta: { title: \`用户 ${user.name} - CPany\` } },`;
})
];
Expand Down
82 changes: 74 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fe17a37

Please sign in to comment.