refactor(projects): 代码优化
This commit is contained in:
parent
44ab07779e
commit
49f95c4e45
@ -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 版本
|
||||
|
@ -22,7 +22,7 @@ export function useDemoContext() {
|
||||
};
|
||||
|
||||
function useProvide() {
|
||||
useDemoProvide(demoContext);
|
||||
return useDemoProvide(demoContext);
|
||||
}
|
||||
|
||||
return {
|
||||
@ -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';
|
||||
|
@ -1 +0,0 @@
|
||||
// import type { DataTableColumn } from 'naive-ui';
|
@ -7,6 +7,7 @@ export default function useContext<T>(contextName = 'context') {
|
||||
|
||||
function useProvide(context: T) {
|
||||
provide(injectKey, context);
|
||||
return context;
|
||||
}
|
||||
|
||||
function useInject() {
|
||||
|
14
src/typings/package.d.ts
vendored
14
src/typings/package.d.ts
vendored
@ -1,4 +1,3 @@
|
||||
/// <reference types="vite/client" />
|
||||
/// <reference types="@amap/amap-jsapi-types" />
|
||||
/// <reference types="bmapgl" />
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user