|
@@ -33,6 +33,10 @@
|
|
|
<div>*分类</div>
|
|
|
<a-form-model-item prop="classify">
|
|
|
<a-cascader :options="classifyList"
|
|
|
+ :popupStyle="{
|
|
|
+ maxWidth: widthVar + 'px',
|
|
|
+ 'overflow-x': 'auto'
|
|
|
+ }"
|
|
|
v-model="bannerForm.classify"
|
|
|
:fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
|
|
|
placeholder="请选择"
|
|
@@ -168,6 +172,19 @@ export default {
|
|
|
this.headers['Authorization'] = 'Bearer ' + token
|
|
|
}
|
|
|
},
|
|
|
+ mounted(){
|
|
|
+ // 计算
|
|
|
+ let innerWidth = window.innerWidth
|
|
|
+ let that=this
|
|
|
+ setTimeout(() => {
|
|
|
+ that.widthVar = innerWidth*0.6
|
|
|
+ }, 1000);
|
|
|
+ document.onclick=function(element){
|
|
|
+ if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
|
|
|
+ document.querySelector('.ant-cascader-menus').scrollLeft = 20480
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
deactivated() {
|
|
|
this.$refs.bannerRef.clearValidate()
|
|
|
},
|