一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)(中)

简介: 一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)

如何自定义页面的整体样式


做这个后台管理系统的demo,给领导看后,他直接pass了,原因就是颜色太暗。


所以我们可以改变这个框架的css变量。


/* 统一修改内置的css变量 */
:root {
      --Layout-aside-width: 220px;
      /* 全局背景颜色 */
      --body-bg: #f4f6f8;
      --fontFamilyBase: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
      --body-color: #595959;
      /* table背景颜色 */
      --background: #fff;
      --Table-borderColor: #f0f0f0;
      --Table-color: #595959;
      --Table-onHover-bg: #fafafa;
      --Table-onHover-borderColor: #f0f0f0;
      --Table-onHover-color: #595959;
      /* table表头 */
      --Table-thead-color:  #262626;
      /*筛选表单组件背景颜色 */
      --Table-searchableForm-backgroundColor: #fff;
      /* 表单提示文字颜色 */
      --Form-select-placeholderColor: #bfbfbf;
      --Form-input-placeholderColor: #bfbfbf;
      --Form-select-borderColor: #e0e0e0;
      --Form-input-borderColor: #e0e0e0;
      /* --Form-input-color: #000; */
      /* --Form-item-gap: 40px; */
      /* 定义表格标题栏操作项偏移的高度 */
      --table-title-operator-top: 14px;
      /* 加载时的背景图片 */
      --Spinner-bg: url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjY0cHgiIGhlaWdodD0iNjRweCIgdmlld0JveD0iMCAwIDY0IDY0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPGcgaWQ9Iumhtemdoi0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8Zy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mlsbD0iZnJlZXplIiBjYWxjTW9kZT0ic3BsaW5lIiBrZXlUaW1lcz0iMDsgMSIgIGtleVNwbGluZXM9Ii41IDAgLjUgMSIvPgogICAgICAgICAgICAgICAgPC9jaXJjbGU+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==")
}


区分事件和动作


看官方文档中很多组件都可以设置事件,看的是一头雾水。不知道如何去操作。


比如下面的dialog组件中的事件和动作。


网络异常,图片无法展示
|


看完之后不知道怎么去操作。


其实事件就是写在每个组件的onEvent属性中的。


onEvent: {
 // 当鼠标移入时触发
  mouseenter: {
    // 配置动作表
    actions: [
      {
        actionType: "toast",
        args: {
          msg: "toast变量"
        }
      }
    ]
  },
  // 当鼠标移除时触发
  mouseleave: {
    // 配置动作表
    actions: [
      {
        actionType: "toast",
        args: {
          msg: "离开"
        }
      }
    ]
  }
}


而动作就是写在每个事件中的actions属性中的actionType。见上。


下面我们来看一个例子。其实他就是通过设置mouseenter, mouseleave, click事件然后配合toast, setValue来提示用户做了哪些操作,并且修改表单中的值。


{
  "type": "page",
  "body": {
    "type": "form",
    id: "form",
    data: {
      username: "zh"
    },
    "body": [
      {
        "type": "input-text",
        "name": "name",
        "label": "姓名:",
        value: "${username}"
      },
      {
        "label": "修改姓名",
        "name": "name",
        "type": "button",
        // "onClick": "props.formStore.setValues({name: 'amis', email: 'amis@baidu.com'});console.log('props', props)",
        onEvent: {
          mouseenter: {
            // 配置动作表
            actions: [
              {
                actionType: "toast",
                args: {
                  msg: "移入",
                }
              },
            ]
          },
          mouseleave: {
            // 配置动作表
            actions: [
              {
                actionType: "toast",
                args: {
                  msg: "离开"
                }
              }
            ]
          },
          click: {
            actions: [
              {
                actionType: "toast",
                args: {
                  msg: "点击了按钮,并且修改了username"
                }
              }, 
              {
                actionType: "setValue",
                // 这个一定需要写上哪个组件的id
                componentId: "form",
                args: {
                  value: {
                    username: "llm"
                  }
                }
              }
            ]
          }
        }
      }
    ]
  }
},


网络异常,图片无法展示
|


并不是所有的组件都可以监听click


目的:想要通过icon组件作为一个复制文本的图标,点击后可以复制文本。但是失败了。


{
    type: "page",
    data: {
      a: "复制的内容"
    },
    body: {
      type: "icon",
      icon: "fa fa-files-o",
      onClick: "console.log('copy.......')",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "copy",
              "args": {
                "copyFormat": "text/html",
                "content": "${a}"
              }
            }
          ]
        }
      }
    }
},


点击页面的icon没有任何反应。


所以这时只能通过button(action)组件来解决。


{
    type: "page",
    data: {
      a: "复制的内容"
    },
    body: {
      // type: "icon",
      type: "action",
      label: "",
      icon: "fa fa-files-o",
      onClick: "console.log('copy.......')",
      "onEvent": {
        "click": {
          "actions": [
            {
              "actionType": "copy",
              "args": {
                "copyFormat": "text/html",
                "content": "${a}"
              }
            }
          ]
        }
      }
    }
  },


网络异常,图片无法展示
|


关于setValue动作的解释


它主要是更新数据域中数据的值的。其中通过componentId来绑定更新那个组件中的数据域。


如果不写componentId,那么更新的就是自己数据域中的值,如果写了,就是更新其他数据域中的值。


