mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: 证书输出选择器优化
This commit is contained in:
+6
-2
@@ -14,7 +14,7 @@ export default {
|
||||
default: undefined
|
||||
},
|
||||
from: {
|
||||
type: String
|
||||
type: [String, Array]
|
||||
}
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
@@ -36,7 +36,11 @@ export default {
|
||||
currentTask: currentTask.value
|
||||
});
|
||||
if (props.from) {
|
||||
options.value = options.value.filter((item: any) => item.type === props.from);
|
||||
if (typeof props.from === "string") {
|
||||
options.value = options.value.filter((item: any) => item.type === props.from);
|
||||
} else {
|
||||
options.value = options.value.filter((item: any) => props.from.includes(item.type));
|
||||
}
|
||||
}
|
||||
if (props.modelValue == null && options.value.length > 0) {
|
||||
ctx.emit("update:modelValue", options.value[0].value);
|
||||
|
||||
Reference in New Issue
Block a user