Skip to content

Commit

Permalink
fix(tooltip): fix tooltip component className place
Browse files Browse the repository at this point in the history
  • Loading branch information
vvpvvp committed Jun 29, 2018
1 parent 3b90377 commit 22c1bbd
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/components/component/message/tooltip.vue
@@ -1,6 +1,7 @@
<template>
<div class="doc">
<h2>Tooltip 气泡提示</h2>
<blockquote>注意:如果tooltip在页面最右边,并且换行异常,请使用样式给内容设定固定宽度。</blockquote>
<h3>普通的提示</h3>
<example demo="message/tooltip1"></example>

Expand All @@ -14,7 +15,6 @@
<example demo="message/tooltip4"></example>

<h3>自定义样式</h3>
<blockquote>注意:如果tooltip在页面最右边,并且换行异常,请使用样式给内容设定固定宽度。</blockquote>
<example demo="message/tooltip5"></example>

<h3>Tooltip 参数</h3>
Expand Down
1 change: 1 addition & 0 deletions doc/components/component/plugin/dropdowncustom.vue
Expand Up @@ -3,6 +3,7 @@
<h2>DropdownCustom 自定义下拉控件</h2>
<p>DropdownCustom可以添加自定义的<code>className</code>定义各种不同的模式的下拉控件,<code>className</code>将应用在<code>.h-dropdowncustom-show</code>上,该dom为触发下拉的元素,包含自定义的内容以及右侧展示状态的icon。</p>
<p>提示:系统自带一个<code>h-text-dropdown</code>的样式。</p>
<blockquote>注意:如果DropdownCustom在页面最右边,并且显示异常,请给内容设定固定宽度。</blockquote>
<blockquote>由于该样式应用在组件中,所以在调用的<code>vue</code>文件中,<code>style</code>的<code>scope</code>属性将无效。</blockquote>


Expand Down
3 changes: 2 additions & 1 deletion doc/components/component/plugin/dropdownmenu.vue
@@ -1,8 +1,9 @@
<template>
<div class="doc">
<h2>DropdownMenu 下拉菜单</h2>
<p>DropdownCustom可以添加自定义的<code>className</code>定义各种不同的模式的下拉菜单,<code>className</code>将应用在<code>.h-dropdownmenu-show</code>上,该dom为触发下拉的元素,包含自定义的内容以及右侧展示状态的icon。</p>
<p>DropdownMenu可以添加自定义的<code>className</code>定义各种不同的模式的下拉菜单,<code>className</code>将应用在<code>.h-dropdownmenu-show</code>上,该dom为触发下拉的元素,包含自定义的内容以及右侧展示状态的icon。</p>
<p>提示:系统自带一个<code>h-text-dropdown</code>的样式。</p>
<blockquote>注意:如果DropdownMenu在页面最右边,并且显示异常,请给内容设定固定宽度。</blockquote>
<blockquote>由于该样式应用在组件中,所以在调用的<code>vue</code>文件中,<code>style</code>的<code>scope</code>属性将无效。</blockquote>


Expand Down
7 changes: 7 additions & 0 deletions doc/components/demos/message/tooltip5.vue
Expand Up @@ -27,5 +27,12 @@
<template>
<div>
<span v-tooltip className="tooltip5-demo" placement="bottom-start" theme="white">自定义样式</span>
<i class="h-split" v-width="30"></i>
<Tooltip theme="white" className="tooltip5-demo" placement="bottom-start">
<span class="text-hover">Component调用</span>
<div slot="content">
自定义样式
</div>
</Tooltip>
</div>
</template>
2 changes: 1 addition & 1 deletion doc/components/demos/view/progress2.vue
@@ -1,6 +1,6 @@
<template>
<div v-width="600">
<p><NumberInput v-model="value" :step="10" :min="0" :max="100"></NumberInput></p>
<p><NumberInput v-model="value" :step="10" :min="0" :max="100" useOperate></NumberInput></p>
<p><Progress :percent="value" :stroke-width="6"><span slot="title">项目1</span><span slot="text">{{value}}%</span></Progress></p>
<p><Progress :percent="value" :stroke-width="10" color="#ff5500"></Progress></p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/components_en/component/message/tooltip.vue
@@ -1,6 +1,7 @@
<template>
<div class="doc">
<h2>Tooltip</h2>
<blockquote>Note: if tooltip is on the right side of the page and the display is abnormal, please use the style to set the fixed width for the content.</blockquote>
<h3>Basic</h3>
<example demo="message/tooltip1"></example>

Expand All @@ -14,7 +15,6 @@
<example demo="message/tooltip4"></example>

<h3>Custom style</h3>
<blockquote>Note: if tooltip is on the right side of the page and the line is abnormal, use the style to set the fixed width for the content.</blockquote>
<example demo="message/tooltip5"></example>

<h3>Tooltip Property</h3>
Expand Down
1 change: 1 addition & 0 deletions doc/components_en/component/plugin/dropdowncustom.vue
Expand Up @@ -3,6 +3,7 @@
<h2>DropdownCustom</h2>
<p>DropdownCustom can add custom <code>className</code>drop-down controls that define various modes that <code>className</code> will be applied <code>.h-dropdowncustom-show</code>. The dom is the element that triggers the drop-down, contains the custom content, and the icon for the right-hand display state.</p>
<p>Tip: The system comes with a <code>h-text-dropdown</code> class.</p>
<blockquote>Note: if DropdownCustom is on the right side of the page and the display is abnormal, please set the width for the content.</blockquote>
<blockquote>Because the style is applied to the component <code>vue</code>, <code>style</code> with <code>scope</code> properties in the calling file will be invalid.</blockquote>

<h3>Basic</h3>
Expand Down
2 changes: 2 additions & 0 deletions doc/components_en/component/plugin/dropdownmenu.vue
Expand Up @@ -3,6 +3,8 @@
<h2>DropdownMenu 下拉菜单</h2>
<p>DropdownMenu can add custom <code>className</code>drop-down controls that define various modes that <code>className</code> will be applied <code>.h-dropdownmenu-show</code>. The dom is the element that triggers the drop-down, contains the custom content, and the icon for the right-hand display state.</p>
<p>Tip: The system comes with a <code>h-text-dropdown</code> class.</p>
<blockquote>Note: if DropdownMenu is on the right side of the page and the display is abnormal, please set the width for the content.</blockquote>

<blockquote>Because the style is applied to the component <code>vue</code>, <code>style</code> with <code>scope</code> properties in the calling file will be invalid.</blockquote>


Expand Down
3 changes: 2 additions & 1 deletion src/components/tooltip/tooltip.vue
@@ -1,7 +1,7 @@
<template>
<div :class="showCls">
<slot></slot>
<div class="h-tooltip-inner-content" :class="className">{{content}}<slot name='content'></slot></div>
<div class="h-tooltip-inner-content">{{content}}<slot name='content'></slot></div>
</div>
</template>
<script>
Expand Down Expand Up @@ -62,6 +62,7 @@ export default {
theme: this.theme,
html: true,
trigger: this.trigger,
className: this.className,
container: document.body,
placement: this.placement,
disabled: this.disabled,
Expand Down

0 comments on commit 22c1bbd

Please sign in to comment.