Comments (14)
demo 版本 是从 tag 0.1.0迁出的版本
复现步骤为
1、在gaiax studio 种新建普通类型模版
2、将gx-content-uper-grid 模版导入gaiax studio,并且 拖拽到 新建模版中
3、将普通模版 按照demo 中创建 根据模id + mock 数据 得到模版view 的流程 创建view 并展示 ,运行demo
4、出现异常
新建模版 json文件
from gaiax.
我看了下你的模板。 你实际上是想使用嵌套一个容器grid模板。
你可以参考这个案例
from gaiax.
你自己的例子,之所以报错,是因为数据传递错误了。
模板的渲染是需要数据源的。 这是个前提。 例如A模板、B模板、C模板。
A嵌套了B、B嵌套了C。
A模板是由代码中直接设定数据源的,所以可以在A的databidning中直接写取值逻辑,赋值给节点。
那么B模板由于被嵌套在了A中,那么B该怎么取值?
这个时候B模板,需要由A模板,从databidning中取出一个数据源,传递给B模板。
同理,在使用容器模板的时候,也需要这么做。
from gaiax.
from gaiax.
from gaiax.
这种模板与模板之间的数据源的传递,的确需要注意一下。
因为看起来就像个普通节点数据绑定一样,所以容易忽视。
这块我们在文档之中也标注一下。
from gaiax.
就想这种A模板嵌套了一个B容器。
写法有两种,
A写$$传数据给B,B自己$nodes取数组给自己赋值。
A写$nodes传数据给B,B自己$$取数组给自己赋值
from gaiax.
你的例子已经给gird模板传递数据源了,但是grid没有给自己绑定数据。
from gaiax.
from gaiax.
我们补充下文档关于 “模板之间数据源传递及使用” 的注意事项。
from gaiax.
https://www.yuque.com/g/biezhihua/gaiax/izbht6/collaborator/join?token=4Q1l2cjz4oV9cHIv# 《数据绑定》
from gaiax.
from gaiax.
from gaiax.
from gaiax.
Related Issues (20)
- RemoteDataSourceTemplateActivity中解析错误,导致崩溃 HOT 1
- 支持高度变化的属性动画
- ld: too many personality routines for compact unwind to encode for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) HOT 1
- JS SetData 与Native BindingData 并发问题
- 鸿蒙Next是否有适配计划,大概啥时候可以完成 HOT 1
- JS里计算出的高度后,setData不会重新刷新根视图的size HOT 1
- iOS Swift 工程通过 Cocoapods 引入 GaiaX 报错 HOT 2
- Android JS异常捕获问题
- Gaia studio windows 问题
- JS Execption 信息内容增加InstanceId
- 希望提供gaia studio 插件开发调试文档
- iOS 的发布不规范 HOT 2
- Android项目集成后libc++_shared.so库冲突(react native和百度地图)
- iOS +[GaiaXJSCModule callSync:] Crash
- Gaia Stuido 编辑源码支持多窗口
- 请问是否有计划支持鸿蒙OS? HOT 3
- 是否支持web端渲染卡片 HOT 1
- jitpack GaiaX-Adapter丢失 HOT 1
- android卡顿问题
- 包体积大小咨询
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gaiax.