上一页 1 ··· 9 10 11 12 13
摘要: 屏幕放大、缩小,自适应 this.myChart 是获取存放图标的盒子元素 mounted() { window.addEventListener("resize", () => { this.myChart.resize(); }); }, beforeDestroy() { window.rem 阅读全文
posted @ 2022-07-14 15:59 DL·Coder 阅读(556) 评论(0) 推荐(0) 编辑
摘要: 放大缩小代码 使用getZr()注册和取消mousewheel事件 字体大小设置放在 textStyle 里面 this.myChart.getZr().off("mousewheel") this.myChart.getZr().on("mousewheel", (param) => { let 阅读全文
posted @ 2022-07-14 15:57 DL·Coder 阅读(1316) 评论(0) 推荐(0) 编辑
摘要: 原因:初始化没有获取到元素 方法:初始化的时候,使用$nextTick延后执行 mounted() { this.init(); }, methods: { init() { this.$nextTick(() => { this.initPic(); }); }, initPic() { cons 阅读全文
posted @ 2022-07-14 14:36 DL·Coder 阅读(5949) 评论(0) 推荐(0) 编辑
摘要: Vue 回车登录(一) 此回车为全局回车方法 created() { this.keyUpSubmit(); }, methods: { // 回车登录 keyUpSubmit() { document.onkeydown = () => { let key = window.event.keyCo 阅读全文
posted @ 2022-07-07 08:44 DL·Coder 阅读(268) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13