Skip to content

Commit 985edac

Browse files
committed
Update: 更新文章和目录结构
1 parent a03cbef commit 985edac

File tree

34 files changed

+190
-272
lines changed

34 files changed

+190
-272
lines changed

package/components/NanoComment/index.vue renamed to .vitepress/components/artalkComment/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
6060
.atk-list-no-comment {
6161
height: unset;
62+
color: deepskyblue;
6263
}
6364
}
6465
}

.vitepress/sidebar/bugs.ts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
import { bugIcon, elementIcon, htmlIcon, tsIcon, uniAppIcon, webIcon } from './icons';
1+
import {
2+
androidStudioIcon,
3+
bugIcon,
4+
editorIcon,
5+
elementIcon,
6+
hBuilderXIcon,
7+
htmlIcon,
8+
ideaIcon,
9+
tsIcon,
10+
uniAppIcon,
11+
webIcon
12+
} from './icons';
213
import { type SidebarType } from '../../package/type';
14+
import ideaItems from './learn/idea';
15+
import hBuilderXItems from './learn/hbuilderx';
16+
import androidStudioItems from './learn/android-studio';
317

418
const bugsSidebar: SidebarType[] = [
519
{
620
icon: bugIcon,
7-
text: 'BUG处理',
21+
text: '问题处理',
822
link: '/bugs/',
923
items: []
1024
},
@@ -78,6 +92,19 @@ const bugsSidebar: SidebarType[] = [
7892
}
7993
]
8094
},
95+
{
96+
icon: editorIcon,
97+
text: '编辑器',
98+
collapsed: false,
99+
items: [
100+
{
101+
icon: androidStudioIcon,
102+
text: 'Android Studio',
103+
collapsed: true,
104+
items: androidStudioItems
105+
}
106+
]
107+
},
81108
{
82109
text: '待分类',
83110
items: []

.vitepress/sidebar/learn.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,6 @@ const learnSidebar: SidebarType[] = [
239239
text: 'HBuilder X',
240240
collapsed: true,
241241
items: hBuilderXItems
242-
},
243-
{
244-
icon: androidStudioIcon,
245-
text: 'Android Studio',
246-
collapsed: true,
247-
items: androidStudioItems
248242
}
249243
]
250244
}

.vitepress/sidebar/learn/android-studio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { type SidebarType } from '../../../package/type';
33
const androidStudioItems: SidebarType[] = [
44
{
55
icon: '🔹',
6-
text: '解决 SDK 无法下载的问题',
7-
link: '/learn/editor/android_studio/solve_sdk_unable_to_download'
6+
text: 'Android Studio 解决 SDK 无法下载的问题',
7+
link: '/bugs/editor/android_studio/solve_sdk_unable_to_download'
88
}
99
];
1010

.vitepress/sidebar/learn/uniapp.ts

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,37 @@ const uniappItems: SidebarType[] = [
44
{
55
icon: '🔹',
66
text: '使用 Android Studio 离线打包',
7-
link: '/learn/web/uniapp/packaging_offline_with_android_studio',
8-
collapsed: false,
9-
items: [
10-
{
11-
icon: '🔹',
12-
text: 'uni-app 离线打包配置使用高德地图',
13-
link: '/learn/web/uniapp/offline_packaging_gaode_map_configuration'
14-
},
15-
{
16-
icon: '🔹',
17-
text: 'uni-app 离线打包 APK 体积比云打包大的原因',
18-
link: '/learn/web/uniapp/the_reason_for_the_large_volume_of_offline_packaging'
19-
},
20-
{
21-
icon: '🔹',
22-
text: '解决离线打包的APK在H5页面中无法调用相机和相册',
23-
link: '/learn/web/uniapp/offline_packaging_h5_cant_use_camera_and_album'
24-
},
25-
{
26-
icon: '🔹',
27-
text: 'uni-app App端与嵌套web-view之间的通讯',
28-
link: '/learn/web/uniapp/communication_between_app_and_nested_webview'
29-
},
30-
{
31-
icon: '🔹',
32-
text: 'uni-app 获取当前元素与完整页面顶部的距离',
33-
link: '/learn/web/uniapp/distance_from_current_element_to_full_page_top'
34-
},
35-
{
36-
icon: '🔹',
37-
text: 'uni-app App端调用键盘会导致页面上移的问题',
38-
link: '/learn/web/uniapp/uniapp_keyboard_causes_page_to_move_up'
39-
}
40-
]
7+
link: '/learn/web/uniapp/packaging_offline_with_android_studio'
8+
},
9+
{
10+
icon: '🔹',
11+
text: 'uni-app 离线打包配置使用高德地图',
12+
link: '/learn/web/uniapp/offline_packaging_gaode_map_configuration'
13+
},
14+
{
15+
icon: '🔹',
16+
text: 'uni-app 离线打包 APK 体积比云打包大的原因',
17+
link: '/learn/web/uniapp/the_reason_for_the_large_volume_of_offline_packaging'
18+
},
19+
{
20+
icon: '🔹',
21+
text: '解决离线打包的APK在H5页面中无法调用相机和相册',
22+
link: '/learn/web/uniapp/offline_packaging_h5_cant_use_camera_and_album'
23+
},
24+
{
25+
icon: '🔹',
26+
text: 'uni-app App端与嵌套web-view之间的通讯',
27+
link: '/learn/web/uniapp/communication_between_app_and_nested_webview'
28+
},
29+
{
30+
icon: '🔹',
31+
text: 'uni-app 获取当前元素与完整页面顶部的距离',
32+
link: '/learn/web/uniapp/distance_from_current_element_to_full_page_top'
33+
},
34+
{
35+
icon: '🔹',
36+
text: 'uni-app App端调用键盘会导致页面上移的问题',
37+
link: '/learn/web/uniapp/uniapp_keyboard_causes_page_to_move_up'
4138
}
4239
];
4340

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type SidebarType } from '../../../package/type';
22

