GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lowcodecloud/lowcode-engine-vue: Lowcode engine renderer and simulator for vue

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
.husky
.husky
 
 
.vscode
.vscode
 
 
packages
packages
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.cjs
.eslintrc.cjs
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.prettierrc
.prettierrc
 
 
.stylelintrc.js
.stylelintrc.js
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lerna.json
lerna.json
 
 
package.json
package.json
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

lowcode-engine-vue

Lowcode Engine Vue 渲染器及适配器实现,点击查看在线演示

和 React 渲染器使用区别

使用变量时:

  • this.props.xxx -> this.xxx
  • this.state.xxx -> this.xxx

现阶段 vue 代码编辑器还未适配,可以直接使用 react 代码编辑器编辑代码,渲染器已做适配

  • state 内容会自动转化为 vue data
  • lifecycle 自动适配为 vue lifecycle
    • componentDidMount -> onMounted
    • componentDidCatch -> onErrorCaptured
    • shouldComponentUpdate -> onBeforeUpdate
    • componentWillUnmount -> onBeforeUnmount
  • 其余方法自动转化为 vue methods

使用示例

直接使用 cdn 渲染器及适配器

import { init } from '@alilc/lowcode-engine';

init(document.getElementById('lce'), {
  // ...
  simulatorUrl: [
    'https://unpkg.com/[email protected]/dist/vue-router.global.prod.js',
    'https://unpkg.com/@knxcloud/[email protected]/dist/vue-simulator-renderer.js',
    'https://unpkg.com/@knxcloud/[email protected]/dist/vue-simulator-renderer.css',
  ],
});

定制渲染器

npm install @knxcloud/lowcode-vue-simulator-renderer @knxcloud/lowcode-vue-renderer --save-dev

TIPS:仅支持 cdn 方式引入,npm 包用于提供 typings 等代码提示能力

工程化配置:

{
  "externals": {
    "@knxcloud/lowcode-vue-simulator-renderer": "var window.LCVueSimulatorRenderer",
    "vue": "var window.Vue"
  }
}
import { vueRendererConfig } '@knx/lowcode-vue-simulator-renderer';
import { NConfigProvider, zhCN, dateZhCN } from 'naive-ui';
import { FunctionalComponent, h } from 'vue';

const ConfigProvider = defineComponent((_, { slots }) => {
  return () => h(NConfigProvider, { locale: zhCN, dateLocale: dateZhCN }, slots);
});

vueRendererConfig.setConfigProvider(ConfigProvider);

更多详细配置请查看 DEMO

本地调试

git clone [email protected]:KNXCloud/lowcode-engine-vue.git
cd lowcode-engine-vue
pnpm install
pnpm start

项目启动后,提供了 umd 文件,可以结合 DEMO 项目做调试,文件代理推荐XSwitch, 规则参考:

{
  "proxy": [
    [
      "https://unpkg.com/@knxcloud/[email protected]/dist/(.*)",
      "http://localhost:5559/$1"
    ],
  ]
}

About

Lowcode engine renderer and simulator for vue

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.