Skip to content

Commit

Permalink
fix: tootips指令手动设置allowHTML为false --bug=131272889
Browse files Browse the repository at this point in the history
  • Loading branch information
luofann committed Oct 11, 2024
1 parent 819dfea commit 4981017
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 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
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

0 comments on commit 4981017

Please sign in to comment.