waibu-bootstrap 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-bootstrap",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Bootstrap suport for Waibu Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,6 +10,7 @@ function bcHandler (href, source, opts = {}) {
10
10
  }
11
11
 
12
12
  async function generateItems (breadcrumb) {
13
+ const { get } = this.plugin.app.bajo.lib._
13
14
  const html = []
14
15
  for (const b of breadcrumb) {
15
16
  let href = ''
@@ -20,7 +21,7 @@ async function generateItems (breadcrumb) {
20
21
  }
21
22
  }
22
23
  const icon = b.icon ? (' icon="' + b.icon + '"') : ''
23
- const title = b.href && b.hrefRebuild && !this.component.locals._meta.this.params.model ? this.component.locals.page.title : b.content
24
+ const title = b.href && b.hrefRebuild && !get(this, 'component.locals._meta.params.model') ? this.component.locals.page.title : b.content
24
25
  const content = b.content ? (' t:content="' + title + '"') : ''
25
26
  const active = b.href ? ' active' : ''
26
27
  html.push(`<c:breadcrumb-item ${icon} ${href} ${content} ${active} />`)