fast-form-ui
v0.1.103
Published
基于 vue3 + Element-Plus + ts 实现的表单组件。
Downloads
1
Readme
fast-form-ui
使用 vue3
ts
,基于 element-plus
进行二次封装的 Form
组件,可通过简单的 json 配置快速展示表单组件。
安装
NPM
npm install fast-form-ui@latest --save
Yarn
yarn add fast-form-ui@latest --save
使用
手动导入
<template>
<Input v-model:model-value="modelValue" />
</template>
<script setup lang="ts">
import { Input } from "fast-form-ui"
import { ref } from "vue";
const modelValue = ref('')
</script>
完整引入
// main.ts
import Form from "fast-form-ui"
app.use(Form);
<template>
<Form :config="config" v-model:model="model"></Form>
</template>
<script setup lang="ts">
import { FormConfigList } from "fast-form-ui/lib/types/Form";
import { reactive } from "vue";
const model = ref({
value: ""
})
const config = reactive<FormConfigList>([
{
label: "标签",
prop: "value",
component: "Input",
placeholder: "请输入"
}
])
</script>