Skip to content

Commit 3869728

Browse files
authored
chore(uniapp): fix live demo of preview site (#4549)
* ci(uniapp): 完善预览站点构建及配置 * fix(site): 修复预览模式移动端路径前缀
1 parent eb78f07 commit 3869728

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/preview-site-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ jobs:
7474

7575
- run: pnpm install
7676

77+
- run: pnpm run uniapp build:npm
78+
7779
- run: pnpm -C packages/tdesign-uniapp/site run site:preview
7880

81+
- run: pnpm -C packages/tdesign-uniapp/example run build:h5 --mode=preview
82+
7983
- uses: actions/upload-artifact@v4
8084
with:
8185
name: tdesign-uniapp-site
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VUE_APP_PUBLICPATH = /live

packages/tdesign-uniapp/site/web/plugins/plugin-tdoc/md-to-vue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ const DEFAULT_EN_TABS = [
1919
];
2020

2121
function getMobilePrefix(mode) {
22+
if (mode === 'production') {
23+
return 'https://static.tdesign.tencent.com/uniapp/live';
24+
}
2225
if (mode === 'preview') {
23-
return 'https://tdesign.tencent.com/uniapp/live';
26+
return '/live/index.html';
2427
}
2528
// 开发环境使用相对路径,通过站点服务的代理访问
2629
return '/uniapp/live';

0 commit comments

Comments
 (0)