mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2026-04-05 15:47:23 +08:00
fix(projects): 🐛 fix unexpected re-assignment of const variable
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { reactive } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
||||||
import { enableStatusRecord } from '@/constants/business';
|
import { enableStatusRecord } from '@/constants/business';
|
||||||
import { fetchGetRoleList } from '@/service/api';
|
import { fetchGetRoleList } from '@/service/api';
|
||||||
@@ -11,7 +11,7 @@ import RoleSearch from './modules/role-search.vue';
|
|||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
const searchParams: Api.SystemManage.RoleSearchParams = reactive({
|
const searchParams = ref<Api.SystemManage.RoleSearchParams>({
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
roleName: null,
|
roleName: null,
|
||||||
@@ -20,11 +20,11 @@ const searchParams: Api.SystemManage.RoleSearchParams = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagination } = useNaivePaginatedTable({
|
const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagination } = useNaivePaginatedTable({
|
||||||
api: () => fetchGetRoleList(searchParams),
|
api: () => fetchGetRoleList(searchParams.value),
|
||||||
transform: response => defaultTransform(response),
|
transform: response => defaultTransform(response),
|
||||||
onPaginationParamsChange: params => {
|
onPaginationParamsChange: params => {
|
||||||
searchParams.current = params.page;
|
searchParams.value.current = params.page;
|
||||||
searchParams.size = params.pageSize;
|
searchParams.value.size = params.pageSize;
|
||||||
},
|
},
|
||||||
columns: () => [
|
columns: () => [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { reactive } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
import { NButton, NPopconfirm, NTag } from 'naive-ui';
|
||||||
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
|
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
|
||||||
import { fetchGetUserList } from '@/service/api';
|
import { fetchGetUserList } from '@/service/api';
|
||||||
@@ -11,7 +11,7 @@ import UserSearch from './modules/user-search.vue';
|
|||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
const searchParams: Api.SystemManage.UserSearchParams = reactive({
|
const searchParams = ref<Api.SystemManage.UserSearchParams>({
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
status: null,
|
status: null,
|
||||||
@@ -23,11 +23,11 @@ const searchParams: Api.SystemManage.UserSearchParams = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination } = useNaivePaginatedTable({
|
const { columns, columnChecks, data, getData, getDataByPage, loading, mobilePagination } = useNaivePaginatedTable({
|
||||||
api: () => fetchGetUserList(searchParams),
|
api: () => fetchGetUserList(searchParams.value),
|
||||||
transform: response => defaultTransform(response),
|
transform: response => defaultTransform(response),
|
||||||
onPaginationParamsChange: params => {
|
onPaginationParamsChange: params => {
|
||||||
searchParams.current = params.page;
|
searchParams.value.current = params.page;
|
||||||
searchParams.size = params.pageSize;
|
searchParams.value.size = params.pageSize;
|
||||||
},
|
},
|
||||||
columns: () => [
|
columns: () => [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user