Tefact
🏭 (Beta) 轻量级无代码/低代码 H5、表单编辑器。Lightweight no-code/low-code editor for website、H5 page and Form. Build your page without code!
Install / Use
/learn @staringos/TefactREADME
⚠️ Warning
This project is not maintain. You can check our new version Low-Code Editor in staringos/mtbird <br /> 这个项目将不在维护,您可以查看我们的新版本开源低代码编辑器 staringos/mtbird
<br /> <br /> <br /> <div align="center"> <img src="./docs/assets/images/logo-banner-2.png"> </div> <div align="center"> <a href="https://staringos.com">Website</a> | <a href="http://saas.staringos.com">Usage</a> | <a href="https://staringos.com/docs">Documents</a> | <a href="https://github.com/staringos/tefact-example">Example</a> | <a href="https://staringos.com/docs/join-us">Community</a> | <a href="https://staringos.com/docs/join-us">Support</a> </div> <br /> <div align="center"> </div>Tefact
Lightweight no-code editor for website、H5 page and Form. Build your application without code!
<a href="./README-CN.md">[中文文档]</a>
<a href="https://github.com/staringos/tefact-example">[Example]</a>
<img src="./docs/assets/images/show.gif" align="center">Dependencies:
Getting Start
Recommend: Fork example project to getting start. or manually import:
- Install dependency:
yarn add @tefact/editor
- Import styles to your css or less file:
import "@tefact/editor/lib/index.css"
- Add
@tefactpackage to your webpack transport.
webpack.config.js or nuxt.config.js
{
"build": {
"transpile": [
/@tefact\/*/
],
}
}
- Import Editor to you.
<template>
<Editor
:value="target"
:editorSetting="editorSetting"
></Editor>
</template>
<script lang="ts">
import Vue from "vue";
import Editor, { getDefaultFeature } from "@tefact/editor";
export default Vue.extends({
data() {
return {
target: getDefaultFeature("page"),
editorSetting: {}
}
},
components: {
Editor
}
})
</script>
Core Concept
Target
Target is an object that we edit for. It can be a H5 Page / Form Page or website Page. It's a JSON data structure for descript how a Page for Form looks like.
You can use getDefaultFeature in @tefact/editor to generate default target data. And save it to somewhere, it can be used directly to @tefact/feature-form or @tefact/feature-page
Editor
@tefact/editor is a Edit view for feature page or form.
Parameters
- value: the edit target
- editorSetting: Setting of editor
Event
- addTarget: Add target within the editor
- editTarget: after editor target basic information
- share: toggle target share
- save: When save target
- back: When editor within the editor back toggle
Page
@tefact/feature-page is a view component for those target has a featureType = page. To preview a page, you can do:
<template>
<Page :value="target"></Page>
</template>
<script lang="ts">
import Vue from "vue";
import Page, { DFFAULT } from "@tefact/feature-page";
export default Vue.extends({
data() {
return {
target: DFFAULT
}
},
components: {
Page
}
})
</script>
Form
Same like page, @tefact/feature-form is use for preview or display those target has a featureType = form, you can do:
<template>
<Form :value="target"></Form>
</template>
<script lang="ts">
import Vue from "vue";
import Form, { DFFAULT } from "@tefact/feature-page";
export default Vue.extends({
data() {
return {
target: DFFAULT
}
},
components: {
Form
}
})
</script>
Contributing
PRs & Issues are all welcome, feel free to ask question or submit your code.
Join Community
Scan with wechat, join our group.
<img src="./docs/assets/images/wechat-group.jpg" width="200">Discord
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
109.9kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
review-duplication
100.4kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
