mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 19:35:50 +00:00
perf: 优化应用参数
This commit is contained in:
parent
b160021e67
commit
943941e0f6
@ -3,6 +3,7 @@
|
|||||||
<iframe
|
<iframe
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
class="micro-app-iframe-container"
|
class="micro-app-iframe-container"
|
||||||
|
:class="{'iframe-immersive': immersive}"
|
||||||
:src="src"
|
:src="src"
|
||||||
sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox">
|
sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox">
|
||||||
</iframe>
|
</iframe>
|
||||||
@ -22,6 +23,11 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: var(--status-bar-height);
|
padding-top: var(--status-bar-height);
|
||||||
padding-bottom: var(--navigation-bar-height);
|
padding-bottom: var(--navigation-bar-height);
|
||||||
|
|
||||||
|
&.iframe-immersive {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.micro-app-iframe-cover {
|
.micro-app-iframe-cover {
|
||||||
@ -49,6 +55,10 @@ export default {
|
|||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
immersive: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
:name="app.name"
|
:name="app.name"
|
||||||
:url="app.url"
|
:url="app.url"
|
||||||
:data="appData(app.name)"
|
:data="appData(app.name)"
|
||||||
|
:immersive="app.iframe_immersive"
|
||||||
@mounted="mounted"
|
@mounted="mounted"
|
||||||
@error="error"/>
|
@error="error"/>
|
||||||
<micro-app
|
<micro-app
|
||||||
@ -154,6 +155,7 @@ export default {
|
|||||||
'userInfo',
|
'userInfo',
|
||||||
'themeName',
|
'themeName',
|
||||||
'microApps',
|
'microApps',
|
||||||
|
'safeAreaSize',
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -228,6 +230,7 @@ export default {
|
|||||||
languageList,
|
languageList,
|
||||||
languageName,
|
languageName,
|
||||||
themeName: this.themeName,
|
themeName: this.themeName,
|
||||||
|
safeArea: this.safeAreaSize,
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
2
resources/assets/js/store/actions.js
vendored
2
resources/assets/js/store/actions.js
vendored
@ -4688,6 +4688,7 @@ export default {
|
|||||||
* - disable_scope_css 是否禁用样式隔离 (true/false),默认 false
|
* - disable_scope_css 是否禁用样式隔离 (true/false),默认 false
|
||||||
* - auto_dark_theme 是否自动适配深色主题 (true/false),默认 true
|
* - auto_dark_theme 是否自动适配深色主题 (true/false),默认 true
|
||||||
* - keep_alive 是否开启微应用保活 (true/false),默认 true
|
* - keep_alive 是否开启微应用保活 (true/false),默认 true
|
||||||
|
* - iframe_immersive 是否开启沉浸式模式,仅在 url_type=iframe[_blank] 时有效 (true/false),默认 false
|
||||||
* - props 传递参数
|
* - props 传递参数
|
||||||
*/
|
*/
|
||||||
async openMicroApp({state}, data) {
|
async openMicroApp({state}, data) {
|
||||||
@ -4719,6 +4720,7 @@ export default {
|
|||||||
disable_scope_css: typeof data.disable_scope_css == 'boolean' ? data.disable_scope_css : false,
|
disable_scope_css: typeof data.disable_scope_css == 'boolean' ? data.disable_scope_css : false,
|
||||||
auto_dark_theme: typeof data.auto_dark_theme == 'boolean' ? data.auto_dark_theme : true,
|
auto_dark_theme: typeof data.auto_dark_theme == 'boolean' ? data.auto_dark_theme : true,
|
||||||
keep_alive: typeof data.keep_alive == 'boolean' ? data.keep_alive : true,
|
keep_alive: typeof data.keep_alive == 'boolean' ? data.keep_alive : true,
|
||||||
|
iframe_immersive: typeof data.iframe_immersive == 'boolean' ? data.iframe_immersive : false,
|
||||||
props: $A.isJson(data.props) ? data.props : {},
|
props: $A.isJson(data.props) ? data.props : {},
|
||||||
}
|
}
|
||||||
if (!state.microAppsIds.includes(config.id)) {
|
if (!state.microAppsIds.includes(config.id)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user