@tmagic/table 1.8.0-beta.28 → 1.8.0-beta.29
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.
|
@@ -49,12 +49,13 @@ var ActionsColumn_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
49
49
|
data: props.editState[index],
|
|
50
50
|
index
|
|
51
51
|
});
|
|
52
|
-
if (res)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
if (res) {
|
|
53
|
+
if (res.ret === 0) {
|
|
54
|
+
tMagicMessage.success("保存成功");
|
|
55
|
+
props.editState[index] = void 0;
|
|
56
|
+
emit("after-action", { index });
|
|
57
|
+
} else tMagicMessage.error(res.msg || "保存失败");
|
|
58
|
+
} else {
|
|
58
59
|
props.editState[index] = void 0;
|
|
59
60
|
emit("after-action", { index });
|
|
60
61
|
}
|
|
@@ -53,8 +53,10 @@
|
|
|
53
53
|
var unmasked = true;
|
|
54
54
|
} catch (e) {}
|
|
55
55
|
var result = nativeObjectToString$1.call(value);
|
|
56
|
-
if (unmasked)
|
|
57
|
-
|
|
56
|
+
if (unmasked) {
|
|
57
|
+
if (isOwn) value[symToStringTag$1] = tag;
|
|
58
|
+
else delete value[symToStringTag$1];
|
|
59
|
+
}
|
|
58
60
|
return result;
|
|
59
61
|
}
|
|
60
62
|
//#endregion
|
|
@@ -2155,12 +2157,13 @@
|
|
|
2155
2157
|
data: props.editState[index],
|
|
2156
2158
|
index
|
|
2157
2159
|
});
|
|
2158
|
-
if (res)
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2160
|
+
if (res) {
|
|
2161
|
+
if (res.ret === 0) {
|
|
2162
|
+
_tmagic_design.tMagicMessage.success("保存成功");
|
|
2163
|
+
props.editState[index] = void 0;
|
|
2164
|
+
emit("after-action", { index });
|
|
2165
|
+
} else _tmagic_design.tMagicMessage.error(res.msg || "保存失败");
|
|
2166
|
+
} else {
|
|
2164
2167
|
props.editState[index] = void 0;
|
|
2165
2168
|
emit("after-action", { index });
|
|
2166
2169
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.8.0-beta.
|
|
2
|
+
"version": "1.8.0-beta.29",
|
|
3
3
|
"name": "@tmagic/table",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/lodash-es": "^4.17.12",
|
|
45
|
-
"@vue/test-utils": "^2.
|
|
45
|
+
"@vue/test-utils": "^2.5.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"typescript": "^6.0.3",
|
|
49
|
-
"vue": "^3.5.
|
|
50
|
-
"@tmagic/
|
|
51
|
-
"@tmagic/form": "1.8.0-beta.
|
|
52
|
-
"@tmagic/
|
|
49
|
+
"vue": "^3.5.43",
|
|
50
|
+
"@tmagic/utils": "1.8.0-beta.29",
|
|
51
|
+
"@tmagic/form": "1.8.0-beta.29",
|
|
52
|
+
"@tmagic/design": "1.8.0-beta.29"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"typescript": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { App } from "vue";
|
|
2
2
|
import { FormConfig, FormValue } from "@tmagic/form";
|
|
3
3
|
//#region temp/packages/table/src/schema.d.ts
|
|
4
|
-
type ColumnActionPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
4
|
+
export type ColumnActionPlacement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
5
5
|
/** 当 type 为 sub-actions 时,更多菜单(Popover)的配置 */
|
|
6
|
-
interface ColumnSubActionConfig {
|
|
6
|
+
export interface ColumnSubActionConfig {
|
|
7
7
|
/** Popover 的弹出位置,默认 bottom */
|
|
8
8
|
placement?: ColumnActionPlacement;
|
|
9
9
|
/** Popover 浮层宽度,数字按 px 处理 */
|
|
@@ -15,7 +15,7 @@ interface ColumnSubActionConfig {
|
|
|
15
15
|
/** 更多菜单中的子动作配置 */
|
|
16
16
|
items?: ColumnActionConfig[];
|
|
17
17
|
}
|
|
18
|
-
interface ColumnActionConfig {
|
|
18
|
+
export interface ColumnActionConfig {
|
|
19
19
|
/**
|
|
20
20
|
* 动作类型:
|
|
21
21
|
* - `delete` / `copy` / `edit`:内置语义,`edit` 会进入行内编辑态。
|
|
@@ -55,7 +55,7 @@ interface ColumnActionConfig {
|
|
|
55
55
|
index: number;
|
|
56
56
|
}) => Promise<void> | void;
|
|
57
57
|
}
|
|
58
|
-
interface ColumnConfig<T = any> {
|
|
58
|
+
export interface ColumnConfig<T = any> {
|
|
59
59
|
pageIndex?: number;
|
|
60
60
|
pageSize?: number;
|
|
61
61
|
form?: FormConfig;
|
|
@@ -155,14 +155,14 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
155
155
|
declare const _default: typeof __VLS_export;
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region temp/packages/table/src/utils.d.ts
|
|
158
|
-
declare const formatter: (item: ColumnConfig, row: any, data: {
|
|
158
|
+
export declare const formatter: (item: ColumnConfig, row: any, data: {
|
|
159
159
|
index: number;
|
|
160
160
|
}) => any;
|
|
161
|
-
declare const createColumns: (columns: ColumnConfig[]) => ColumnConfig<any>[];
|
|
161
|
+
export declare const createColumns: (columns: ColumnConfig[]) => ColumnConfig<any>[];
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region temp/packages/table/src/index.d.ts
|
|
164
164
|
declare const _default$1: {
|
|
165
165
|
install(app: App): void;
|
|
166
166
|
};
|
|
167
167
|
//#endregion
|
|
168
|
-
export {
|
|
168
|
+
export { _default as MagicTable, _default$1 as default };
|