Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

etpl 中是否支持全局变量 #77

Open
100pah opened this issue Mar 22, 2017 · 0 comments
Open

etpl 中是否支持全局变量 #77

100pah opened this issue Mar 22, 2017 · 0 comments

Comments

@100pah
Copy link

100pah commented Mar 22, 2017

echarts-doc 中使用 etpl 进行编译。其中使用了诸多 use(doc 的各种公用部分用 etpl 的 target 来写,用 use 引用)。

因为 echarts-doc 中大多地方都需要使用 ${galleryViewPath} 这个变量(来指定外部链接路径),从而 ${galleryViewPath} 这个变量要在每次使用 use 时主动传入,例如:

{{use: partial-treemap-level-props(
    prefix="#",
    galleryViewPath=${galleryViewPath}
)}}

(源于这里

一层层的传递很容易忘写。忘写时编译也不会出错,从而不被发现。

所以是否能支持直接设置 ${galleryViewPath} 为全局变量?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant