🌀(tag): update

This commit is contained in:
就眠儀式 2022-11-20 05:00:54 +08:00
parent 4021432a93
commit d96d718ac4
4 changed files with 16 additions and 16 deletions

View File

@ -73,12 +73,8 @@
} }
} }
&-ellipsis &-text { & &-text {
display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap
white-space: nowrap;
word-wrap: normal;
overflow: hidden;
text-overflow: ellipsis
} }
& &-close-icon { & &-close-icon {

View File

@ -49,7 +49,6 @@ const classTag = computed(() => [
[`layui-tag-${props.type}`]: props.type, [`layui-tag-${props.type}`]: props.type,
"layui-tag-bordered": props.bordered, "layui-tag-bordered": props.bordered,
"layui-tag-disabled": props.disabled, "layui-tag-disabled": props.disabled,
"layui-tag-ellipsis": props.maxWidth,
}, },
]); ]);
@ -105,13 +104,8 @@ function useTagCustomStyle(props: TagProps) {
<span v-if="$slots.icon" class="layui-tag-icon"> <span v-if="$slots.icon" class="layui-tag-icon">
<slot name="icon" /> <slot name="icon" />
</span> </span>
<span <span class="layui-tag-text">
style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap" <slot />
>
<span v-if="maxWidth" :style="styleTag" class="layui-tag-text">
<slot />
</span>
<slot v-else />
</span> </span>
<span <span
v-if="closable" v-if="closable"

View File

@ -14,7 +14,7 @@
<template> <template>
<lay-space size="md"> <lay-space size="md">
<lay-tag>标签</lay-tag> <lay-tag maxWidth="100px">标签</lay-tag>
<lay-tag v-for="type in TAG_TYPES" :type="type">标签</lay-tag> <lay-tag v-for="type in TAG_TYPES" :type="type">标签</lay-tag>
</lay-space> </lay-space>
</template> </template>
@ -164,10 +164,11 @@ export default {
<template v-for="(tag, index) of tagData" :key="`tag-${index}`"> <template v-for="(tag, index) of tagData" :key="`tag-${index}`">
<lay-tag <lay-tag
closable closable
maxWidth="100px"
@close="handleClose(index)" @close="handleClose(index)"
style="margin-right: 5px;" style="margin-right: 5px;"
> >
{{tag}} {{tag}}
</lay-tag> </lay-tag>
</template> </template>
<span id="tagDemo" @click="handlerFocus"> <span id="tagDemo" @click="handlerFocus">

View File

@ -11,6 +11,15 @@
<template> <template>
<lay-timeline> <lay-timeline>
<lay-timeline-item title="1.7.x"> <lay-timeline-item title="1.7.x">
<ul>
<a name="1-7-9"></a>
<li>
<h3>1.7.9 <span class="layui-badge-rim">2022-11-20</span></h3>
<ul>
<li>[新增] upload 组件 auto 属性, 是否自动上传配置。</li>
</ul>
</li>
</ul>
<ul> <ul>
<a name="1-7-8"></a> <a name="1-7-8"></a>
<li> <li>