Commit 59a2eb4a by 杨明

fixed

1 parent 9a7b717c
<template>
<<<<<<< HEAD
<div class="full-container" v-bind="$attrs">
=======
<div class="full-container">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-tooltip placement="top" v-if="hoverStatus">
<div slot="content">
<template v-if="$slots.default"><slot></slot></template>
......@@ -11,18 +7,6 @@
{{ label }}
</template>
</div>
<<<<<<< HEAD
<div :class="['full-text', identification]" :style="{ 'max-width': labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</el-tag>
</div>
<div v-if="textType != 'text' && haveClose">
=======
<div :class="['full-text', identification]" :style="{ width: labelWidth + 'px' }" @mouseenter="hoverFun" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
......@@ -30,17 +14,12 @@
</el-tag>
</div>
<div v-if="textType != 'text' && haveClose" @mouseenter="hoverFun">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<el-tag class="tag-user-closable" :style="{ 'max-width': labelWidth + 'px' }" type="info" :disable-transitions="false" closable @close="handleRemove">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<span :class="['full-text-user', { 'user-icon-checked': textType == 'user' && haveClose }, identification]">{{ label }}</span>
</el-tag>
</div>
<<<<<<< HEAD
<div :class="[line ? 'full-text-line' : 'full-text', identification]" :style="{ 'max-width': labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
=======
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
......@@ -48,20 +27,10 @@
</div>
</el-tooltip>
<template v-else>
<<<<<<< HEAD
<div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ 'max-width': labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
=======
<div :class="['full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px' }" v-if="textType != 'text' && !haveClose">
<el-tag type="info" class="full-text" :disable-transitions="false">
<i class="el-icon-user-solid" v-if="textType == 'user'"></i>
{{ label }}
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
</el-tag>
</div>
<div @mouseenter="hoverFun" v-if="textType != 'text' && haveClose">
......@@ -70,11 +39,7 @@
<span :class="['full-text-user', identification]">{{ label }}</span>
</el-tag>
</div>
<<<<<<< HEAD
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ 'max-width': labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
=======
<div :class="[line ? 'full-text-line' : 'full-text', identification]" @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }" v-if="textType == 'text'">
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
......@@ -88,12 +53,7 @@ export default {
name: 'GLFull',
data() {
return {
<<<<<<< HEAD
hoverStatus: false,
identification: 'text_' + this.identi
=======
hoverStatus: false
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}
},
props: {
......@@ -130,14 +90,6 @@ export default {
default: false
}
},
<<<<<<< HEAD
methods: {
hoverFun() {
if (this.line > 1) {
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollHeight - 10 > document.querySelector(`.${this.identification}`).offsetHeight
return
}
=======
computed: {
identification() {
return 'text_' + this.identi
......@@ -145,7 +97,6 @@ export default {
},
methods: {
hoverFun() {
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
if (this.haveClose) {
//this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth - 30
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth > document.querySelector(`.${this.identification}`).offsetWidth
......@@ -154,16 +105,10 @@ export default {
// this.hoverStatus = this.identi ? document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
this.hoverStatus = document.querySelector(`.${this.identification}`).scrollWidth - widthMuti > this.labelWidth
}
<<<<<<< HEAD
},
handleRemove() {
this.$emit('handleRemove', this.$attrs)
=======
console.log(this.hoverStatus)
},
handleRemove() {
this.$emit('handleRemove')
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}
}
}
......@@ -171,19 +116,10 @@ export default {
<style scoped lang="scss">
.full-container {
display: inline-block;
<<<<<<< HEAD
margin-right: 4px;
/deep/ {
.el-tag {
// margin-right: 10px;
line-height: 26px;
height: 26px;
=======
/deep/ {
.el-tag {
height: 26px;
line-height: 26px;
>>>>>>> 396e1482ded1b79e8dc9f700b1a584ff319bc981
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!