(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 undefined
); );
const { children, firstElement: dropdownRef } = useFirstElement(); const { children, firstElement: dropdownRef } = useFirstElement();
//const dropdownRef = shallowRef<HTMLElement | undefined>();
const contentRef = shallowRef<HTMLElement | undefined>(); const contentRef = shallowRef<HTMLElement | undefined>();
const contentStyle = ref<CSSProperties>({}); const contentStyle = ref<CSSProperties>({});
const { width: windowWidth, height: windowHeight } = useWindowSize(); const { width: windowWidth, height: windowHeight } = useWindowSize();

View File

@ -64,12 +64,13 @@ const selected = computed(() => {
const isFirst = ref(true); const isFirst = ref(true);
const display = computed(() => { const display = computed(() => {
if(searchMethod && !isFirst.value) { if (searchMethod && !isFirst.value) {
isFirst.value = false; isFirst.value = false;
return searchMethod(searchValue.value, props); return searchMethod(searchValue.value, props);
} }
return ( return (
props.keyword?.toString().indexOf(searchValue.value) > -1 || props.label?.toString().indexOf(searchValue.value) > -1 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; border-bottom: 1px solid #eeeeee;
} }
.layui-tab-title.is-right { .layui-tab-title.is-right {
border-left: 1px solid var(--global-neutral-color-3); border-left: 1px solid var(--global-neutral-color-3);
} }

View File

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

View File

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