同步操作将从 alibaba/schema-plugin-flow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
简体中文 | English
schema-plugin-flow,简称 Sifo ([sɪfɔ]),是一个高扩展性、可二开的插件式前端开发框架。
导读
sifo-model 是 Sifo 的内核,它使用 JSON (称为 schema)来描述页面结构,使用插件来控制逻辑。有三类插件:模型插件、页面插件和组件插件。关于 Sifo 的基础信息和使用方法请阅读此包的 README。
sifo-react 是封装了 sifo-model 和 sifo-singleton 的一个React 组件。sifo-react 还提供了 sifoAppDecorator
功能,可以使一个普通的 React 组件拥有扩展能力,详情请见 README 或在线示例。
sifo-vue 是封装了 sifo-model 和 sifo-singleton 的一个 Vue 组件。sifo-vue 还提供了 sifoAppDecorator
功能,可以使一个普通的 Vue 组件拥有扩展能力,详情请见 README 或在线示例。
sifo-singleton 是一个全局扩展容器。所有的扩展插件和扩展组件都注册到这里。
sifo-model
+ react
= sifo-react
sifo-model
+ vue
= sifo-vue
sifo-react
+ sifo-mplg-form-core
+ ant-design
= sifo-mplg-form-antd
sifo-vue
+ sifo-mplg-form-core
+ ant-design-vue
= sifo-mplg-form-antdv
$ npm i @schema-plugin-flow/sifo-model --save
$ npm i @schema-plugin-flow/sifo-react --save
$ npm i @schema-plugin-flow/sifo-vue --save
React
$ git clone https://github.com/alibaba/schema-plugin-flow.git
$ cd schema-plugin-flow
$ npm run i
$ npm run start
http://localhost:8000
.Vue
$ git clone https://github.com/alibaba/schema-plugin-flow.git
$ cd schema-plugin-flow
$ npm run i
$ npm run i-vue
$ npm run start-vue
http://localhost:8080
.sifo-react
sifo-vue
项目
extend.js
import SifoSingleton from '@schema-plugin-flow/sifo-singleton';
const singleton = new SifoSingleton('quick-start'); // target namespace
singleton.registerItem('testExtendId', () => {
return {
plugins,
components
}
});
app.js
import React from 'react';
import ReactDOM from "react-dom";
import SifoApp from '@schema-plugin-flow/sifo-react';
const plugins = [{ modelPlugin, componentPlugin, pagePlugin }];
class App extends React.Component {
render() {
return (
<SifoApp
namespace='quick-start'
components={components}
schema={schema}
plugins={plugins}
/>
);
}
}
ReactDOM.render(
<App />
rootElement
);
runtime
load extend js
load app js
你应该在 sifoApp 渲染前加载扩展 js 资源
<script src="extend.js"></script>
<script src="app.js"></script>
form-extend-demo
simple demo
In this demo, there are seven extend-plugins in seven independent js. The checkbox set which plugin should be registered. Each plugin control different logic and all registered plugins make up a integrated page.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。