How to set style? when using template rendering function

when using the template render function, write the style to label:

    h("div", { style: {} }, [
      h("label", "", {style: { fontWeight: "1500"}}),
      h("label", "andy")
    ])
    

Why doesn"t style work here?

{style: { fontWeight: "1500"}}      

  
Feb.28,2021

try this

h('div', { 
    style: {} 
}, [
          h('label', {
              domProps: {
                innerHTML: ''
            },
              style: { 
                  fontWeight: "1500"
              }
          }),
          h('label', "andy")
    ]
)
< H1 > reference < / H1 >

ide/render-function.html-sharp%E6%B7%B1%E5%85%A5-data-%E5%AF%B9%E8%B1%A1" rel=" nofollow noreferrer "> render function & JSX

Menu