Why not add attributes on the server side? Don’t put too much pressure on the front end. If this attribute is only for front-end display, it can be operated without adding the attribute. {{You can write your operation logic for xy here, try not to add attributes here}}. For example, if you want to add a new value of x-y, you can write it like this: {{item.x - item.y}}
I usually traverse the
items
,给每一项加x_y
attributes.The performance is so poor, others must have a better way.
Why not add attributes on the server side? Don’t put too much pressure on the front end. If this attribute is only for front-end display, it can be operated without adding the attribute. {{You can write your operation logic for xy here, try not to add attributes here}}. For example, if you want to add a new value of x-y, you can write it like this:
{{item.x - item.y}}
Add attributes to controller