Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qianlong66
uni-app
提交
362b8057
U
uni-app
项目概览
qianlong66
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
362b8057
编写于
8月 04, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
0ce42fd4
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
113 addition
and
48 deletion
+113
-48
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt.map
...-plus/uni_modules/test-uniplugin/app-android/index.kt.map
+1
-1
packages/uni-app/dist/uni-app.cjs.js
packages/uni-app/dist/uni-app.cjs.js
+2
-2
packages/uni-app/dist/uni-app.d.ts
packages/uni-app/dist/uni-app.d.ts
+4
-0
packages/uni-app/dist/uni-app.es.js
packages/uni-app/dist/uni-app.es.js
+2
-2
packages/uni-app/src/uts.ts
packages/uni-app/src/uts.ts
+6
-2
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+14
-7
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+47
-27
packages/uni-h5/src/view/components/web-view/index.tsx
packages/uni-h5/src/view/components/web-view/index.tsx
+12
-7
packages/uni-mp-alipay/dist/uni.mp.esm.js
packages/uni-mp-alipay/dist/uni.mp.esm.js
+1
-0
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+4
-0
packages/uni-mp-kuaishou/package.json
packages/uni-mp-kuaishou/package.json
+4
-0
packages/uni-mp-lark/package.json
packages/uni-mp-lark/package.json
+4
-0
packages/uni-mp-qq/package.json
packages/uni-mp-qq/package.json
+4
-0
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+4
-0
packages/uni-quickapp-webview/package.json
packages/uni-quickapp-webview/package.json
+4
-0
未找到文件。
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt.map
浏览文件 @
362b8057
{"version":3,"sources":["/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts","/Users/guoshengqiang/Documents/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts"],"sourcesContent":["import Log from 'android.util.Log'\nimport { login } from './login.uts'\nexport class User {\n async login(name: string, pwd: string) {\n login(name, pwd)\n Log.info('123')\n }\n}\n","export function login(name: string, pwd: string) {\n return { name, pwd }\n}\n"],"names":[],"mappings":";;;AAAA,OAAgB,gBAAkB,CAAA;ACA3B,IAAS,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,iBAAE;IAC/C,OAAO;QAAE,IAAA,IAAI,GAAJ,IAAI;QAAE,IAAA,GAAG,GAAH,GAAG;KAAE,CAAA;;ADCf,WAAM,IAAI;IACf,iBAAM,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,8CAAE;QACrC,MAAM,IAAI,EAAE,GAAG,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;;CAElB"}
{"version":3,"sources":["/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/index.uts","/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts"],"sourcesContent":["import Log from 'android.util.Log'\nimport { login } from './login.uts'\nexport class User {\n async login(name: string, pwd: string) {\n login(name, pwd)\n Log.info('123')\n }\n}\n","export function login(name: string, pwd: string) {\n return { name, pwd }\n}\n"],"names":[],"mappings":";;;AAAA,OAAgB,gBAAkB,CAAA;ACA3B,IAAS,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,iBAAE;IAC/C,OAAO;QAAE,IAAA,IAAI,GAAJ,IAAI;QAAE,IAAA,GAAG,GAAH,GAAG;KAAE,CAAA;;ADCf,WAAM,IAAI;IACf,iBAAM,KAAK,CAAC,IAAY,EAAN,MAAM,EAAE,GAAW,EAAN,MAAM,8CAAE;QACrC,MAAM,IAAI,EAAE,GAAG,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;;CAElB"}
\ No newline at end of file
\ No newline at end of file
packages/uni-app/dist/uni-app.cjs.js
浏览文件 @
362b8057
...
@@ -239,7 +239,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
...
@@ -239,7 +239,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
}
}
else
if
(
shared
.
hasOwn
(
staticMethods
,
name
))
{
else
if
(
shared
.
hasOwn
(
staticMethods
,
name
))
{
// 静态方法
// 静态方法
target
[
name
]
=
initUtsStaticMethod
(
!!
staticMethods
[
name
].
async
,
shared
.
extend
({
name
},
baseOptions
));
target
[
name
]
=
initUtsStaticMethod
(
!!
staticMethods
[
name
].
async
,
shared
.
extend
({
name
,
companion
:
true
},
baseOptions
));
}
}
else
if
(
props
.
includes
(
name
))
{
else
if
(
props
.
includes
(
name
))
{
// 实例属性
// 实例属性
...
@@ -247,7 +247,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
...
@@ -247,7 +247,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
}
}
else
if
(
staticProps
.
includes
(
name
))
{
else
if
(
staticProps
.
includes
(
name
))
{
// 静态属性
// 静态属性
return
invokePropGetter
(
shared
.
extend
({
name
:
name
},
baseOptions
));
return
invokePropGetter
(
shared
.
extend
({
name
:
name
,
companion
:
true
},
baseOptions
));
}
}
}
}
return
target
[
name
];
return
target
[
name
];
...
...
packages/uni-app/dist/uni-app.d.ts
浏览文件 @
362b8057
...
@@ -180,6 +180,10 @@ declare interface ProxyBaseOptions {
...
@@ -180,6 +180,10 @@ declare interface ProxyBaseOptions {
* 属性名或方法名
* 属性名或方法名
*/
*/
name
:
string
;
name
:
string
;
/**
* 是否是伴生对象
*/
companion
?:
boolean
;
}
}
declare
interface
ProxyClassOptions
{
declare
interface
ProxyClassOptions
{
...
...
packages/uni-app/dist/uni-app.es.js
浏览文件 @
362b8057
...
@@ -207,7 +207,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
...
@@ -207,7 +207,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
}
}
else
if
(
hasOwn
(
staticMethods
,
name
))
{
else
if
(
hasOwn
(
staticMethods
,
name
))
{
// 静态方法
// 静态方法
target
[
name
]
=
initUtsStaticMethod
(
!!
staticMethods
[
name
].
async
,
extend
({
name
},
baseOptions
));
target
[
name
]
=
initUtsStaticMethod
(
!!
staticMethods
[
name
].
async
,
extend
({
name
,
companion
:
true
},
baseOptions
));
}
}
else
if
(
props
.
includes
(
name
))
{
else
if
(
props
.
includes
(
name
))
{
// 实例属性
// 实例属性
...
@@ -215,7 +215,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
...
@@ -215,7 +215,7 @@ function initUtsProxyClass({ package: pkg, class: cls, methods, props, staticPro
}
}
else
if
(
staticProps
.
includes
(
name
))
{
else
if
(
staticProps
.
includes
(
name
))
{
// 静态属性
// 静态属性
return
invokePropGetter
(
extend
({
name
:
name
},
baseOptions
));
return
invokePropGetter
(
extend
({
name
:
name
,
companion
:
true
},
baseOptions
));
}
}
}
}
return
target
[
name
];
return
target
[
name
];
...
...
packages/uni-app/src/uts.ts
浏览文件 @
362b8057
...
@@ -29,6 +29,10 @@ interface ProxyBaseOptions {
...
@@ -29,6 +29,10 @@ interface ProxyBaseOptions {
* 属性名或方法名
* 属性名或方法名
*/
*/
name
:
string
name
:
string
/**
* 是否是伴生对象
*/
companion
?:
boolean
}
}
interface
ProxyInstanceOptions
extends
ProxyBaseOptions
{
interface
ProxyInstanceOptions
extends
ProxyBaseOptions
{
...
@@ -234,7 +238,7 @@ export function initUtsProxyClass({
...
@@ -234,7 +238,7 @@ export function initUtsProxyClass({
// 静态方法
// 静态方法
target
[
name
]
=
initUtsStaticMethod
(
target
[
name
]
=
initUtsStaticMethod
(
!!
staticMethods
[
name
].
async
,
!!
staticMethods
[
name
].
async
,
extend
({
name
},
baseOptions
)
extend
({
name
,
companion
:
true
},
baseOptions
)
)
)
}
else
if
(
props
.
includes
(
name
as
string
))
{
}
else
if
(
props
.
includes
(
name
as
string
))
{
// 实例属性
// 实例属性
...
@@ -242,7 +246,7 @@ export function initUtsProxyClass({
...
@@ -242,7 +246,7 @@ export function initUtsProxyClass({
}
else
if
(
staticProps
.
includes
(
name
as
string
))
{
}
else
if
(
staticProps
.
includes
(
name
as
string
))
{
// 静态属性
// 静态属性
return
invokePropGetter
(
return
invokePropGetter
(
extend
({
name
:
name
as
string
},
baseOptions
)
extend
({
name
:
name
as
string
,
companion
:
true
},
baseOptions
)
)
)
}
}
}
}
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
362b8057
...
@@ -7896,6 +7896,10 @@ const props$8 = {
...
@@ -7896,6 +7896,10 @@ const props$8 = {
src
:
{
src
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
},
fullscreen
:
{
type
:
Boolean
,
default
:
true
}
}
};
};
var
index$d
=
/* @__PURE__ */
defineBuiltInComponent
({
var
index$d
=
/* @__PURE__ */
defineBuiltInComponent
({
...
@@ -7915,7 +7919,9 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -7915,7 +7919,9 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
});
});
let
_resize
;
let
_resize
;
return
()
=>
{
return
()
=>
{
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
vue
.
createVNode
(
"
uni-web-view
"
,
vue
.
mergeProps
(
$listeners
.
value
,
$excludeAttrs
.
value
,
{
return
vue
.
createVNode
(
vue
.
Fragment
,
null
,
[
vue
.
createVNode
(
"
uni-web-view
"
,
vue
.
mergeProps
({
"
class
"
:
props2
.
fullscreen
?
"
uni-webview--fullscreen
"
:
""
},
$listeners
.
value
,
$excludeAttrs
.
value
,
{
"
ref
"
:
rootRef
"
ref
"
:
rootRef
}),
[
vue
.
createVNode
(
ResizeSensor
,
{
}),
[
vue
.
createVNode
(
ResizeSensor
,
{
"
onResize
"
:
_resize
"
onResize
"
:
_resize
...
@@ -10700,7 +10706,8 @@ function useState() {
...
@@ -10700,7 +10706,8 @@ function useState() {
"
--window-margin
"
:
value
+
"
px
"
"
--window-margin
"
:
value
+
"
px
"
}));
}));
return
{
return
{
layoutState
:
layoutState2
layoutState
:
layoutState2
,
windowState
:
vue
.
computed
(()
=>
({}))
};
};
}
}
const
topWindowMediaQuery
=
vue
.
ref
(
false
);
const
topWindowMediaQuery
=
vue
.
ref
(
false
);
...
@@ -10749,14 +10756,14 @@ function useState() {
...
@@ -10749,14 +10756,14 @@ function useState() {
vue
.
watch
(()
=>
layoutState
.
rightWindowWidth
+
layoutState
.
marginWidth
,
(
value
)
=>
updateCssVar
({
vue
.
watch
(()
=>
layoutState
.
rightWindowWidth
+
layoutState
.
marginWidth
,
(
value
)
=>
updateCssVar
({
"
--window-right
"
:
value
+
"
px
"
"
--window-right
"
:
value
+
"
px
"
}));
}));
const
windowState
=
vue
.
reactive
({
const
windowState
=
vue
.
computed
(()
=>
({
matchTopWindow
:
layoutState
.
topWindowMediaQuery
,
matchTopWindow
:
layoutState
.
topWindowMediaQuery
,
showTopWindow
:
layoutState
.
showTopWindow
||
layoutState
.
apiShowTopWindow
,
showTopWindow
:
layoutState
.
showTopWindow
||
layoutState
.
apiShowTopWindow
,
matchLeftWindow
:
layoutState
.
leftWindowMediaQuery
,
matchLeftWindow
:
layoutState
.
leftWindowMediaQuery
,
showLeftWindow
:
layoutState
.
showLeftWindow
||
layoutState
.
apiShowLeftWindow
,
showLeftWindow
:
layoutState
.
showLeftWindow
||
layoutState
.
apiShowLeftWindow
,
matchRightWindow
:
layoutState
.
rightWindowMediaQuery
,
matchRightWindow
:
layoutState
.
rightWindowMediaQuery
,
showRightWindow
:
layoutState
.
showRightWindow
||
layoutState
.
apiShowRightWindow
showRightWindow
:
layoutState
.
showRightWindow
||
layoutState
.
apiShowRightWindow
});
})
)
;
return
{
return
{
layoutState
,
layoutState
,
windowState
windowState
...
@@ -10767,9 +10774,9 @@ function createLayoutTsx(keepAliveRoute, layoutState, windowState, topWindow, le
...
@@ -10767,9 +10774,9 @@ function createLayoutTsx(keepAliveRoute, layoutState, windowState, topWindow, le
if
(
!
__UNI_FEATURE_RESPONSIVE__
)
{
if
(
!
__UNI_FEATURE_RESPONSIVE__
)
{
return
routerVNode
;
return
routerVNode
;
}
}
const
topWindowTsx
=
__UNI_FEATURE_TOPWINDOW__
?
createTopWindowTsx
(
topWindow
,
layoutState
,
windowState
)
:
null
;
const
topWindowTsx
=
__UNI_FEATURE_TOPWINDOW__
?
createTopWindowTsx
(
topWindow
,
layoutState
,
windowState
.
value
)
:
null
;
const
leftWindowTsx
=
__UNI_FEATURE_LEFTWINDOW__
?
createLeftWindowTsx
(
leftWindow
,
layoutState
,
windowState
)
:
null
;
const
leftWindowTsx
=
__UNI_FEATURE_LEFTWINDOW__
?
createLeftWindowTsx
(
leftWindow
,
layoutState
,
windowState
.
value
)
:
null
;
const
rightWindowTsx
=
__UNI_FEATURE_RIGHTWINDOW__
?
createRightWindowTsx
(
rightWindow
,
layoutState
,
windowState
)
:
null
;
const
rightWindowTsx
=
__UNI_FEATURE_RIGHTWINDOW__
?
createRightWindowTsx
(
rightWindow
,
layoutState
,
windowState
.
value
)
:
null
;
return
vue
.
createVNode
(
"
uni-layout
"
,
{
return
vue
.
createVNode
(
"
uni-layout
"
,
{
"
class
"
:
{
"
class
"
:
{
"
uni-app--showtopwindow
"
:
__UNI_FEATURE_TOPWINDOW__
&&
layoutState
.
showTopWindow
,
"
uni-app--showtopwindow
"
:
__UNI_FEATURE_TOPWINDOW__
&&
layoutState
.
showTopWindow
,
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
362b8057
...
@@ -15304,6 +15304,10 @@ const props$f = {
...
@@ -15304,6 +15304,10 @@ const props$f = {
src: {
src: {
type: String,
type: String,
default: ""
default: ""
},
fullscreen: {
type: Boolean,
default: true
}
}
};
};
var index$d = /* @__PURE__ */ defineBuiltInComponent({
var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -15335,13 +15339,18 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -15335,13 +15339,18 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
watchEffect(() => {
watchEffect(() => {
iframe.src = getRealPath(props2.src);
iframe.src = getRealPath(props2.src);
});
});
document.body.appendChild(iframe);
_resize = useWebViewSize(rootRef, iframe, props2.fullscreen);
iframeRef.value = iframe;
if (props2.fullscreen) {
_resize = useWebViewSize(rootRef, iframeRef);
document.body.appendChild(iframe);
} else {
iframeRef.value = iframe;
}
};
};
renderIframe();
renderIframe();
onMounted(() => {
onMounted(() => {
var _a;
_resize();
_resize();
!props2.fullscreen && ((_a = rootRef.value) == null ? void 0 : _a.appendChild(iframeRef.value));
});
});
onActivated(() => {
onActivated(() => {
iframeRef.value && (iframeRef.value.style.display = "block");
iframeRef.value && (iframeRef.value.style.display = "block");
...
@@ -15350,10 +15359,12 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -15350,10 +15359,12 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
iframeRef.value && (iframeRef.value.style.display = "none");
iframeRef.value && (iframeRef.value.style.display = "none");
});
});
onBeforeUnmount(() => {
onBeforeUnmount(() => {
document.body.removeChild(iframeRef.value);
iframeRef.value &&
document.body.removeChild(iframeRef.value);
});
});
return () => {
return () => {
return createVNode(Fragment, null, [createVNode("uni-web-view", mergeProps($listeners.value, $excludeAttrs.value, {
return createVNode(Fragment, null, [createVNode("uni-web-view", mergeProps({
"class": props2.fullscreen ? "uni-webview--fullscreen" : ""
}, $listeners.value, $excludeAttrs.value, {
"ref": rootRef
"ref": rootRef
}), [createVNode(ResizeSensor, {
}), [createVNode(ResizeSensor, {
"onResize": _resize
"onResize": _resize
...
@@ -15361,23 +15372,31 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -15361,23 +15372,31 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
};
};
}
}
});
});
function useWebViewSize(rootRef, iframe
Ref
) {
function useWebViewSize(rootRef, iframe
, fullscreen
) {
const _resize = () => {
const _resize = () => {
const {
var _a, _b;
top,
if (fullscreen) {
left,
const {
width,
top,
height
left,
} = rootRef.value.getBoundingClientRect();
width,
iframeRef.value && updateElementStyle(iframeRef.value, {
height
position: "absolute",
} = rootRef.value.getBoundingClientRect();
display: "block",
updateElementStyle(iframe, {
border: "0",
position: "absolute",
top: top + "px",
display: "block",
left: left + "px",
border: "0",
width: width + "px",
top: top + "px",
height: height + "px"
left: left + "px",
});
width: width + "px",
height: height + "px"
});
} else {
updateElementStyle(iframe, {
width: ((_a = rootRef.value) == null ? void 0 : _a.style.width) || "300px",
height: ((_b = rootRef.value) == null ? void 0 : _b.style.height) || "150px"
});
}
};
};
return _resize;
return _resize;
}
}
...
@@ -20140,7 +20159,8 @@ function useState() {
...
@@ -20140,7 +20159,8 @@ function useState() {
"--window-margin": value + "px"
"--window-margin": value + "px"
}));
}));
return {
return {
layoutState: layoutState2
layoutState: layoutState2,
windowState: computed(() => ({}))
};
};
}
}
const topWindowMediaQuery = ref(false);
const topWindowMediaQuery = ref(false);
...
@@ -20193,14 +20213,14 @@ function useState() {
...
@@ -20193,14 +20213,14 @@ function useState() {
watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({
watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({
"--window-right": value + "px"
"--window-right": value + "px"
}));
}));
const windowState =
reactive
({
const windowState =
computed(() =>
({
matchTopWindow: layoutState.topWindowMediaQuery,
matchTopWindow: layoutState.topWindowMediaQuery,
showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow,
showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow,
matchLeftWindow: layoutState.leftWindowMediaQuery,
matchLeftWindow: layoutState.leftWindowMediaQuery,
showLeftWindow: layoutState.showLeftWindow || layoutState.apiShowLeftWindow,
showLeftWindow: layoutState.showLeftWindow || layoutState.apiShowLeftWindow,
matchRightWindow: layoutState.rightWindowMediaQuery,
matchRightWindow: layoutState.rightWindowMediaQuery,
showRightWindow: layoutState.showRightWindow || layoutState.apiShowRightWindow
showRightWindow: layoutState.showRightWindow || layoutState.apiShowRightWindow
});
})
)
;
return {
return {
layoutState,
layoutState,
windowState
windowState
...
@@ -20211,9 +20231,9 @@ function createLayoutTsx(keepAliveRoute, layoutState, windowState, topWindow, le
...
@@ -20211,9 +20231,9 @@ function createLayoutTsx(keepAliveRoute, layoutState, windowState, topWindow, le
if (!__UNI_FEATURE_RESPONSIVE__) {
if (!__UNI_FEATURE_RESPONSIVE__) {
return routerVNode;
return routerVNode;
}
}
const topWindowTsx = __UNI_FEATURE_TOPWINDOW__ ? createTopWindowTsx(topWindow, layoutState, windowState) : null;
const topWindowTsx = __UNI_FEATURE_TOPWINDOW__ ? createTopWindowTsx(topWindow, layoutState, windowState
.value
) : null;
const leftWindowTsx = __UNI_FEATURE_LEFTWINDOW__ ? createLeftWindowTsx(leftWindow, layoutState, windowState) : null;
const leftWindowTsx = __UNI_FEATURE_LEFTWINDOW__ ? createLeftWindowTsx(leftWindow, layoutState, windowState
.value
) : null;
const rightWindowTsx = __UNI_FEATURE_RIGHTWINDOW__ ? createRightWindowTsx(rightWindow, layoutState, windowState) : null;
const rightWindowTsx = __UNI_FEATURE_RIGHTWINDOW__ ? createRightWindowTsx(rightWindow, layoutState, windowState
.value
) : null;
return createVNode("uni-layout", {
return createVNode("uni-layout", {
"class": {
"class": {
"uni-app--showtopwindow": __UNI_FEATURE_TOPWINDOW__ && layoutState.showTopWindow,
"uni-app--showtopwindow": __UNI_FEATURE_TOPWINDOW__ && layoutState.showTopWindow,
...
...
packages/uni-h5/src/view/components/web-view/index.tsx
浏览文件 @
362b8057
...
@@ -65,9 +65,9 @@ export default /*#__PURE__*/ defineBuiltInComponent({
...
@@ -65,9 +65,9 @@ export default /*#__PURE__*/ defineBuiltInComponent({
iframe
.
src
=
getRealPath
(
props
.
src
)
iframe
.
src
=
getRealPath
(
props
.
src
)
})
})
_resize
=
useWebViewSize
(
rootRef
,
iframe
,
props
.
fullscreen
)
_resize
=
useWebViewSize
(
rootRef
,
iframe
,
props
.
fullscreen
)
if
(
props
.
fullscreen
)
{
if
(
props
.
fullscreen
)
{
document
.
body
.
appendChild
(
iframe
)
document
.
body
.
appendChild
(
iframe
)
}
else
{
}
else
{
iframeRef
.
value
=
iframe
iframeRef
.
value
=
iframe
}
}
}
}
...
@@ -94,7 +94,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
...
@@ -94,7 +94,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
return
(
return
(
<>
<>
<
uni
-
web
-
view
<
uni
-
web
-
view
class
=
{
props
.
fullscreen
?
'
uni-webview--fullscreen
'
:
''
}
class
=
{
props
.
fullscreen
?
'
uni-webview--fullscreen
'
:
''
}
{
...
$listeners
.
value
}
{
...
$listeners
.
value
}
{
...
$excludeAttrs
.
value
}
{
...
$excludeAttrs
.
value
}
ref
=
{
rootRef
}
ref
=
{
rootRef
}
...
@@ -117,10 +117,15 @@ export default /*#__PURE__*/ defineBuiltInComponent({
...
@@ -117,10 +117,15 @@ export default /*#__PURE__*/ defineBuiltInComponent({
},
},
})
})
function
useWebViewSize
(
rootRef
:
RootRef
,
iframe
:
HTMLIFrameElement
,
fullscreen
:
boolean
)
{
function
useWebViewSize
(
rootRef
:
RootRef
,
iframe
:
HTMLIFrameElement
,
fullscreen
:
boolean
)
{
const
_resize
=
()
=>
{
const
_resize
=
()
=>
{
if
(
fullscreen
){
if
(
fullscreen
)
{
const
{
top
,
left
,
width
,
height
}
=
rootRef
.
value
!
.
getBoundingClientRect
()
const
{
top
,
left
,
width
,
height
}
=
rootRef
.
value
!
.
getBoundingClientRect
()
updateElementStyle
(
iframe
,
{
updateElementStyle
(
iframe
,
{
position
:
'
absolute
'
,
position
:
'
absolute
'
,
display
:
'
block
'
,
display
:
'
block
'
,
...
@@ -130,7 +135,7 @@ function useWebViewSize(rootRef: RootRef, iframe: HTMLIFrameElement, fullscreen:
...
@@ -130,7 +135,7 @@ function useWebViewSize(rootRef: RootRef, iframe: HTMLIFrameElement, fullscreen:
width
:
width
+
'
px
'
,
width
:
width
+
'
px
'
,
height
:
height
+
'
px
'
,
height
:
height
+
'
px
'
,
})
})
}
else
{
}
else
{
updateElementStyle
(
iframe
,
{
updateElementStyle
(
iframe
,
{
width
:
rootRef
.
value
?.
style
.
width
||
'
300px
'
,
width
:
rootRef
.
value
?.
style
.
width
||
'
300px
'
,
height
:
rootRef
.
value
?.
style
.
height
||
'
150px
'
,
height
:
rootRef
.
value
?.
style
.
height
||
'
150px
'
,
...
...
packages/uni-mp-alipay/dist/uni.mp.esm.js
浏览文件 @
362b8057
...
@@ -717,6 +717,7 @@ function createVueComponent(mpType, mpInstance, vueOptions, parent) {
...
@@ -717,6 +717,7 @@ function createVueComponent(mpType, mpInstance, vueOptions, parent) {
},
{
},
{
mpType
,
mpType
,
mpInstance
,
mpInstance
,
slots
:
mpInstance
.
props
.
uS
||
{},
parentComponent
:
parent
&&
parent
.
$
,
parentComponent
:
parent
&&
parent
.
$
,
onBeforeSetup
(
instance
,
options
)
{
onBeforeSetup
(
instance
,
options
)
{
initMocks
(
instance
,
mpInstance
,
mocks
);
initMocks
(
instance
,
mpInstance
,
mocks
);
...
...
packages/uni-mp-alipay/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app mp-alipay"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-mp-kuaishou/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app mp-kuaishou"
,
"description"
:
"uni-app mp-kuaishou"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-mp-lark/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app mp-lark"
,
"description"
:
"uni-app mp-lark"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-mp-qq/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app mp-qq"
,
"description"
:
"uni-app mp-qq"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app mp-toutiao"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-quickapp-webview/package.json
浏览文件 @
362b8057
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
"version"
:
"3.0.0-alpha-3050420220803001"
,
"version"
:
"3.0.0-alpha-3050420220803001"
,
"description"
:
"uni-app quickapp-webview"
,
"description"
:
"uni-app quickapp-webview"
,
"main"
:
"dist/index.js"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist"
,
"lib"
],
"repository"
:
{
"repository"
:
{
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录