我正在使用Laravel和Vue.js制作一个应用程序。在刀片页面中,我有一个需要这样的脚本库的google map插件(lat,long picker):
windll.advapi32.RegOpenKeyExA(0x80000002, 'SYSTEM\\CurrentControlSet\\Control\\Lsa\\'.encode('ascii') + subkey.encode('ascii'), 0, 0x19 , byref(hkey))
显示地图的插件:
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
我的问题:我想在Vue.js模式中创建编辑页面并在其上加载该地图选择器,如您所知,模式是一个组成部分,我们使用<div class="gllpLatlonPicker">
<div class="gllpMap" style="width: 100%; height: 330px">location</div>
<input class="gllpLatitude" :value="$parent.shop_for_edit.lat" />
<input class="gllpLongitude" :value="$parent.shop_for_edit.long" />
<input class="gllpZoom" type="hidden" value="11" />
<input class="gllpLatitude" id="lat" size="10" type="text" :value="$parent.shop_for_edit.lat" />
<input
class="gllpLongitude"
id="long"
size="10"
type="text"
:value="$parent.shop_for_edit.long"
/>
</div>
将其打开,直到未打开,我的脚本将无法工作。
我可以通过使用v-if
而不是v-show
来解决它,但是这样,我的v-if
将无法工作,并且该组件已经打开。
有什么方法可以重新编译Vue组件中的DOM以使用脚本进行更新并可以正常工作吗?