We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我用npm安装后按照文档写了一个示例,发现水平和垂直的虚线是可以拖动并且有动画效果的, 但是无法将虚线固定到屏幕上. 即松开鼠标后虚线显示不见了. 后来发现是 <div :style="{top:verticalDottedTop + 'px'}" class="vue-ruler-ref-dot-h" /> <div :style="{left:horizontalDottedLeft + 'px'}" class="vue-ruler-ref-dot-v" /> 中: style绑定的时候有问题. 我重新定义了两个响应式data: hStyle和lStyle, 修改上述代码为... :style="hStyle" 和...:style="lStyle" , 并修改方法dottedLineMove 中对x 和y 赋值的地方:
<div :style="{top:verticalDottedTop + 'px'}" class="vue-ruler-ref-dot-h" /> <div :style="{left:horizontalDottedLeft + 'px'}" class="vue-ruler-ref-dot-v" />
... :style="hStyle"
...:style="lStyle"
dottedLineMove
x
y
const topPx = this.verticalDottedTop + "px"; this.hStyle = { top: topPx };
const leftPx = this.horizontalDottedLeft + "px"; this.lStyle = { left: leftPx };
然后 就可以了.
我的Vue版本是2.6.10, 感觉像是兼容性问题.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我用npm安装后按照文档写了一个示例,发现水平和垂直的虚线是可以拖动并且有动画效果的, 但是无法将虚线固定到屏幕上. 即松开鼠标后虚线显示不见了.
后来发现是
<div :style="{top:verticalDottedTop + 'px'}" class="vue-ruler-ref-dot-h" /> <div :style="{left:horizontalDottedLeft + 'px'}" class="vue-ruler-ref-dot-v" />
中: style绑定的时候有问题.
我重新定义了两个响应式data: hStyle和lStyle,
修改上述代码为
... :style="hStyle"
和...:style="lStyle"
, 并修改方法dottedLineMove
中对x
和y
赋值的地方:const topPx = this.verticalDottedTop + "px"; this.hStyle = { top: topPx };
const leftPx = this.horizontalDottedLeft + "px"; this.lStyle = { left: leftPx };
然后 就可以了.
我的Vue版本是2.6.10, 感觉像是兼容性问题.
The text was updated successfully, but these errors were encountered: