feat: 元素库样式优化

This commit is contained in:
chenjianxing 2022-03-29 14:04:45 +08:00 committed by 刘瑞斌
parent 24fab2517b
commit c172538a31
5 changed files with 29 additions and 3 deletions

View File

@ -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>

View File

@ -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

View File

@ -41,7 +41,8 @@ const state = {
selectCommand: {},
//按照type分组的指令
groupedCmd: {},
librarySelectElement: {}
librarySelectElement: {},
uiElementLibraryModuleIds: null,
}
const store = new Vuex.Store({

View File

@ -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;