From fb5f3f881786948bcea049b5923b913cb6c751f7 Mon Sep 17 00:00:00 2001 From: xyf-mac Date: Sat, 6 Nov 2021 20:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E7=9C=81=E7=95=A5=E5=8F=B7=E5=86=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BAtooltip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/src/devtools/ui/ui-prop.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/source/src/devtools/ui/ui-prop.vue b/source/src/devtools/ui/ui-prop.vue index d0075ef..a2ff119 100644 --- a/source/src/devtools/ui/ui-prop.vue +++ b/source/src/devtools/ui/ui-prop.vue @@ -10,8 +10,8 @@ :class="fold?'el-icon-caret-right':'el-icon-caret-bottom'" :style="{'visibility':isArrayOrObject()?'visible':'hidden','margin-left':indent*10+'px'}"> -
- +
+
{{ name }}
{{ name }}
@@ -205,6 +205,17 @@ export default class UiProp extends Vue { created() { } + isShowTooltip() { + const el: HTMLDivElement = this.$refs.propText; + if (el) { + if (el.scrollWidth > el.offsetWidth) { + // 出现了省略号 + return true; + } + } + return false; + } + getEngineTypeIcon() { const value = this.value as EngineData; switch (value.engineType) {