diff --git a/packages/ncform-common/src/ncform-utils.js b/packages/ncform-common/src/ncform-utils.js index 8c390dc..6cbfbe7 100755 --- a/packages/ncform-common/src/ncform-utils.js +++ b/packages/ncform-common/src/ncform-utils.js @@ -523,7 +523,7 @@ const ncformUtils = { break; case "number": case "integer": - defVal = undefined; // 数字默认值不好给,所以这里给undefined + defVal = ""; // 数字默认值不好给,所以这里给undefined break; case "boolean": defVal = false; diff --git a/packages/ncform-e2e/ncform/cypress/integration/examples/layoutWidgets.spec.js b/packages/ncform-e2e/ncform/cypress/integration/examples/layoutWidgets.spec.js index f7084ca..faf8e5e 100644 --- a/packages/ncform-e2e/ncform/cypress/integration/examples/layoutWidgets.spec.js +++ b/packages/ncform-e2e/ncform/cypress/integration/examples/layoutWidgets.spec.js @@ -140,4 +140,12 @@ context('Layout widgets', () => { }) }) + it('array: with number items', () => { + let id = md5('array: with number items'); + cy.get(`[data-cy=${id}]`).within(() => { + cy.get('legend').contains('user').as('userLegend'); + cy.get('@userLegend').parent().find('button').contains('Add').click(); + }) + }) + })