Skip to content

Commit

Permalink
refactor(projects): 代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Aug 22, 2022
1 parent 44ab077 commit 49f95c4
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -71,12 +71,12 @@
- [x] 图表示例:ECharts、AntV G2
- [x] 多页签:支持 query、hash 等参数,同一页面支持多个 Tab
- [x] 缓存主题配置
- [x] 精简版(新分支 thin)
- [ ] v0.9.7 表单、表格示例(ing...)
- [ ] v0.9.8 可修改的 KeepAlive 的页面缓存和全局 Tab 组件 store 重构
- [ ] v0.9.9 全局 Iframe 组件
- [ ] v1.0 示例页面完善
- [ ] v1.0 版本文档
- [ ] 精简版(新分支 thin)
- [ ] element-plus 版本
- [ ] i18n 国际化
- [ ] 其他 UI 版本
Expand Down
4 changes: 2 additions & 2 deletions src/context/demo.ts
Expand Up @@ -22,7 +22,7 @@ export function useDemoContext() {
};

function useProvide() {
useDemoProvide(demoContext);
return useDemoProvide(demoContext);
}

return {
Expand All @@ -35,7 +35,7 @@ export function useDemoContext() {
// A.vue
// import { useDemoContext } from '@/context';
// const { useProvide } = useDemoContext();
// useProvide();
// const { counts, setCounts } = useProvide();

// B.vue 和 C.vue : 共享状态 counts
// import { useDemoContext } from '@/context';
Expand Down
1 change: 0 additions & 1 deletion src/hooks/business/useNaiveTable.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/hooks/common/useContext.ts
Expand Up @@ -7,6 +7,7 @@ export default function useContext<T>(contextName = 'context') {

function useProvide(context: T) {
provide(injectKey, context);
return context;
}

function useInject() {
Expand Down
14 changes: 0 additions & 14 deletions src/typings/package.d.ts
@@ -1,4 +1,3 @@
/// <reference types="vite/client" />
/// <reference types="@amap/amap-jsapi-types" />
/// <reference types="bmapgl" />

Expand All @@ -8,16 +7,3 @@ declare namespace BMap {
}

declare const TMap: any;

declare module 'virtual:icons/*' {
import type { FunctionalComponent, SVGAttributes } from 'vue';

const component: FunctionalComponent<SVGAttributes>;
export default component;
}
declare module '~icons/*' {
import type { FunctionalComponent, SVGAttributes } from 'vue';

const component: FunctionalComponent<SVGAttributes>;
export default component;
}
2 changes: 1 addition & 1 deletion tsconfig.json
Expand Up @@ -17,7 +17,7 @@
"~/*": ["./*"],
"@/*": ["./src/*"]
},
"types": ["node", "naive-ui/volar", "unplugin-vue-define-options"]
"types": ["vite/client", "node", "unplugin-icons/types/vue", "naive-ui/volar", "unplugin-vue-define-options"]
},
"exclude": ["node_modules", "dist"]
}

0 comments on commit 49f95c4

Please sign in to comment.