2023.02.15 Question collection

1. Solve the problem of Error in created hook: “TypeError: Cannot read properties of undefined (reading 'gutter’)”!

Use uni-col outer layer must have uni-row package
reference

2. 解决Duplicate keys detected: ‘0‘. This may cause an update error.

When using v-for traversal, the array subscript is used as the key, which can be placed in different divs.
That is, if two v-fors are included in the same dom node, two keys will appear, and these two keys are traversal indexes, so the values ​​of the two keys will be the same , which violates similar unique constraints in principle.

ps: A lot of information says that the reason is that the name of the key is repeated, which is nonsense.
refer to

3. Add a drop-down box (independent of each other and no repeated selection)

4. The display hide and flex box conflict

You can use flex directly to display the block

5. “TypeError: Cannot read properties of undefined (reading ‘xxx‘)“

  1. In the template syntax, some properties are undefined
    1. Most likely it's because you mistyped the attribute name
    2. Need to use v-if to judge !== undefined
  2. When asynchronously requesting to obtain data, since the data is obtained asynchronously, there is no such data attribute at the beginning, and this error will also be reported in this case.

Guess you like

Origin blog.csdn.net/kwroi/article/details/129047342