白色主题

This commit is contained in:
2023-02-12 19:04:01 +08:00
parent d736a5912f
commit 57ab6fbb49
411 changed files with 1752 additions and 5304 deletions

View File

@@ -1,5 +1,5 @@
const props = {
customStyle: {
style: {
type: String,
value: '',
},

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
import { LoadingProps } from '../loading/index';
export interface TdPullDownRefreshProps {
customStyle?: {
style?: {
type: StringConstructor;
value?: string;
};