feat: 商品规格功能调整

This commit is contained in:
duan
2025-02-21 14:41:43 +08:00
parent dc5f664143
commit 43ae9f371d
17 changed files with 954 additions and 140 deletions

View File

@@ -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);

View File

@@ -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,