mature忘了call.this

This commit is contained in:
Xu Chang 2025-02-10 13:43:59 +08:00
parent 42b7600e51
commit fcab7b6c75
6 changed files with 18 additions and 18 deletions

View File

@ -487,7 +487,7 @@ const oakBehavior = Behavior({
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature.call(this);
}
else {
this.reRender();
@ -650,7 +650,7 @@ export function createComponent(option, features) {
await (onPullDownRefresh
? onPullDownRefresh.call(this)
: this.refresh());
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
this.setState({
oakPullDownRefreshLoading: false,
});
@ -767,7 +767,7 @@ export function createComponent(option, features) {
default: {
assert(behavior === 'refresh');
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
return;
}
}
@ -794,7 +794,7 @@ export function createComponent(option, features) {
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
try {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
catch (err) {
if (err instanceof OakException) {

View File

@ -648,7 +648,7 @@ export function createComponent(option, features) {
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();
@ -707,7 +707,7 @@ export function createComponent(option, features) {
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();

View File

@ -490,7 +490,7 @@ const oakBehavior = Behavior({
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature.call(this);
}
else {
this.reRender();
@ -653,7 +653,7 @@ function createComponent(option, features) {
await (onPullDownRefresh
? onPullDownRefresh.call(this)
: this.refresh());
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
this.setState({
oakPullDownRefreshLoading: false,
});
@ -770,7 +770,7 @@ function createComponent(option, features) {
default: {
(0, assert_1.assert)(behavior === 'refresh');
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
return;
}
}
@ -797,7 +797,7 @@ function createComponent(option, features) {
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
try {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
catch (err) {
if (err instanceof types_1.OakException) {

View File

@ -653,7 +653,7 @@ function createComponent(option, features) {
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();
@ -712,7 +712,7 @@ function createComponent(option, features) {
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();

View File

@ -711,7 +711,7 @@ const oakBehavior = Behavior<
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature();
this.oakOption.lifetimes?.mature && this.oakOption.lifetimes.mature.call(this);
} else {
this.reRender();
}
@ -969,7 +969,7 @@ export function createComponent<
? onPullDownRefresh.call(this)
: this.refresh()
);
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
this.setState({
oakPullDownRefreshLoading: false as any,
});
@ -1087,7 +1087,7 @@ export function createComponent<
default: {
assert(behavior === 'refresh');
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
return;
}
}
@ -1119,7 +1119,7 @@ export function createComponent<
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
try {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
catch (err) {
if (err instanceof OakException) {

View File

@ -981,7 +981,7 @@ export function createComponent<
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();
@ -1050,7 +1050,7 @@ export function createComponent<
const { oakFullpath } = this.state;
if (oakFullpath && !this.features.runningTree.isListDescandentOrStale(oakFullpath)) {
await this.refresh();
lifetimes?.mature && lifetimes.mature();
lifetimes?.mature && lifetimes.mature.call(this);
}
else {
this.reRender();