-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] - ability to consolidate all @name under single table #1
Comments
Just for some feedback, I am currently looking into your request here. May take some time but will be done as soon as I am able. |
Can you please provide me with a full file / test repo? I need to see exactly how you are documenting these getters. /**
* The module 'getters' object.
* @name Getters
* @type {object}
* @getter {array} getCheckedRolesCount=arrayProp Returns a number.
* @getter {array} getCheckedRoles=arrayProp Returns an array property.
*/
getter: {
getCheckedRoles: (state) => (view) => {
console.log(`getCheckedRoles was returned: {view: ${view}}`)
return state.filtersInfo[view].checkedRoles
},
getCheckedRolesCount: (state) => (view) => {
console.log(`getCheckedRolesCount was returned: {view: ${view}}`)
return state.filtersInfo[view].checkedRolesCount
}
} |
Hey @martiensk unfortunately I cannot, its a private repo :/ However, what I pasted above is how I documented them, which gave me the two table results. In order for me to get a single table I need to add them all together. Here is an example from my **
* The module 'setters' object.
* @name Mutations
* @type {object}
* @mutator {array} setCheckedRoles=filtersInfo[view].checkedRoles Sets the checkedRoles array property.
* @mutator {number} setCheckedRolesCount=filtersInfo[view].checkedRolesCount Sets the checkedRolesCount number property.
* @mutator {object} setContactInfo=trending.providers[view].contactInfo Sets the contactInfo object property.
* @mutator {object} setDocsInfo=trending.providers[id].docsInfo Sets the docsInfo object property.
* @mutator {array} setFiltersInfo=filtersInfo[view].roles Sets the roles array property.
*/ EDIT:ah, I see. You are using getters as an object. I am using Nuxt, so my getters/actions/mutations are name spaced via the file names in a dir. so my **
* The module 'setters' object.
* @name Mutations
* @type {object}
* @mutator {array} setCheckedRoles=filtersInfo[view].checkedRoles Sets the checkedRoles array property.
* @mutator {number} setCheckedRolesCount=filtersInfo[view].checkedRolesCount Sets the checkedRolesCount number property.
**
export default {
setCheckedRoles(state, { checkedRoles, view }) {
// setting state.filters.checkedRoles
state.filtersInfo[view].checkedRoles = checkedRoles
console.log('setCheckedRoles complete')
},
setCheckedRolesCount(state, { checkedRoles, view }) {
let count = 0
checkedRoles.forEach((role) => {
state[view].providers.filter((provider) => {
if (provider.filterRole.toLowerCase() === role) {
count++
}
})
})
state.filtersInfo[view].checkedRolesCount = count
console.log('setCheckedRolesCount complete')
},
} where as I would like to use your module with the documentation block above each function declaration like so: export default {
**
* The module 'setters' object.
* @name Mutations
* @type {object}
* @mutator {array} setCheckedRoles=filtersInfo[view].checkedRoles Sets the checkedRoles array property.
**
setCheckedRoles(state, { checkedRoles, view }) {
// setting state.filters.checkedRoles
state.filtersInfo[view].checkedRoles = checkedRoles
console.log('setCheckedRoles complete')
},
**
* The module 'setters' object.
* @name Mutations
* @type {object}
* @mutator {number} setCheckedRolesCount=filtersInfo[view].checkedRolesCount Sets the checkedRolesCount number property.
**
setCheckedRolesCount(state, { checkedRoles, view }) {
let count = 0
checkedRoles.forEach((role) => {
state[view].providers.filter((provider) => {
if (provider.filterRole.toLowerCase() === role) {
count++
}
})
})
state.filtersInfo[view].checkedRolesCount = count
console.log('setCheckedRolesCount complete')
},
} |
The above example is great, I will see what I can do to adapt the plugin for your use case. |
Great work, and thanks a lot for this! I have been using vuese.org for the components.
I was wondering if possible to have multiple codeblocks all be generated under a single table.
e.g.
Currently with the above, I get two blocks in the
out/index.html
file, where as I would prefer to have all my getter documentation under one big getter table in theout/index.html
file.The text was updated successfully, but these errors were encountered: