we0-cms
v0.7.3
Published
A CMS component for React applications
Readme
we0-cms
A React CMS component for managing content.
Installation
npm install we0-cms
# or
yarn add we0-cmsUsage
import React from "react"
import CmsLayout from "we0-cms"
// Sample model data
const modelData = {
models: [
{
id: 1,
name: "用户模型",
table_name: "users",
json_schema: {
fields: [
{
name: "name",
type: "string",
comment: "用户姓名",
required: true,
maxLength: 100,
},
{
name: "email",
type: "email",
unique: true,
comment: "用户邮箱",
required: true,
},
],
},
created_at: "2023-07-18T19:00:28.098Z",
updated_at: "2023-07-18T19:00:28.099Z",
},
],
}
function App() {
return (
<div className="app">
<CmsLayout inputModels={modelData} />
</div>
)
}
export default AppDependencies
This package requires the following peer dependencies:
- react: ^18.0.0
- react-dom: ^18.0.0
- @ant-design/icons: ^5.0.0
- @ant-design/pro-components: ^2.0.0
- antd: ^5.0.0
License
MIT
