修改悬浮按钮的显示

v1.0.0
于肖磊 2024-09-26 18:17:52 +08:00
parent 932c08785c
commit 702d7347c1
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,8 @@
</div>
</template>
<script setup lang="ts">
import { percentage_count } from '@/utils';
const props = defineProps({
value: {
type: Object,
@ -41,7 +43,8 @@ watch(props.value, (val) => {
}
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 });
}, {immediate: true, deep: true});
</script>

View File

@ -9,6 +9,7 @@ interface defaultSearch {
style: {
display_location: string;
offset_number: number;
offset_number_percentage: string;
float_style: string;
float_style_color: string;
};
@ -22,6 +23,7 @@ const defaultSearch: defaultSearch = {
style: {
display_location: 'right',
offset_number: 120,
offset_number_percentage: '100%',
float_style: 'shadow',
float_style_color: '#32373a1a',
},