undefinedfix
Sign in

The dialog box in element uses calculated properties

Lynax edited in Sun, 05 Jun 2022

This is the dialog box of element. The requirement is that when users click the drop-down box to select, they input the number of sheets to be issued, and I want to calculate the total price of face value and the total price of unit price. Now the problem is that the drop-down box of face value / unit price is spliced into the style of 2 / 2, so when users click to select, the change event is triggered to get the string of "2 / 2" selected by users, Then split ("/") into an array to get the face value and unit price, and use the calculation property. However, the calculation property will be calculated as soon as it enters the page, but at this time, the face value and unit price are empty arrays, and there is no value, so the error is reported, and all kinds of gods ask for advice! Or is there any other way to solve it

1 Replies
dinara_pulseway
commented on Sun, 05 Jun 2022

If (true) {} operation when defining a variable calculation in data

lock This question has been locked and the reply function has been disabled.