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