相关疑难解决方法(0)

Jade:没有值的元素属性

我是新手使用Jade - 到目前为止它真棒.

但我需要做的一件事是带有'itemscope'属性的元素:

<header itemscope itemtype="http://schema.org/WPHeader">
Run Code Online (Sandbox Code Playgroud)

我的玉符号是:

header(itemscope, itemtype='http://schema.org/WPHeader')
Run Code Online (Sandbox Code Playgroud)

但结果是:

<header itemscope="itemscope" itemtype="http://schema.org/WPHeader">
Run Code Online (Sandbox Code Playgroud)

我怎样才能确保得到正确的结果 - itemscope而不是itemscope="itemscope"

attributes pug

12
推荐指数
4
解决办法
5964
查看次数

标签 统计

attributes ×1

pug ×1