我是靠谱客的博主 殷勤小馒头,这篇文章主要介绍vue项目 友好 放大缩小设置,现在分享给大家,希望可以做个参考。

vue项目 友好 放大缩小设置zoom属性

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template> <div id="app" :style="{zoom : zoomNum}"> <button @click="change(1)">放大</button> <button @click="change(-1)">缩小</button> <router-view style="height:100%;padding-top:170px" /> </div> </template> <script> export default ({ data() { return { zoomNum:1 } }, methods:{ change(num) { if(num > 0 ) { this.zoomNum = this.zoomNum +0.1; } else{ this.zoomNum = this.zoomNum - 0.1 } } } }) </script> <style lang="less" scoped> #app { font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; /* text-align: center; */ color: #2c3e50; // overflow: hidden; // overflow-y: scroll; // height: 100vh; } </style>

最后

以上就是殷勤小馒头最近收集整理的关于vue项目 友好 放大缩小设置的全部内容,更多相关vue项目内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部