style(测试计划): 计划详情-关联用例高级筛选-所属测试计划下拉样式

--bug=1050375 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050375
This commit is contained in:
teukkk 2024-12-16 16:37:17 +08:00 committed by Craftsman
parent 9ad4c85090
commit 152644de17
5 changed files with 12 additions and 1 deletions

View File

@ -405,6 +405,7 @@
type: FilterType.SELECT_EQUAL, type: FilterType.SELECT_EQUAL,
selectProps: { selectProps: {
options: props.testPlanList, options: props.testPlanList,
optionTooltipPosition: 'tr',
}, },
}, },
{ {

View File

@ -344,6 +344,7 @@
type: FilterType.SELECT_EQUAL, type: FilterType.SELECT_EQUAL,
selectProps: { selectProps: {
options: props.testPlanList, options: props.testPlanList,
optionTooltipPosition: 'tr',
}, },
}, },
{ {

View File

@ -385,6 +385,7 @@
type: FilterType.SELECT_EQUAL, type: FilterType.SELECT_EQUAL,
selectProps: { selectProps: {
options: props.testPlanList, options: props.testPlanList,
optionTooltipPosition: 'tr',
}, },
}, },
{ {

View File

@ -371,6 +371,7 @@
type: FilterType.SELECT_EQUAL, type: FilterType.SELECT_EQUAL,
selectProps: { selectProps: {
options: props.testPlanList, options: props.testPlanList,
optionTooltipPosition: 'tr',
}, },
}, },
{ {

View File

@ -44,6 +44,7 @@ export interface MsSearchSelectProps {
optionLabelRender?: (item: SelectOptionData) => string; // 自定义 option 的 label 渲染,返回一个 html 字符串,默认使用 item.label optionLabelRender?: (item: SelectOptionData) => string; // 自定义 option 的 label 渲染,返回一个 html 字符串,默认使用 item.label
optionTooltipContent?: (item: SelectOptionData) => string; // 自定义 option 的 tooltip 内容,返回一个字符串,默认使用 item.label optionTooltipContent?: (item: SelectOptionData) => string; // 自定义 option 的 tooltip 内容,返回一个字符串,默认使用 item.label
remoteFilterFunc?: (options: SelectOptionData[]) => SelectOptionData[]; // 自定义过滤函数,会在远程请求返回数据后执行 remoteFilterFunc?: (options: SelectOptionData[]) => SelectOptionData[]; // 自定义过滤函数,会在远程请求返回数据后执行
optionTooltipPosition?: string;
} }
export interface RadioProps { export interface RadioProps {
options: SelectOptionData[]; options: SelectOptionData[];
@ -283,7 +284,12 @@ export default defineComponent(
const _slots: MsSearchSelectSlots = { const _slots: MsSearchSelectSlots = {
default: () => default: () =>
filterOptions.value.map((item) => ( filterOptions.value.map((item) => (
<a-tooltip content={item.tooltipContent} mouse-enter-delay={500} position="bl"> <a-tooltip
content={item.tooltipContent}
mouse-enter-delay={500}
position={props.optionTooltipPosition || 'bl'}
arrow-class={props.optionTooltipPosition === 'tr' ? 'absolute right-[4px] !left-auto' : ''}
>
<a-option <a-option
key={item[props.valueKey || 'value']} key={item[props.valueKey || 'value']}
value={props.objectValue ? item : item[props.valueKey || 'value']} value={props.objectValue ? item : item[props.valueKey || 'value']}
@ -581,6 +587,7 @@ export default defineComponent(
'shouldCalculateMaxTag', 'shouldCalculateMaxTag',
'disabled', 'disabled',
'size', 'size',
'optionTooltipPosition',
], ],
emits: [ emits: [
'update:modelValue', 'update:modelValue',