Skip to content

Commit

Permalink
fix(harmony): WebView 支持 updateTitle 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jul 6, 2024
1 parent f067e94 commit 7ba4596
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/uni-app-harmony/src/view/components/web-view/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineBuiltInComponent } from '@dcloudio/uni-components'
import { getRealPath } from '../../../platform/getRealPath'
import Embed from '../embed'

const props = {
src: {
Expand All @@ -24,9 +25,13 @@ export default /*#__PURE__*/ defineBuiltInComponent({
setup(props) {
return () => (
<uni-web-view>
<embed
type="native/webview"
src={getRealPath(props.src)}
<Embed
tag="webview"
options={{
src: getRealPath(props.src),
updateTitle: props.updateTitle,
webviewStyles: props.webviewStyles,
}}
style="width:100%;height:100%"
/>
</uni-web-view>
Expand Down

0 comments on commit 7ba4596

Please sign in to comment.