白色主题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const props = {
|
||||
customStyle: {
|
||||
style: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
import { SuperComponent, RelationsOptions } from '../common/src/index';
|
||||
export default class PullDownRefresh extends SuperComponent {
|
||||
pixelRatio: number;
|
||||
startPoint: {
|
||||
@@ -14,6 +14,7 @@ export default class PullDownRefresh extends SuperComponent {
|
||||
options: {
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
relations: RelationsOptions;
|
||||
properties: import("./type").TdPullDownRefreshProps;
|
||||
data: {
|
||||
prefix: string;
|
||||
|
||||
@@ -23,6 +23,11 @@ let PullDownRefresh = class PullDownRefresh extends SuperComponent {
|
||||
this.options = {
|
||||
multipleSlots: true,
|
||||
};
|
||||
this.relations = {
|
||||
'../back-top/back-top': {
|
||||
type: 'descendant',
|
||||
},
|
||||
};
|
||||
this.properties = props;
|
||||
this.data = {
|
||||
prefix,
|
||||
@@ -81,9 +86,11 @@ let PullDownRefresh = class PullDownRefresh extends SuperComponent {
|
||||
});
|
||||
},
|
||||
onScroll(e) {
|
||||
const { scrollTop } = e.detail;
|
||||
this.setData({
|
||||
enableToRefresh: e.detail.scrollTop === 0,
|
||||
enableToRefresh: scrollTop === 0,
|
||||
});
|
||||
this.triggerEvent('scroll', { scrollTop });
|
||||
},
|
||||
onTouchStart(e) {
|
||||
if (this.isPulling || !this.data.enableToRefresh)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<scroll-view
|
||||
style="{{ customStyle }}"
|
||||
style="{{ style }}"
|
||||
class="{{classPrefix}} {{prefix}}-class"
|
||||
scroll-top="{{scrollTop}}"
|
||||
bind:touchstart="onTouchStart"
|
||||
@@ -16,7 +16,7 @@
|
||||
>
|
||||
<view
|
||||
class="{{classPrefix}}__track {{classPrefix + '__track--' + (loosing ? 'loosing' : '')}}"
|
||||
style="transform: translate3d(0, {{barHeight + 'rpx'}}, 0);"
|
||||
style="{{barHeight > 0 ? 'transform: translate3d(0, ' + barHeight + 'rpx, 0);' : ''}}"
|
||||
>
|
||||
<view class="{{classPrefix}}__tips" style="height: {{computedLoadingBarHeight}}rpx">
|
||||
<t-loading
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LoadingProps } from '../loading/index';
|
||||
export interface TdPullDownRefreshProps {
|
||||
customStyle?: {
|
||||
style?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user