@bsgoal/common 2.13.1 → 2.13.3
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-21 08:43:33
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-25
|
|
5
|
+
* @LastEditTime: 2023-06-25 15:38:56
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree\index.vue
|
|
7
7
|
* @Description: 虚拟化树型结构 公共组件
|
|
8
8
|
*
|
|
@@ -55,7 +55,7 @@ const props = defineProps({
|
|
|
55
55
|
*/
|
|
56
56
|
lazyLoad: {
|
|
57
57
|
type: [Function],
|
|
58
|
-
default:
|
|
58
|
+
default: null
|
|
59
59
|
},
|
|
60
60
|
/**
|
|
61
61
|
* 初始化树节点
|
|
@@ -65,7 +65,7 @@ const props = defineProps({
|
|
|
65
65
|
*/
|
|
66
66
|
initNode: {
|
|
67
67
|
type: [Function],
|
|
68
|
-
default:
|
|
68
|
+
default: null
|
|
69
69
|
}
|
|
70
70
|
})
|
|
71
71
|
|
|
@@ -132,11 +132,10 @@ const loadNode = async (node, resolve, props) => {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
const lazyGet = computed(() => {
|
|
135
|
-
const {
|
|
136
|
-
if
|
|
135
|
+
const { lazyLoad = null , initNode = null} = props
|
|
136
|
+
if(lazyLoad && initNode ){
|
|
137
137
|
return true
|
|
138
138
|
}
|
|
139
|
-
|
|
140
139
|
return false
|
|
141
140
|
})
|
|
142
141
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-06-20 09:20:51
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-06-25 15:
|
|
5
|
+
* @LastEditTime: 2023-06-25 15:32:25
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-table\demo.vue
|
|
7
7
|
* @Description: 树 + 列表 + 演示
|
|
8
8
|
*
|
|
@@ -769,24 +769,29 @@ const triggerTreeAddClick = (params = '') => {
|
|
|
769
769
|
console.log('triggerTreeAddClick', params)
|
|
770
770
|
}
|
|
771
771
|
|
|
772
|
-
const treeData = ref([
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
772
|
+
const treeData = ref([])
|
|
773
|
+
|
|
774
|
+
setTimeout(() => {
|
|
775
|
+
treeData.value = ref([
|
|
776
|
+
{
|
|
777
|
+
label: 'label2-1',
|
|
778
|
+
isLeaf: true,
|
|
779
|
+
hasIcon: true
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
label: 'label2-2',
|
|
783
|
+
children: [
|
|
784
|
+
{
|
|
785
|
+
label: 'label2-2-1'
|
|
786
|
+
}
|
|
787
|
+
]
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
label: 'label2-3'
|
|
791
|
+
}
|
|
792
|
+
])
|
|
793
|
+
}, 5000)
|
|
794
|
+
|
|
790
795
|
const BSGOAL_BASE_TREE_TABLE_REF = ref(null)
|
|
791
796
|
const test = () => {
|
|
792
797
|
BSGOAL_BASE_TREE_TABLE_REF.value.refreshList({ prop: 111 })
|