Giter Site home page Giter Site logo

Comments (8)

allenve avatar allenve commented on July 19, 2024

应该没有特殊处理 方便发下有问题的 json 吗?

from amis.

snowing-x avatar snowing-x commented on July 19, 2024

把下面的schema复制粘贴进编辑器,点预览以后,文本框没有值;再点编辑以后,schema里已经没有 "__testB": "456" 这一项了。
直接配置【组件静态数据】,添加key以__开头的数据,schema里会不展示这项数据。

{
  "type": "page",
  "body": [
    {
      "type": "input-text",
      "label": "文本",
      "name": "__testB",
      "id": "u:d8d5072dd884"
    }
  ],
  "id": "u:933dfc4abcf5",
  "data": {
    "testA": "123",
    "__testB": "456"
  }
}

from amis.

snowing-x avatar snowing-x commented on July 19, 2024

把下面的schema复制粘贴进编辑器,点预览以后,文本框没有值;再点编辑以后,schema里已经没有 "__testB": "456" 这一项了。 直接配置【组件静态数据】,添加key以__开头的数据,schema里会不展示这项数据。

{
  "type": "page",
  "body": [
    {
      "type": "input-text",
      "label": "文本",
      "name": "__testB",
      "id": "u:d8d5072dd884"
    }
  ],
  "id": "u:933dfc4abcf5",
  "data": {
    "testA": "123",
    "__testB": "456"
  }
}

编辑器是6.0.0版本

from amis.

allenve avatar allenve commented on July 19, 2024

编辑器里面确实有特殊处理 用来维护一些内部数据
amis本身是支持的

from amis.

snowing-x avatar snowing-x commented on July 19, 2024

编辑器里对__的特殊处理包括哪些啊?是只针对数据域,还是其它地方也有?

from amis.

allenve avatar allenve commented on July 19, 2024

仅在schema中不会展示 没有其他影响吧

from amis.

snowing-x avatar snowing-x commented on July 19, 2024

编辑器,预览时候也不生效

from amis.

allenve avatar allenve commented on July 19, 2024

参考这里吧 https://github.com/baidu/amis/blob/master/packages/amis-editor-core/src/store/editor.ts#L575
目前 __ 和 $$ 开头的会过滤掉

from amis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.