<script setup>

import LogicRunner from '@vue2-client/logic/LogicRunner'
import { getCurrentInstance, ref } from 'vue'
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'

const { proxy } = getCurrentInstance()

const metaData = ref({
  test: {},
  test2: [],
  inputValue: '',
  displayValue: 'default'
})

async function testLogic () {
  const result = await LogicRunner.run('testVueLogic', {
    metaData: metaData,
    proxy: proxy
  })
  console.warn(metaData)
  console.info('pageTest:' + result)
}
</script>

<template>
  <div>
    录入值：<a-input v-model="metaData.inputValue" />
    显示值：<span ref="displaySpan">{{ metaData.displayValue }}</span>
    <br/>
    <a-button @click="testLogic">修改</a-button>
    <br/>
    <p>调用组件方法</p>
    <br/>
    <x-form-table
      ref="testFormTable"
      serviceName="af-system"
      :queryParamsName="'crud_dictionary_manage'"
      title="字典">
    </x-form-table>
  </div>
</template>

<style scoped lang="less">

</style>
