修复bug
This commit is contained in:
@@ -1,26 +1,34 @@
|
||||
<template>
|
||||
<view class="Page">
|
||||
<view class="Header">
|
||||
<text class="Title">用户</text>
|
||||
<text class="SubTitle">user-management</text>
|
||||
</view>
|
||||
<AdminLayout :currentPage="currentPage">
|
||||
<view class="Page">
|
||||
<view class="Header">
|
||||
<text class="Title">用户</text>
|
||||
<text class="SubTitle">user-management</text>
|
||||
</view>
|
||||
|
||||
<view class="Card">
|
||||
<text class="Label">页面参数(query)</text>
|
||||
<text class="Mono">{{ params }}</text>
|
||||
<view class="Card">
|
||||
<text class="Label">页面参数(query)</text>
|
||||
<text class="Mono">{{ params }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
|
||||
const params = ref('')
|
||||
const currentPage = ref('user-list') // 默认
|
||||
|
||||
onLoad((options) => {
|
||||
// options: Record<string, any>
|
||||
params.value = JSON.stringify(options ?? {})
|
||||
onLoad((opts: Record<string, string>) => {
|
||||
const action = opts['action'] || ''
|
||||
if (action == 'group') currentPage.value = 'user-group'
|
||||
else if (action == 'tag') currentPage.value = 'user-tag'
|
||||
else if (action == 'level') currentPage.value = 'user-level'
|
||||
else if (action == 'config') currentPage.value = 'user-config'
|
||||
else currentPage.value = 'user-list'
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user