Commit ee4278d4 authored by wanli's avatar wanli

🐞 fix: 修复监视器前端多行高亮bug

parent 391a58ba
...@@ -62,6 +62,8 @@ def hello_evm(): ...@@ -62,6 +62,8 @@ def hello_evm():
'form': check('form') 'form': check('form')
} }
time.sleep(5)
return json.dumps(result) return json.dumps(result)
@api.route("/store", methods=['GET', 'POST']) @api.route("/store", methods=['GET', 'POST'])
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
import defaultSetting from './settings' import defaultSetting from './settings'
export default { export default {
name: 'App', name: 'App',
methods: {
},
mounted() { mounted() {
let divTemp = document.createElement("title"); let divTemp = document.createElement("title");
divTemp.innerHTML = defaultSetting.title; divTemp.innerHTML = defaultSetting.title;
......
...@@ -511,3 +511,10 @@ export function deleteFile(params) { ...@@ -511,3 +511,10 @@ export function deleteFile(params) {
data: params, data: params,
}); });
} }
export function fetchData() {
return request({
url: "/api/v1/evm_store/evm",
method: "get",
})
}
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
</div> </div>
</template> </template>
<script> <script>
import { fetchData } from "@/api/index";
import { postByteCodeFile } from "@/api/app-store"; import { postByteCodeFile } from "@/api/app-store";
export default { export default {
...@@ -36,6 +37,7 @@ export default { ...@@ -36,6 +37,7 @@ export default {
data() { data() {
return { return {
fileList: [], fileList: [],
page: "bytecode-tool.vue"
}; };
}, },
methods: { methods: {
...@@ -92,9 +94,36 @@ export default { ...@@ -92,9 +94,36 @@ export default {
this.$message.error(err.message); this.$message.error(err.message);
}); });
}, },
fetchData() {
console.log("请求已经发送")
fetchData()
.then((res) => {
console.log("打印来自bytecode-tool.vue");
console.log(res);
})
.catch((err) => {
console.log(this.page)
this.test()
console.log("打印来自bytecode-tool.vue");
console.log(err);
});
setTimeout(function() {
console.log("bytecode-tool timeout")
}, 3000)
setInterval(function() {
console.log("bytecode-tool interval")
}, 4000)
},
test() {
console.log("byecode-tool.vue test function")
},
}, },
mounted() {}, mounted() {},
created() {}, created() {
this.fetchData();
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
</div> </div>
</template> </template>
<script> <script>
import { fetchData } from "@/api/index";
import { postByteCodeFile } from "@/api/app-store"; import { postByteCodeFile } from "@/api/app-store";
export default { export default {
...@@ -92,9 +93,21 @@ export default { ...@@ -92,9 +93,21 @@ export default {
this.$message.error(err.message); this.$message.error(err.message);
}); });
}, },
fetchData() {
fetchData()
.then((res) => {
console.log("打印来自evue.vue")
console.log(res);
})
.catch((err) => {
console.log(err);
});
},
}, },
mounted() {}, mounted() {},
created() {}, created() {
this.fetchData()
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -966,8 +966,8 @@ export default { ...@@ -966,8 +966,8 @@ export default {
uris.push(item.uri); uris.push(item.uri);
}); });
m.image && m.image &&
m.image.forEach((item) => { m.image.forEach((item, index) => {
if (item.png_uncompressed_size > 0) { if (m.image.length - 1 === index) {
item.highlight = true; item.highlight = true;
} else { } else {
item.highlight = false; item.highlight = false;
...@@ -977,9 +977,9 @@ export default { ...@@ -977,9 +977,9 @@ export default {
if (target) { if (target) {
target.length = item.length; target.length = item.length;
target.png_total_count = item.png_total_count; target.png_total_count = item.png_total_count;
target.highlight = false; target.highlight = item.highlight;
if (item.png_uncompressed_size) { if (item.png_uncompressed_size) {
target.highlight = true; // target.highlight = true;
if (item.png_uncompressed_size !== target.png_uncompressed_size) { if (item.png_uncompressed_size !== target.png_uncompressed_size) {
target.png_uncompressed_size = item.png_uncompressed_size; target.png_uncompressed_size = item.png_uncompressed_size;
if (this.pngShowMode) this.pngList = item.png_detail || []; if (this.pngShowMode) this.pngList = item.png_detail || [];
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
inputString: null, inputString: null,
outputString: null, outputString: null,
filename: "app.js", filename: "app.js",
page: "tools.vue"
}; };
}, },
methods: { methods: {
...@@ -88,6 +89,9 @@ export default { ...@@ -88,6 +89,9 @@ export default {
this.$message.error(err.message); this.$message.error(err.message);
}); });
}, },
test() {
console.log("tool.vue test function")
}
}, },
mounted() {}, mounted() {},
created() {}, created() {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment