We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 489ccb2 commit a95277cCopy full SHA for a95277c
src/packages/__VUE/avatar/index.taro.vue
@@ -127,8 +127,10 @@ export default create({
127
for (let i = 0; i < children.length; i++) {
128
children[i].setAttribute('data-index', i + 1);
129
}
130
- // state.index = avatarRef?.value?.dataset?.index;
131
- state.index = avatarRef?.value?.props['data-index'];
+
+ if (avatarRef?.value?.props) {
132
+ state.index = avatarRef?.value?.props['data-index'];
133
+ }
134
if (state.index == state.maxIndex && state.index != avatarGroup?.props?.maxCount) {
135
state.showMax = true;
136
0 commit comments