早安开发人员...我试图使用已经通过获取获取的信息动态填充数据表,该信息先前存储在vuex实例中的变量中,现在在我的applet中称为计算属性,它说:
<script>
import { mapActions, mapGetters } from "vuex";
export default {
name: "Games",
data() {
return {
search: "",
headers:[
{text:'Game#', value:'Game#'},
{text:'Players in Game',value:'Players inGame'},
{text:'Permissions',value:'Permissions'},
{text:'Results',value:'Results'},
],
};
},
components: {
},
props: ["gameid"],
methods: {
...mapActions(["fetchingJsonEvents", "joinToGame","logOut", "createGame"]),
},
computed: {
...mapGetters(["getGamesAll", "getUserLogged"]),
getGamesAll(){
return this.$store.getters.getGamesAll.games-------->here is where the json is stored
}
},
created() {
this.fetchingJsonEvents();
}
};
</script>
和我的html标记(称为计算所得)以及其他所有内容如下:
<v-data-table :search="search" :headers="headers" v-bind:items="getGamesAll">
<template>
<tbody>
<tr v-for="(general, index) in getGamesAll.games" v-bind:key="index">
<td>Game {{general.id}}:</td>
<td>xxxxxxxx</td>
<td>xxxxxxxx</td>
</tbody>
</template>
</v-data-table>
但是该表未显示任何结果,它与v-simple-table一起工作,但是一旦我尝试以这种方式进行操作,它就不会...。 任何建议.....提前谢谢
答案 0 :(得分:0)
这是不必要的:
xquery version "3.0";
declare namespace office="urn:oasis:names:tc:opendocument:xmlns:text:1.0";
<ul>
{
for $line in db:open("people")//text()
return
if (matches($line, "[0-9]"))
then <ul>{$line}</ul>
else <li>{$line}</li>
}
</ul>
因为您已经使用getGamesAll(){
return this.$store.getters.getGamesAll.games
}
了:
mapGetters
如果您的吸气剂...mapGetters(["getGamesAll", "getUserLogged"]),
有数据,那么这应该可以正常工作:
getGamesAll