-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
<%_(page.plugins||[]).forEach(function(item){ _%> | ||
<%_if (typeof item == "string") { _%> | ||
<%- partial( item + "/index") %> | ||
<%_}else if(typeof item == "object"){ _%> | ||
<%- partial( Object.keys(item)[0] + "/index", { pagePlugin:item }) %> | ||
<%_} _%> | ||
<%_ }) _%> | ||
<%_ | ||
(page.plugins||[]).forEach(function(item){ | ||
try { | ||
if (typeof item == "string") { _%> | ||
<%- partial( item + "/index") %> | ||
<%_ }else if(typeof item == "object"){ _%> | ||
<%- partial( Object.keys(item)[0] + "/index", { pagePlugin:item }) %> | ||
<%_ } | ||
} catch (error) { | ||
// error friendly | ||
console.log(` | ||
=============================================================================== | ||
没有找到页面插件:${item} | ||
请检查是否存在该插件,或者检查插件名称是否正确:${item} | ||
出问题的页面:${page.path} | ||
see: https://volantis.js.org/v5/page-settings/#页面插件-page-plugins | ||
================================================================================ | ||
There is no page plugin: ${item} | ||
Please check if the plugin exists, or check the plugin name is correct: ${item} | ||
The page that has problem: ${page.path} | ||
see: https://volantis.js.org/v5/page-settings/#页面插件-page-plugins | ||
=================================================================================`); | ||
} | ||
}) | ||
_%> |