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