vue-amap icon indicating copy to clipboard operation
vue-amap copied to clipboard

信息窗体 template 方式报错

Open alinquan opened this issue 5 years ago • 3 comments

问题

信息窗体 template 方式报错

              <el-amap-info-window v-if="window" :position="window.position"
                                   :visible="window.visible"
                                   :template="window.template"></el-amap-info-window>
windows.push({
              position: [arr[0], arr[1]], 
              template: `<div class="prompt">
                              <p><strong>${locationList[i].pname}</strong></p>
                              <p>${locationList[i].address}</p>
                              <button @click="returnClick">查看详情</button>
                            </div>`,
              visible: false
            });

TypeError: o.a.compile is not a function
    at a (index.js:1)
    at VueComponent.template (index.js:1)
    at VueComponent.convertSignalProp (index.js:1)
    at index.js:1
    at Array.reduce (<anonymous>)
    at VueComponent.convertProps (index.js:1)
    at VueComponent.register (index.js:1)
    at VueComponent.mounted (index.js:1)
    at callHook (vue.runtime.esm.js:2917)
    at Object.insert (vue.runtime.esm.js:4154)

用content方式可以,但是@click事件无效

VueAMap 版本

0.5.8

OS/Browsers version

Vue 版本

2.5.17

复现地址

预期

实际

feature request

alinquan avatar Mar 14 '19 08:03 alinquan

@lq15521012174

你好,方便整体代码发一下吗?

AxeMea avatar Mar 28 '19 02:03 AxeMea

code.zip

@AxeMea 你好,我想自定义infowindow实现一些信息的显示,但我项目的当前环境运行示例代码的时候就会报错,请帮助解决,谢谢!

MeixiaZeng avatar Sep 26 '19 15:09 MeixiaZeng

同样的报错,有人知道咋回事嘛

herohql521 avatar Nov 26 '21 08:11 herohql521