Tag: kotlin html builder

在intellij中将kotlinx-html-js添加到kotlin / js项目中

我需要将kotlinx-html-js库添加到使用Intellij创建的kotlin / js项目中。 我试图添加maven支持,并在pom.xml文件中写下如下: 4.0.0 com.cillario Demo 1.0-SNAPSHOT jcenter jcenter https://jcenter.bintray.com org.jetbrains.kotlinx kotlinx-html-js ${kotlinx.html.version} 正如这里所解释的,但它不起作用。 有人可以帮我吗? 非常感谢。

Kotlin HTML-Builder

在Kotlin页面中 ,在HTML-Builder我可以看到下面的代码,我怎样才能在简单的.tk文件中使用它? 这里怎么开始? val data = mapOf(1 to "one", 2 to "two") createHTML().table { for ((num, string) in data) { Iterate over data tr { Functions to create HTML tags td { +"$num" } td { +string } } } }