Switch Vue components from class to object syntax
This commit is contained in:
parent
f0e1632510
commit
2f43f2e68e
|
|
@ -3,15 +3,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
import MainWindow from "./components/window/MainWindow.vue";
|
import MainWindow from "./components/window/MainWindow.vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
|
name: "App",
|
||||||
components: {
|
components: {
|
||||||
MainWindow,
|
MainWindow,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
export default class App extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -44,18 +44,14 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
import LayoutRow from "../layout/LayoutRow.vue";
|
|
||||||
import LayoutCol from "../layout/LayoutCol.vue";
|
|
||||||
import InputHint from "./InputHint.vue";
|
import InputHint from "./InputHint.vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
|
name: "FooterBar",
|
||||||
components: {
|
components: {
|
||||||
LayoutRow,
|
|
||||||
LayoutCol,
|
|
||||||
InputHint,
|
InputHint,
|
||||||
},
|
},
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class FooterBar extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
export enum MouseInputInteraction {
|
export enum MouseInputInteraction {
|
||||||
"None" = "None",
|
"None" = "None",
|
||||||
|
|
@ -69,14 +69,14 @@ export enum MouseInputInteraction {
|
||||||
"MMBDrag" = "MMBDrag",
|
"MMBDrag" = "MMBDrag",
|
||||||
}
|
}
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "InputHint",
|
||||||
props: {
|
props: {
|
||||||
inputKeys: { type: Array, default: [] },
|
inputKeys: { type: Array, default: () => [] },
|
||||||
inputMouse: { type: String },
|
inputMouse: { type: String },
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getMouseIconInnerSVG() {
|
getMouseIconInnerSVG(): string {
|
||||||
switch (this.inputMouse) {
|
switch (this.inputMouse) {
|
||||||
case MouseInputInteraction.None: return `
|
case MouseInputInteraction.None: return `
|
||||||
<path style="fill:#888888;" d="M9,7c0,0.55-0.45,1-1,1l0,0C7.45,8,7,7.55,7,7V4.5c0-0.55,0.45-1,1-1l0,0c0.55,0,1,0.45,1,1V7z" />
|
<path style="fill:#888888;" d="M9,7c0,0.55-0.45,1-1,1l0,0C7.45,8,7,7.55,7,7V4.5c0-0.55,0.45-1,1-1l0,0c0.55,0,1,0.45,1,1V7z" />
|
||||||
|
|
@ -140,6 +140,5 @@ export enum MouseInputInteraction {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
export default class InputHint extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -48,11 +48,9 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "FileMenu",
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class FileMenu extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -30,22 +30,17 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
import LayoutRow from "../layout/LayoutRow.vue";
|
|
||||||
import LayoutCol from "../layout/LayoutCol.vue";
|
|
||||||
import FileMenu from "./FileMenu.vue";
|
import FileMenu from "./FileMenu.vue";
|
||||||
import WindowTitle from "./WindowTitle.vue";
|
import WindowTitle from "./WindowTitle.vue";
|
||||||
import WindowButtons from "./WindowButtons.vue";
|
import WindowButtons from "./WindowButtons.vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
|
name: "HeaderBar",
|
||||||
components: {
|
components: {
|
||||||
LayoutRow,
|
|
||||||
LayoutCol,
|
|
||||||
FileMenu,
|
FileMenu,
|
||||||
WindowTitle,
|
WindowTitle,
|
||||||
WindowButtons,
|
WindowButtons,
|
||||||
},
|
},
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class HeaderBar extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,12 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "WindowButtons",
|
||||||
props: {
|
props: {
|
||||||
maximized: { type: Boolean, default: false },
|
maximized: { type: Boolean, default: false },
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
export default class WindowButtons extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,9 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "WindowTitle",
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class WindowTitle extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,9 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "LayoutCol",
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class LayoutCol extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,9 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "LayoutRow",
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class LayoutRow extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -131,16 +131,15 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
components: {},
|
name: "DockablePanel",
|
||||||
props: {
|
props: {
|
||||||
tabConstantWidths: { type: Boolean, default: false },
|
tabConstantWidths: { type: Boolean, default: false },
|
||||||
tabCloseButtons: { type: Boolean, default: false },
|
tabCloseButtons: { type: Boolean, default: false },
|
||||||
tabLabels: { type: Array, required: true },
|
tabLabels: { type: Array, required: true },
|
||||||
tabActiveIndex: { type: Number, required: true },
|
tabActiveIndex: { type: Number, required: true },
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
export default class DockablePanel extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -39,18 +39,17 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
import LayoutRow from "../layout/LayoutRow.vue";
|
import LayoutRow from "../layout/LayoutRow.vue";
|
||||||
import LayoutCol from "../layout/LayoutCol.vue";
|
import LayoutCol from "../layout/LayoutCol.vue";
|
||||||
import DockablePanel from "./DockablePanel.vue";
|
import DockablePanel from "./DockablePanel.vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
|
name: "PanelArea",
|
||||||
components: {
|
components: {
|
||||||
LayoutRow,
|
LayoutRow,
|
||||||
LayoutCol,
|
LayoutCol,
|
||||||
DockablePanel,
|
DockablePanel,
|
||||||
},
|
},
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class PanelArea extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,15 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Options, Vue } from "vue-class-component";
|
import { defineComponent } from "vue";
|
||||||
import LayoutRow from "../layout/LayoutRow.vue";
|
import LayoutRow from "../layout/LayoutRow.vue";
|
||||||
import LayoutCol from "../layout/LayoutCol.vue";
|
import LayoutCol from "../layout/LayoutCol.vue";
|
||||||
import HeaderBar from "../header/HeaderBar.vue";
|
import HeaderBar from "../header/HeaderBar.vue";
|
||||||
import PanelArea from "../panel-system/PanelArea.vue";
|
import PanelArea from "../panel-system/PanelArea.vue";
|
||||||
import FooterBar from "../footer/FooterBar.vue";
|
import FooterBar from "../footer/FooterBar.vue";
|
||||||
|
|
||||||
@Options({
|
export default defineComponent({
|
||||||
|
name: "MainWindow",
|
||||||
components: {
|
components: {
|
||||||
LayoutRow,
|
LayoutRow,
|
||||||
LayoutCol,
|
LayoutCol,
|
||||||
|
|
@ -49,7 +50,5 @@ import FooterBar from "../footer/FooterBar.vue";
|
||||||
PanelArea,
|
PanelArea,
|
||||||
FooterBar,
|
FooterBar,
|
||||||
},
|
},
|
||||||
props: {},
|
});
|
||||||
})
|
|
||||||
export default class MainWindow extends Vue {}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue