I am attempting to integrate external components into Vue Typescript Class Components. Following the installation of the standard template, I made modifications to its <script>
block based on this guide:
import { Vue, Component, Prop } from "vue-property-decorator";
@Component
export default class App extends Vue {
msg: string = "Hello";
}
However, I encountered an error message:
No known component for element RadSideDrawer
.
In an attempt to resolve this issue, I also tried adding RadSideDrawer
to the @Component
options without success:
import { Vue, Component, Prop } from "vue-property-decorator";
const RadSideDrawer = require('nativescript-ui-sidedrawer').RadSideDrawer;
@Component({
components: {
RadSideDrawer,
}
})
export default class App extends Vue {
msg: string = "Hello";
}
You can find all my component code here. No changes were made to other sections of the template, so I have these lines in main.ts
:
Vue.registerElement(
'RadSideDrawer',
() => require('nativescript-ui-sidedrawer').RadSideDrawer,
);
Despite this setup, the integration is not functioning as expected. How can I successfully use RadSideDrawer with class components?