feat: 商品规格功能调整
This commit is contained in:
@@ -798,6 +798,8 @@ function fetchPageData(formData: IObject = {}, isRestart = false) {
|
||||
if (isRestart) {
|
||||
pagination.currentPage = 1;
|
||||
}
|
||||
console.log(props, 'debug1')
|
||||
console.log(props.contentConfig, 'debug2')
|
||||
props.contentConfig
|
||||
.indexAction(
|
||||
showPagination
|
||||
@@ -809,6 +811,7 @@ function fetchPageData(formData: IObject = {}, isRestart = false) {
|
||||
: formData
|
||||
)
|
||||
.then((data) => {
|
||||
|
||||
if (showPagination) {
|
||||
if (props.contentConfig.parseData) {
|
||||
data = props.contentConfig.parseData(data);
|
||||
|
||||
@@ -3,7 +3,9 @@ import type { IObject, PageContentInstance, PageModalInstance, PageSearchInstanc
|
||||
|
||||
function usePage() {
|
||||
const searchRef = ref<PageSearchInstance>();
|
||||
const searchRefs = ref<PageSearchInstance>();
|
||||
const contentRef = ref<PageContentInstance>();
|
||||
const contentRefs = ref<PageContentInstance>();
|
||||
const addModalRef = ref<PageModalInstance>();
|
||||
const editModalRef = ref<PageModalInstance>();
|
||||
// 搜索
|
||||
@@ -11,6 +13,11 @@ function usePage() {
|
||||
const filterParams = contentRef.value?.getFilterParams();
|
||||
contentRef.value?.fetchPageData({ ...queryParams, ...filterParams }, true);
|
||||
}
|
||||
// 搜索2
|
||||
function searchs(queryParams: IObject) {
|
||||
const filterParams = contentRefs.value?.getFilterParams();
|
||||
contentRefs.value?.fetchPageData({ ...queryParams, ...filterParams }, true);
|
||||
}
|
||||
// 重置
|
||||
function handleResetClick(queryParams: IObject) {
|
||||
const filterParams = contentRef.value?.getFilterParams();
|
||||
@@ -50,10 +57,13 @@ function usePage() {
|
||||
|
||||
return {
|
||||
searchRef,
|
||||
searchRefs,
|
||||
contentRef,
|
||||
contentRefs,
|
||||
addModalRef,
|
||||
editModalRef,
|
||||
handleQueryClick,
|
||||
searchs,
|
||||
handleResetClick,
|
||||
handleAddClick,
|
||||
handleEditClick,
|
||||
|
||||
Reference in New Issue
Block a user