1. <tfoot id='sY7cH'></tfoot>

    <legend id='sY7cH'><style id='sY7cH'><dir id='sY7cH'><q id='sY7cH'></q></dir></style></legend>

    • <bdo id='sY7cH'></bdo><ul id='sY7cH'></ul>

  2. <i id='sY7cH'><tr id='sY7cH'><dt id='sY7cH'><q id='sY7cH'><span id='sY7cH'><b id='sY7cH'><form id='sY7cH'><ins id='sY7cH'></ins><ul id='sY7cH'></ul><sub id='sY7cH'></sub></form><legend id='sY7cH'></legend><bdo id='sY7cH'><pre id='sY7cH'><center id='sY7cH'></center></pre></bdo></b><th id='sY7cH'></th></span></q></dt></tr></i><div id='sY7cH'><tfoot id='sY7cH'></tfoot><dl id='sY7cH'><fieldset id='sY7cH'></fieldset></dl></div>

    <small id='sY7cH'></small><noframes id='sY7cH'>

      您可以在玉中引用带有破折号的变量吗?

      时间:2023-09-06

          <tfoot id='JubHF'></tfoot>
          <i id='JubHF'><tr id='JubHF'><dt id='JubHF'><q id='JubHF'><span id='JubHF'><b id='JubHF'><form id='JubHF'><ins id='JubHF'></ins><ul id='JubHF'></ul><sub id='JubHF'></sub></form><legend id='JubHF'></legend><bdo id='JubHF'><pre id='JubHF'><center id='JubHF'></center></pre></bdo></b><th id='JubHF'></th></span></q></dt></tr></i><div id='JubHF'><tfoot id='JubHF'></tfoot><dl id='JubHF'><fieldset id='JubHF'></fieldset></dl></div>

          <small id='JubHF'></small><noframes id='JubHF'>

            <tbody id='JubHF'></tbody>
        1. <legend id='JubHF'><style id='JubHF'><dir id='JubHF'><q id='JubHF'></q></dir></style></legend>

            • <bdo id='JubHF'></bdo><ul id='JubHF'></ul>

              • 本文介绍了您可以在玉中引用带有破折号的变量吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试在我的翡翠模板中做这样的事情

                I'm trying to do something like this in my jade template

                a.apply-url(href="#{apply-url}")
                

                但它被解释为应用减去 url"

                But it's being interpreted as 'apply minus url'

                有没有办法强制解释器做正确的事情?或者有什么方法可以引用顶级对象,并将索引放在引号中,像这样?

                Is there a way I can force the interpreter to do the right thing? Or is there some way to refer to a top-level object, and put the index in quotes, like this?

                a.apply-url(href="#{this['apply-url']}")
                

                推荐答案

                我对 Jade 不是很熟悉,但我之前研究过一点.在 here 玩了一段时间后,我能够让它工作:

                I'm not all that familiar with Jade, but I have looked into it a little bit before. After playing around a while here, I was able to get this to work:

                a.apply-url(href="#{locals['apply-url']}")
                

                {"apply-url": "foo"}
                

                产生:

                <a href="foo" class="apply-url"></a>
                

                这是可行的,因为这个特定的实现将数据存储在名为 locals 的局部变量中,然后由模板函数关闭.据我所知,这是一个实现细节,我不一定期望它在其他 Jade 实现中也能工作.

                This works because this particular implementation stores the data in a local variable named locals which is then closed over by the templating function. As far as I can tell, this is an implementation detail, and I wouldn't necessarily expect this to work in other Jade implementations.

                这篇关于您可以在玉中引用带有破折号的变量吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:Vuetify外部分页不显示页码 下一篇:如何让背景覆盖一个单独的div?

                相关文章

              • <small id='jElus'></small><noframes id='jElus'>

                <i id='jElus'><tr id='jElus'><dt id='jElus'><q id='jElus'><span id='jElus'><b id='jElus'><form id='jElus'><ins id='jElus'></ins><ul id='jElus'></ul><sub id='jElus'></sub></form><legend id='jElus'></legend><bdo id='jElus'><pre id='jElus'><center id='jElus'></center></pre></bdo></b><th id='jElus'></th></span></q></dt></tr></i><div id='jElus'><tfoot id='jElus'></tfoot><dl id='jElus'><fieldset id='jElus'></fieldset></dl></div>

              • <tfoot id='jElus'></tfoot>
                  <bdo id='jElus'></bdo><ul id='jElus'></ul>
                  <legend id='jElus'><style id='jElus'><dir id='jElus'><q id='jElus'></q></dir></style></legend>