(component): update

This commit is contained in:
就眠儀式 2022-11-20 19:28:07 +08:00
parent 710f616389
commit 120b8a3d58
5 changed files with 16 additions and 11 deletions

View File

@ -105,7 +105,6 @@ const dropdownCtx = inject<DropdownContext | undefined>(
undefined
);
const { children, firstElement: dropdownRef } = useFirstElement();
//const dropdownRef = shallowRef<HTMLElement | undefined>();
const contentRef = shallowRef<HTMLElement | undefined>();
const contentStyle = ref<CSSProperties>({});
const { width: windowWidth, height: windowHeight } = useWindowSize();

View File

@ -64,12 +64,13 @@ const selected = computed(() => {
const isFirst = ref(true);
const display = computed(() => {
if(searchMethod && !isFirst.value) {
isFirst.value = false;
return searchMethod(searchValue.value, props);
if (searchMethod && !isFirst.value) {
isFirst.value = false;
return searchMethod(searchValue.value, props);
}
return (
props.keyword?.toString().indexOf(searchValue.value) > -1 || props.label?.toString().indexOf(searchValue.value) > -1
return (
props.keyword?.toString().indexOf(searchValue.value) > -1 ||
props.label?.toString().indexOf(searchValue.value) > -1
);
});

View File

@ -97,8 +97,6 @@
border-bottom: 1px solid #eeeeee;
}
.layui-tab-title.is-right {
border-left: 1px solid var(--global-neutral-color-3);
}

View File

@ -696,7 +696,11 @@ onBeforeUnmount(() => {
<slot name="toolbar"></slot>
</div>
<div v-if="defaultToolbar" class="layui-table-tool-self">
<lay-dropdown updateAtScroll v-if="showToolbar('filter')">
<!-- 筛选 -->
<lay-dropdown
v-if="showToolbar('filter')"
updateAtScroll>
<div class="layui-inline" title="筛选" lay-event>
<i class="layui-icon layui-icon-slider"></i>
</div>
@ -715,6 +719,7 @@ onBeforeUnmount(() => {
</template>
</lay-dropdown>
<!-- 导出 -->
<div
v-if="showToolbar('export')"
class="layui-inline"
@ -725,9 +730,10 @@ onBeforeUnmount(() => {
<i class="layui-icon layui-icon-export"></i>
</div>
<!-- 打印 -->
<div
class="layui-inline"
v-if="showToolbar('print')"
class="layui-inline"
title="打印"
lay-event
@click="print()"

View File

@ -16,7 +16,8 @@
<li>
<h3>1.7.9 <span class="layui-badge-rim">2022-11-20</span></h3>
<ul>
<li>[新增] upload 组件 auto 属性, 是否自动上传配置。</li>
<li>[新增] select 组件 search-method 属性, 允许自定义搜索逻辑。</li>
<li>[修复] tag 组件 max-width 属性, 内容超出后 `...` 省略符缺失。</li>
</ul>
</li>
</ul>