33 lines
1.6 KiB
HTML
33 lines
1.6 KiB
HTML
|
|
<!doctype html>
|
||
|
|
<html lang="zh-CN"><meta charset="UTF-8"><title>E2E 按需加载回归</title>
|
||
|
|
<style>body{font:14px Arial;margin:24px;background:#f5f7fa}main{background:white;padding:20px;max-width:1100px;margin:auto}button{margin:0 12px 16px 0}</style>
|
||
|
|
<main><h1>按需加载回归</h1><p>仅检查内存表单,不创建数据或执行设备动作。</p><div id="app"></div></main>
|
||
|
|
<script type="module">
|
||
|
|
import {createApp,h,ref,resolveComponent} from 'vue'
|
||
|
|
import {setupStore} from '/src/store/index.ts'
|
||
|
|
import {setupI18n} from '/src/plugins/vueI18n/index.ts'
|
||
|
|
import {setupGlobCom} from '/src/components/index.ts'
|
||
|
|
import {setupElementPlus} from '/src/plugins/elementPlus/index.ts'
|
||
|
|
import {setupFormCreate} from '/src/plugins/formCreate/index.ts'
|
||
|
|
import {Editor} from '/src/components/Editor/index.ts'
|
||
|
|
const app=createApp({setup(){
|
||
|
|
const active=ref(''), model=ref({caption:'按需加载成功'})
|
||
|
|
return ()=>h('div',[
|
||
|
|
...['表单','设计器','富文本'].map(name=>h('button',{onClick:()=>active.value=name},name)),
|
||
|
|
h('p',{role:'status'},active.value||'等待选择组件'),
|
||
|
|
active.value==='表单'?h(resolveComponent('form-create'),{
|
||
|
|
rule:[{type:'input',field:'caption',title:'回归测试字段'}],
|
||
|
|
option:{submitBtn:false},modelValue:model.value,'onUpdate:modelValue':v=>model.value=v
|
||
|
|
}):null,
|
||
|
|
active.value==='设计器'?h(resolveComponent('fc-designer'),{height:'600px'}):null,
|
||
|
|
active.value==='富文本'?h(Editor,{height:'200px',modelValue:'<p>富文本加载成功</p>'}):null
|
||
|
|
])
|
||
|
|
}})
|
||
|
|
setupStore(app)
|
||
|
|
await setupI18n(app)
|
||
|
|
setupGlobCom(app)
|
||
|
|
setupElementPlus(app)
|
||
|
|
setupFormCreate(app)
|
||
|
|
app.mount('#app')
|
||
|
|
</script></html>
|