@tmagic/table 1.8.0-manmanyu.26 → 1.8.0-manmanyu.28
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/dist/es/ActionButton.js +2 -2
- package/dist/es/ActionButton.vue_vue_type_script_lang.js +51 -0
- package/dist/es/ActionsColumn.js +0 -1
- package/dist/es/ActionsColumn.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/style.css +17 -15
- package/dist/style.css +17 -15
- package/dist/tmagic-table.umd.cjs +1033 -960
- package/package.json +5 -5
- package/src/ActionButton.vue +62 -40
- package/src/ActionsColumn.vue +2 -23
- package/src/theme/index.scss +19 -0
- package/dist/es/ActionButton.vue_vue_type_script_setup_true_lang.js +0 -57
package/dist/es/ActionButton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ActionButton_vue_vue_type_script_lang_default from "./ActionButton.vue_vue_type_script_lang.js";
|
|
2
2
|
//#region packages/table/src/ActionButton.vue
|
|
3
|
-
var ActionButton_default =
|
|
3
|
+
var ActionButton_default = ActionButton_vue_vue_type_script_lang_default;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { ActionButton_default as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { disabled, formatActionText } from "./actionHelpers.js";
|
|
2
|
+
import { defineComponent, h, vShow, withDirectives } from "vue";
|
|
3
|
+
import { TMagicButton, TMagicTooltip } from "@tmagic/design";
|
|
4
|
+
//#region packages/table/src/ActionButton.vue?vue&type=script&lang.ts
|
|
5
|
+
var ActionButton_vue_vue_type_script_lang_default = defineComponent({
|
|
6
|
+
name: "MTableActionButton",
|
|
7
|
+
props: {
|
|
8
|
+
action: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
row: {
|
|
13
|
+
type: null,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
index: {
|
|
17
|
+
type: Number,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
btnClass: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "action-btn"
|
|
23
|
+
},
|
|
24
|
+
visible: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["click"],
|
|
30
|
+
setup(props, { emit }) {
|
|
31
|
+
const onClick = () => emit("click", props.action, props.row, props.index);
|
|
32
|
+
return () => {
|
|
33
|
+
const button = withDirectives(h(TMagicButton, {
|
|
34
|
+
class: props.btnClass,
|
|
35
|
+
link: true,
|
|
36
|
+
size: "small",
|
|
37
|
+
type: props.action.buttonType || "primary",
|
|
38
|
+
icon: props.action.icon,
|
|
39
|
+
disabled: disabled(props.action.disabled, props.row),
|
|
40
|
+
onClick
|
|
41
|
+
}, () => h("span", { innerHTML: formatActionText(props.action.text, props.row) })), [[vShow, props.visible]]);
|
|
42
|
+
if (!props.action.tooltip) return button;
|
|
43
|
+
return h(TMagicTooltip, {
|
|
44
|
+
placement: props.action.tooltipPlacement || "top",
|
|
45
|
+
content: props.action.tooltip
|
|
46
|
+
}, () => button);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ActionButton_vue_vue_type_script_lang_default as default };
|
package/dist/es/ActionsColumn.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import ActionsColumn_vue_vue_type_script_setup_true_lang_default from "./ActionsColumn.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
/* empty css */
|
|
3
2
|
//#region packages/table/src/ActionsColumn.vue
|
|
4
3
|
var ActionsColumn_default = ActionsColumn_vue_vue_type_script_setup_true_lang_default;
|
|
5
4
|
//#endregion
|
|
@@ -6,7 +6,7 @@ import { cloneDeep } from "lodash-es";
|
|
|
6
6
|
import { TMagicButton, TMagicPopover, tMagicMessage } from "@tmagic/design";
|
|
7
7
|
import { ArrowDown, ArrowRight } from "@element-plus/icons-vue";
|
|
8
8
|
//#region packages/table/src/ActionsColumn.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var _hoisted_1 = { class: "sub-actions" };
|
|
9
|
+
var _hoisted_1 = { class: "tmagic-table-sub-actions" };
|
|
10
10
|
var ActionsColumn_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
11
11
|
name: "MTableActionsColumn",
|
|
12
12
|
__name: "ActionsColumn",
|
|
@@ -83,7 +83,7 @@ var ActionsColumn_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
83
83
|
placement: action.subActionConfig?.placement || "bottom",
|
|
84
84
|
width: action.subActionConfig?.popoverWidth,
|
|
85
85
|
"popper-class": action.subActionConfig?.popoverClass,
|
|
86
|
-
"destroy-on-close": action.subActionConfig?.popoverDestroyOnClose
|
|
86
|
+
"destroy-on-close": action.subActionConfig?.popoverDestroyOnClose ?? true
|
|
87
87
|
}, {
|
|
88
88
|
reference: withCtx(() => [withDirectives(createVNode(unref(TMagicButton), {
|
|
89
89
|
class: "action-btn",
|
package/dist/es/style.css
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
.
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
}
|
|
7
|
-
.sub-actions .sub-action-btn {
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
.sub-actions .tmagic-design-button + .tmagic-design-button {
|
|
11
|
-
margin-left: 0;
|
|
12
|
-
}
|
|
13
|
-
.sub-actions .tmagic-design-button {
|
|
14
|
-
justify-content: flex-start;
|
|
15
|
-
}.m-table .el-button.action-btn + .el-button.action-btn {
|
|
1
|
+
.m-table .el-button.action-btn + .el-button.action-btn {
|
|
16
2
|
margin-left: 0;
|
|
17
3
|
}
|
|
18
4
|
.m-table .keep-all {
|
|
@@ -24,4 +10,20 @@
|
|
|
24
10
|
}
|
|
25
11
|
.m-table .el-table__row.el-table__row--level-1 {
|
|
26
12
|
color: #999;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tmagic-table-sub-actions {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
}
|
|
21
|
+
.tmagic-table-sub-actions .sub-action-btn {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
.tmagic-table-sub-actions .tmagic-design-button + .tmagic-design-button {
|
|
25
|
+
margin-left: 0;
|
|
26
|
+
}
|
|
27
|
+
.tmagic-table-sub-actions .tmagic-design-button {
|
|
28
|
+
justify-content: flex-start;
|
|
27
29
|
}/*$vite$:1*/
|
package/dist/style.css
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
.
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 4px;
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
}
|
|
7
|
-
.sub-actions .sub-action-btn {
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
.sub-actions .tmagic-design-button + .tmagic-design-button {
|
|
11
|
-
margin-left: 0;
|
|
12
|
-
}
|
|
13
|
-
.sub-actions .tmagic-design-button {
|
|
14
|
-
justify-content: flex-start;
|
|
15
|
-
}.m-table .el-button.action-btn + .el-button.action-btn {
|
|
1
|
+
.m-table .el-button.action-btn + .el-button.action-btn {
|
|
16
2
|
margin-left: 0;
|
|
17
3
|
}
|
|
18
4
|
.m-table .keep-all {
|
|
@@ -24,4 +10,20 @@
|
|
|
24
10
|
}
|
|
25
11
|
.m-table .el-table__row.el-table__row--level-1 {
|
|
26
12
|
color: #999;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tmagic-table-sub-actions {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
}
|
|
21
|
+
.tmagic-table-sub-actions .sub-action-btn {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
.tmagic-table-sub-actions .tmagic-design-button + .tmagic-design-button {
|
|
25
|
+
margin-left: 0;
|
|
26
|
+
}
|
|
27
|
+
.tmagic-table-sub-actions .tmagic-design-button {
|
|
28
|
+
justify-content: flex-start;
|
|
27
29
|
}/*$vite$:1*/
|