|
@@ -7,7 +7,7 @@ import { TableProBar } from "../../ReTable";
|
|
|
import { onBeforeRouteLeave } from "vue-router";
|
|
|
import { useColumns } from "./hooks/use-columns";
|
|
|
import { useActions } from "./hooks/use-actions";
|
|
|
-import { useRequeset } from "./hooks/use-request";
|
|
|
+import { useRequest } from "./hooks/use-request";
|
|
|
import { useSelection } from "./hooks/use-selection";
|
|
|
import { useRenderIcon } from "../../ReIcon/src/hooks";
|
|
|
import { createActionProps } from "./utils/create-operation";
|
|
@@ -28,7 +28,9 @@ import {
|
|
|
|
|
|
const PageContent = defineComponent({
|
|
|
name: "PageContent",
|
|
|
+
|
|
|
props: pageContentProps,
|
|
|
+
|
|
|
emits: [
|
|
|
"createBtnClick",
|
|
|
"updateBtnClick",
|
|
@@ -53,7 +55,7 @@ const PageContent = defineComponent({
|
|
|
getPagination,
|
|
|
onBeforeAction,
|
|
|
paginationConfig
|
|
|
- } = useRequeset(props);
|
|
|
+ } = useRequest(props);
|
|
|
|
|
|
const { selects } = useSelection();
|
|
|
const { action } = useActions(props.contentConfig);
|
|
@@ -85,13 +87,12 @@ const PageContent = defineComponent({
|
|
|
showPreview,
|
|
|
showPayTagFn,
|
|
|
showReturnTagFn,
|
|
|
- isRequesetArray,
|
|
|
+ isRequestArray,
|
|
|
superUserNoAction,
|
|
|
superUserNoPerview,
|
|
|
} = contentConfig;
|
|
|
|
|
|
const view = showPreview ? showPreview(row) : true;
|
|
|
-
|
|
|
const del = showDelete ? showDelete(row) : true;
|
|
|
|
|
|
const noAction =
|
|
@@ -101,7 +102,7 @@ const PageContent = defineComponent({
|
|
|
(superUserNoPerview && !isSuperUser.value) || !superUserNoPerview;
|
|
|
|
|
|
const showPay = showPayTagFn ? showPayTagFn(row, powers) : true;
|
|
|
- const showRerturn = showReturnTagFn ? showReturnTagFn(row, powers) : true;
|
|
|
+ const showReturn = showReturnTagFn ? showReturnTagFn(row, powers) : true;
|
|
|
|
|
|
const _showStatus = showStatus
|
|
|
? showStatus(isSuperUser.value)
|
|
@@ -121,7 +122,7 @@ const PageContent = defineComponent({
|
|
|
|
|
|
{slots.custom && slots.custom(row)}
|
|
|
|
|
|
- {returnProps && noAction && showRerturn && (
|
|
|
+ {returnProps && noAction && showReturn && (
|
|
|
<Operation.Tag
|
|
|
row={row}
|
|
|
tagProps={returnProps}
|
|
@@ -151,7 +152,7 @@ const PageContent = defineComponent({
|
|
|
prop={contentConfig.statusProp}
|
|
|
statusRowProp={contentConfig.statusRowProp}
|
|
|
onReload={() => onSearch()}
|
|
|
- isRequesetArray={isRequesetArray}
|
|
|
+ isRequestArray={isRequestArray}
|
|
|
{...createActionProps("status", apis)}
|
|
|
/>
|
|
|
)}
|
|
@@ -216,7 +217,7 @@ const PageContent = defineComponent({
|
|
|
|
|
|
const renderExpand = (row) => slots.expand && slots.expand(row)
|
|
|
|
|
|
- function renderFilterColumnns() {
|
|
|
+ function renderFilterColumns() {
|
|
|
return (
|
|
|
<div class="filter-columns__content">
|
|
|
<div class="filter-columns_reset">
|
|
@@ -292,9 +293,7 @@ const PageContent = defineComponent({
|
|
|
data={dataList.value}
|
|
|
checkList={checkList}
|
|
|
maxHeight={ maxHeight ? maxHeight : '660px'}
|
|
|
- paginationSmall={
|
|
|
- size === "small" ? true : false
|
|
|
- }
|
|
|
+ paginationSmall={size === "small" ? true : false}
|
|
|
rowClassName={tableRowClassName}
|
|
|
headerCellStyle={{ background: "#fafafa", color: "#606266" }}
|
|
|
onSelectionChange={handleSelection}
|
|
@@ -321,7 +320,7 @@ const PageContent = defineComponent({
|
|
|
|
|
|
return (
|
|
|
<TableProBar
|
|
|
- tableRef={tableRef.value?.getTableRef()}
|
|
|
+ tableRef={(tableRef.value as any)?.getTableRef()}
|
|
|
title={title}
|
|
|
showTitle={showTitle}
|
|
|
dataList={dataList.value}
|
|
@@ -330,7 +329,7 @@ const PageContent = defineComponent({
|
|
|
custom
|
|
|
v-slots={{
|
|
|
buttons: () => renderButtons(),
|
|
|
- toolbar: () => renderFilterColumnns(),
|
|
|
+ toolbar: () => renderFilterColumns(),
|
|
|
default: ({ size, checkList }) => renderPureTable(size, checkList)
|
|
|
}}
|
|
|
/>
|