Skip to content

Commit

Permalink
Merge branch 'main' into fix/env
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj authored Mar 14, 2024
2 parents 61c1ce4 + f080a07 commit b51196c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class MovableView {
* 超过可移动区域后,是否还可以移动
*/
@Prop() outOfBounds: boolean = false
/**
* 是否带有惯性
/**
* 是否带有惯性
*/
@Prop() inertia: boolean = false
/**
Expand Down Expand Up @@ -404,7 +404,10 @@ export class MovableView {
if (this.disabled || !this.element || this.scaling || !this.touching || touches.length > 1) {
return
}
e.preventDefault()

if (this.direction !== "horizontal") {
e.preventDefault()
}

const touch = touches[0]

Expand Down
12 changes: 7 additions & 5 deletions packages/taro-webpack-runner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,18 @@ const buildDev = async (appPath: string, config: BuildConfig, appHelper: AppHelp
publicPath,
contentBase: outputPath,
writeToDisk: config.isBuildNativeComp,
proxy,
},
baseDevServerOption,
customDevServerOption,
{
historyApiFallback: {
rewrites: [{
from: /./,
to: publicPath
}]
},
proxy,
},
baseDevServerOption,
customDevServerOption
}
}
)

if (devServerOptions.proxy?.length < 1) {
Expand Down
10 changes: 6 additions & 4 deletions packages/taro-webpack5-runner/src/index.h5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,16 @@ async function getDevServerOptions (appPath: string, config: H5BuildConfig): Pro
const pathname = chunkFilename.replace('[name]', path.basename(context.parsedUrl.pathname).replace(/\.[^.]*.hot-update\.(js|json)/, ''))
return (['', 'auto'].includes(publicPath) ? '' : publicPath) + pathname
}
}, {
from: /./,
to: publicPath
}]
},
proxy
},
customDevServerOption
customDevServerOption,
{
historyApiFallback: {
rewrites: [{ from: /./, to: publicPath }]
}
}
)

const originalPort = Number(devServerOptions.port)
Expand Down

0 comments on commit b51196c

Please sign in to comment.