{
      "type": "page",
      data: {
        a: "llm"
      },
      id: "pageId",
      "body": [
        {
          type: "tpl",
          tpl: "${a}",
        },
        {
          "type": "form",
          onEvent: {
            change: {
              actions: [
                {
                  actionType: "toast",
                  args: {
                    msg: "提示toast"
                  }
                },
                // 直接清空选中的选项
                // {
                //   actionType: "clear",
                // },
                {
                  actionType: "setValue",
                  // 这个写的是那个组件id,他就更新那个组件的数据域
                  componentId: "pageId",
                  args: {
                    value: {
                      a: "${select}"
                    }
                  }
                  // 如果没有写,那么它将绑定的是该组件的id。
                  // args: {
                  //   value: {
                  //     select: "a"
                  //   }
                  // }
                }
              ]
            }
          },
          "body": [
            {
              "label": "选项",
              "type": "select",
              "name": "select",
              multiple: true,
              "menuTpl": "<div>${label} 值:${value}, 当前是否选中: ${checked}</div>",
              "options": [
                {
                  "label": "A",
                  "value": "a"
                },
                {
                  "label": "B",
                  "value": "b"
                },
                {
                  "label": "C",
                  "value": "c"
                }
              ]
            }
          ]
        }
      ]
    },


网络异常,图片无法展示
|


事件动作中获取的event.data到底是啥


这个我也很迷,结合官网的一个案例,我只知道是当前事件传递的args。


{
      "type": "page",
      "body": [
        {
          "type": "button",
          "id": "b_001",
          "label": "发一个广播,携带动作参数",
          "className": "mb-2",
          "level": "primary",
          "onEvent": {
            "click": {
              "actions": [
                {
                  "actionType": "broadcast",
                  "eventName": "broadcast_1",
                  "args": {
                    "username": "lvxj",
                    "age": 30
                  },
                  "description": "一个按钮的点击事件"
                }
              ]
            }
          }
        },
        {
          "type": "form",
          "name": "form1",
          "id": "form_001",
          "title": "接收广播事件的参数",
          "debug": true,
          "body": [
            {
              "type": "input-text",
              "id": "form_001_text_01",
              "label": "年龄",
              "name": "age",
              "disabled": false,
              "mode": "horizontal"
            },
            {
              "type": "input-text",
              "id": "form_001_text_02",
              "label": "usernae",
              "name": "username",
              "disabled": false,
              "mode": "horizontal"
            }
          ],
          "data": {
            "username": "amis"
          },
          "onEvent": {
            "broadcast_1": {
              "actions": [
                {
                  "actionType": "reload",
                  "args": {
                    "age": "${event.data.age}",
                    "username": "${event.data.username}"
                  }
                },
                {
                  actionType: "toast",
                  args: {
                    msg: "${event.data | json}"
                  }
                }
              ]
            }
          }
        }
      ]
    },


网络异常,图片无法展示
|


所以当我们用到了event这个对象的时候,可以通过这种方式打印出来看一下。


{
  "actionType": "toast",
  "args": {
    "msgType": "info",
    "msg": "${event.data | json}"
  }
}


具体案例请看这里


相关文章
|
前端开发
一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)(下)
一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)
|
JavaScript 搜索推荐 Java
一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)(上)
一次偶然的机会,让我遇见了amis之排错总结(持续更新,因为还在学习)
|
4月前
|
SQL 安全 算法
爆赞!终于有大佬把网络安全零基础入门教程给讲明白了!
网络安全的一个通用定义指网络信息系统的硬件、软件及其系统中的数据受到保护,不因偶然的或者恶意的破坏、更改、泄露,系统能连续、可靠、正常地运行,服务不中断。网络安全简单的说是在网络环境下能够识别和消除不安全因素的能力。 网络安全在不同环境和应用中有不同的解释,例如系统运行的安全、系统信息内容的安全、信息通信与传播的安全等。 网络安全的主体是保护网络上的数据和通信的安全,数据安全性是指软硬件保护措施,用来阻止对数据进行非授权的泄漏、转移、修改和破坏等,通信安全性是通信保护措施,要求在通信中采用保密安全性、传输安全性、辐射安全性等措施。
|
6月前
|
人工智能 达摩院 算法
什么是优化技术?给算法小白同学的快速讲解和上手文
本文作者用一个曾经小白学习的视角,来讲解什么是优化问题,以及要如何用这个优化技术。
48098 59
|
6月前
|
前端开发 Java 数据库连接
如何顺利完成毕业项目看完这篇文章有你想要的!
如何顺利完成毕业项目看完这篇文章有你想要的!
|
Android开发 开发者 容器
[持续更新]细数那些Compose新手容易犯的错误(一)
[持续更新]细数那些Compose新手容易犯的错误
292 0
|
API Android开发 图形学
[持续更新]细数那些Compose新手容易犯的错误(二)
[持续更新]细数那些Compose新手容易犯的错误
204 0
|
Java 应用服务中间件 Nacos
Java后端项目排错经验分享
Java后端项目排错经验分享
244 0
|
搜索推荐 程序员 Python
为什么新手在编程社区提问经常得不到回答,甚至还会被嘲讽?
学编程难免遇到问题,遇到问题就需要上网求助。然而有过不少同学向我诉苦,说在网上提问没有人回答,有的还收到一些不是很友好的回复。我自己也在经常上的论坛上目睹过类似的帖子。以至于有人说,程序员社区就是对新人不友好,不愿帮助新人,甚至说这是怕别人学会了来抢饭碗。
|
人工智能 搜索推荐 程序员
为什么新手在编程社区提问得不到回答,甚至还会被嘲讽?
说了这么多,你也不要因此而不想提问题。该问的还是得问,要敢于提问和讨论,甚至要上 StackOverflow 等英语网站去问。不然怎么提高自己?不但要问,还要回答,“教”是最好的“学”。当你能向别人解释清楚一个东西时,才是你真的理解了它。既回馈了社区,又提升了自己,何乐而不为?