fix select postion

This commit is contained in:
2023-05-26 16:37:09 +08:00
parent 6c966e8424
commit 13f45bcfef
8 changed files with 39 additions and 19 deletions

View File

@@ -44,6 +44,7 @@ export interface SelectProps {
showSearch?: boolean;
contentClass?: string | Array<string | object> | object;
contentStyle?: StyleValue;
position?:string;
}
export interface SelectEmits {
@@ -61,6 +62,7 @@ const props = withDefaults(defineProps<SelectProps>(), {
disabled: false,
multiple: false,
size: "md",
position:"top"
});
const slots = useSlots();
@@ -215,6 +217,7 @@ provide("searchMethod", props.searchMethod);
:disabledInput="!showSearch"
:size="size"
:class="{ 'layui-unselect': true }"
:position="position"
@remove="handleRemove"
@clear="handleClear"
@input-value-change="handleSearch"

View File

@@ -40,12 +40,14 @@ export interface TagInputProps {
size?: TagInputSize;
tagProps?: TagProps;
disabledInput?: boolean;
position?:string;
}
const props = withDefaults(defineProps<TagInputProps>(), {
placeholder: undefined,
minCollapsedNum: 0,
size: "md",
position:"top"
});
const emit = defineEmits([
@@ -274,6 +276,7 @@ defineExpose({
trigger="hover"
popperStyle="padding:6px"
:disabled="!collapseTagsTooltip"
:position="position"
>
<LayTag v-bind="tagProps" key="more" :closable="false" :size="size">
+{{ moreCount }}...

View File

@@ -108,7 +108,7 @@ onMounted(() => {
</span>
</div>
<slot v-else></slot>
<lay-popper v-if="isMounted" v-bind="innerProps">
<lay-popper :positio="position" v-if="isMounted" v-bind="innerProps">
<slot name="content"></slot>
</lay-popper>
</template>