1.3.6 • Published 8 months ago
source-editors v1.3.6
表单源码编辑器
支持 ant-design-vue v4 less 全局汉化 内网环境等 必须全局引入 ant-design-vue
- main 文件中
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
app.use(Antd)
- 组件中使用编辑器
<script setup>
import { ref } from 'vue'
import { Cant, CantStore } from 'source-editors'
import Monaco from 'source-editors/monaco-editor'
const store = new CantStore({})
const cant = ref()
console.log(store)
const getFunc = () => {
console.log(cant.value.getEditor()) //获取编辑器
console.log(cant.value.getData()) //获取数据
}
</script>
<template>
<a-button @click="getFunc">测试</a-button>
<Cant :editor="Monaco" :store="store" ref="cant" />
</template>
- 组件中渲染表单
<template>
<Preview ref="pdom" :code="code"></Preview>
</template>
<script setup>
import {Preview} from "source-editors";
const test = async() => {
pdom.value?.getData()
const data = await pdom.value?.validate()
console.log(data)
pdom.value?.setData()
}
element-plus 编辑 source-editors-ep
1.3.6
8 months ago
1.3.5
1 year ago
1.3.4
1 year ago
1.3.3
1 year ago
1.3.2
1 year ago
1.3.1
1 year ago
1.3.0
1 year ago
1.2.8
1 year ago
1.2.7
1 year ago
1.2.9
1 year ago
1.2.6
1 year ago
1.2.5
1 year ago
1.2.4
1 year ago
1.2.3
1 year ago
1.2.0
1 year ago
1.1.9
1 year ago
1.1.8
1 year ago
1.2.2
1 year ago
1.2.1
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.5
1 year ago
1.1.4
1 year ago
1.1.3
1 year ago
1.1.2
1 year ago
1.1.1
1 year ago
1.0.19
1 year ago
1.1.0
1 year ago
1.0.17
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago