menu
This commit is contained in:
@@ -12,10 +12,7 @@
|
|||||||
/>
|
/>
|
||||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<Table @currentChange="currentChange" />
|
||||||
:tree-config="{ reserve: true, expandAll: !!tableStore.table.params.searchValue }"
|
|
||||||
@currentChange="currentChange"
|
|
||||||
/>
|
|
||||||
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
|
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -116,7 +113,7 @@ provide('tableStore', tableStore)
|
|||||||
|
|
||||||
const addMenu = () => {
|
const addMenu = () => {
|
||||||
console.log(popupRef)
|
console.log(popupRef)
|
||||||
popupRef.value.open('新增菜单',{})
|
popupRef.value.open('新增菜单', {})
|
||||||
}
|
}
|
||||||
const currentChange = (newValue: any) => {
|
const currentChange = (newValue: any) => {
|
||||||
emits('select', newValue.row.id)
|
emits('select', newValue.row.id)
|
||||||
@@ -127,10 +124,6 @@ const search = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableStore.table.ref?.setAllTreeExpand(true)
|
tableStore.table.ref?.setAllTreeExpand(true)
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
nextTick(() => {
|
|
||||||
tableStore.table.ref?.setAllTreeExpand(false)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user