added emits
This commit is contained in:
@@ -47,7 +47,7 @@ export default buildComponent({
|
|||||||
mappedProps: props,
|
mappedProps: props,
|
||||||
name: 'polygon',
|
name: 'polygon',
|
||||||
ctr: () => google.maps.Polygon,
|
ctr: () => google.maps.Polygon,
|
||||||
|
emits: events,
|
||||||
beforeCreate(options) {
|
beforeCreate(options) {
|
||||||
if (!options.path) delete options.path
|
if (!options.path) delete options.path
|
||||||
if (!options.paths) delete options.paths
|
if (!options.paths) delete options.paths
|
||||||
@@ -55,6 +55,12 @@ export default buildComponent({
|
|||||||
|
|
||||||
afterCreate(inst) {
|
afterCreate(inst) {
|
||||||
let clearEvents = () => {}
|
let clearEvents = () => {}
|
||||||
|
|
||||||
|
events.forEach((event)=> {
|
||||||
|
inst.addListener(event, (payload)=> {
|
||||||
|
this.$emit(event, payload)
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
// Watch paths, on our own, because we do not want to set either when it is
|
// Watch paths, on our own, because we do not want to set either when it is
|
||||||
// empty
|
// empty
|
||||||
|
|||||||
Reference in New Issue
Block a user