惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

博客园 - 阿炬

Claude Code 老是提示找不到文件的解决方案 目标设定与积极反馈:如何通过小目标激励自己 阿布思考法 win11环境下执行yarn build,提示:'mv' 不是内部或外部命令,也不是可运行的程序 如何在关闭远程桌面后继续自动化程序 解决Mac下ERROR: Cannot connect to the Docker daemon at unix:///Users/qq/.orbstack/run/docker.sock. Is the docker daemon running? Visual Studo for Mac 快捷键 取消api返回结果中data对象默认Json首字母小写 Pega里Flow图元 NPOI导入sheet,并复制多行数据 用PC windows作为Mac macos的扩展屏 能改变你一生的顶级逻辑层次 《从偶然到必然》思维导图第1、2章 macbook m1 无法启动mysql服务,提示Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ mac VS提示 SDK package not found "Microsoft.NET.SDK 解决方法 MacOS Monterey 一键重置系统 macbook m1 键盘进灰导致个别按键不灵敏解决方法 DataGrip连接sqlserver,提示驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接的解决方法 .net6环境下RestSharp获取gbk网页乱码的解决方案 macbook air m1笔记本使用体验和心得(01)
amis中月份选择组件,如何设定值为月末最后一天
阿炬 · 2024-01-08 · via 博客园 - 阿炬

需求:选择月份,表单提交时,提交的值是月末最后一天

{
    "type": "page",
    "id": "u:f4d759761b40",
    "asideResizor": false,
    "themeCss": {
      "baseControlClassName": {
        "boxShadow:default": " 0px 0px 0px 0px transparent"
      },
      "bodyControlClassName": {
        "boxShadow:default": " 0px 0px 0px 0px transparent"
      },
      "headerControlClassName": {
        "boxShadow:default": " 0px 0px 0px 0px transparent"
      },
      "toolbarControlClassName": {
        "boxShadow:default": " 0px 0px 0px 0px transparent"
      },
      "asideControlClassName": {
        "boxShadow:default": " 0px 0px 0px 0px transparent"
      }
    },
    "body": [
      {
        "id": "u:b156da001a16",
        "type": "form",
        "title": "表单",
        "mode": "horizontal",
        "dsType": "api",
        "feat": "Insert",
        "body": [
          {
            "type": "input-month",
            "label": "日期",
            "name": "mydate",
            "id": "u:dcb628073830",
            "placeholder": "请选择月份",
            "valueFormat": "YYYY-MM-DD",
            "displayFormat": "YYYY-MM",
            "minDate": "",
            "maxDate": "",
            "value": "",
            "onEvent": {
              "change": {
                "weight": 0,
                "actions": [
                  {
                    "ignoreError": false,
                    "script": "setTimeout(function () {\n  let date = new Date( context.props.formStore.data.mydate);\n  let year = date.getFullYear();\n  let month = date.getMonth() + 1;\n  let l = new Date(year, month, 0).getDate();\n  let lastday = year +\"-\"+ month+\"-\" + l;\n\n  context.props.formStore.setValues({ lastday: lastday });\n\n  console.log(context.props.data.mydate);\n},500)\n\n",
                    "actionType": "custom"
                  }
                ]
              }
            },
            "autoFill": {
            }
          },
          {
            "type": "input-text",
            "label": "月末",
            "name": "lastday",
            "id": "u:53abff2c83bb",
            "value": ""
          }
        ],
        "actions": [
          {
            "type": "button",
            "label": "提交",
            "onEvent": {
              "click": {
                "actions": [
                  {
                    "actionType": "submit",
                    "componentId": "u:b156da001a16"
                  }
                ]
              }
            },
            "level": "primary",
            "id": "u:8d07bb3f10f5"
          }
        ],
        "resetAfterSubmit": true,
        "debug": true
      }
    ]
  }