VUE
ima_zhan
软件
展开
-
IDEA中 “Vue.js“ is incompatible
直接在设置里选择Plugins,然后更新vue插件就可以了原创 2020-12-11 13:15:55 · 569 阅读 · 0 评论 -
vue利用计算属性动态控制div大小
因为需要动态控制div的显示数目,所以需要div的大小能动态变化,这里使用的计算属性来实现<div class="video" :style="{width: videoWidth + 'px', height: videoHeight + 'px'}"></div>这里的videoWidth和videoHeight就是计算属性computed: { videoWidth: { get: function () { // elmWidth是当前控.原创 2020-07-25 20:55:47 · 5072 阅读 · 0 评论 -
VUE监听组件大小变化
可使用ResizeObserverhttps://developer.mozilla.org/zh-CN/docs/Web/API/ResizeObserverconst resizeObserver = new ResizeObserver(entries => { for (let entry of entries) { entry.target.style.borderRadius = Math.max(0, 250 - entry.contentRect.width) +原创 2020-07-24 16:03:43 · 2190 阅读 · 0 评论