mireo91 / repeatablefields
Neos包,用于向neos-ui react添加可重复字段
v2.2.1
2024-04-15 11:06 UTC
Requires
- neos/neos: >=5.0
- neos/neos-ui: >=3.7.0
- dev-master
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.x-dev
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.9
- v1.7.8
- v1.7.7
- v1.7.6
- v1.7.5
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7
- v1.6
- 1.5
- v1.4
- v1.3
- v1.2
- v1.1
- v1.0
- v0.1
- dev-9-editor-option-doesnt-work-if-type-is-string
- dev-dependabot/npm_and_yarn/Resources/Private/Backend/RepeatableField/minimist-0.2.4
- dev-6-if-an-editor-is-set-for-one-subproperty-it-gets-applied-to-all
This package is auto-updated.
Last update: 2024-09-22 05:52:26 UTC
README
Neos包,用于向neos-ui react添加可重复字段
演示视图
安装
composer require mireo91/repeatablefields
配置
创建类型为 reapeatable
的属性。
... properties: repeatableProperty: type: repeatable ui: label: 'Repeatable Field Group' inspector: group: document editorOptions: # you can use data source to dynamically set editorOptions (example: {predefinedProperties: [...]}) # dataSourceUri: "" # dataSourceIdentifier: # dataSourceDisableCaching: false # dataSourceAdditionalData: # apiKey: 'foo-bar-baz' buttonAddLabel: 'Add row' #default lable max: 100 #default max min: 0 #default min indexKey: field0 # when set nested data are not available but you can get data like (.property("repeatableProperty.[value of field0].field1")) controls: #default all set to true move: true remove: true add: true predefinedProperties: - label: Group label properties: field0: defaultValue: defalut value for index 0 field0 editorOptions: readonly: true field2: defaultValue: defalut value for index 0 field1 - properties: field0: defaultValue: defalut value for index 1 field0 - properties: field0: defaultValue: defalut value for index 2 field0 # ... properties: filed0: editorOptions: placeholder: 'default field editor' field1: type: 'Neos\Media\Domain\Model\ImageInterface' # type for property mapper label: 'Image field' editorOptions: placeholder: 'placeholder test' field2: editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor' label: 'Textarea editor' editorOptions: placeholder: 'test placeholder 2'
嵌套
在Fusion中,您可以通过路径 q(node).property('repetableProperty').field1
获取数据,因此您可以获取特定可重复字段的嵌套数据
v1.x.x 版本之间的重要变化
目前,当您想要升级到v2.x.x时,请注意您可能需要调整一些Fusion,因为对象类型字段有了更好的属性映射
问题
- 早期版本