Questions about (three) vue encountered in project form

3.table table to achieve different rendering of a post according to the previous one data content.

As shown, the one type and are used in the enumeration, i.e., 01, 02 are returned directly to the rear end of the string class. Before rendering backend will first get a request form to obtain content corresponding enumeration value.

In this page, if the former is a basic type, need to display the maximum capacity or maximum demand, if the price of electricity is to be displayed corresponding to the number kv. That needs to send a request in accordance with a different value of the previous column.

But the enumeration values ​​are unique, that is, an element can be bound to an enumeration value. So I have no way to send two different requests to enumerate the contents of the previous column.

So I changed the idea of ​​enumerating request voltage levels in the return value first. Because each element can be bound to an enumerated value and the capacity demand enumeration value is a value corresponding to only 01, 02 and does not become fixed,

So instead of using ternary expression enumeration requests, and finally assign them to a new property. When rendering direct rendering new properties on it.

(Enumeration request is written directly on Public method here is not to capture the enumeration return value if the element is bound to be priceType return value is priceTypeName)

The return value here only voltageClass this value, voltageClassName after the request is the result of an enumeration.

 

Guess you like

Origin www.cnblogs.com/9852zl/p/10929134.html