修改优化
parent
08f6831767
commit
2a97aecd21
|
|
@ -79,15 +79,15 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
const icon_data = reactive({
|
const icon_data = reactive({
|
||||||
name: 'margin',
|
name: 'margin',
|
||||||
title: '统一'
|
title: '独个'
|
||||||
});
|
});
|
||||||
const icon_event = (name: string) => {
|
const icon_event = (name: string) => {
|
||||||
if (name == 'margin') {
|
if (name == 'margin') {
|
||||||
icon_data.name = 'alone';
|
icon_data.name = 'alone';
|
||||||
icon_data.title = '独个';
|
icon_data.title = '统一';
|
||||||
} else {
|
} else {
|
||||||
icon_data.name = 'margin';
|
icon_data.name = 'margin';
|
||||||
icon_data.title = '统一';
|
icon_data.title = '独个';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
||||||
|
|
@ -79,15 +79,15 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
const icon_data = reactive({
|
const icon_data = reactive({
|
||||||
name: 'margin',
|
name: 'margin',
|
||||||
title: '统一'
|
title: '独个'
|
||||||
});
|
});
|
||||||
const icon_event = (name: string) => {
|
const icon_event = (name: string) => {
|
||||||
if (name == 'margin') {
|
if (name == 'margin') {
|
||||||
icon_data.name = 'alone';
|
icon_data.name = 'alone';
|
||||||
icon_data.title = '独个';
|
icon_data.title = '统一';
|
||||||
} else {
|
} else {
|
||||||
icon_data.name = 'margin';
|
icon_data.name = 'margin';
|
||||||
icon_data.title = '统一';
|
icon_data.title = '独个';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
||||||
|
|
@ -97,15 +97,15 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
const icon_data = reactive({
|
const icon_data = reactive({
|
||||||
name: 'unified',
|
name: 'unified',
|
||||||
title: '统一'
|
title: '独个'
|
||||||
});
|
});
|
||||||
const icon_event = (name: string) => {
|
const icon_event = (name: string) => {
|
||||||
if (name == 'unified') {
|
if (name == 'unified') {
|
||||||
icon_data.name = 'alone';
|
icon_data.name = 'alone';
|
||||||
icon_data.title = '独个';
|
icon_data.title = '统一';
|
||||||
} else {
|
} else {
|
||||||
icon_data.name = 'unified';
|
icon_data.name = 'unified';
|
||||||
icon_data.title = '统一';
|
icon_data.title = '独个';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="slider w">
|
<div class="slider w">
|
||||||
<el-slider v-model="modelValue" :min="min" :max="max" :step="step" />
|
<template v-if="max <= 10">
|
||||||
|
<el-slider v-model="modelValue" :min="min" :max="max" :step="step" show-stops />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-slider v-model="modelValue" :min="min" :max="max" :step="step" />
|
||||||
|
</template>
|
||||||
<input-number v-model="modelValue" :class="type == 'notRetract'? 'slider-input' : 'slider-retract-input'" :min="min" :max="max"></input-number>
|
<input-number v-model="modelValue" :class="type == 'notRetract'? 'slider-input' : 'slider-retract-input'" :min="min" :max="max"></input-number>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -33,6 +38,9 @@ const modelValue = defineModel({ type: Number, default: 0 });
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
:deep(.el-slider__stop) {
|
||||||
|
background: #f2f2f2;
|
||||||
|
}
|
||||||
.slider-input {
|
.slider-input {
|
||||||
:deep(.el-input-number) {
|
:deep(.el-input-number) {
|
||||||
width: 10.7rem;
|
width: 10.7rem;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue