0
Follow
0
View

The tree selector component in the Ant Design Vue library cannot customize suffix ICONS

dengfangjian 注册会员
2023-02-28 13:26

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > according to provide you the code, you will is SmileOutlined components as suffixIcon attribute of tree selection components, This is the right thing to do. However, you mention that the suffix icon simply disappears, most likely due to incorrect replaceFields property values. The
-
tree selection component's replaceFields property is the property name of the node data from the definition tree. Depending on your code, you use {children: 'children', title: 'name', key: 'id', value: 'id'} as the value of the replaceFields property, but these property values may not match the property name of your tree data.
-
Make sure that your replaceFields property value correctly matches the property name of your tree data. For example, if the child node array name in your tree data is nodes instead of children, you should change the replaceFields property value to {children: 'nodes', title: 'name', key: 'id', value: 'id'}.
-
If your replaceFields property values are correct, it is recommended that you check that the SmileOutlined component is properly imported and ensure that it is not overwritten by other styles.