feat: 元素库样式优化
This commit is contained in:
parent
24fab2517b
commit
c172538a31
|
@ -6,7 +6,7 @@
|
|||
v-loading="tableIsLoading"
|
||||
:data="data"
|
||||
:default-sort="defaultSort"
|
||||
:class="{'ms-select-all-fixed': showSelectAll}"
|
||||
:class="{'ms-select-all-fixed': showSelectAll, 'row-click': rowClickStyle}"
|
||||
:height="screenHeight"
|
||||
:row-key="rowKey"
|
||||
:row-class-name="tableRowClassName"
|
||||
|
@ -244,6 +244,13 @@ export default {
|
|||
return true;
|
||||
}
|
||||
},
|
||||
// 添加鼠标移入小手样式
|
||||
rowClickStyle: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
tableIsLoading:{
|
||||
type:Boolean,
|
||||
default() {
|
||||
|
@ -558,4 +565,8 @@ export default {
|
|||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.row-click {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -156,6 +156,7 @@ export default {
|
|||
filterText: "",
|
||||
loading: false,
|
||||
checkedId: [],
|
||||
selectNodeIds: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -270,6 +271,17 @@ export default {
|
|||
});
|
||||
this.returnDatas = t;
|
||||
}
|
||||
this.selectNodeIds = [];
|
||||
this.getChildNodeId(data, this.selectNodeIds);
|
||||
},
|
||||
getChildNodeId(rootNode, nodeIds) {
|
||||
//递归获取所有子节点ID
|
||||
nodeIds.push(rootNode.id);
|
||||
if (rootNode.children) {
|
||||
for (let i = 0; i < rootNode.children.length; i++) {
|
||||
this.getChildNodeId(rootNode.children[i], nodeIds);
|
||||
}
|
||||
}
|
||||
},
|
||||
//单选:清空选中
|
||||
clean() {
|
||||
|
@ -341,6 +353,7 @@ export default {
|
|||
//下拉框关闭执行
|
||||
popoverHide() {
|
||||
this.$emit('getValue', this.returnDataKeys, this.returnDatas ? this.returnDatas : {});
|
||||
this.$emit('setSelectNodeIds', this.selectNodeIds);
|
||||
},
|
||||
// 多选,清空所有勾选
|
||||
clearSelectedNodes() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit dee87cd69aaeaca312e5211f40a3f539dc8b040a
|
||||
Subproject commit b265d6001752dd21b2d25fec113292bf34f5c99d
|
|
@ -41,7 +41,8 @@ const state = {
|
|||
selectCommand: {},
|
||||
//按照type分组的指令
|
||||
groupedCmd: {},
|
||||
librarySelectElement: {}
|
||||
librarySelectElement: {},
|
||||
uiElementLibraryModuleIds: null,
|
||||
}
|
||||
|
||||
const store = new Vuex.Store({
|
||||
|
|
|
@ -25,6 +25,7 @@ const mutations = {
|
|||
setCurrentScenario: (state, value) => state.currentScenario = value,
|
||||
setScenarioDefinition: (state, value) => state.scenarioDefinition = value,
|
||||
setGroupedCmd: (state, value) => state.groupedCmd = value,
|
||||
setUiElementLibraryModuleIds: (state, value) => state.uiElementLibraryModuleIds = value,
|
||||
}
|
||||
|
||||
export default mutations;
|
||||
|
|
Loading…
Reference in New Issue