@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
28 lines (27 loc) • 608 B
JavaScript
import { defineComponent, computed, toDisplayString } from "vue";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "RenderString",
props: {
value: {}
},
setup(__props) {
const valueAsString = computed(() => {
if (__props.value === "") {
return `''`;
}
if (__props.value === null) {
return "null";
}
if (__props.value === void 0) {
return "undefined";
}
return __props.value;
});
return (_ctx, _cache) => {
return toDisplayString(valueAsString.value);
};
}
});
export {
_sfc_main as default
};