Skip to content

Commit

Permalink
feat: 加上缺少的幽灵依赖,解决pnpm启动和打包问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Apr 3, 2023
1 parent 6d2380d commit 4f878ec
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ types/directives.d.ts
stats.html
vite.config.ts.timestamp*
types/components.d.ts
.eslintcache
.eslintcache
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"i": "npm install --registry=https://registry.npm.taobao.org && npx husky install"
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@meadmin-cn/vite-plugin-mock": "^2.9.7",
"@vue/shared": "^3.2.25",
"@vueuse/core": "^9.1.0",
"axios": "^0.27.2",
"dayjs": "^1.11.3",
Expand All @@ -47,12 +49,14 @@
"@babel/eslint-parser": "^7.18.9",
"@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.19.1",
"@babel/runtime": "^7.21.0",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@release-it/conventional-changelog": "^5.0.0",
"@rollup/plugin-babel": "^5.3.1",
"@types/jquery": "^3.5.14",
"@types/js-cookie": "^3.0.2",
"@types/lodash-es": "^4.17.7",
"@types/mockjs": "^1.0.6",
"@types/node": "^18.0.1",
"@types/nprogress": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/layout/components/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import { settingConfig } from '@/config';
import { useRouteStore } from '@/store';
import { ComputedRef, TransitionProps } from 'vue';
const props = defineProps<{
transition?:TransitionProps
transition?: TransitionProps;
}>();
const routeStore = useRouteStore();
let keepAliveProps: undefined | ComputedRef<MeKeepAliveProps>;
if (settingConfig.openKeepAlive) {
keepAliveProps = computed<MeKeepAliveProps>(() => ({
max: 30,
max: 3,
includeKey: [...routeStore.cacheFullPath],
}));
const route = useRoute();
Expand Down
4 changes: 4 additions & 0 deletions src/views/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<div class="index">
hello word!
<input v-model="value" name="text" />
<me-keep-alive>
<div></div>
<div></div>
</me-keep-alive>
</div>
</template>
<script setup lang="ts" name="DashboardIndex">
Expand Down
2 changes: 1 addition & 1 deletion template/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents {
//code
}
Expand Down
2 changes: 1 addition & 1 deletion template/directives.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '@vue/runtime-core' {
declare module 'vue' {
export interface ComponentCustomProperties {
//code
}
Expand Down
2 changes: 1 addition & 1 deletion template/meIconComments.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DefineComponent, defineComponent } from 'vue';
declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents {
//code
}
Expand Down
2 changes: 1 addition & 1 deletion types/melIconComments.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { icons } from '@element-plus/icons-vue/global';
declare module '@vue/runtime-core' {
declare module 'vue' {
type GlobalComponentsTypes = {
[k in `MelIcon${keyof typeof icons}`]: Icon;
};
Expand Down
2 changes: 1 addition & 1 deletion types/vueExtendType.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MessageImport } from '@/locales/I18n';
declare module '@vue/runtime-core' {
declare module 'vue' {
/* eslint-disable */
type LifecycleHook<TFn = Function> = TFn[] | null;
export declare interface ComponentOptionsBase {
Expand Down

0 comments on commit 4f878ec

Please sign in to comment.