fix: 修复下拉菜单嵌套下拉菜单包裹问题

This commit is contained in:
就眠儀式 2022-02-20 16:05:51 +08:00
parent 8f21f8e132
commit 1538585214
2 changed files with 13 additions and 11 deletions

View File

@ -139,11 +139,10 @@ onMounted(() => {
});
watch([red, green, blue], (newValue) => {
emit("update:modelValue", rgba2hex(red.value,
green.value,
blue.value,
alpha.value));
emit(
"update:modelValue",
rgba2hex(red.value, green.value, blue.value, alpha.value)
);
let { h, s, v } = rgb2hsv(red.value, green.value, blue.value);
@ -158,10 +157,10 @@ watch([red, green, blue], (newValue) => {
});
watch(alpha, () => {
emit("update:modelValue", rgba2hex(red.value,
green.value,
blue.value,
alpha.value));
emit(
"update:modelValue",
rgba2hex(red.value, green.value, blue.value, alpha.value)
);
//
alphaSliderStyle.value = `left: ${
alpha.value >= 1 ? "calc(100% - 6px)" : alpha.value * 100 + "%"
@ -347,7 +346,9 @@ function parseColor(color: any) {
let r, g, b, a;
if (typeof color === "string") {
if (
/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8}|[0-9a-fA-F]{3}|[0-9a-fA-F]{4})$/.test(color)
/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8}|[0-9a-fA-F]{3}|[0-9a-fA-F]{4})$/.test(
color
)
) {
return hex2rgba(color);
}

View File

@ -1923,10 +1923,11 @@ a cite {
display: none;
position: absolute;
left: 0;
margin-top: 2px;
z-index: 899;
min-width: 100%;
//max-height: 360px;
overflow-y: auto;
//overflow-y: auto;
background-color: #fff;
box-sizing: border-box;
}