Skip to content

Commit

Permalink
Merge pull request #1437 from luofann/fix_10_09
Browse files Browse the repository at this point in the history
fix: tootips指令手动设置allowHTML为false --bug=131272889
  • Loading branch information
luofann authored Oct 11, 2024
2 parents c186c50 + 5276d4f commit 92b9773
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
15 changes: 2 additions & 13 deletions frontend/pc/src/components/common/modal/CreateTicketDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,9 @@
:class="['service-item', { active: selectedService && selectedService.id === service.id }]"
:key="service.id"
@click="onSelectService(service)">
<div
v-html="service.name"
v-bk-tooltips="{
allowHtml: true,
placement: 'top',
boundary: 'window',
extCls: 'service-title-desc-tooltip',
width: 354,
delay: [500, 0],
content: `#serviceTips_${service.id}`
}"
class="service-name">
<div class="service-name">
{{ service.name }}
</div>
<div :id="`serviceTips_${service.id}`" class="service-tooltip-content"><h4 v-html="service.name"></h4><pre>{{service.desc}}</pre></div>
<div class="active-tag">
<i class="bk-itsm-icon icon-itsm-icon-fill-fit"></i>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/pc/src/components/renderview/tags/TagText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
<p class="text-block" v-for="(item, index) in value" :key="index">
<label v-if="item.label" class="label">
{{ item.label }}
<i v-if="item.desc || desc" v-bk-tooltips="{ content: item.desc || desc, allowHtml: false }" class="bk-itsm-icon icon-itsm-icon-help"></i>
<i v-if="item.desc || desc" v-bk-tooltips="{ content: item.desc || desc, allowHTML: false }" class="bk-itsm-icon icon-itsm-icon-help"></i>
</label>
<span class="value">{{ item.value }}</span>
</p>
</div>
<p v-else>
<label v-if="label" class="label">
{{ label }}
<i v-if="desc" v-bk-tooltips="{ content: desc, allowHtml: false }" class="bk-itsm-icon icon-itsm-icon-help"></i>
<i v-if="desc" v-bk-tooltips="{ content: desc, allowHTML: false }" class="bk-itsm-icon icon-itsm-icon-help"></i>
</label>
<span class="value">{{ value }}</span>
</p>
Expand Down
16 changes: 14 additions & 2 deletions frontend/pc/src/views/service/editService/ServiceFormStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
</div>
<ul class="field-list">
<li class="field-item" v-for="(field, index) in fieldsLibrary" :key="index" @click="onAddFormClick(field)">
<span v-bk-tooltips.light="field.name" class="field-name">{{ field.name }}</span>
<span
v-bk-tooltips="{
allowHTML: false,
theme: 'light',
content: field.name
}"
class="field-name">
{{ field.name }}
</span>
</li>
</ul>
<div v-if="fieldsLibrary.length === 0" class="public-field">
Expand All @@ -68,7 +76,11 @@
</div>
<ul class="field-list">
<li class="field-item" v-for="(field, index) in publicFields" :key="index" @click="addField(field)">
<span class="field-name" v-bk-tooltips.light="field.name">{{ field.name }}</span>
<span
class="field-name"
v-bk-tooltips.light="{ allowHTML: false, content: field.name }">
{{ field.name }}
</span>
</li>
</ul>
<div v-if="publicFields.length === 0" class="public-field"><i class="bk-itsm-icon icon-itsm-icon-four-zero" style="font-size: 14px"></i> 已有字段不存在你搜索的内容</div>
Expand Down
8 changes: 0 additions & 8 deletions frontend/pc/src/views/ticket/details/currentSteps/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
// 组织架构
organizationList: [],
updateDate: +new Date(),
tooltipConfig: {
allowHtml: true,
trigger: 'click',
theme: 'light',
content: '#tooltipHtml',
placement: 'top',
extCls: 'bk-processor-wrapper',
},
// 手动触发器下拉框状态
isDropdownShow: false,
basicInDomHeight: 54, // 基本信息初始高度
Expand Down

0 comments on commit 92b9773

Please sign in to comment.