0
我有下面的代碼片段:如何在Cycle.js/dom中啓用屬性的渲染?
button('.textbutton', {
type: "button",
onclick: `toggleVisibility('#abs-${submission.submission_id}');`
},
'Abstract'
),
a({href: "https://localhost:8080"}, 'View Article'),
div(`#abs-${submission.submission_id}`,
{style: 'display:none'}, submission.abstract
),
這似乎是隻呈現:
<button class="textbutton">Abstract</button>
<a>View Article</a>
<div id="abs-1405603">Text not shown on SO...</div>
注意,沒有任何屬性都被渲染。我cycle.js進口這個文件只是:
import {VNode, div, a, button, h3, img, hr, b, p, span} from "@cycle/dom";