cosey 0.3.15 → 0.3.17
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/components/table/index.d.ts +3 -0
- package/components/table/table.d.ts +1 -0
- package/components/table/table.js +2 -1
- package/components/table/table.vue.d.ts +1 -0
- package/components/table/table.vue.js +5 -1
- package/config/http.d.ts +4 -0
- package/config/http.js +5 -1
- package/package.json +1 -1
- package/request/useRequest.js +3 -0
|
@@ -273,6 +273,7 @@ declare const _Table: {
|
|
|
273
273
|
collapseAll: () => void;
|
|
274
274
|
getFetchParams: () => Record<string, any>;
|
|
275
275
|
getFullFetchParams: () => Record<string, any>;
|
|
276
|
+
setData: (data: any[]) => void;
|
|
276
277
|
reset: () => void;
|
|
277
278
|
submit: () => Promise<any>;
|
|
278
279
|
validate: (callback?: import("element-plus").FormValidateCallback) => import("element-plus").FormValidationResult;
|
|
@@ -600,6 +601,7 @@ declare const _Table: {
|
|
|
600
601
|
collapseAll: () => void;
|
|
601
602
|
getFetchParams: () => Record<string, any>;
|
|
602
603
|
getFullFetchParams: () => Record<string, any>;
|
|
604
|
+
setData: (data: any[]) => void;
|
|
603
605
|
reset: () => void;
|
|
604
606
|
submit: () => Promise<any>;
|
|
605
607
|
validate: (callback?: import("element-plus").FormValidateCallback) => import("element-plus").FormValidationResult;
|
|
@@ -785,6 +787,7 @@ declare const _Table: {
|
|
|
785
787
|
collapseAll: () => void;
|
|
786
788
|
getFetchParams: () => Record<string, any>;
|
|
787
789
|
getFullFetchParams: () => Record<string, any>;
|
|
790
|
+
setData: (data: any[]) => void;
|
|
788
791
|
reset: () => void;
|
|
789
792
|
submit: () => Promise<any>;
|
|
790
793
|
validate: (callback?: import("element-plus").FormValidateCallback) => import("element-plus").FormValidationResult;
|
|
@@ -159,6 +159,7 @@ export interface TableCustomExpose {
|
|
|
159
159
|
collapseAll: () => void;
|
|
160
160
|
getFetchParams: () => Record<string, any>;
|
|
161
161
|
getFullFetchParams: () => Record<string, any>;
|
|
162
|
+
setData: (data: any[]) => void;
|
|
162
163
|
}
|
|
163
164
|
export type TableExpose = TableCustomExpose & TableQueryExpose & {
|
|
164
165
|
clearSelection: () => void;
|
|
@@ -133,6 +133,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
133
133
|
collapseAll: () => void;
|
|
134
134
|
getFetchParams: () => Record<string, any>;
|
|
135
135
|
getFullFetchParams: () => Record<string, any>;
|
|
136
|
+
setData: (data: any[]) => void;
|
|
136
137
|
reset: () => void;
|
|
137
138
|
submit: () => Promise<any>;
|
|
138
139
|
validate: (callback?: import("element-plus").FormValidateCallback) => import("element-plus").FormValidationResult;
|
|
@@ -126,6 +126,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
126
126
|
watch(() => props.data, () => {
|
|
127
127
|
tableData.value = props.data || [];
|
|
128
128
|
});
|
|
129
|
+
const setData = data => {
|
|
130
|
+
tableData.value = data;
|
|
131
|
+
};
|
|
129
132
|
const tableDataWithSummary = computed(() => {
|
|
130
133
|
const columns = flattedColumns.value.map(column => {
|
|
131
134
|
return {
|
|
@@ -332,7 +335,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
332
335
|
expandAll,
|
|
333
336
|
collapseAll,
|
|
334
337
|
getFetchParams,
|
|
335
|
-
getFullFetchParams
|
|
338
|
+
getFullFetchParams,
|
|
339
|
+
setData
|
|
336
340
|
}, () => tableQueryRef.value);
|
|
337
341
|
watch(() => props.getExpose, () => {
|
|
338
342
|
props.getExpose?.(expose);
|
package/config/http.d.ts
CHANGED
|
@@ -58,6 +58,10 @@ export declare const defaultHttpConfig: {
|
|
|
58
58
|
* 错误提示显示时长
|
|
59
59
|
*/
|
|
60
60
|
errorDuration: number;
|
|
61
|
+
/**
|
|
62
|
+
* 是否直接返回 AxiosResponse 对象
|
|
63
|
+
*/
|
|
64
|
+
originalResponse: boolean;
|
|
61
65
|
};
|
|
62
66
|
export type HttpConfig = DeepPartial<typeof defaultHttpConfig>;
|
|
63
67
|
export type RequiredHttpConfig = typeof defaultHttpConfig;
|
package/config/http.js
CHANGED
package/package.json
CHANGED
package/request/useRequest.js
CHANGED
|
@@ -60,6 +60,9 @@ function useRequest(config = {}, useHttpConfig) {
|
|
|
60
60
|
);
|
|
61
61
|
axiosIns.interceptors.response.use(
|
|
62
62
|
(response) => {
|
|
63
|
+
if (mergedHttpConfig.originalResponse) {
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
63
66
|
const { data: resData } = response;
|
|
64
67
|
return handleError(resData, mergedHttpConfig);
|
|
65
68
|
},
|