inviton-powerduck 0.0.82 → 0.0.83
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Prop } from "vue-facing-decorator";
|
|
1
|
+
import { Prop, toNative } from "vue-facing-decorator";
|
|
2
2
|
import TsxComponent, { Component } from "../../app/vuetsx";
|
|
3
3
|
import { Teleport } from "vue";
|
|
4
4
|
import { PortalUtils } from "../../common/utils/utils";
|
|
@@ -8,12 +8,16 @@ interface DataTableUpperButtonsWrapperArgs {
|
|
|
8
8
|
cssClass?: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export class DataTableUpperButtonsWrapperConfig {
|
|
12
|
+
static defaultPortalTarget = '#bs-dtbtn-container';
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
@Component({
|
|
12
16
|
components: {
|
|
13
17
|
teleport: Teleport,
|
|
14
18
|
},
|
|
15
19
|
})
|
|
16
|
-
|
|
20
|
+
class DataTableUpperButtonsWrapperComponent extends TsxComponent<DataTableUpperButtonsWrapperArgs> implements DataTableUpperButtonsWrapperArgs {
|
|
17
21
|
@Prop() hasCheckbox?: boolean;
|
|
18
22
|
@Prop() cssClass?: string;
|
|
19
23
|
|
|
@@ -30,11 +34,15 @@ export default class DataTableUpperButtonsWrapper extends TsxComponent<DataTable
|
|
|
30
34
|
return builder;
|
|
31
35
|
}
|
|
32
36
|
|
|
37
|
+
get portalContainer(): string {
|
|
38
|
+
return DataTableUpperButtonsWrapperConfig.defaultPortalTarget;
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
private render(h) {
|
|
34
42
|
if (PortalUtils.isIOS()) {
|
|
35
43
|
return (
|
|
36
44
|
<div class={"ios-table-upper-buttons-wrap" + (this.hasCheckbox ? " wrap-has-checkbox" : "")}>
|
|
37
|
-
|
|
45
|
+
<teleport to={this.portalContainer} defer={true}>
|
|
38
46
|
<div class={this.getCssClass()}>{this.$slots.default?.()}</div>
|
|
39
47
|
</teleport>
|
|
40
48
|
</div>
|
|
@@ -44,3 +52,6 @@ export default class DataTableUpperButtonsWrapper extends TsxComponent<DataTable
|
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
54
|
}
|
|
55
|
+
|
|
56
|
+
const DataTableUpperButtonsWrapper = toNative(DataTableUpperButtonsWrapperComponent)
|
|
57
|
+
export default DataTableUpperButtonsWrapper
|