zydx-plus 1.19.87 → 1.19.89
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 +1 -1
- package/src/components/biz_header/src/bizHeader.vue +36 -39
- package/src/components/biz_header/src/button_name.js +934 -441
- package/src/components/data_table/src/data_table.vue +72 -14
- package/src/components/data_table/src/table_head.vue +7 -4
- package/src/components/data_table/src/table_row.vue +30 -13
- package/src/components/editor2/src/editor.vue +23 -17
- package/src/components/select/src/select.vue +33 -12
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -17,23 +17,31 @@
|
|
|
17
17
|
<div v-for="(item, index) in nodeList" :key="index" class="borderBottom1cccccc padding0_10">
|
|
18
18
|
<zydx-topic-dry>
|
|
19
19
|
<template v-slot:title_slot><span class="fontSize16">{{item.name}}</span></template>
|
|
20
|
-
<template v-slot:button_slot v-
|
|
20
|
+
<template v-slot:button_slot v-if="isShowBtn">
|
|
21
21
|
<template v-for="(buttonInfo, buttonIndex) in initConfig(item).buttonList[tabType]">
|
|
22
|
-
<template v-if="buttonInfo instanceof Object">
|
|
23
|
-
<!--
|
|
24
|
-
<button class="z-button"
|
|
22
|
+
<template v-if="buttonInfo instanceof Object" v-for="(childButtonInfo, childButtonIndex) in buttonInfo">
|
|
23
|
+
<!-- 在课上渲染的 -->
|
|
24
|
+
<button class="z-button"
|
|
25
|
+
:class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''"
|
|
26
|
+
v-if="item.level === 0 && buttonIndex === 'headLevel' && childButtonIndex !== 'default'"
|
|
27
|
+
@click="clickRightBtn(item, childButtonIndex, childButtonInfo)"
|
|
28
|
+
>
|
|
25
29
|
{{childButtonInfo}}
|
|
26
30
|
</button>
|
|
27
|
-
<!--
|
|
28
|
-
<button class="z-button"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<!-- 单独在最低节点设置的按钮 -->
|
|
32
|
+
<button class="z-button"
|
|
33
|
+
:class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''"
|
|
34
|
+
v-if="item.level !== 0 && (!item.children || item.children.length === 0) && buttonIndex === 'lowLevel' && childButtonIndex !== 'default'"
|
|
35
|
+
@click="clickRightBtn(item, childButtonIndex, childButtonInfo)"
|
|
36
|
+
>
|
|
33
37
|
{{childButtonInfo}}
|
|
34
38
|
</button>
|
|
35
|
-
<!--
|
|
36
|
-
<button class="z-button"
|
|
39
|
+
<!-- 在非课和非最低节点 -->
|
|
40
|
+
<button class="z-button"
|
|
41
|
+
:class="childButtonIndex === getSelectBtnIndex && selectItem.level === item.level? 'active' : ''"
|
|
42
|
+
v-if="item.level !== 0 && item.children && item.children.length !== 0 && buttonIndex === 'otherLevel' && childButtonIndex !== 'default'"
|
|
43
|
+
@click="clickRightBtn(item, childButtonIndex, childButtonInfo)"
|
|
44
|
+
>
|
|
37
45
|
{{childButtonInfo}}
|
|
38
46
|
</button>
|
|
39
47
|
</template>
|
|
@@ -58,14 +66,12 @@ export default {
|
|
|
58
66
|
props: {
|
|
59
67
|
actionId: {
|
|
60
68
|
type: String,
|
|
61
|
-
|
|
69
|
+
required: true
|
|
62
70
|
},
|
|
63
71
|
// 选中的节点
|
|
64
72
|
selectItem: {
|
|
65
73
|
type: Object,
|
|
66
|
-
|
|
67
|
-
return {}
|
|
68
|
-
}
|
|
74
|
+
required: true
|
|
69
75
|
},
|
|
70
76
|
// 班级还是个人
|
|
71
77
|
tabType: {
|
|
@@ -85,34 +91,36 @@ export default {
|
|
|
85
91
|
// 目录树集合
|
|
86
92
|
catalogList: {
|
|
87
93
|
type: Array,
|
|
88
|
-
|
|
89
|
-
return []
|
|
90
|
-
}
|
|
94
|
+
required: true
|
|
91
95
|
},
|
|
92
96
|
// 0动作或者1资源或者2学生端
|
|
93
97
|
headerType: {
|
|
94
98
|
type: Number,
|
|
95
|
-
|
|
99
|
+
required: true
|
|
96
100
|
}
|
|
97
101
|
},
|
|
98
102
|
data() {
|
|
99
103
|
return {
|
|
100
|
-
nodeList: []
|
|
101
|
-
buttonInfo: {}
|
|
104
|
+
nodeList: []
|
|
102
105
|
}
|
|
103
106
|
},
|
|
104
107
|
computed: {
|
|
105
108
|
getSelectBtnIndex () {
|
|
106
109
|
if (this.selectBtnIndex === '') {
|
|
107
110
|
let buttonIndex = '';
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
let buttonList = this.initConfig(this.selectItem).buttonList[this.tabType];
|
|
112
|
+
if (this.selectItem.level === 0 && buttonList.headLevel) {
|
|
113
|
+
buttonIndex = buttonList.headLevel.default;
|
|
114
|
+
this.clickRightBtn(this.selectItem, buttonIndex, buttonList.headLevel[buttonIndex]);
|
|
115
|
+
} else if(this.selectItem.level != 0 && (!this.selectItem.children || this.selectItem.children.length === 0) && buttonList.lowLevel) {
|
|
116
|
+
buttonIndex = buttonList.lowLevel.default;
|
|
117
|
+
this.clickRightBtn(this.selectItem, buttonIndex, buttonList.lowLevel[buttonIndex]);
|
|
110
118
|
} else {
|
|
111
|
-
|
|
119
|
+
if (buttonList.otherLevel) {
|
|
120
|
+
buttonIndex = buttonList.otherLevel.default;
|
|
121
|
+
this.clickRightBtn(this.selectItem, buttonIndex, buttonList.otherLevel[buttonIndex]);
|
|
122
|
+
}
|
|
112
123
|
}
|
|
113
|
-
// 获取按钮名称
|
|
114
|
-
this.queryKey(this.initConfig(this.selectItem).buttonList[this.tabType])
|
|
115
|
-
this.clickRightBtn(this.selectItem, buttonIndex, this.buttonInfo[buttonIndex]);
|
|
116
124
|
return buttonIndex;
|
|
117
125
|
} else {
|
|
118
126
|
return this.selectBtnIndex;
|
|
@@ -166,17 +174,6 @@ export default {
|
|
|
166
174
|
clickRightBtn (selectItem, selectBtnIndex, selectBtnName) {
|
|
167
175
|
this.$emit('clickRightBtn', {selectItem, selectBtnIndex, selectBtnName, 'nodeList': this.nodeList})
|
|
168
176
|
},
|
|
169
|
-
// 通过递归获取对象所有key
|
|
170
|
-
queryKey(obj) {
|
|
171
|
-
for(let key in obj){
|
|
172
|
-
// 判断子节点是否为对象,是的话则递归,最后为键值对而不是对象则跳出
|
|
173
|
-
if(obj[key] instanceof Object){
|
|
174
|
-
this.queryKey(obj[key])
|
|
175
|
-
} else {
|
|
176
|
-
this.buttonInfo = {...this.buttonInfo,...obj}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
177
|
},
|
|
181
178
|
components: {zydxTopicDry}
|
|
182
179
|
}
|