簡體   English   中英

玉錯誤將變量作為標簽

[英]Jade error putting variable as label

我得到一個錯誤,玉輸入是自動關閉,應該沒有內容

input(type='radio') This discount has
   -if type == 1
    | #{value} %
   -else
    | RM #{value}

任何想法?

您不能將內容插入輸入。 此html無效

<input type="radio">This discount has 0</input>

可能你想要

label
    input(type='radio') 
    | This discount has
    - if (type == 1)
      | #{value} %
    - else
      | RM #{value}  

要么

input(type='radio') 
span This discount has
- if (type == 1)
  | #{value} %
- else
  | RM #{value}  

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM