fix update widget occur error (#16139)

* fix update widget occur error

* update expression
This commit is contained in:
黄森斌
2023-08-31 16:22:24 +08:00
committed by GitHub
parent 2b275816fc
commit 4d213938e9
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -8,6 +8,7 @@ const Vue = require('vue/dist/vue.min.js');
const propUtils = require('../utils/prop');
const cssMediaWidth = 340;
let layout = 'vertical';
exports.template = `
<style>
@@ -947,11 +948,14 @@ exports.methods = {
},
setLayout() {
const rect = this.$this.getBoundingClientRect();
this.layout ??= layout;
if (rect.width) {
if (rect.width > cssMediaWidth) {
this.layout = 'horizontal';
layout = this.layout = 'horizontal';
} else {
this.layout = 'vertical';
layout = this.layout = 'vertical';
}
}
},
+3 -3
View File
@@ -345,7 +345,7 @@ exports.template = /* html*/`
<section class="component scene">
<ui-prop class="release" type="dump"></ui-prop>
<ui-prop class="ambient" type="dump" ui-section-config></ui-prop>
<ui-section class="skybox config" expand>
<ui-section class="skybox config" expand cache-expand="inspector-scene-skybox">
<div slot="header" class="component-header">
<span>Skybox</span>
<ui-link tooltip="i18n:scene.menu.help_url">
@@ -353,7 +353,7 @@ exports.template = /* html*/`
</ui-link>
</div>
<div class="before"></div>
<ui-section class="envmap" expand>
<ui-section class="envmap" expand cache-expand="inspector-scene-skybox-envmap">
<ui-label slot="header" value="Envmap"></ui-label>
<ui-radio-group class="useHDR" default-value="HDR" value="HDR">
<ui-prop class="envmap-prop">
@@ -387,7 +387,7 @@ exports.template = /* html*/`
<ui-prop class="postSettings" type="dump" ui-section-config></ui-prop>
</section>
<ui-section class="component node config" expand>
<ui-section class="component node config" expand cache-expand="inspector-node">
<header class="component-header" slot="header">
<span class="name">Node</span>
<ui-link class="link" tooltip="i18n:ENGINE.menu.help_url">