fix bug of Poptip
fix bug of Poptip
This commit is contained in:
parent
9699c270dc
commit
88bb7c923d
3 changed files with 23 additions and 11 deletions
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div :class="[`${prefixCls}-inner`]" v-if="!confirm">
|
||||
<div :class="[`${prefixCls}-title`]" v-if="!!title"><slot name="title">{{ title }}</slot></div>
|
||||
<div :class="[`${prefixCls}-title`]" v-if="showTitle" v-el:title><slot name="title">{{ title }}</slot></div>
|
||||
<div :class="[`${prefixCls}-body`]"><slot name="content">{{ content }}</slot></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -83,7 +83,8 @@
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
prefixCls: prefixCls
|
||||
prefixCls: prefixCls,
|
||||
showTitle: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -157,6 +158,11 @@
|
|||
this.visible = false;
|
||||
this.$emit('on-ok');
|
||||
}
|
||||
},
|
||||
ready () {
|
||||
if (!this.confirm) {
|
||||
this.showTitle = this.$els.title.innerHTML != '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -15,18 +15,24 @@
|
|||
<!--<Poptip title="标题" content="内容" trigger="hover">-->
|
||||
<!--<Button>hover 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<Poptip title="确定删除这条信息吗?" content="内容" trigger="focus" @on-ok="ok" @on-cancel="cancel" ok-text="yes" cancel-text="no" width="200">
|
||||
<a>Delete</a>
|
||||
</Poptip>
|
||||
<Poptip title="标题" content="内容" trigger="focus">
|
||||
<input type="text">
|
||||
<Poptip title="确定删除这条信息吗?" confirm content="内容" trigger="focus" @on-ok="ok" @on-cancel="cancel">
|
||||
<a><strong>Delete</strong></a>
|
||||
</Poptip>
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<input type="text">-->
|
||||
<!--</Poptip>-->
|
||||
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
||||
<!--<Button>focus 触发</Button>-->
|
||||
<!--</Poptip>-->
|
||||
<Tooltip content="这里是提示文字">
|
||||
当鼠标经过这段文字时,会显示一个气泡框
|
||||
</Tooltip>
|
||||
<!--<Tooltip content="这里是提示文字">-->
|
||||
<!--当鼠标经过这段文字时,会显示一个气泡框-->
|
||||
<!--</Tooltip>-->
|
||||
<Poptip>
|
||||
<a>click 激活</a>
|
||||
<div slot="content">
|
||||
<a>关闭提示框</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iview",
|
||||
"version": "0.9.5-rc-6",
|
||||
"version": "0.9.5-rc-7",
|
||||
"title": "iView",
|
||||
"description": "A high quality UI components Library with Vue.js",
|
||||
"homepage": "http://www.iviewui.com",
|
||||
|
|
Loading…
Add table
Reference in a new issue