Commit a5056a12 authored by 高宇's avatar 高宇

优化级联菜单用户体验2;

parent f0a0c9e7
<template> <template>
<section> <section class="single-radio">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4" :class="['client-label', 'text-right', {'required': required}]"> <el-col :span="4" :class="['client-label', 'text-right', {'required': required}]">
<span>{{label}}</span> <span>{{label}}</span>
...@@ -36,23 +36,23 @@ ...@@ -36,23 +36,23 @@
</script> </script>
<style> <style>
.el-radio-button__inner, .el-radio-button:last-child .el-radio-button__inner, .el-radio-button:first-child .el-radio-button__inner{ .single-radio .el-radio-button__inner, .single-radio .el-radio-button:last-child .el-radio-button__inner, .single-radio .el-radio-button:first-child .el-radio-button__inner{
border-left: 1px solid #DCDFE6; border-left: 1px solid #DCDFE6;
margin: 0 10px 5px 0; margin: 0 10px 5px 0;
border-radius: 6px!important; border-radius: 6px!important;
} }
.el-radio-button__inner:hover{ .single-radio .el-radio-button__inner:hover{
color: #333; color: #333;
background-color: #e6e6e6; background-color: #e6e6e6;
border-color: #adadad; border-color: #adadad;
} }
.el-radio-button__orig-radio:checked+.el-radio-button__inner{ .single-radio .el-radio-button__orig-radio:checked+.el-radio-button__inner{
color: #fff; color: #fff;
background-color: #3c3c3c; background-color: #3c3c3c;
border-color: #373737; border-color: #373737;
box-shadow: 0 0 0 0 #373737; box-shadow: 0 0 0 0 #373737;
} }
.el-radio-button__orig-radio:checked+.el-radio-button__inner:hover{ .single-radio .el-radio-button__orig-radio:checked+.el-radio-button__inner:hover{
color: #333; color: #333;
background-color: #d4d4d4; background-color: #d4d4d4;
border-color: #8c8c8c; border-color: #8c8c8c;
......
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
setScenarioOption (val) { setScenarioOption (val) {
let scenario = this.scenarioOptionIds.find(i => i.key === val) let scenario = this.scenarioOptionIds.find(i => i.key === val)
if (scenario) { if (scenario) {
this.options['WorkLogSearch[scenario_option_id]'].value = scenario.value this.options['WorkLogSearch[scenario_option_id]'].value = scenario.child
} }
}, },
setClientOption (id) { setClientOption (id) {
...@@ -265,9 +265,10 @@ ...@@ -265,9 +265,10 @@
} }
}).then(res => { }).then(res => {
Object.keys(res.options).forEach(item => { Object.keys(res.options).forEach(item => {
console.log(res.options[item])
if (res.options[item].value) { if (res.options[item].value) {
res.options[item].value.forEach(i => { res.options[item].value.forEach(i => {
if (i.value) { if (i.child) {
this.scenarioOptionIds.push(i) this.scenarioOptionIds.push(i)
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment