Commit 1055eebf by 李伟康

commit 修复画笔粗细

1 parent 90115526
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
mode: "pen", //操作模式 mode: "pen", //操作模式
currentColor: "red", //当前画笔颜色 currentColor: "red", //当前画笔颜色
bgColor: "#fff", //画板背景颜色 bgColor: "#fff", //画板背景颜色
lineWidth: 3, //画笔粗细 px lineWidth: 2, //画笔粗细 px
lastRect: {}, //运动轨迹最后一个方形 lastRect: {}, //运动轨迹最后一个方形
lastCircle: {}, //运动轨迹最后一个圆形 lastCircle: {}, //运动轨迹最后一个圆形
//工具箱 //工具箱
...@@ -498,6 +498,7 @@ export default { ...@@ -498,6 +498,7 @@ export default {
//开始touch //开始touch
touchStart (e) { touchStart (e) {
if (!this.drawStatus) return if (!this.drawStatus) return
this.drawContext.setLineWidth(this.lineWidth)
let { let {
x, x,
y y
...@@ -540,6 +541,7 @@ export default { ...@@ -540,6 +541,7 @@ export default {
//touch移动 //touch移动
touchMove (e) { touchMove (e) {
if (!this.drawStatus) return if (!this.drawStatus) return
this.drawContext.setLineWidth(this.lineWidth)
let { let {
x, x,
y y
...@@ -581,6 +583,7 @@ export default { ...@@ -581,6 +583,7 @@ export default {
//touch结束 //touch结束
touchEnd (e) { touchEnd (e) {
if (!this.drawStatus) return if (!this.drawStatus) return
this.drawContext.setLineWidth(this.lineWidth)
let { let {
x, x,
y y
......
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
query query
.select(`#tab-${tabIndex}`) .select(`#tab-${tabIndex}`)
.boundingClientRect((data) => { .boundingClientRect((data) => {
console.log(data)
this.borderLeft = `left:${data.left}px;` this.borderLeft = `left:${data.left}px;`
setTimeout(() => { setTimeout(() => {
this.borderLeft += `display:block;` this.borderLeft += `display:block;`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!