代码拉取完成,页面将自动刷新
pnpm install
pnpm dev
pnpm build
npm install exercise-form
//main.ts
import { createApp } from "vue";
import ElementPlus from "element-plus";
import ExerciseForm from "exercise-form"; // 组件引入
import "element-plus/dist/index.css";
import "exercise-form/dist/index.css"; // 样式引入
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import App from "./App.vue";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
app.use(ElementPlus);
app.use(ExerciseForm);
app.mount("#app");
<template>
<ex-form-designer :form-json="formJson" />
</template>
<script lang="ts" setup>
import { reactive } from "vue";
import { DesFormParams } from "exercise-form";
const formJson = reactive<DesFormParams>({
formConfig: {}, //表单设置
widgetList: [] //组件列表
});
</script>
<template>
<ex-form-render :form-json="formJson" :form-data="formData" />
</template>
<script lang="ts" setup>
import { ref, reactive } from "vue";
import { DesFormParams } from "exercise-form";
const formData = ref({});
const formJson = reactive<DesFormParams>({
formConfig: {}, //表单设置
widgetList: [] //组件列表
});
</script>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。