Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日期时间组件显示成文本框 #11184

Open
taoyao-code opened this issue Nov 11, 2024 · 4 comments
Open

日期时间组件显示成文本框 #11184

taoyao-code opened this issue Nov 11, 2024 · 4 comments
Assignees
Labels
need confirm style Bug or PR related to component's style

Comments

@taoyao-code
Copy link

描述问题:

请用一段清晰简洁的文字描述问题是什么...

截图或视频:

iShot_2024-11-11_09.52.29.mp4
image

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的?
    npm

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    6.9

  3. 粘贴有问题的完整 amis schema 代码:

{
  "type": "wrapper",
  "id": "input_wl_travel_guide",
  "label": "信息",
  "name": "wl_travel_guide",
  "placeholder": "请输入信息",
  "body": [
    {
      "type": "input-table",
      "name": "wl_travel_guide",
      "id": "wl_travel_guide",
      "label": "信息",
      "canAccessSuperData": true,
      "strictMode": false,
      "addable": true,
      "editable": true,
      "removable": true,
      "columnsTogglable": false,
      "placeholder": "请输入信息",
      "columns": [
        {
          "type": "input-datetime-range",
          "name": "booking_start_date",
          "id": "booking_start_date",
          "label": "预定日期",
          "valueFormat": "YYYY-MM-DD HH:mm:ss",
          "displayFormat": "YYYY-MM-DD HH:mm",
          "shortcuts": [
            "today",
            "tomorrow",
            "2dayslater",
            "1weekslater",
            "1monthslater"
          ],
          "clearable": true,
          "required": true,
          "placeholder": "-"
        },
        {
          "type": "select",
          "source": "",
          "autoComplete": "",
          "name": "guide_id",
          "id": "guide_id",
          "label": "(姓名/证号搜索)",
          "searchable": true,
          "clearable": true,
          "required": true
        },
        {
          "type": "tpl",
          "name": "DetailInfo",
          "id": "DetailInfo",
          "label": "详细信息",
          "quickEdit": false
        },
        {
          "type": "tpl",
          "name": "Status",
          "id": "Status",
          "label": "状态",
          "quickEdit": false,
          "tpl": ""
        }
      ],
      "body": [
        {
          "type": "combo",
          "name": "wl_travel_guide",
          "id": "wl_travel_guide",
          "label": "信息",
          "needConfirm": false,
          "canAccessSuperData": true,
          "strictMode": false,
          "addable": true,
          "editable": true,
          "removable": true,
          "columnsTogglable": false,
          "placeholder": "请输入信息",
          "columns": [
            {
              "type": "input-datetime-range",
              "name": "booking_start_date",
              "id": "booking_start_date",
              "label": "预定日期",
              "valueFormat": "YYYY-MM-DD HH:mm:ss",
              "displayFormat": "YYYY-MM-DD HH:mm",
              "shortcuts": [
                "today",
                "tomorrow",
                "2dayslater",
                "1weekslater",
                "1monthslater"
              ],
              "clearable": true,
              "required": true
            },
            {
              "type": "select",
              "source": "",
              "autoComplete": "",
              "name": "guide_id",
              "id": "guide_id",
              "label": "(姓名/证号搜索)",
              "searchable": true,
              "clearable": true,
              "required": true
            },
            {
              "type": "tpl",
              "name": "DetailInfo",
              "id": "DetailInfo",
              "label": "详细信息",
              "quickEdit": false
            },
            {
              "type": "tpl",
              "name": "Status",
              "id": "Status",
              "label": "状态",
              "quickEdit": false,
              "tpl": ""
            }
          ]
        }
      ]
    }
  ],
  "asideResizor": false,
  "pullRefresh": {
    "disabled": true
  },
  "style": {
    "position": "static",
    "display": "block"
  },
  "isFixedHeight": false,
  "isFixedWidth": false
}
  1. 操作步骤
    直接粘贴上面的json数据,无法正常显示日期时间组件,例如直接粘贴到官网文档的amis渲染器中,但在amis-editor中是正常显示的,如果在文档中无法正常显示,需要强制刷新一次界面,然后在将json数据放入渲染器中。
@github-actions github-actions bot added the style Bug or PR related to component's style label Nov 11, 2024
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@CheshireJCat CheshireJCat self-assigned this Nov 13, 2024
@CheshireJCat
Copy link
Collaborator

在 editor 里,或者示例页面,或者运行项目中不会复现,只在文档里可以复现,你实际使用试试呢?

@taoyao-code
Copy link
Author

在 editor 里,或者示例页面,或者运行项目中不会复现,只在文档里可以复现,你实际使用试试呢?

实际使用如上述视频所示。editor中不会出现这个问题,editor在同一个项目中,打开一次后,在返回来,项目中就会正常显示。

@lhtuling
Copy link

应该是amis渲染器的小bug吧 影响不大 设置下快速编辑就行了
实测ok
image

Amis低代码前端框架交流群【QQ1群】:717791727
Amis低代码前端框架交流群【QQ2群】:721182449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need confirm style Bug or PR related to component's style
Projects
None yet
Development

No branches or pull requests

3 participants