Skip to content

1.2.0

Choose a tag to compare

@pardnchiu pardnchiu released this 03 Aug 15:37

Added

  • PD function CALC supports simple calculations.
    • index.html
      <body id="app">
          <p>{{ CALC(num + 1) }}</p>
          <p>{{ CALC(num - 2) }}</p>
          <p>{{ CALC(num * 3) }}</p>
          <p>{{ CALC(num / 4) }}</p>
      </body>
      <script>
          const app = new PD({
              id: "app",
              data: {
                  num: 12
              }
          });
      </script>
    • Result
      <body id="app">
          <p>13</p>
          <p>10</p>
          <p>36</p>
          <p>3</p>
      </body>
  • PD tag :* supports {{value}} combined binding.
    • index.html
      <body id="app">
          <a :for="e in ary" :href="https://example.com/id/{{ e }}">https://example.com/id/{{ e }}</a>
      </body>
      <script>
          const app = new PD({
              id: "app",
              data: {
                  ary: ["1", "2", "3"]
              }
          });
      </script>
    • Result
      <body id="app">
          <a href="https://example.com/id/1">https://example.com/id/1</a>
          <a href="https://example.com/id/2">https://example.com/id/2</a>
          <a href="https://example.com/id/3">https://example.com/id/3</a>
      </body>
  • PD tags :bg-image, :bg-attachment, :bg-blend-mode, :bg-clip, :bg-origin, :bg-position, :bg-position-x, :bg-position-y, :bg-repeat, :bg-size, :bg-color, :color support quick style setting.

Fixed

  • PD tag {{}} using function LENGTH has no response.
  • PD function LENGTH returns undefined for Object type.