|
@@ -103,6 +103,11 @@
|
|
|
<a-form-item label="上级分类" prop="parent" v-if="chooseLevel != 1">
|
|
|
<a-cascader v-model="classForm.parent"
|
|
|
ref="cascader"
|
|
|
+ :popupStyle="{
|
|
|
+ maxWidth: '40vw',
|
|
|
+ 'overflow-x': 'auto',
|
|
|
+ }"
|
|
|
+ :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
|
|
|
:options="classifyLevelList"
|
|
|
:fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
|
|
|
placeholder="请选择上级分类,创建一级分类无需选择"
|
|
@@ -166,22 +171,25 @@ export default {
|
|
|
title: 'ID',
|
|
|
dataIndex: 'pkId',
|
|
|
align: 'center',
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '分类名称',
|
|
|
dataIndex: 'name',
|
|
|
// align: 'center',
|
|
|
- scopedSlots: {customRender: 'name'}
|
|
|
+ scopedSlots: {customRender: 'name'},
|
|
|
},
|
|
|
{
|
|
|
title: '操作人',
|
|
|
dataIndex: 'operatorName',
|
|
|
align: 'center',
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '操作时间',
|
|
|
dataIndex: 'updateTime',
|
|
|
align: 'center',
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -251,13 +259,25 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
let that = this
|
|
|
+ setInterval(() => {
|
|
|
+ document.querySelectorAll('.ant-cascader-menu-item').forEach(el => {
|
|
|
+ el.onclick = function() {
|
|
|
+ document.querySelector('.ant-cascader-menus').scrollLeft = 2048
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
setInterval(() => {
|
|
|
document.querySelectorAll('.ant-table-row-expand-icon').forEach(el => {
|
|
|
el.onclick = function() {
|
|
|
+ // 前一个兄弟元素
|
|
|
+ let preElement = el.previousElementSibling
|
|
|
+
|
|
|
// 获取level
|
|
|
- let className = el.previousElementSibling.getAttribute('class')
|
|
|
- let level = className.charAt(className.length - 1)
|
|
|
+ let className = preElement.getAttribute('class')
|
|
|
+ let level = parseInt(className.charAt(className.length - 1))
|
|
|
|
|
|
+ // preElement.parentNode.parentNode.nextSibling.firstElementChild.nextSibling.firstElementChild.style.paddingLeft = 30*(level+1) + 'px'
|
|
|
+
|
|
|
let maxLevel = that.maxLevel
|
|
|
if(maxLevel > level) return
|
|
|
// that.maxLevel = level
|
|
@@ -269,7 +289,6 @@ export default {
|
|
|
document.querySelectorAll('.ant-table-thead tr th:nth-child(2)').forEach(item => {
|
|
|
item.style.width = computed + 'px'
|
|
|
})
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
}, 1000)
|
|
@@ -538,4 +557,13 @@ export default {
|
|
|
/deep/ .ant-pagination-options {
|
|
|
margin-left: 8px;
|
|
|
}
|
|
|
+/deep/ .ant-cascader-menus {
|
|
|
+ left: 0!important;
|
|
|
+}
|
|
|
+/deep/ .ant-cascader-menu:last-child {
|
|
|
+ margin-right: 0!important;
|
|
|
+}
|
|
|
+/deep/ .ant-modal-wrap {
|
|
|
+ overflow: inherit;
|
|
|
+}
|
|
|
</style>
|