Commit 72c64c7a authored by Michael Underwood's avatar Michael Underwood
Browse files

Define props `as const`, use `defineComponent` everywhere

parent 220c6fbd
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
<script lang="ts">
import type L from "leaflet";
import { onMounted, ref, inject, nextTick, markRaw } from "vue";
import {
  onMounted,
  ref,
  inject,
  nextTick,
  markRaw,
  defineComponent,
} from "vue";
import {
  remapEvents,
  propsBinder,
@@ -17,7 +24,7 @@ import {
/**
 * Circle component, lets you add and personalize circles on the map
 */
export default {
export default defineComponent({
  name: "LCircle",
  props: circleProps,
  setup(props, context) {
@@ -55,5 +62,5 @@ export default {
  render() {
    return render(this.ready, this.$slots);
  },
};
});
</script>
+10 −3
Original line number Diff line number Diff line
<script lang="ts">
import type L from "leaflet";
import { onMounted, ref, inject, nextTick, markRaw } from "vue";
import {
  onMounted,
  ref,
  inject,
  nextTick,
  markRaw,
  defineComponent,
} from "vue";
import {
  remapEvents,
  propsBinder,
@@ -20,7 +27,7 @@ import {
/**
 * Circle Marker component, lets you add and personalize circle markers on the map
 */
export default {
export default defineComponent({
  name: "LCircleMarker",
  props: circleMarkerProps,
  setup(props, context) {
@@ -64,5 +71,5 @@ export default {
  render() {
    return render(this.ready, this.$slots);
  },
};
});
</script>
+10 −3
Original line number Diff line number Diff line
<script lang="ts">
import type L from "leaflet";
import { onMounted, ref, inject, markRaw, nextTick } from "vue";
import {
  onMounted,
  ref,
  inject,
  markRaw,
  nextTick,
  defineComponent,
} from "vue";
import { controlProps, setupControl, render } from "@src/functions/control";
import { propsBinder, WINDOW_OR_GLOBAL, assertInject } from "@src/utils.js";
import {
@@ -8,7 +15,7 @@ import {
  UseGlobalLeafletInjection,
} from "@src/types/injectionKeys";

export default {
export default defineComponent({
  name: "LControl",
  props: {
    ...controlProps,
@@ -61,5 +68,5 @@ export default {
  render() {
    return render(this.$slots);
  },
};
});
</script>
+10 −3
Original line number Diff line number Diff line
<script lang="ts">
import type L from "leaflet";
import { onMounted, ref, inject, nextTick, markRaw } from "vue";
import {
  onMounted,
  ref,
  inject,
  nextTick,
  markRaw,
  defineComponent,
} from "vue";
import {
  controlAttributionProps,
  setupControlAttribution,
@@ -11,7 +18,7 @@ import {
  UseGlobalLeafletInjection,
} from "@src/types/injectionKeys";

export default {
export default defineComponent({
  name: "LControlAttribution",
  props: controlAttributionProps,
  setup(props, context) {
@@ -40,5 +47,5 @@ export default {
  render() {
    return null;
  },
};
});
</script>
+10 −3
Original line number Diff line number Diff line
<script lang="ts">
import type L from "leaflet";
import { onMounted, ref, inject, nextTick, markRaw } from "vue";
import {
  onMounted,
  ref,
  inject,
  nextTick,
  markRaw,
  defineComponent,
} from "vue";
import {
  controlLayersProps,
  setupControlLayers,
@@ -11,7 +18,7 @@ import {
  UseGlobalLeafletInjection,
} from "@src/types/injectionKeys";

export default {
export default defineComponent({
  name: "LControlLayers",
  props: controlLayersProps,
  setup(props, context) {
@@ -46,5 +53,5 @@ export default {
  render() {
    return null;
  },
};
});
</script>
Loading