Comments (3)
-
Q:Is there a way to debug dx expressions? I'm happy to figure them out - but find it hard without being able to see them evaluate.
A: You can use function style of dx to debug the value, refer to https://github.com/ncform/ncform#dx-expression -
Q: My idea was to use a rule like the example below on each of the 3 fields and to tell each one to fire the other 2 rules, so that they all update at roughly the same time.
A: Refer to this example: https://codepen.io/daniel-dx/pen/eYBKXVL. But there has some problems:- you must hide the "*" symbol by yourself (may be by overriding the style)
- there is a bug that when the required message show and the filed's rule become no required, the required message cannot hide automatically(this i will fix it as soon as possble)
from ncform.
Thanks Daniel!
I totally missed the note about function-style dx expressions - that's really brilliant. Does this mean that the dx-syntax is just there to enable a shorter form for writing very simple expressions or is there a performance penalty in choosing one style over the other? I would imagine the dx-expressions must be slightly slower - since they need to be parsed/processed? (probably not even measurable for most common situations).
I'll leave this issue open until the bug is fixed. If you have another issue tracking the bug - please feel free to close this one.
from ncform.
If you want to pass the schema to server, you can only use the string-style dx.
And if you just write the schema in the code, you can feel free to use the function-style
from ncform.
Related Issues (20)
- dx 表达式,不支持string类型 HOT 1
- Development documentation HOT 6
- How can i get all attributes of ncform schema? HOT 1
- is-dirty never changes it value HOT 2
- Small issue with serialization HOT 2
- Event "change" does not fire if type is "array" and tag removing
- How link fields works? HOT 2
- 提示信息tooltip当中的超链接为什么固定为#? HOT 1
- 自定义子组件$emit一个自定义事件时,期望可以在ncform层接收到 HOT 2
- Property key with $ sometimes does not work HOT 1
- ncForm 提供一个updateModelByKeys方法 方便从ncForm顶层手动更新model
- It is planned for support vue 3? HOT 2
- 关于联动级联加载的问题 HOT 11
- 如何通过ncform外的逻辑改变value值,并在ncform上生效呢? HOT 1
- Removing padding and margin
- @ncform/ncform/node_modules/@ncform/ncform-common not found HOT 1
- Input lag as number of fields / nested fields increase HOT 1
- How to get constants value from nested array HOT 1
- dynamic-object怎么用
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 ncform.