Giter Site home page Giter Site logo

Comments (5)

2betop avatar 2betop commented on April 24, 2024

你的问题是,怎么把数据传递给 amis 渲染器,还是说 amis 渲染器里面的组件间的数据获取?

如果是后者,按理直接就能取到,因为每一次层的数据的原型都执行了父级数据。

from amis.

hyschumi avatar hyschumi commented on April 24, 2024

场景是这样的

{
    type: "crud",
    columns: [
     ....,
    // 外层A
    {
       type: "operation",
       buttons:[
          {
               type: "button",
               actionType: "dialog",
               dialog: {
                  body: {
                      type: 'crud',
                      columns: [
                        // 内层 B
                        {}
                      ]
                  }
               },
          }
       ],
     }
    ]
}

”内层B“的columns 内有办法获取到“外层A“中的数据吗 比如A的ID?

from amis.

2betop avatar 2betop commented on April 24, 2024

自动的,默认行为

from amis.

hyschumi avatar hyschumi commented on April 24, 2024

外层 column A的数据item有id属性 但是内层column B 的API数据item有也包含id,这样配置column�B时怎么区分这两个ID呢?

from amis.

2betop avatar 2betop commented on April 24, 2024

dialog 里面可以加个数据映射

"data": {
  "&": "$$", // 如果想保留原有数据,加这样,如果不需要,可以去掉。
  "parentId": "${id}"
}

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.