33
const wxMiniprogramItems: SidebarType[] = [
4-
{ icon: '🔥', text: 'app.json 详细解析', link: '/learn/web/wx-miniprogram/app_json' }
4+
{ icon: '🔹', text: 'app.json 详细解析', link: '/learn/web/wx-miniprogram/app_json' }
55
];
66

77
export default wxMiniprogramItems;

.vitepress/theme/index.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ import vModal from '../components/vModal.vue';
1111
import 'viewerjs/dist/viewer.min.css';
1212
import 'virtual:uno.css';
1313
import '../../package/App.scss';
14-
import { theme, install } from '../../package/App';
14+
import { App, install } from '../../package/App';
15+
import { h } from 'vue';
16+
import artalkComment from '../components/artalkComment/index.vue';
1517

1618
export default {
17-
Layout: theme,
19+
Layout: () => h(App, {}, {
20+
'content-footer': () => h(artalkComment)
21+
}),
1822
// ...DefaultTheme,
1923
enhanceApp(ctx: EnhanceAppContext) {
2024
install(ctx);
@@ -30,14 +34,6 @@ export default {
3034
// 获取前言和路由
3135
const route = useRoute();
3236
imageViewer(route, '.vp-doc', { toolbar: true });
33-
// giscusTalk({
34-
// repo: 'T-miracle/blog',
35-
// repoId: 'R_kgDOJCf-FQ',
36-
// categoryId: 'DIC_kwDOJCf-Fc4CUohc',
37-
// mapping: 'pathname'
38-
// }, {
39-
// frontmatter, route
40-
// });
4137
googleAnalysis();
4238
}
4339
};

.vitepress/themeConfig.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export default {
1717
type: 'artalk',
1818
options: {
1919
server: 'https://artalk.namichong.com',
20-
site: 'Hi! Tmiracle'
20+
site: 'Hi! Tmiracle',
21+
editorTravel: true
2122
}
2223
},
2324
search: {
@@ -56,17 +57,11 @@ export default {
5657
},
5758
nav: [
5859
{ text: '学习备忘录', link: '/learn/' },
60+
{ text: '问题处理', link: '/bugs/' },
61+
{ text: '捣鼓新玩意', link: '/new-tools/' },
5962
{ text: '文档翻译', link: '/translation-docs/' },
6063
{ text: '资源导航', link: '/nav/' },
61-
{
62-
text: '更多内容',
63-
items: [
64-
{ text: '问题处理', link: '/bugs/' },
65-
{ text: '测试题', link: '/test/' },
66-
{ text: '杂谈', link: '/tittle-tattle/' }
67-
// { text: '面试与笔试模拟', link: '/simulation/' }
68-
]
69-
}
64+
{ text: '杂谈', link: '/tittle-tattle/' }
7065
],
7166
outline: {
7267
level: 'deep',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"overlayscrollbars-vue": "^0.5.9",
2525
"pinia": "^2.3.0",
2626
"pinia-plugin-persistedstate": "3.2.3",
27+
"unocss": "^65.4.0",
2728
"uuid": "^11.0.3",
2829
"viewerjs": "^1.11.7",
2930
"vitepress": "^1.5.0",
@@ -37,11 +38,11 @@
3738
"@typescript-eslint/eslint-plugin": "^8.18.2",
3839
"@typescript-eslint/parser": "^8.18.2",
3940
"@unocss/preset-rem-to-px": "^0.55.7",
41+
"@vitejs/plugin-vue": "^5.2.1",
4042
"eslint": "^9.17.0",
4143
"eslint-plugin-vue": "^9.32.0",
4244
"sass": "1.62.1",
4345
"typescript-eslint": "^8.18.2",
44-
"unocss": "^0.65.2",
4546
"vite": "^4.5.5"
4647
}
4748
}

package/App.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
1111
const pinia = createPinia();
1212
pinia.use(piniaPluginPersistedstate);
1313

14-
export const theme = App;
15-
16-
export const install = (app: EnhanceAppContext) => {
17-
DefaultTheme.enhanceApp(app);
18-
const { app: appInstance } = app;
19-
appInstance.use(pinia);
20-
appInstance.config.globalProperties.$go = function goPage(url: string, target: '_self' | '_blank' = '_self') {
14+
const install = (ctx: EnhanceAppContext) => {
15+
DefaultTheme.enhanceApp(ctx);
16+
const { app, router } = ctx;
17+
app.use(pinia);
18+
app.config.globalProperties.$go = function goPage(url: string, target: '_self' | '_blank' = '_self') {
2119
if (url) {
2220
if (target === '_blank') {
2321
window.open(url);
2422
} else {
25-
app.router.go(url);
23+
router.go(url);
2624
}
2725
}
2826
};
2927
};
3028

29+
export { App, install };
30+
3131
declare module 'vue' {
3232
interface ComponentCustomProperties {
3333
$go: (url: string, target?: '_self' | '_blank') => void;

0 commit comments

Comments
 (0)