vue2-client 1.15.125 → 1.15.127
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/package.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
<script setup lang="ts">
|
2
2
|
import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
|
3
|
+
import { ref } from 'vue'
|
3
4
|
|
4
5
|
defineProps({
|
5
6
|
// HTab特有的属性
|
@@ -8,11 +9,50 @@ defineProps({
|
|
8
9
|
default: true
|
9
10
|
}
|
10
11
|
})
|
12
|
+
|
13
|
+
// 创建对XTab组件的引用
|
14
|
+
const xTabRef = ref()
|
15
|
+
|
16
|
+
// 暴露方法给父组件使用
|
17
|
+
defineExpose({
|
18
|
+
// 为了兼容性,保留getXTabInstance方法
|
19
|
+
getXTabInstance: () => xTabRef.value,
|
20
|
+
|
21
|
+
// 直接暴露常用方法,方便调用
|
22
|
+
tabPaneChange: function () {
|
23
|
+
if (xTabRef.value) {
|
24
|
+
return xTabRef.value.tabPaneChange.apply(xTabRef.value, arguments)
|
25
|
+
}
|
26
|
+
},
|
27
|
+
initConfig: function () {
|
28
|
+
if (xTabRef.value) {
|
29
|
+
return xTabRef.value.initConfig()
|
30
|
+
}
|
31
|
+
},
|
32
|
+
getConfig: function () {
|
33
|
+
if (xTabRef.value) {
|
34
|
+
return xTabRef.value.getConfig()
|
35
|
+
}
|
36
|
+
},
|
37
|
+
// 暴露XTab的属性访问方法
|
38
|
+
getActiveKey: function () {
|
39
|
+
return xTabRef.value && xTabRef.value.activeKey
|
40
|
+
},
|
41
|
+
|
42
|
+
getConfigData: function () {
|
43
|
+
return xTabRef.value && xTabRef.value.config
|
44
|
+
},
|
45
|
+
|
46
|
+
getShowTabBar: function () {
|
47
|
+
return xTabRef.value && xTabRef.value.showTabBar
|
48
|
+
}
|
49
|
+
})
|
11
50
|
</script>
|
12
51
|
|
13
52
|
<template>
|
14
53
|
<div class="h-tab-wrapper" :class="{ 'h-tab-has-top-margin': hasTopMargin }">
|
15
54
|
<x-tab
|
55
|
+
ref="xTabRef"
|
16
56
|
v-bind="$attrs"
|
17
57
|
v-on="$listeners"
|
18
58
|
>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
</div>
|
42
42
|
</template>
|
43
43
|
<div class="a-div" v-for="(n, i) in numberColumns" :slot="n.dataIndex" :key="i">
|
44
|
-
<div v-for="(item, index) in n.row" :key="index" class="number">{{item}}</div>
|
44
|
+
<div v-for="(item, index) in n.row" :key="index" class="number">{{ item }}</div>
|
45
45
|
</div>
|
46
46
|
</a-table>
|
47
47
|
</div>
|