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

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

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

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

        函数事件(onChange)中的调用函数,来自在 Leaflet 和

        时间:2023-05-28
        • <bdo id='5LFPJ'></bdo><ul id='5LFPJ'></ul>

          <small id='5LFPJ'></small><noframes id='5LFPJ'>

          <tfoot id='5LFPJ'></tfoot>

            <tbody id='5LFPJ'></tbody>

          <legend id='5LFPJ'><style id='5LFPJ'><dir id='5LFPJ'><q id='5LFPJ'></q></dir></style></legend>

            1. <i id='5LFPJ'><tr id='5LFPJ'><dt id='5LFPJ'><q id='5LFPJ'><span id='5LFPJ'><b id='5LFPJ'><form id='5LFPJ'><ins id='5LFPJ'></ins><ul id='5LFPJ'></ul><sub id='5LFPJ'></sub></form><legend id='5LFPJ'></legend><bdo id='5LFPJ'><pre id='5LFPJ'><center id='5LFPJ'></center></pre></bdo></b><th id='5LFPJ'></th></span></q></dt></tr></i><div id='5LFPJ'><tfoot id='5LFPJ'></tfoot><dl id='5LFPJ'><fieldset id='5LFPJ'></fieldset></dl></div>
                1. 本文介绍了函数事件(onChange)中的调用函数,来自在 Leaflet 和 Vue.js 中创建的 Select的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在用 Vue.js 和 Leaflet 制作一个应用程序.在这个应用程序中,我在使用 L.DomUtil 创建的传单中选择了一个

                  I am making a app in Vue.js and Leaflet. In this app, I have a Select in leaflet created with L.DomUtil

                    this.select = L.DomUtil.create('select','leaflet-countryselect',this.div);
                  

                  我没有找到在这个选择"中放置v-on:change"的方法,所以,我必须在 Vue.js 的函数方法中调用一个事件函数.

                  I do not find the way for put 'v-on:change' in this 'Select', so, I have to call a event function, inside to a Function Method in Vue.js.

                   methods: {
                     firstFunction{
                     },
                     secondFunction() {
                        this.select.on('change', function(e){
                             this.firstFunction()
                        }
                     }
                   }
                  

                  但它不起作用,错误是this.firstFunction() is not a function"

                  But it not working, the error is "this.firstFunction() is not a function"

                  我试着放了

                     .../
                       var _self = this
                       _self.firstFunction()
                      ../
                  

                  但无论如何都不起作用.

                  But not working, anyway.

                  我该怎么做?谢谢.

                  推荐答案

                  你应该使用箭头函数 ()=>{...} 来访问组件实例 this如下:

                  You should use arrow function ()=>{...} to get access to the component instance this as follows :

                        secondFunction() {
                            this.select.on('change', (e)=>{
                              this.firstFunction()
                                }
                          }
                  

                  这篇关于函数事件(onChange)中的调用函数,来自在 Leaflet 和 Vue.js 中创建的 Select的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:空白地图图块 - 错误 410 消失(Mapbox 和 Leaflet JS) 下一篇:R 的传单:如何更改默认 CSS 集群类

                  相关文章

                  最新文章

                2. <legend id='ZH4Y5'><style id='ZH4Y5'><dir id='ZH4Y5'><q id='ZH4Y5'></q></dir></style></legend>

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

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