Skip to content

v0.4.0

Compare
Choose a tag to compare
@pardnchiu pardnchiu released this 05 Nov 15:27

新增

  • 新增 render 參數,使用模板語法可以動態插入 HTML 內容,類似於使用 :html 動態插入 innerHTML
    • index.html
      <body id="app"></body>
      <script>
          const test = new QUI({
              id: "app",
              data: {
                  hint: "hint 123",
                  title: "test 123"
              },
              render: () => {
                  return `
                      "{{ hint }}",
                      h1 {
                          style: "background: red;", 
                          children: [ 
                              "{{ title }}"
                          ]
                      }`
              }
          })
      </script>
    • Result
      <body id="app">
          hint 123
          <h1 style="background: red;">test 123</h1>
      </body>

即將移除的功能