Compare commits

...

2 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -72,6 +72,7 @@ Each item in the `items` array represents a question with the following structur
allowBack: true, // Allow navigation to previous questions
allowAutoNext: true, // Auto-advance after selection for radio/scale
darkMode: false, // Visual theme
showItemIndex: true, // Show item index in the header
lang: 'en-US' // Language code
}
```
@ -113,7 +114,7 @@ When the questionnaire is completed, the component sends a message to the parent
Please refer to source code of demo files.
## For developers
## For Developers
To modify or build the component, simply follow the standard routine:

View File

@ -42,6 +42,7 @@ export default {
allowBack: true,
allowAutoNext: true,
darkMode: false,
showItemIndex: true,
lang: 'en-US',
},
lang,
@ -87,8 +88,8 @@ export default {
}
},
updateTitle() {
this.itemStatus.title = this.itemStatus.item ?
`${this.currentIdx + 1}. ${this.itemStatus.item.title}` : '';
const prefix = this.settings.showItemIndex ? `${this.currentIdx + 1}. ` : '';
this.itemStatus.title = this.itemStatus.item ? `${prefix}${this.itemStatus.item.title}` : '';
},
updateItem() {
this.itemStatus.item = this.items[this.currentIdx];