waibu-mpa 1.2.5 → 1.2.7
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/index.js +15 -0
- package/package.json +1 -1
- package/bajoTemplate/partial/address.html +0 -8
package/index.js
CHANGED
|
@@ -532,6 +532,21 @@ async function factory (pkgName) {
|
|
|
532
532
|
})
|
|
533
533
|
return result
|
|
534
534
|
}
|
|
535
|
+
|
|
536
|
+
getMenuPages = (menu, path, subPath) => {
|
|
537
|
+
const { get, filter, isFunction } = this.lib._
|
|
538
|
+
const all = get(menu, 'pages', [])
|
|
539
|
+
if (!path) return all
|
|
540
|
+
const pages = filter(all, a => {
|
|
541
|
+
return a.children && (a.title === path || a.href === path)
|
|
542
|
+
})
|
|
543
|
+
if (!isFunction(subPath)) {
|
|
544
|
+
return filter(pages, p => {
|
|
545
|
+
return p.title === subPath || p.href === subPath
|
|
546
|
+
})
|
|
547
|
+
}
|
|
548
|
+
return subPath(pages, subPath)
|
|
549
|
+
}
|
|
535
550
|
}
|
|
536
551
|
}
|
|
537
552
|
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<% const type = attr.type ?? 'site' %>
|
|
2
|
-
<address>
|
|
3
|
-
<c:strong><%= type === 'user' ? (_meta[type].firstName + ' ' + _meta[type].lastName) : _meta[type].orgName %></c:strong><br />
|
|
4
|
-
<%= _meta[type].address1 %><br/>
|
|
5
|
-
<%= _meta[type].address2 %><br />
|
|
6
|
-
<c:span><%= _meta[type].city %> <%= _meta[type].zipCode %> - <%= _meta[type].provinceState %></c:span><br />
|
|
7
|
-
<%= _meta[type].countryName %><br />
|
|
8
|
-
</address>
|