Config UI: hide duration example (#21002)

This commit is contained in:
Michael Geers 2025-05-03 08:15:04 +02:00 • committed by GitHub
parent 58e7a57a88
commit 3629c20a08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,9 +3,9 @@
:id="id"
:optional="!Required"
:deprecated="Deprecated"
:label="Description || `[${Name}]`"
:help="Description === Help ? undefined : Help"
:example="Example"
:label="label"
:help="help"
:example="example"
>
<PropertyField
:id="id"
@ -51,6 +51,16 @@ export default {
this.$emit("update:modelValue", value);
},
},
label() {
return this.Description || `[${this.Name}]`;
},
help() {
return this.Description === this.Help ? undefined : this.Help;
},
example() {
// hide example text since config ui doesnt use go duration format (e.g. 5m)
return this.Type === "Duration" ? undefined : this.Example;
},
},
};
</script>