Skip to content

Commit

Permalink
专题页面代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
yafoo committed Aug 16, 2022
1 parent a3f797e commit 82b2701
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions public/static/map.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
VueBMap.initBMapApiLoader({
ak: map_ak,
});
const {createApp, onMounted, ref, reactive, toRefs, computed, watch, defineComponent, getCurrentInstance, nextTick} = Vue;

const creat_app = data => {
const {createApp, onMounted, ref, computed} = Vue;
const app = {
setup() {
onMounted(() => {
Expand Down Expand Up @@ -39,17 +40,6 @@ const creat_app = data => {
}

const zoom = ref(data.zoom);
// const textStyle = computed(() => {
// return data => {
// const obj = {color: color(data.text_color), opacity: opacity(data.text_color), fontSize: data.text_size + 'px'};
// if(data.text_scale == 1) {
// obj.transformOrigin = '0 0';
// const scale = 2 ** (parseFloat(zoom.value).toFixed(2) - zoom.value);
// obj.transform = 'scale(' + scale + ')';
// }
// return obj;
// }
// });
const scale = computed(() => {
return 2 ** (parseFloat(zoom.value).toFixed(2) - data.zoom);
});
Expand Down

0 comments on commit 82b2701

Please sign in to comment.