merge-dev
This commit is contained in:
commit
4ebadd4c98
|
|
@ -1,4 +1,4 @@
|
|||
import { AggregationResult, EntityDict, OperationResult, OpRecord, SelectOption } from 'oak-domain/lib/types/Entity';
|
||||
import { AggregationResult, EntityDict, OperateOption, OperationResult, OpRecord, SelectOption } from 'oak-domain/lib/types/Entity';
|
||||
import { StorageSchema } from "oak-domain/lib/types/Storage";
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
||||
import { Checker, CheckerType, TxnOption } from 'oak-domain/lib/types';
|
||||
|
|
@ -10,6 +10,7 @@ export declare class CacheStore<ED extends EntityDict & BaseEntityDict, Cxt exte
|
|||
private resetInitialDataFn?;
|
||||
constructor(storageSchema: StorageSchema<ED>, getFullDataFn?: () => any, resetInitialDataFn?: () => void);
|
||||
aggregate<T extends keyof ED, OP extends SelectOption>(entity: T, aggregation: ED[T]['Aggregation'], context: SyncContext<ED>, option: OP): AggregationResult<ED[T]['Schema']>;
|
||||
protected cascadeUpdate<T extends keyof ED, OP extends OperateOption>(entity: T, operation: ED[T]['Operation'], context: SyncContext<ED>, option: OP): OperationResult<ED>;
|
||||
operate<T extends keyof ED, OP extends TreeStoreOperateOption>(entity: T, operation: ED[T]['Operation'], context: Cxt, option: OP): OperationResult<ED>;
|
||||
sync<Cxt extends SyncContext<ED>>(opRecords: Array<OpRecord<ED>>, context: Cxt): void;
|
||||
check<T extends keyof ED>(entity: T, operation: Omit<ED[T]['Operation'], 'id'>, context: Cxt, checkerTypes?: CheckerType[]): void;
|
||||
|
|
|
|||
|
|
@ -18,17 +18,22 @@ var CacheStore = /** @class */ (function (_super) {
|
|||
CacheStore.prototype.aggregate = function (entity, aggregation, context, option) {
|
||||
return this.aggregateSync(entity, aggregation, context, option);
|
||||
};
|
||||
CacheStore.prototype.operate = function (entity, operation, context, option) {
|
||||
CacheStore.prototype.cascadeUpdate = function (entity, operation, context, option) {
|
||||
(0, assert_1.default)(context.getCurrentTxnId());
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context, 'before');
|
||||
}
|
||||
var result = _super.prototype.operateSync.call(this, entity, operation, context, option);
|
||||
var result = _super.prototype.cascadeUpdate.call(this, entity, operation, context, option);
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context, 'after');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
CacheStore.prototype.operate = function (entity, operation, context, option) {
|
||||
(0, assert_1.default)(context.getCurrentTxnId());
|
||||
var result = _super.prototype.operateSync.call(this, entity, operation, context, option);
|
||||
return result;
|
||||
};
|
||||
CacheStore.prototype.sync = function (opRecords, context) {
|
||||
var autoCommit = !context.getCurrentTxnId();
|
||||
if (autoCommit) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ var utils_1 = require("./utils");
|
|||
var refAttr_1 = tslib_1.__importDefault(require("../refAttr"));
|
||||
function Render(props) {
|
||||
var _a = props.data, entity = _a.entity, column = _a.column, oakFullpath = _a.oakFullpath, viewType = _a.viewType, options = _a.options, attrI18n = _a.attrI18n, entityI18n = _a.entityI18n, isCommonI18n = _a.isCommonI18n;
|
||||
var _b = props.methods, t = _b.t, addNamedFilter = _b.addNamedFilter, removeNamedFilterByName = _b.removeNamedFilterByName, refresh = _b.refresh, getNamedFilter = _b.getNamedFilter, setFilterAndResetFilter = _b.setFilterAndResetFilter;
|
||||
var _b = props.methods, t = _b.t, getNamedFilter = _b.getNamedFilter, setFilterAndResetFilter = _b.setFilterAndResetFilter;
|
||||
var name = (0, utils_1.getFilterName)(column);
|
||||
var filter = getNamedFilter(name);
|
||||
var op = column.op, attr = column.attr, placeholder = column.placeholder, _label = column.label;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
.titleView {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.iconBox {
|
||||
margin-block: 0;
|
||||
margin-inline: 4px;
|
||||
color: rgba(42, 46, 54, 0.88);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.iconBox:hover {
|
||||
color: var(--oak-color-primary);
|
||||
}
|
||||
.listItem {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.listItemView {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 132px;
|
||||
transition: all 0.3s;
|
||||
.listItemTitle {
|
||||
flex: 1;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.listIconView {
|
||||
display: none;
|
||||
margin-left: 4px;
|
||||
align-items: center;
|
||||
.listIcon {
|
||||
color: var(--oak-color-primary);
|
||||
margin-inline: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.listItemView:hover .listIconView {
|
||||
display: flex;
|
||||
}
|
||||
|
|
@ -8,20 +8,9 @@
|
|||
<block wx:if="{{mobileData && mobileData.length}}">
|
||||
<view class="list-container">
|
||||
<view class="card" wx:for="{{mobileData}}" wx:key="index">
|
||||
<view class="title-view">
|
||||
<view class="title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="state-view">
|
||||
<view class="badge {{item.state.color}}"></view>
|
||||
<view>
|
||||
{{item.state.value}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{item.rows && item.rows.length > 0}}">
|
||||
<block wx:if="{{item.data && item.data.length > 0}}">
|
||||
<view class="card-content">
|
||||
<block wx:for="{{item.rows}}" wx:for-item="row" wx:key="index">
|
||||
<block wx:for="{{item.data}}" wx:for-item="row" wx:key="index">
|
||||
<view class="text-view">
|
||||
<text class="label">{{row.label}}</text>
|
||||
<text>{{row.value}}</text>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
.textView {
|
||||
margin-block: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
.text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<block wx:if="{{value === '' || value === undefined || value === null}}">
|
||||
<view class="text">--</view>
|
||||
</block>
|
||||
<block wx:if="{{type === image}}">
|
||||
<block wx:if="{{value.length}}">
|
||||
<block wx:for="{{value}}">
|
||||
<image src="{{item}}" style="width: 100px;height: 60px" mode="aspectFit" />
|
||||
</block>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<image src="{{value}}" style="width: 100px;height: 60px" mode="aspectFit" />
|
||||
</block>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="text">{{value}}</view>
|
||||
</block>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
.toolbarContainer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-block: 16px;
|
||||
padding-inline: 0;
|
||||
}
|
||||
.reloadIconBox {
|
||||
margin-block: 0;
|
||||
margin-inline: 4px;
|
||||
color: rgba(42, 46, 54, 0.88);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.reloadIconBox:hover {
|
||||
color: var(--oak-color-primary);
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
color: rgba(42, 46, 54, 0.88);
|
||||
font-weight: bolder;
|
||||
padding-left: 10px;
|
||||
font-size: var(--oak-font-size-title-large);
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
.container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
.listContainer {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@ export declare class Port<ED extends EntityDict & BaseEntityDict, Cxt extends As
|
|||
opRecords?: import("oak-domain/lib/types").OpRecord<ED>[] | undefined;
|
||||
message?: string | null | undefined;
|
||||
}>;
|
||||
exportEntity<T extends keyof ED>(entity: T, id: string, filter?: ED[T]['Selection']['filter']): Promise<{
|
||||
exportEntity<T extends keyof ED>(entity: T, id: string, filter?: ED[T]['Selection']['filter'], properties?: Record<string, any>): Promise<{
|
||||
result: Awaited<ReturnType<AD["exportEntity"]>>;
|
||||
opRecords?: import("oak-domain/lib/types").OpRecord<ED>[] | undefined;
|
||||
message?: string | null | undefined;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ var Port = /** @class */ (function (_super) {
|
|||
formData.set('option', JSON.stringify(option));
|
||||
return this.aspectWrapper.exec('importEntity', formData);
|
||||
};
|
||||
Port.prototype.exportEntity = function (entity, id, filter) {
|
||||
return this.aspectWrapper.exec('exportEntity', { entity: entity, id: id, filter: filter });
|
||||
Port.prototype.exportEntity = function (entity, id, filter, properties) {
|
||||
return this.aspectWrapper.exec('exportEntity', { entity: entity, id: id, filter: filter, properties: properties });
|
||||
};
|
||||
Port.prototype.getImportationTemplate = function (id) {
|
||||
return this.aspectWrapper.exec('getImportationTemplate', { id: id });
|
||||
|
|
|
|||
|
|
@ -1260,7 +1260,7 @@ var SingleNode = /** @class */ (function (_super) {
|
|||
_this.aggr = aggr && aggr[0];
|
||||
_this.setFiltersAndSortedApplied();
|
||||
_this.setLoading(false);
|
||||
_this.clean();
|
||||
//this.clean();
|
||||
})];
|
||||
case 2:
|
||||
_a = tslib_1.__read.apply(void 0, [(_b.sent()).data, 1]), value = _a[0];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
.oak-pull-to-refresh-content {
|
||||
height: 100%;
|
||||
transform-origin: left top 0px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-content-wrapper {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-transition {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-indicator {
|
||||
color: grey;
|
||||
text-align: center;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-down .oak-pull-to-refresh-indicator {
|
||||
margin-top: -25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-up .oak-pull-to-refresh-indicator {
|
||||
margin-bottom: -25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-content-wrapper .oak-pull-to-refresh-content>:nth-child(2) {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import 'rmc-pull-to-refresh/assets/index.css';
|
||||
import './PullToRefresh.css';
|
||||
declare const OakPullToRefresh: React.FC<any>;
|
||||
export default OakPullToRefresh;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var rmc_pull_to_refresh_1 = tslib_1.__importDefault(require("rmc-pull-to-refresh"));
|
||||
require("rmc-pull-to-refresh/assets/index.css");
|
||||
require("./PullToRefresh.css");
|
||||
var OakPullToRefresh = function (props) {
|
||||
return ((0, jsx_runtime_1.jsx)(rmc_pull_to_refresh_1.default, tslib_1.__assign({}, props)));
|
||||
return (0, jsx_runtime_1.jsx)(rmc_pull_to_refresh_1.default, tslib_1.__assign({}, props, { prefixCls: "oak-pull-to-refresh" }));
|
||||
};
|
||||
exports.default = OakPullToRefresh;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = tslib_1.__importDefault(require("react"));
|
||||
// @ts-ignore
|
||||
var react_router_dom_1 = require("react-router-dom");
|
||||
var react_i18next_1 = require("react-i18next");
|
||||
var responsive_1 = require("./../responsive");
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@
|
|||
"copy-xml": "copyfiles -u 1 src/**/*.xml lib/ & copyfiles -u 1 src/**/*.wxml lib/",
|
||||
"build": "tsc && npm run copy-js && npm run copy-less && npm run copy-wxs && npm run copy-svg && npm run copy-xml",
|
||||
"test": "ts-node ./test/test2.ts",
|
||||
"prepare": "rimraf node_modules/react & rimraf node_modules/react-dom & rimraf node_modules/react-router & rimraf node_modules/react-router-dom"
|
||||
"prepare": "rimraf node_modules/react & rimraf node_modules/react-dom & rimraf node_modules/react-router & rimraf node_modules/react-router-dom",
|
||||
"remove-antd": "rimraf node_modules/antd & rimraf node_modules/antd-mobile & rimraf node_modules/@ant-design & rimraf node_modules/antd-mobile-icons & rimraf node_modules/antd-mobile-v5-count"
|
||||
},
|
||||
"main": "lib/index"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { AggregationResult, EntityDict, OperationResult, OpRecord, SelectOption } from 'oak-domain/lib/types/Entity';
|
||||
import { AggregationResult, EntityDict, OperateOption, OperationResult, OpRecord, SelectOption } from 'oak-domain/lib/types/Entity';
|
||||
import { StorageSchema } from "oak-domain/lib/types/Storage";
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/base-app-domain';
|
||||
import { Checker, CheckerType, TxnOption } from 'oak-domain/lib/types';
|
||||
|
|
@ -32,6 +32,20 @@ export class CacheStore<
|
|||
return this.aggregateSync(entity, aggregation, context, option);
|
||||
}
|
||||
|
||||
protected cascadeUpdate<T extends keyof ED, OP extends OperateOption>(entity: T, operation: ED[T]['Operation'], context: SyncContext<ED>, option: OP): OperationResult<ED> {
|
||||
assert(context.getCurrentTxnId());
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context as Cxt, 'before');
|
||||
}
|
||||
const result = super.cascadeUpdate(entity, operation, context, option);
|
||||
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context as Cxt, 'after');
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
operate<T extends keyof ED, OP extends TreeStoreOperateOption>(
|
||||
entity: T,
|
||||
operation: ED[T]['Operation'],
|
||||
|
|
@ -39,14 +53,7 @@ export class CacheStore<
|
|||
option: OP
|
||||
): OperationResult<ED> {
|
||||
assert(context.getCurrentTxnId());
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context, 'before');
|
||||
}
|
||||
const result = super.operateSync(entity, operation, context, option);
|
||||
if (!option.blockTrigger) {
|
||||
this.checkerExecutor.check(entity, operation, context, 'after');
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ import { SyncContext } from 'oak-domain/lib/store/SyncRowStore';
|
|||
import { translateCheckerInSyncContext } from 'oak-domain/lib/store/checker';
|
||||
import { checkFilterRepel } from 'oak-domain/lib/store/filter';
|
||||
|
||||
export default class CheckerExecutor<ED extends EntityDict & BaseEntityDict,Cxt extends SyncContext<ED>> {
|
||||
export default class CheckerExecutor<ED extends EntityDict & BaseEntityDict, Cxt extends SyncContext<ED>> {
|
||||
static All_Checker_Types: CheckerType[] = ['data', 'logical', 'logicalRelation', 'relation', 'row'];
|
||||
private checkerMap: {
|
||||
[K in keyof ED]?: {
|
||||
[A: string]: Array<{
|
||||
priority: number;
|
||||
fn: (operation: Omit<ED[K]['Operation'], 'id'>, context: Cxt, option: SelectOption | OperateOption) => void;
|
||||
fn: (operation: Omit<ED[K]['Operation'], 'id'>, context: SyncContext<ED>, option: SelectOption | OperateOption) => void;
|
||||
type: CheckerType;
|
||||
when: 'before' | 'after';
|
||||
filter?: ED[K]['Update']['filter'] | ((operation: Omit<ED[K]['Operation'], 'id'>, context: Cxt, option: SelectOption | OperateOption) => ED[K]['Update']['filter']);
|
||||
filter?: ED[K]['Update']['filter'] | ((operation: Omit<ED[K]['Operation'], 'id'>, context: SyncContext<ED>, option: SelectOption | OperateOption) => ED[K]['Update']['filter']);
|
||||
}>;
|
||||
};
|
||||
} = {};
|
||||
|
|
@ -42,7 +42,7 @@ export default class CheckerExecutor<ED extends EntityDict & BaseEntityDict,Cxt
|
|||
checkers.splice(iter, 0, {
|
||||
type,
|
||||
priority: priority!,
|
||||
fn: fn as (operation: Omit<ED[T]['Operation'], 'id'>, context: Cxt, option: OperateOption | SelectOption) => void,
|
||||
fn: fn as (operation: Omit<ED[T]['Operation'], 'id'>, context: SyncContext<ED>, option: OperateOption | SelectOption) => void,
|
||||
when,
|
||||
filter: conditionalFilter,
|
||||
});
|
||||
|
|
@ -101,7 +101,7 @@ export default class CheckerExecutor<ED extends EntityDict & BaseEntityDict,Cxt
|
|||
if (filter) {
|
||||
const filterr = typeof filter === 'function' ? filter(operation, context, {}) : filter;
|
||||
assert(!(filter instanceof Promise), `对${entity as string}的动作${action}上定义的checker,其filter返回了Promise,请注意将同步和异步的返回区分对待`);
|
||||
const isRepel = checkFilterRepel<ED, T, Cxt>(entity, context, filterr, operation.filter, true);
|
||||
const isRepel = checkFilterRepel<ED, T, SyncContext<ED>>(entity, context, filterr, operation.filter, true);
|
||||
assert(typeof isRepel === 'boolean');
|
||||
if (isRepel) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -74,9 +74,6 @@ export default function Render<ED2 extends ED>(
|
|||
} = props.data;
|
||||
const {
|
||||
t,
|
||||
addNamedFilter,
|
||||
removeNamedFilterByName,
|
||||
refresh,
|
||||
getNamedFilter,
|
||||
setFilterAndResetFilter,
|
||||
} = props.methods;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ export class Port<
|
|||
return this.aspectWrapper.exec('importEntity', formData);
|
||||
}
|
||||
|
||||
exportEntity<T extends keyof ED>(entity: T, id: string, filter?: ED[T]['Selection']['filter']) {
|
||||
return this.aspectWrapper.exec('exportEntity', { entity, id, filter });
|
||||
exportEntity<T extends keyof ED>(entity: T, id: string, filter?: ED[T]['Selection']['filter'], properties?: Record<string, any>) {
|
||||
return this.aspectWrapper.exec('exportEntity', { entity, id, filter, properties });
|
||||
}
|
||||
|
||||
getImportationTemplate<T extends keyof ED>(id: string) {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class ListNode<
|
|||
Cxt extends AsyncContext<ED>,
|
||||
FrontCxt extends SyncContext<ED>,
|
||||
AD extends CommonAspectDict<ED, Cxt>
|
||||
> extends Node<ED, T, Cxt, FrontCxt, AD> {
|
||||
> extends Node<ED, T, Cxt, FrontCxt, AD> {
|
||||
private children: Record<string, SingleNode<ED, T, Cxt, FrontCxt, AD>>;
|
||||
private updates: Record<
|
||||
string,
|
||||
|
|
@ -1337,7 +1337,7 @@ class SingleNode<ED extends EntityDict & BaseEntityDict,
|
|||
this.aggr = aggr && aggr[0];
|
||||
this.setFiltersAndSortedApplied();
|
||||
this.setLoading(false);
|
||||
this.clean();
|
||||
//this.clean();
|
||||
});
|
||||
this.publish();
|
||||
}
|
||||
|
|
@ -1507,7 +1507,7 @@ class VirtualNode<
|
|||
Cxt extends AsyncContext<ED>,
|
||||
FrontCxt extends SyncContext<ED>,
|
||||
AD extends CommonAspectDict<ED, Cxt>
|
||||
> extends Feature {
|
||||
> extends Feature {
|
||||
private dirty: boolean;
|
||||
private executing: boolean;
|
||||
private loading = false;
|
||||
|
|
@ -1693,7 +1693,7 @@ export class RunningTree<
|
|||
Cxt extends AsyncContext<ED>,
|
||||
FrontCxt extends SyncContext<ED>,
|
||||
AD extends CommonAspectDict<ED, Cxt>
|
||||
> extends Feature {
|
||||
> extends Feature {
|
||||
private cache: Cache<ED, Cxt, FrontCxt, AD>;
|
||||
private schema: StorageSchema<ED>;
|
||||
private root: Record<
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
.oak-pull-to-refresh-content {
|
||||
height: 100%;
|
||||
transform-origin: left top 0px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-content-wrapper {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-transition {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-indicator {
|
||||
color: grey;
|
||||
text-align: center;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-down .oak-pull-to-refresh-indicator {
|
||||
margin-top: -25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-up .oak-pull-to-refresh-indicator {
|
||||
margin-bottom: -25px;
|
||||
}
|
||||
|
||||
.oak-pull-to-refresh-content-wrapper .oak-pull-to-refresh-content>:nth-child(2) {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
import React from 'react';
|
||||
import PullToRefresh from 'rmc-pull-to-refresh';
|
||||
import 'rmc-pull-to-refresh/assets/index.css';
|
||||
import './PullToRefresh.css';
|
||||
|
||||
|
||||
const OakPullToRefresh: React.FC<any> = (props) => {
|
||||
return (
|
||||
<PullToRefresh {...props} />
|
||||
);
|
||||
return <PullToRefresh {...props} prefixCls="oak-pull-to-refresh" />;
|
||||
};
|
||||
|
||||
export default OakPullToRefresh;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
// @ts-ignore
|
||||
import { useNavigate, useLocation, useParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useWidth } from './../responsive';
|
||||
|
|
|
|||
Loading…
Reference in New Issue