<!-- 以下是SmartWeb生成代码，请勿修改！ -->
<!-- $pageRef.name -->
#macro(printWidget $widget, $path)
  <$widget.type
    #if($widget.props.name && $widget.vars['$ref'])
    ref="$widget.props.name.$ref"
    #end
    #if($widget.layout.col)
    class="sw-layout-col$widget.layout.col"
    #end
    #foreach($prop in $widget.props.entrySet())
    #if($widget.vars[$prop.key])
      :$prop.key="wigets.$widget.props.name.$prop.key"
    #else
      $vmTool.htmlProp($prop.key, $prop.value)
    #end
    #end
    #if($widget.props.dataset)
    @action="onAction('$widget.props.dataset', $event)"
    #end
    #foreach($event in $widget.events.entrySet())
    @$event.key="onEvent('$widget.name', '$event.value', $event)"
    #end
  #if($widget.children)
  >
    #foreach($child in $widget.children)
      #printWidget($child)
    #end
  </$widget.type>
  #else
  />
  #end
#end
<template>
  #printWidget($page.form)
</template>

<script lang="ts">
    import {tabRouter, usePageEngineEx} from "sw-widget";
    import datasets from "./dataset";
    import eventObject from "./event";

    export default {
  name: "$pageRef.routerName",
  props: {
    id: {
      type: String,
      default: "",
    },
  },
  setup(props, context) {
    // 控件集
    const widgets = $vmTool.jsonFull($pageRef.widgets);

    //  pageId, widgets, eventObject, datasets, props, context, extraDataRef, pageRouter
    return usePageEngineEx({ pageId: "$pageRef.name", eventObject, widgets, datasets, props, context, pageRouter: tabRouter });
  },
};
</script>

<style lang="less">
</style>
