Client now running. Toward fully 1-page (with filters for variants)
[vchess.git] / client / next_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 // });
03470390
BA
25 //console.log(this.$variants);
26
27 // TODO: components which need to access user.name and user.id should
28 // import a module with a function to get this from localStorage (or anonymous)
625022fd
BA
29 },
30 methods: {
31 //...
32 },
33};
34</script>
35
36<!-- Add "scoped" attribute to limit CSS to this component only -->
37<style scoped lang="scss">
38h3 {
39 margin: 40px 0 0;
40}
41ul {
42 list-style-type: none;
43 padding: 0;
44}
45li {
46 display: inline-block;
47 margin: 0 10px;
48}
49a {
50 color: #42b983;
51}
52</style>