File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
packages/tdesign-miniprogram-chat/site/plugins/plugin-tdoc Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export default defineComponent({
8484 },
8585 liveUrl() {
8686 const componentName = this .name .split (' -en' )[0 ];
87- return ` ${this .liveHost }/miniprogram/live/m2w/program/miniprogram/#!pages/${componentName }/${componentName }.html ` ;
87+ return ` ${this .liveHost }/miniprogram-chat /live/m2w/program/miniprogram/#!pages/${componentName }/${componentName }.html ` ;
8888 },
8989 qrcode() {
9090 const componentName = this .name .split (' -en' )[0 ];
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ const srcExampleInput = {
3434const srcExampleOutput = 'packages/tdesign-miniprogram/example/pages' ;
3535
3636const copySrcExample = ( type = 'all' ) => {
37- console . log ( `📦 Copying ${ type } component examples...` ) ;
3837 return gulp
3938 . src ( srcExampleInput [ type ] )
4039 . pipe ( changed ( srcExampleOutput ) )
Original file line number Diff line number Diff line change 22
33TYPE=${1:- all}
44
5+ # 检查 type 参数是否合法
6+ if [ " $TYPE " != " all" ] && [ " $TYPE " != " base" ] && [ " $TYPE " != " chat" ]; then
7+ echo " 错误: 不支持的 type 参数 '$TYPE '"
8+ echo " 支持的 type: all, base, chat"
9+ exit 1
10+ fi
11+
12+ # 根据 type 参数设置 output 和 baseUrl
13+ if [ " $TYPE " = " base" ]; then
14+ OUTPUT=" --output ../packages/tdesign-miniprogram/site/dist/live"
15+ BASE_URL=" --baseUrl /miniprogram/live"
16+ elif [ " $TYPE " = " chat" ]; then
17+ OUTPUT=" --output ../packages/tdesign-miniprogram-chat/site/dist/live"
18+ BASE_URL=" --baseUrl /miniprogram-chat/live"
19+ else
20+ OUTPUT=" ./m2w_dist"
21+ BASE_URL=" /"
22+ fi
23+
524# 执行构建命令
625npx cross-env NODE_ENV=production gulp --gulpfile script/gulpfile.dist.js --cwd ./
726npx cross-env NODE_ENV=production TYPE=$TYPE SKIP_SKYLINE=true gulp --gulpfile script/gulpfile.example.js --cwd ./
@@ -17,6 +36,6 @@ pnpm install
1736pnpm add @tencent/m2w-tdesign@latest -w
1837
1938# 执行 m2w-tdesign 命令
20- npx m2w-tdesign build --navigationStyle custom --output ../packages/tdesign-miniprogram/site/dist/live --baseUrl /miniprogram/live
39+ npx m2w-tdesign build --navigationStyle custom $OUTPUT $BASE_URL
2140
2241echo " m2w 脚本执行完成!"
You can’t perform that action at this time.
0 commit comments