github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/witch/webroot/viz-item.html (about)

     1  <script type="text/x-template" id="viz-item-template">
     2      <table style="width: 100%; height: 100%;">
     3          <tr>
     4              <td>
     5                  <div class="vue-draggable-handle"></div>
     6                  <div class="no-drag" style="padding-left: 18px;">{{ptr}}</div>
     7              </td>
     8          </tr>
     9          <tr>
    10              <td>
    11                  <viz-value class="no-drag viz-item" :path="ptr" :data="addrMap[ptr]"
    12                             @showPtr="showPtr" @hidePtr="hidePtr"
    13                             style="width: 100%; height: 100%;"/>
    14              </td>
    15          </tr>
    16      </table>
    17  </script>
    18  <script>
    19      Vue.component('viz-item', {
    20          template: '#viz-item-template',
    21          props: ['ptr','addrMap'],
    22          methods: {
    23              showPtr: function (e) {
    24                  e.sourcePtr = this.ptr;
    25                  this.$emit('showPtr', e);
    26              },
    27              hidePtr: function (e) {
    28                  e.sourcePtr = this.ptr;
    29                  this.$emit('hidePtr', e);
    30              }
    31          }
    32      });
    33  </script>