mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
64 lines
16 KiB
JavaScript
64 lines
16 KiB
JavaScript
|
amis.define('docs/index.md', function(require, exports, module, define) {
|
|||
|
|
|||
|
module.exports = {
|
|||
|
"title": "介绍",
|
|||
|
"description": "介绍",
|
|||
|
"type": 0,
|
|||
|
"group": "💡 概念",
|
|||
|
"menuName": "介绍",
|
|||
|
"icon": null,
|
|||
|
"order": 8,
|
|||
|
"html": "<h2><a class=\"anchor\" name=\"%E4%BB%80%E4%B9%88%E6%98%AF-amis\" href=\"#%E4%BB%80%E4%B9%88%E6%98%AF-amis\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>什么是 amis</h2><p>amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可以节省页面开发工作量,极大提升开发前端页面的效率。</p>\n<h2><a class=\"anchor\" name=\"%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-\" href=\"#%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-\" aria-hidden=\"true\"><svg aria-hidden=\"true\" class=\"octicon octicon-link\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>为什么要做 amis?🤔</h2><p>在经历了十几年的发展后,前端开发变得越来越复杂,门槛也越来越高,要使用当下流行的 UI 组件库,你必须懂 npm、webpack、react/vue,必须熟悉 ES 6 语法,最好还了解状态管理(比如 Redux),如果没接触过函数式编程,一开始入门就很困难,而它还有巨大的 <a href=\"https://github.com/markerikson/redux-ecosystem-links\">生态</a>,相关的库有 2347 个。</p>\n<p>然而前端技术的发展不会停滞,等学完这些后可能会发现大家都用 Hooks 了、某个打包工具取代 Webpack 了。。。</p>\n<p>而有时候你只是为了做个普通的增删改查界面,用于系统管理,类似下面这种:</p>\n<div class=\"amis-preview\" style=\"height: 1100px\"><script type=\"text/schema\" height=\"1100\">{\n \"title\": \"浏览器内核对 CSS 的支持情况\",\n \"remark\": \"嘿,不保证数据准确性\",\n \"type\": \"page\",\n \"body\": {\n \"type\": \"crud\",\n \"draggable\": true,\n \"api\": \"https://houtai.baidu.com/api/sample\",\n \"keepItemSelectionOnPageChange\": true,\n \"filter\": {\n \"title\": \"筛选\",\n \"submitText\": \"\",\n \"controls\": [\n {\n \"type\": \"text\",\n \"name\": \"keywords\",\n \"placeholder\": \"关键字\",\n \"addOn\": {\n \"label\": \"搜索\",\n \"type\": \"submit\"\n }\n }\n ]\n },\n \"bulkActions\": [\n {\n \"label\": \"批量删除\",\n \"actionType\": \"ajax\",\n \"api\": \"delete:https://houtai.baidu.com/api/sample/${ids|raw}\",\n \"confirmText\": \"确定要批量删除?\"\n },\n {\n \"label\": \"批量修改\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"批量编辑\",\n \"name\": \"sample-bulk-edit\",\n \"body\": {\n \"type\": \"form\",\n \"api\": \"https://houtai.baidu.com/api/sample/bulkUpdate2\",\n \"controls\": [\n {\n \"type\": \"hidden\",\n \"name\": \"ids\"\n },\n {\n \"type\": \"text\",\n \"name\": \"engine\",\n \"label\": \"Engine\"\n }\n ]\n }\n }\n }\n ],\n \"quickSaveApi\": \"https://houtai.baidu.com/api/sample/bulkUpdate\",\n \"quickSaveItemApi\": \"https://houtai.baidu.com/api/sample/$id\",\n \"filterTogglable\": true,\n \"headerToolbar\": [\n
|
|||
|
"toc": {
|
|||
|
"label": "目录",
|
|||
|
"type": "toc",
|
|||
|
"children": [
|
|||
|
{
|
|||
|
"label": "什么是 amis",
|
|||
|
"fragment": "%E4%BB%80%E4%B9%88%E6%98%AF-amis",
|
|||
|
"fullPath": "#%E4%BB%80%E4%B9%88%E6%98%AF-amis",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "为什么要做 amis?🤔",
|
|||
|
"fragment": "%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-",
|
|||
|
"fullPath": "#%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%81%9A-amis-",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "用 JSON 写页面有什么好处 ❓",
|
|||
|
"fragment": "%E7%94%A8-json-%E5%86%99%E9%A1%B5%E9%9D%A2%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%A4%84-",
|
|||
|
"fullPath": "#%E7%94%A8-json-%E5%86%99%E9%A1%B5%E9%9D%A2%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%A4%84-",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "amis 的其它亮点 ✨",
|
|||
|
"fragment": "amis-%E7%9A%84%E5%85%B6%E5%AE%83%E4%BA%AE%E7%82%B9-",
|
|||
|
"fullPath": "#amis-%E7%9A%84%E5%85%B6%E5%AE%83%E4%BA%AE%E7%82%B9-",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "amis 不适合做什么?😶",
|
|||
|
"fragment": "amis-%E4%B8%8D%E9%80%82%E5%90%88%E5%81%9A%E4%BB%80%E4%B9%88-",
|
|||
|
"fullPath": "#amis-%E4%B8%8D%E9%80%82%E5%90%88%E5%81%9A%E4%BB%80%E4%B9%88-",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "阅读建议 👆",
|
|||
|
"fragment": "%E9%98%85%E8%AF%BB%E5%BB%BA%E8%AE%AE-",
|
|||
|
"fullPath": "#%E9%98%85%E8%AF%BB%E5%BB%BA%E8%AE%AE-",
|
|||
|
"level": 2
|
|||
|
},
|
|||
|
{
|
|||
|
"label": "让我们马上开始吧!",
|
|||
|
"fragment": "%E8%AE%A9%E6%88%91%E4%BB%AC%E9%A9%AC%E4%B8%8A%E5%BC%80%E5%A7%8B%E5%90%A7-",
|
|||
|
"fullPath": "#%E8%AE%A9%E6%88%91%E4%BB%AC%E9%A9%AC%E4%B8%8A%E5%BC%80%E5%A7%8B%E5%90%A7-",
|
|||
|
"level": 2
|
|||
|
}
|
|||
|
],
|
|||
|
"level": 0
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
});
|