🐛(component): table

修复table 布局问题
column 新增minWidth和ellipsisTooltip属性

ISSUES CLOSED: https://gitee.com/layui/layui-vue/issues/I58DWF
This commit is contained in:
dingyongya 2022-05-21 17:16:44 +08:00
parent 5b64cad09c
commit bcfdefde00
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
export default { export default {
name: "LayRate" name: "LayRate",
}; };
</script> </script>
@ -83,14 +83,12 @@ const action = function (index: number, event: any) {
}; };
// //
const showClearIcon = computed( const showClearIcon = computed(() => !props.readonly && props.hasClear);
() => !props.readonly && props.hasClear const clearRate = function () {
);
const clearRate = function(){
tempValue.value = 0; tempValue.value = 0;
currentValue.value = 0; currentValue.value = 0;
emit("clear", currentValue.value); emit("clear", currentValue.value);
} };
</script> </script>
<template> <template>
@ -131,7 +129,11 @@ const clearRate = function(){
</span> </span>
</template> </template>
<template v-if="showClearIcon"> <template v-if="showClearIcon">
<i :class="['layui-icon', 'layui-rate-clear-icon', clearIcon]" @click="clearRate" title="清除评分"></i> <i
:class="['layui-icon', 'layui-rate-clear-icon', clearIcon]"
@click="clearRate"
title="清除评分"
></i>
</template> </template>
</div> </div>
</template> </template>

View File

@ -374,7 +374,7 @@ export default {
| sort | 排序 | -- | -- | -- | | sort | 排序 | -- | -- | -- |
| titleSlot | 标题插槽 | -- | -- | -- | | titleSlot | 标题插槽 | -- | -- | -- |
| align | 对齐方式 | `string` | `left` | `left` `right` `center` | | align | 对齐方式 | `string` | `left` | `left` `right` `center` |
| textOverflowTooltip | 当内容过长被隐藏时显示 tooltip | `boolean` | `false` | `true` `false` | | ellipsisTooltip | 当内容过长被隐藏时显示 tooltip | `boolean` | `false` | `true` `false` |
::: :::