|
@@ -26,6 +26,7 @@
|
|
|
trigger="click"
|
|
trigger="click"
|
|
|
@command="handleCommand"
|
|
@command="handleCommand"
|
|
|
> -->
|
|
> -->
|
|
|
|
|
+ <el-tooltip effect="dark" :content="dataModel" placement="top" :disabled="isShowTooltip">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="dataModel"
|
|
v-model="dataModel"
|
|
|
:placeholder="placeholder"
|
|
:placeholder="placeholder"
|
|
@@ -39,9 +40,11 @@
|
|
|
:clearable="clearable && hasFocus"
|
|
:clearable="clearable && hasFocus"
|
|
|
@focus="() => hasFocus = true"
|
|
@focus="() => hasFocus = true"
|
|
|
@blur="() => hasFocus = false"
|
|
@blur="() => hasFocus = false"
|
|
|
|
|
+ @mouseover.native="inputOnMouseOver($event)"
|
|
|
v-on="$listeners"
|
|
v-on="$listeners"
|
|
|
/>
|
|
/>
|
|
|
-
|
|
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+
|
|
|
<!-- <el-button
|
|
<!-- <el-button
|
|
|
v-if="(!fieldOptions.custom_class || fieldOptions.custom_class>=120) && !dataModel"
|
|
v-if="(!fieldOptions.custom_class || fieldOptions.custom_class>=120) && !dataModel"
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -668,7 +671,8 @@ export default {
|
|
|
inputKey: '',
|
|
inputKey: '',
|
|
|
dict_add: false,
|
|
dict_add: false,
|
|
|
selectDataResult: [],
|
|
selectDataResult: [],
|
|
|
- hasFocus: false
|
|
|
|
|
|
|
+ hasFocus: false,
|
|
|
|
|
+ isShowTooltip:false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -997,6 +1001,17 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ inputOnMouseOver(e){
|
|
|
|
|
+ const target = e.target;
|
|
|
|
|
+
|
|
|
|
|
+ // 判断是否开启tooltip功能
|
|
|
|
|
+ if (this.isTable==true&&target.offsetWidth < target.scrollWidth) {
|
|
|
|
|
+ this.isShowTooltip = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.isShowTooltip = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(e,target,target.offsetWidth , target.scrollWidth,target.offsetWidth < target.scrollWidth,this.isShowTooltip,!this.isTable,!this.isTable&&this.isShowTooltip)
|
|
|
|
|
+ },
|
|
|
handleRadioChange (val) {
|
|
handleRadioChange (val) {
|
|
|
if (this.dataModel === val && this.fieldOptions.uncheck === true) {
|
|
if (this.dataModel === val && this.fieldOptions.uncheck === true) {
|
|
|
this.dataModel = null
|
|
this.dataModel = null
|