<template>
  <app-base>
    <div id="content"></div>
  </app-base>
</template>

<script>
  import TestData from "./TestData"
  export default {
    ready() {
      // 设置模板为测试,,
      global.canvas = "TestDataComponent";
      global.myjson = Object.assign(global.myjson, {
        TestDataComponent:{"template":{"Row":"@1*","Background":"@yellow","Column":"@200,1*,100","children":[{"Data":"stat.Data.components","@Change":"stat.Call($setSelected$,e.Value.self)","Slots":{"item":{"type":"Text","Text":"${data.name}-{index}$"}},"type":"List"},{"TemplateName":"stat.Data.Call($getTemplate$)","type":"Component","Data":"stat.Data"},{"type":"Button","Text":"@查询","@Click":"stat.ShowModal($NewPlan$,$申请登记$,$beginCommit$,$cancel$)"}],"type":"Grid"},"Drag":{"NewPlan":{"children":[{"Column":"@90,1*,90,1*,90,1*","children":[{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"Classes":"@FormInput","@Change":"stat.Data.Call($changeBeginValue$, $f_user_name$ ,e.Value.self)","type":"Input","PlaceHolder":"@请输入","Value":"stat.addFlow.f_user_name"},{"Text":"@标签","Classes":"@FormLabel","type":"Text"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"Classes":"@FormInput","PlaceHolder":"@请输入","type":"Input"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"Classes":"@FormLabel","Text":"@标签","type":"Text"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Classes":"@FormLabel","Text":"@标签"},{"PlaceHolder":"@请输入","type":"Input","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"Classes":"@FormInput","PlaceHolder":"@请输入","type":"Input"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"PlaceHolder":"@请输入","type":"Input","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"Text":"@标签","Classes":"@FormLabel","type":"Text"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"PlaceHolder":"@请输入","type":"Input","Classes":"@FormInput"},{"Classes":"@FormLabel","Text":"@标签","type":"Text"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"Text":"@标签","Classes":"@FormLabel","type":"Text"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"type":"Text","Classes":"@FormLabel","Text":"@标签"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"Classes":"@FormLabel","type":"Text","Text":"@标签"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"type":"Text","Classes":"@FormLabel","Text":"@标签"},{"type":"Input","Classes":"@FormInput","PlaceHolder":"@请输入"},{"type":"Text","Classes":"@FormLabel","Text":"@标签"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"},{"Text":"@标签","Classes":"@FormLabel","type":"Text"},{"PlaceHolder":"@请输入","Classes":"@FormInput","type":"Input"},{"type":"Text","Text":"@标签","Classes":"@FormLabel"},{"type":"Input","PlaceHolder":"@请输入","Classes":"@FormInput"}],"type":"Grid","Row":"@*,*,*,*,*,*,*,*,*"},{"type":"List","Data":"stat.Data.tests","Slots":{"item":{"type":"Select","Data":"stat.Data.selects"}}},{"if":"true","type":"Select","Data":"stat.Data.selects"}],"type":"Grid","Column":"@1*,1*","Row":"@400,40"}}}
        ,
        component1:{"template":{"type":"Grid","Row":"@1*","Column":"@1*,1*","children":[{"type":"Text","Text":"stat.Data.name","Classes":"@Button" , "@Click":"stat.Call($jumptodefault$, stat.Data.selected.self)"},{"type":"Text","Text":"@4"}]},"Drag":{}}
        ,
        component2:{"template":{"type":"Grid","Row":"@1*","Column":"@1*,1*","children":[{"Classes":"@Button","type":"Text","Text":"@3"},{"Classes":"@Button2","type":"Text","Text":"stat.Data.name"}]},"Drag":{}}
        ,
        component3:{"template":{"children":[{"type":"Text","Classes":"@Button2","Text":"stat.Data.count"},{"type":"Select","Classes":"@SelectWhite", "Data":"stat.Data.selects"}],"type":"Grid","Row":"@*","Column":"@1*,1*"},"Drag":{}}
        ,
        component4:{"Drag":{},"template":{"Row":"@*","Column":"@1*,1*","children":[{"Classes":"@SelectWhite","type":"Select", "Data":"stat.Data.selects"},{"type":"Select", "Data":"stat.Data.selects"}],"type":"Grid"}}
        ,
        defaultPage:{"template":{"Row":"@1*","Column":"@1*","children":[{"type":"Text","Text":"@默认页面"}],"type":"Grid"},"Drag":{}}
      });
      loadWasm().then(()=> {
        global.stat = new TestData()
        global.stat.ready().then(()=> {
          console.log(global.stat)
          run()
        })
      })
    }
  }
</script>
