mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
恢复注释
This commit is contained in:
@@ -80,68 +80,68 @@ export function useBoeApiPage(_url, params = {}, config = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// export function useBoeApi(_url, params = {}, config = {
|
export function useBoeApi(_url, params = {}, config = {
|
||||||
// init: true,
|
init: true,
|
||||||
// result: res => res.result,
|
result: res => res.result,
|
||||||
// }) {
|
}) {
|
||||||
//
|
|
||||||
// const state = reactive({
|
|
||||||
// data: [],
|
|
||||||
// loading: false,
|
|
||||||
// });
|
|
||||||
// watch(() => params, () => {
|
|
||||||
// fetch();
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// function fetch() {
|
|
||||||
// state.loading = true;
|
|
||||||
// return boeRequest(_url, params).then(r => {
|
|
||||||
// state.data = config.result(r);
|
|
||||||
// state.loading = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// config.init && fetch();
|
|
||||||
// return {
|
|
||||||
// ...toRefs(state),
|
|
||||||
// fetch,
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export function useBoeUserListPage(_url, params = {}, init = true) {
|
const state = reactive({
|
||||||
//
|
data: [],
|
||||||
// const state = reactive({
|
loading: false,
|
||||||
// data: [],
|
});
|
||||||
// loading: false,
|
watch(() => params, () => {
|
||||||
// total: 0,
|
fetch();
|
||||||
// totalPage: 0,
|
});
|
||||||
// page: 1,
|
|
||||||
// ...params
|
function fetch() {
|
||||||
// });
|
state.loading = true;
|
||||||
//
|
return boeRequest(_url, params).then(r => {
|
||||||
// watch(() => params.keyword, throttle(fetch, 600));
|
state.data = config.result(r);
|
||||||
// watch(() => params.page, fetch);
|
state.loading = false;
|
||||||
//
|
});
|
||||||
// function fetch() {
|
}
|
||||||
// state.loading = true;
|
|
||||||
// if (!params.keyword) {
|
config.init && fetch();
|
||||||
// state.loading = false;
|
return {
|
||||||
// return;
|
...toRefs(state),
|
||||||
// }
|
fetch,
|
||||||
// return boeRequest(_url, params).then(r => {
|
};
|
||||||
// state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList];
|
}
|
||||||
// state.totalPage = r.result.totalPage;
|
|
||||||
// state.total = r.result.totalElement;
|
export function useBoeUserListPage(_url, params = {}, init = true) {
|
||||||
// state.loading = false;
|
|
||||||
// });
|
const state = reactive({
|
||||||
// }
|
data: [],
|
||||||
//
|
loading: false,
|
||||||
// init && fetch();
|
total: 0,
|
||||||
// return {
|
totalPage: 0,
|
||||||
// ...toRefs(state),
|
page: 1,
|
||||||
// fetch,
|
...params
|
||||||
// };
|
});
|
||||||
// }
|
|
||||||
|
watch(() => params.keyword, throttle(fetch, 600));
|
||||||
|
watch(() => params.page, fetch);
|
||||||
|
|
||||||
|
function fetch() {
|
||||||
|
state.loading = true;
|
||||||
|
if (!params.keyword) {
|
||||||
|
state.loading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return boeRequest(_url, params).then(r => {
|
||||||
|
state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList];
|
||||||
|
state.totalPage = r.result.totalPage;
|
||||||
|
state.total = r.result.totalElement;
|
||||||
|
state.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
init && fetch();
|
||||||
|
return {
|
||||||
|
...toRefs(state),
|
||||||
|
fetch,
|
||||||
|
};
|
||||||
|
}
|
||||||
export function useNewRowsPageNoInit(_url, params) {
|
export function useNewRowsPageNoInit(_url, params) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user