mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 20:08:41 -05:00
refactor(ui): Removed badge.count option from PluginApi
This commit is contained in:
@@ -11,7 +11,6 @@ const badgeSchema = createSchema(joi => ({
|
||||
id: joi.string().required(),
|
||||
type: joi.string(),
|
||||
label: joi.string().required(),
|
||||
count: joi.number().integer(),
|
||||
priority: joi.number().integer(),
|
||||
hidden: joi.boolean()
|
||||
}))
|
||||
|
||||
@@ -69,12 +69,12 @@ function addBadge ({ routeId, badge }, context) {
|
||||
const existingBadge = route.badges.find(b => b.id === badge.id)
|
||||
if (existingBadge) {
|
||||
Object.assign(existingBadge, badge, {
|
||||
count: existingBadge.count + (badge.count || 1)
|
||||
count: existingBadge.count + 1
|
||||
})
|
||||
} else {
|
||||
route.badges.push({
|
||||
type: 'dim',
|
||||
count: (badge.count || 1),
|
||||
count: 1,
|
||||
priority: 0,
|
||||
hidden: false,
|
||||
...badge
|
||||
|
||||
Reference in New Issue
Block a user