zzz-pc-view 0.0.130 → 0.0.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -731,6 +731,7 @@ export declare abstract class CurdHandler<T extends object = object, P extends P
|
|
|
731
731
|
* @returns {Promise<any>} - 返回一个 Promise,表示验证的结果。
|
|
732
732
|
*/
|
|
733
733
|
abstract validEditorData(): Promise<any>;
|
|
734
|
+
abstract onStepIndexChange(): void;
|
|
734
735
|
/**
|
|
735
736
|
* 定义一个抽象方法,用于在保存编辑器数据成功后执行的操作。
|
|
736
737
|
* 这个方法会在编辑器数据成功保存到服务器后被调用,用于执行一些后续操作,例如提示用户保存成功、更新UI等。
|
package/src/index.es.js
CHANGED
|
@@ -5108,7 +5108,7 @@ class CurdApi {
|
|
|
5108
5108
|
}),
|
|
5109
5109
|
// 处理响应数据
|
|
5110
5110
|
(response2) => {
|
|
5111
|
-
response2 = this.Target.bindList(response2);
|
|
5111
|
+
response2 = this.Target.bindList(response2 ?? []);
|
|
5112
5112
|
const { treeKey } = this;
|
|
5113
5113
|
if (treeKey) {
|
|
5114
5114
|
response2 = createBySelf(
|
|
@@ -5946,7 +5946,7 @@ class CurdHandler extends FilterHandler {
|
|
|
5946
5946
|
* @param {number} total - 列表数据的总数。
|
|
5947
5947
|
*/
|
|
5948
5948
|
setList(list2, total) {
|
|
5949
|
-
this.listRef.value = list2;
|
|
5949
|
+
this.listRef.value = list2.length > 0 && list2[0] instanceof this.CurdTarget ? this.CurdTarget.bindList(list2) : list2;
|
|
5950
5950
|
this.totalRef.value = total;
|
|
5951
5951
|
}
|
|
5952
5952
|
/**
|
|
@@ -5969,10 +5969,10 @@ class CurdHandler extends FilterHandler {
|
|
|
5969
5969
|
const data = await this.listRequestUtil.requestData(
|
|
5970
5970
|
api2.getListByPage(this.pagination, query)
|
|
5971
5971
|
);
|
|
5972
|
-
this.setList(
|
|
5972
|
+
this.setList(data.list || [], data.total);
|
|
5973
5973
|
} else {
|
|
5974
5974
|
const data = await this.listRequestUtil.requestData(api2.getList(query));
|
|
5975
|
-
this.setList(
|
|
5975
|
+
this.setList(data || [], (data == null ? void 0 : data.length) ?? 0);
|
|
5976
5976
|
}
|
|
5977
5977
|
} catch (e) {
|
|
5978
5978
|
if (e.code !== ABORTED_CODE) {
|
|
@@ -6056,6 +6056,8 @@ class CurdHandler extends FilterHandler {
|
|
|
6056
6056
|
const minStepIndex = Math.max(0, formStepIndex);
|
|
6057
6057
|
const maxStepIndex = Math.min(minStepIndex, this.displayStepFormItemsGroup.length - 1);
|
|
6058
6058
|
this.formStepIndexRef.value = maxStepIndex;
|
|
6059
|
+
setTimeout(() => {
|
|
6060
|
+
});
|
|
6059
6061
|
}
|
|
6060
6062
|
/**
|
|
6061
6063
|
* 更改表单步骤索引。
|
|
@@ -12082,6 +12084,11 @@ class CurdViewHandler extends CurdHandler {
|
|
|
12082
12084
|
}
|
|
12083
12085
|
autoFocusEl.focus();
|
|
12084
12086
|
}
|
|
12087
|
+
onStepIndexChange() {
|
|
12088
|
+
setTimeout(() => {
|
|
12089
|
+
this.focusInput();
|
|
12090
|
+
});
|
|
12091
|
+
}
|
|
12085
12092
|
/**
|
|
12086
12093
|
* 获取表单是否禁用的状态。
|
|
12087
12094
|
* 该 getter 方法返回 `formDisabledComputed` 计算属性的值,用于确定表单是否应该被禁用。
|