vxe-table 4.7.59 → 4.7.60
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/es/grid/src/grid.js +32 -11
- package/es/locale/lang/ja-JP.js +22 -22
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/hook.js +13 -3
- package/es/table/render/index.js +9 -9
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +44 -11
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +83 -26
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +22 -22
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +22 -22
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/hook.js +19 -3
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/render/index.js +9 -9
- package/lib/table/render/index.min.js +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +33 -12
- package/packages/locale/lang/ja-JP.ts +22 -22
- package/packages/table/module/export/hook.ts +13 -3
- package/packages/table/render/index.ts +9 -9
- package/styles/theme/base.scss +2 -7
- package/styles/theme/dark.scss +4 -1
- package/styles/theme/light.scss +4 -1
- /package/es/{iconfont.1721660188146.ttf → iconfont.1722698239691.ttf} +0 -0
- /package/es/{iconfont.1721660188146.woff → iconfont.1722698239691.woff} +0 -0
- /package/es/{iconfont.1721660188146.woff2 → iconfont.1722698239691.woff2} +0 -0
- /package/lib/{iconfont.1721660188146.ttf → iconfont.1722698239691.ttf} +0 -0
- /package/lib/{iconfont.1721660188146.woff → iconfont.1722698239691.woff} +0 -0
- /package/lib/{iconfont.1721660188146.woff2 → iconfont.1722698239691.woff2} +0 -0
package/es/grid/src/grid.js
CHANGED
|
@@ -86,7 +86,7 @@ export default defineComponent({
|
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
const computeProxyOpts = computed(() => {
|
|
89
|
-
return
|
|
89
|
+
return XEUtils.merge({}, getConfig().grid.proxyConfig, props.proxyConfig);
|
|
90
90
|
});
|
|
91
91
|
const computeIsRespMsg = computed(() => {
|
|
92
92
|
const proxyOpts = computeProxyOpts.value;
|
|
@@ -701,6 +701,8 @@ export default defineComponent({
|
|
|
701
701
|
case 'reload':
|
|
702
702
|
case 'query': {
|
|
703
703
|
const ajaxMethods = ajax.query;
|
|
704
|
+
const querySuccessMethods = ajax.querySuccess;
|
|
705
|
+
const queryErrorMethods = ajax.queryError;
|
|
704
706
|
if (ajaxMethods) {
|
|
705
707
|
const isInited = code === '_init';
|
|
706
708
|
const isReload = code === 'reload';
|
|
@@ -759,8 +761,7 @@ export default defineComponent({
|
|
|
759
761
|
reactData.sortData = sortList;
|
|
760
762
|
reactData.filterData = filterList;
|
|
761
763
|
reactData.tableLoading = true;
|
|
762
|
-
|
|
763
|
-
return Promise.resolve((beforeQuery || ajaxMethods)(...applyArgs))
|
|
764
|
+
return Promise.resolve((beforeQuery || ajaxMethods)(commitParams, ...args))
|
|
764
765
|
.then(rest => {
|
|
765
766
|
reactData.tableLoading = false;
|
|
766
767
|
if (rest) {
|
|
@@ -785,11 +786,17 @@ export default defineComponent({
|
|
|
785
786
|
reactData.tableData = [];
|
|
786
787
|
}
|
|
787
788
|
if (afterQuery) {
|
|
788
|
-
afterQuery(...
|
|
789
|
+
afterQuery(commitParams, ...args);
|
|
790
|
+
}
|
|
791
|
+
if (querySuccessMethods) {
|
|
792
|
+
querySuccessMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
789
793
|
}
|
|
790
794
|
return { status: true };
|
|
791
|
-
}).catch(() => {
|
|
795
|
+
}).catch((rest) => {
|
|
792
796
|
reactData.tableLoading = false;
|
|
797
|
+
if (queryErrorMethods) {
|
|
798
|
+
queryErrorMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
799
|
+
}
|
|
793
800
|
return { status: false };
|
|
794
801
|
});
|
|
795
802
|
}
|
|
@@ -802,19 +809,20 @@ export default defineComponent({
|
|
|
802
809
|
}
|
|
803
810
|
case 'delete': {
|
|
804
811
|
const ajaxMethods = ajax.delete;
|
|
812
|
+
const deleteSuccessMethods = ajax.deleteSuccess;
|
|
813
|
+
const deleteErrorMethods = ajax.deleteError;
|
|
805
814
|
if (ajaxMethods) {
|
|
806
815
|
const selectRecords = gridExtendTableMethods.getCheckboxRecords();
|
|
807
816
|
const removeRecords = selectRecords.filter(row => !$xeTable.isInsertByRow(row));
|
|
808
817
|
const body = { removeRecords };
|
|
809
818
|
const commitParams = { $grid: $xeGrid, code, button, body, form: formData, options: ajaxMethods };
|
|
810
|
-
const applyArgs = [commitParams].concat(args);
|
|
811
819
|
if (selectRecords.length) {
|
|
812
820
|
return handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
813
821
|
if (!removeRecords.length) {
|
|
814
822
|
return $xeTable.remove(selectRecords);
|
|
815
823
|
}
|
|
816
824
|
reactData.tableLoading = true;
|
|
817
|
-
return Promise.resolve((beforeDelete || ajaxMethods)(...
|
|
825
|
+
return Promise.resolve((beforeDelete || ajaxMethods)(commitParams, ...args))
|
|
818
826
|
.then(rest => {
|
|
819
827
|
reactData.tableLoading = false;
|
|
820
828
|
$xeTable.setPendingRow(removeRecords, false);
|
|
@@ -824,11 +832,14 @@ export default defineComponent({
|
|
|
824
832
|
}
|
|
825
833
|
}
|
|
826
834
|
if (afterDelete) {
|
|
827
|
-
afterDelete(...
|
|
835
|
+
afterDelete(commitParams, ...args);
|
|
828
836
|
}
|
|
829
837
|
else {
|
|
830
838
|
gridMethods.commitProxy('query');
|
|
831
839
|
}
|
|
840
|
+
if (deleteSuccessMethods) {
|
|
841
|
+
deleteSuccessMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
842
|
+
}
|
|
832
843
|
return { status: true };
|
|
833
844
|
})
|
|
834
845
|
.catch(rest => {
|
|
@@ -838,6 +849,9 @@ export default defineComponent({
|
|
|
838
849
|
VxeUI.modal.message({ id: code, content: getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
839
850
|
}
|
|
840
851
|
}
|
|
852
|
+
if (deleteErrorMethods) {
|
|
853
|
+
deleteErrorMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
854
|
+
}
|
|
841
855
|
return { status: false };
|
|
842
856
|
});
|
|
843
857
|
});
|
|
@@ -859,11 +873,12 @@ export default defineComponent({
|
|
|
859
873
|
}
|
|
860
874
|
case 'save': {
|
|
861
875
|
const ajaxMethods = ajax.save;
|
|
876
|
+
const saveSuccessMethods = ajax.saveSuccess;
|
|
877
|
+
const saveErrorMethods = ajax.saveError;
|
|
862
878
|
if (ajaxMethods) {
|
|
863
879
|
const body = $xeTable.getRecordset();
|
|
864
880
|
const { insertRecords, removeRecords, updateRecords, pendingRecords } = body;
|
|
865
881
|
const commitParams = { $grid: $xeGrid, code, button, body, form: formData, options: ajaxMethods };
|
|
866
|
-
const applyArgs = [commitParams].concat(args);
|
|
867
882
|
// 排除掉新增且标记为删除的数据
|
|
868
883
|
if (insertRecords.length) {
|
|
869
884
|
body.pendingRecords = pendingRecords.filter((row) => $xeTable.findRowIndexOf(insertRecords, row) === -1);
|
|
@@ -884,7 +899,7 @@ export default defineComponent({
|
|
|
884
899
|
}
|
|
885
900
|
if (body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length) {
|
|
886
901
|
reactData.tableLoading = true;
|
|
887
|
-
return Promise.resolve((beforeSave || ajaxMethods)(...
|
|
902
|
+
return Promise.resolve((beforeSave || ajaxMethods)(commitParams, ...args))
|
|
888
903
|
.then(rest => {
|
|
889
904
|
reactData.tableLoading = false;
|
|
890
905
|
$xeTable.clearPendingRow();
|
|
@@ -894,11 +909,14 @@ export default defineComponent({
|
|
|
894
909
|
}
|
|
895
910
|
}
|
|
896
911
|
if (afterSave) {
|
|
897
|
-
afterSave(...
|
|
912
|
+
afterSave(commitParams, ...args);
|
|
898
913
|
}
|
|
899
914
|
else {
|
|
900
915
|
gridMethods.commitProxy('query');
|
|
901
916
|
}
|
|
917
|
+
if (saveSuccessMethods) {
|
|
918
|
+
saveSuccessMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
919
|
+
}
|
|
902
920
|
return { status: true };
|
|
903
921
|
})
|
|
904
922
|
.catch(rest => {
|
|
@@ -908,6 +926,9 @@ export default defineComponent({
|
|
|
908
926
|
VxeUI.modal.message({ id: code, content: getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
|
|
909
927
|
}
|
|
910
928
|
}
|
|
929
|
+
if (saveErrorMethods) {
|
|
930
|
+
saveErrorMethods(Object.assign(Object.assign({}, commitParams), { response: rest }));
|
|
931
|
+
}
|
|
911
932
|
return { status: false };
|
|
912
933
|
});
|
|
913
934
|
}
|
package/es/locale/lang/ja-JP.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
export default {
|
|
6
6
|
vxe: {
|
|
7
7
|
base: {
|
|
8
|
-
pleaseInput: '
|
|
9
|
-
pleaseSelect: '
|
|
8
|
+
pleaseInput: '入力してください',
|
|
9
|
+
pleaseSelect: '選択してください',
|
|
10
10
|
comma: ',',
|
|
11
11
|
fullStop: '.'
|
|
12
12
|
},
|
|
@@ -14,9 +14,9 @@ export default {
|
|
|
14
14
|
text: 'Loading...'
|
|
15
15
|
},
|
|
16
16
|
error: {
|
|
17
|
-
groupFixed: '
|
|
18
|
-
groupMouseRange: '
|
|
19
|
-
groupTag: '
|
|
17
|
+
groupFixed: 'ヘッダー結合を使用する場合、固定列はグループで設定しなければなりません',
|
|
18
|
+
groupMouseRange: 'ヘッダー結合と「{0}」は同時に使用できません。これによりエラーが発生する可能性があります',
|
|
19
|
+
groupTag: 'ヘッダー結合は "{0}" を使ってください。 "{1}" はエラーが発生する可能性があります',
|
|
20
20
|
scrollErrProp: '仮想スクロールはこのパラメータを使えません: "{0}"',
|
|
21
21
|
errConflicts: 'パラメータ "{0}" と "{1}" は同時に使えません',
|
|
22
22
|
unableInsert: '指定された位置に挿入できない',
|
|
@@ -66,13 +66,13 @@ export default {
|
|
|
66
66
|
expSrcFilename: 'エクスポート_ソース_{0}',
|
|
67
67
|
customTitle: '列設定',
|
|
68
68
|
customAll: '全部',
|
|
69
|
-
customConfirm: '
|
|
69
|
+
customConfirm: 'OK',
|
|
70
70
|
customCancel: 'Cancel',
|
|
71
|
-
customRestore: '
|
|
71
|
+
customRestore: 'リセット',
|
|
72
72
|
maxFixedCol: '最大固定列数が {0} です。'
|
|
73
73
|
},
|
|
74
74
|
grid: {
|
|
75
|
-
selectOneRecord: '1
|
|
75
|
+
selectOneRecord: '1つ以上のレコードを選択してください',
|
|
76
76
|
deleteSelectRecord: 'レコードを削除してもよろしいですか?',
|
|
77
77
|
removeSelectRecord: 'レコードを削除してもよろしいですか?',
|
|
78
78
|
dataUnchanged: 'データが変更されませんでした',
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
endPageTitle: '最後ページ'
|
|
105
105
|
},
|
|
106
106
|
alert: {
|
|
107
|
-
title: '
|
|
107
|
+
title: '確認'
|
|
108
108
|
},
|
|
109
109
|
button: {
|
|
110
110
|
confirm: 'OK',
|
|
@@ -122,12 +122,12 @@ export default {
|
|
|
122
122
|
cstmDragTarget: '移動ターゲット: {0}',
|
|
123
123
|
setting: {
|
|
124
124
|
colSort: 'ソート',
|
|
125
|
-
sortHelpTip: '
|
|
125
|
+
sortHelpTip: 'ドラッグして列を並べ替えます',
|
|
126
126
|
colTitle: 'タイトル',
|
|
127
|
-
colResizable: '
|
|
128
|
-
colVisible: '
|
|
129
|
-
colFixed: '
|
|
130
|
-
colFixedMax: '
|
|
127
|
+
colResizable: '列の幅 (px)',
|
|
128
|
+
colVisible: '表示する',
|
|
129
|
+
colFixed: '列固定',
|
|
130
|
+
colFixedMax: '列固定(最大 {0} 列)',
|
|
131
131
|
fixedLeft: '左側',
|
|
132
132
|
fixedUnset: '指定しない',
|
|
133
133
|
fixedRight: '右側'
|
|
@@ -135,17 +135,17 @@ export default {
|
|
|
135
135
|
},
|
|
136
136
|
import: {
|
|
137
137
|
modes: {
|
|
138
|
-
covering: '
|
|
139
|
-
insert: '
|
|
140
|
-
insertTop: '
|
|
141
|
-
insertBottom: '
|
|
138
|
+
covering: '上書きモード',
|
|
139
|
+
insert: '追加モード(最後行に追加)',
|
|
140
|
+
insertTop: '追加モード(先頭行に追加)',
|
|
141
|
+
insertBottom: '追加モード(最後行に追加)'
|
|
142
142
|
},
|
|
143
143
|
impTitle: 'データインポート',
|
|
144
144
|
impFile: 'ファイル名',
|
|
145
145
|
impSelect: 'ファイル選択',
|
|
146
146
|
impType: 'ファイルの種類',
|
|
147
147
|
impOpts: 'パラメータ指定',
|
|
148
|
-
impMode: '
|
|
148
|
+
impMode: 'インポートモード',
|
|
149
149
|
impConfirm: 'インポート',
|
|
150
150
|
impCancel: 'キャンセル'
|
|
151
151
|
},
|
|
@@ -194,9 +194,9 @@ export default {
|
|
|
194
194
|
expCancel: 'キャンセル'
|
|
195
195
|
},
|
|
196
196
|
modal: {
|
|
197
|
-
errTitle: '
|
|
198
|
-
zoomMin: '
|
|
199
|
-
zoomIn: '
|
|
197
|
+
errTitle: 'エラー',
|
|
198
|
+
zoomMin: '最小化',
|
|
199
|
+
zoomIn: '最大化',
|
|
200
200
|
zoomOut: '縮小',
|
|
201
201
|
close: '閉じる',
|
|
202
202
|
miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
|