我剛開始弄亂 form.io 并且有點卡住了。我正在嘗試在數(shù)據(jù)網(wǎng)格的每一行中創(chuàng)建一些條件。例如,如果選擇了等于“payIn”的單選按鈕,則同一行中應(yīng)出現(xiàn)另一個字段。我可以通過將數(shù)組編號分配給組件的 JSON 來靜態(tài)地做到這一點,但這顯然不能解決動態(tài)工作的問題(這只是用來測試邏輯,因為它總是指向第一行)。我可以做什么/使用什么來使這個邏輯在數(shù)據(jù)網(wǎng)格中的每一行中獨立工作?{"label": "Pay In Reason","widget": "choicesjs","hidden": true,"tableView": true,"data": { "values": [ { "label": "Employee", "value": "employee" }, { "label": "Bank", "value": "bank" } ], "json": "", "url": "", "resource": "", "custom": ""},"selectThreshold": 0.3,"key": "payInReason","conditional": { "show": true, "when": "dataGrid[0].payInOut", "eq": "payIn"},"type": "select","indexeddb": { "filter": {}},"input": true,"placeholder": "","prefix": "","customClass": "","suffix": "","multiple": false,"defaultValue": null,"protected": false,"unique": false,"persistent": true,"clearOnHide": true,"refreshOn": "","redrawOn": "","modalEdit": false,"labelPosition": "top","description": "","errorLabel": "","tooltip": "","hideLabel": false,"tabindex": "","disabled": false,"autofocus": false,"dbIndex": false,"customDefaultValue": "","calculateValue": "","calculateServer": false,"attributes": {},"validateOn": "change","validate": { "required": false, "custom": "", "customPrivate": false, "strictDateValidation": false, "multiple": false, "unique": false},"overlay": { "style": "", "left": "", "top": "", "width": "", "height": ""},"allowCalculateOverride": false,"encrypted": false,"showCharCount": false,"showWordCount": false,"properties": {},"allowMultipleMasks": false,"clearOnRefresh": false,"limit": 100,"dataSrc": "values","valueProperty": "","lazyLoad": true,"filter": "","searchEnabled": true,"searchField": "","minSearch": 0,"readOnlyValue": false,"authenticate": false,"template": "<span>{{ item.label }}</span>","selectFields": "","searchThreshold": 0.3,"uniqueOptions": false,"fuseOptions": { "include": "score", "threshold": 0.3},"customOptions": {},"id": "eas39m"}謝謝你的幫助!
在數(shù)據(jù)網(wǎng)格中的 form.io 中使用條件
吃雞游戲
2022-12-22 11:56:59