This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
placeholder="请选择省市区"
|
||||
clearable
|
||||
class="region-cascader"
|
||||
popper-class="agent-registration-cascader-popper"
|
||||
@change="handleRegionChange"
|
||||
/>
|
||||
</ElFormItem>
|
||||
@@ -119,7 +120,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
|
||||
import { computed, onBeforeUnmount, reactive, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { CascaderOption, CascaderValue, FormInstance, FormRules } from 'element-plus'
|
||||
@@ -307,25 +308,12 @@
|
||||
form.code = ''
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.documentElement.classList.add('allow-touch-scroll')
|
||||
document.body.classList.add('allow-touch-scroll')
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (timer) clearInterval(timer)
|
||||
document.documentElement.classList.remove('allow-touch-scroll')
|
||||
document.body.classList.remove('allow-touch-scroll')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:global(html.allow-touch-scroll),
|
||||
:global(body.allow-touch-scroll) {
|
||||
touch-action: pan-y;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.agent-registration-page {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -440,4 +428,30 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
:global(.agent-registration-cascader-popper) {
|
||||
width: calc(100vw - 24px) !important;
|
||||
max-width: calc(100vw - 24px) !important;
|
||||
}
|
||||
|
||||
:global(.agent-registration-cascader-popper .el-cascader-panel) {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
:global(.agent-registration-cascader-popper .el-cascader-menu) {
|
||||
flex: 1 1 0;
|
||||
width: 0;
|
||||
min-width: 0 !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:global(.agent-registration-cascader-popper .el-cascader-node__label) {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user