Separate client and server codes. Keep everything in one git repo for simplicity
[vchess.git] / client / src / components / TestComp.vue
CommitLineData
625022fd
BA
1<template>
2 <div class="test">
3 <h3>Ecosystem</h3>
4 <p>Test comp</p>
5 </div>
6</template>
7
8<script>
9export default {
10 name: "HelloWorld",
11 props: {
12 vname: String
13 },
14 created: async function() {
15 //console.log("@variants/" + this.vname + ".js");
16 // En fait "V" est une variable globale, donc juste "V = vModule.V;"
17 const vModule = await import("../variants/" + this.vname + ".js");
18 const V = vModule.V;
19 var instance = new V();
20 instance.show();
21 //import("/src/variants/" + this.vname + ".js")
22 // .then((V) => {
23 // console.log(V);
24 // });
25 },
26 methods: {
27 //...
28 },
29};
30</script>
31
32<!-- Add "scoped" attribute to limit CSS to this component only -->
33<style scoped lang="scss">
34h3 {
35 margin: 40px 0 0;
36}
37ul {
38 list-style-type: none;
39 padding: 0;
40}
41li {
42 display: inline-block;
43 margin: 0 10px;
44}
45a {
46 color: #42b983;
47}
48</style>