update: keep users state
This commit is contained in:
@@ -39,6 +39,7 @@ const routes = [
|
||||
name: 'Users',
|
||||
component: UsersView,
|
||||
meta: {
|
||||
keepAlive: true,
|
||||
showInNav: true,
|
||||
navName: '使用者列表'
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script setup>
|
||||
import CreateForm from '../components/CreateUser/CreateForm.vue';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onActivated, ref } from 'vue';
|
||||
|
||||
const users = ref([]);
|
||||
|
||||
onMounted(async () => {
|
||||
onActivated(async () => {
|
||||
const response = await fetch('/api/users');
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user