DE
Size: a a a
NR
DE
DE
DE
NR
Vue.js uses an HTML-based template syntax that allows you to declaratively bind the rendered DOM to the underlying Vue instance’s data. All Vue.js templates are valid HTML that can be parsed by spec-compliant browsers and HTML parsers.
NR
DE
DE
DE
DE
NR
render() {
return (
<>
{_.map(this.props.layer.getTooltips(), tooltip => {
const { linkId, id } = tooltip.options;
const link = this.props.engine.getModel().getLink(linkId) as CustomLinkModel;
if (!link) {
return;
}
const renderPredicates = link.model?.predicates?.map(({ code, expectedValue }) => {
return (
<p key={code} className={cn(`predicate`, { active: expectedValue })}>
{expectedValue ? null : `НЕ`} {getNameByCode(this.context?.predicates, code)}
</p>
);
});
const tooltipContent = (
<>
<p dangerouslySetInnerHTML={{ __html: link.model.description }} />
{renderPredicates}
</>
);
return (
<Tooltip
key={id}
title={link.model.name}
description={tooltipContent}
link={link}
label={link.getLabels()[0] as CustomLabelModel}
/>
);
})}
</>
);
}
NR
DE
DE
NR
DE
DE