修改悬浮按钮的显示
parent
932c08785c
commit
702d7347c1
|
|
@ -10,6 +10,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { percentage_count } from '@/utils';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -41,7 +43,8 @@ watch(props.value, (val) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
style.value = location;
|
style.value = location;
|
||||||
|
// 60 为自身高度
|
||||||
|
new_style.value.offset_number_percentage = (new_style.value.offset_number / (846 - 60)).toFixed(4);
|
||||||
emits('change', { bottom: new_style.value.offset_number, location: new_style.value.display_location });
|
emits('change', { bottom: new_style.value.offset_number, location: new_style.value.display_location });
|
||||||
}, {immediate: true, deep: true});
|
}, {immediate: true, deep: true});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ interface defaultSearch {
|
||||||
style: {
|
style: {
|
||||||
display_location: string;
|
display_location: string;
|
||||||
offset_number: number;
|
offset_number: number;
|
||||||
|
offset_number_percentage: string;
|
||||||
float_style: string;
|
float_style: string;
|
||||||
float_style_color: string;
|
float_style_color: string;
|
||||||
};
|
};
|
||||||
|
|
@ -22,6 +23,7 @@ const defaultSearch: defaultSearch = {
|
||||||
style: {
|
style: {
|
||||||
display_location: 'right',
|
display_location: 'right',
|
||||||
offset_number: 120,
|
offset_number: 120,
|
||||||
|
offset_number_percentage: '100%',
|
||||||
float_style: 'shadow',
|
float_style: 'shadow',
|
||||||
float_style_color: '#32373a1a',
|
float_style_color: '#32373a1a',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue