Comments (1)
I found solution, added extra array level in constants
of globalConfig
and changed the dx code dx: {{$const.choice[0].lang[i].code}}
:
module.exports = {
title: 'Choose one',
icon: 'mdi-checkbox-multiple-marked-circle',
class: 'item',
// ==== SCHEMA =====
schema: {
type: 'object',
properties: {
sectionChoices: {
type: 'object',
properties: {
choices: {
type: 'array',
items: {
type: 'object',
properties: {
name: {
type: 'string',
ui: {
label: 'Name',
placeholder: 'Name',
},
rules: {
required: true,
},
},
label: {
type: 'array',
value: ['', ''],
items: {
type: 'string',
ui: {
label: 'dx: {{$const.choice[0].lang[i].code}}',
},
},
ui: {
label: 'Label',
showLegend: false,
widgetConfig: {
autoIdxToLabel: false,
disableAdd: true,
disableDel: true,
disableReorder: true,
disableItemCollapse: true,
disableCollapse: true,
},
},
},
},
ui: {
label: 'Name',
},
},
ui: {
showLegend: false,
noLabelSpace: true,
widgetConfig: {
showOneIfEmpty: true,
},
},
},
},
ui: {
legend: 'Choices',
showLabel: false,
label: '',
widgetConfig: {
collapsed: false,
},
},
},
},
globalConfig: {
constants: { // Global constant configuration, can be accessed by {{$const.userName}}
choice: [
{
lang: [{ code: 'en', label: 'English' }, { code: 'af', label: 'Afrikaans' }],
},
],
},
},
},
}
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
- DX Custom Rule HOT 3
- 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
- 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.