vite vue3 lowcode
1.0.0
Chinese | English
PS: 此项目为个人半年以前做的实验性小玩具,使用的都是最新的技术栈,后面由于个人时间问题,没有持续维护和完善,暂时计划于2022年下半年开始对项目进行整体的重构和重新设计,实现一个基本可用的简易低代码平台。感谢关注~
From the simplest structure, a model-driven view system contains the following elements:
Model
view
This is a very simple rendering mode that can be applied to most scenes.
git clone --single-branch https://github.com/buqiyuan/vite-vue3-lowcode.git
or
git clone --depth=1 https://github.com/buqiyuan/vite-vue3-lowcode.git cd vite-vue3-lowcode
pnpm install
pnpm servepnpm build When using a form currently, you need to put the relevant表单控件inside表单容器, and you need to put按钮into表单容器, and then set按钮的type to表单提交按钮. Then click the submit button to automatically collect the form container. All fields and values inside
// 在vant文档中 chrome控制台输入以下代码,快速生成组件属性
let propObj = {
string : ( config ) => `createEditorInputProp( ${ JSON . stringify ( config ) } )` ,
number : ( config ) => `createEditorInputNumberProp( ${ JSON . stringify ( config ) } )` ,
boolean : ( config ) => `createEditorSwitchProp( ${ JSON . stringify ( config ) } )` ,
} ;
JSON . stringify (
$$ ( '#props + table tbody tr' ) . reduce ( ( prev , curr ) => {
const children = curr . children ;
const key = children [ 0 ] . textContent . replace ( / -([a-z]) / g , ( all , i ) => i . toUpperCase ( ) ) ;
const child3Text = children [ 3 ] . textContent ;
const defaultValue = [ 'true' , 'false' ] . includes ( child3Text )
? child3Text
: `' ${ child3Text == '-' ? '' : child3Text } '` ;
const value = ( propObj [ children [ 2 ] . textContent ] ?? propObj [ 'string' ] ) ( {
label : `' ${ children [ 1 ] . textContent } '` ,
defaultValue ,
} ) . replaceAll ( '"' , '' ) ;
prev [ key ] = value ;
return prev ;
} , { } ) ,
) . replaceAll ( '"' , '' ) ; // 在vant文档中 chrome控制台输入以下代码,快速生成组件事件
JSON . stringify (
$$ ( '#events + table tbody tr' ) . reduce ( ( prev , curr ) => {
const children = curr . children ;
const event = {
label : children [ 1 ] . textContent ,
value : children [ 0 ] . textContent ,
} ;
return prev . concat ( [ event ] ) ;
} , [ ] ) ,
)
. replaceAll ( / (?<!:)"(?!,|}) / g , '' )
. replace ( / " / g , "'" ) ; For local development, it is recommended to use Chrome 80+ browser
Supports modern browsers, does not support IE
IE | Edge | Firefox | Chrome | Safari |
|---|---|---|---|---|
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
feat adds new featuresfix issues/BUGstyle code style is related and has no impact on the running results.perf optimization/performance improvementrefactorrevert modificationstest test relateddocs /notesbuild makes changes to the build system or external dependencieschore dependency update/scaffolding configuration modification, etc.workflow workflow improvementsci continuous integrationtypes type definition file changeswip is under development