mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-27 15:50:43 +00:00
no message
This commit is contained in:
parent
2e7f2bc316
commit
4c068f4a62
@ -151,10 +151,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
windowSizeListener() {
|
windowSizeListener() {
|
||||||
this.$store.state.windowWidth = window.outerWidth
|
this.$store.state.windowWidth = $A(window).width()
|
||||||
this.$store.state.windowHeight = window.outerHeight
|
this.$store.state.windowHeight = $A(window).height()
|
||||||
this.$store.state.windowLarge = window.outerWidth > 768
|
this.$store.state.windowLarge = this.$store.state.windowWidth > 768
|
||||||
this.$store.state.windowSmall = window.outerWidth <= 768
|
this.$store.state.windowSmall = this.$store.state.windowWidth <= 768
|
||||||
},
|
},
|
||||||
|
|
||||||
windowScrollListener() {
|
windowScrollListener() {
|
||||||
|
|||||||
@ -182,13 +182,13 @@ export default {
|
|||||||
let top = e.clientY - this.record.y;
|
let top = e.clientY - this.record.y;
|
||||||
if (left < 0) {
|
if (left < 0) {
|
||||||
left = 0
|
left = 0
|
||||||
} else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) {
|
} else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) {
|
||||||
left = window.outerWidth - this.floatDrag.offsetWidth
|
left = window.innerWidth - this.floatDrag.offsetWidth
|
||||||
}
|
}
|
||||||
if (top < 0) {
|
if (top < 0) {
|
||||||
top = 0
|
top = 0
|
||||||
} else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) {
|
} else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) {
|
||||||
top = window.outerHeight - this.floatDrag.offsetHeight
|
top = window.innerHeight - this.floatDrag.offsetHeight
|
||||||
}
|
}
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.top = top;
|
this.top = top;
|
||||||
@ -219,13 +219,13 @@ export default {
|
|||||||
let top = touch.clientY - this.floatDrag.offsetHeight / 2;
|
let top = touch.clientY - this.floatDrag.offsetHeight / 2;
|
||||||
if (left < 0) {
|
if (left < 0) {
|
||||||
left = 0
|
left = 0
|
||||||
} else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) {
|
} else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) {
|
||||||
left = window.outerWidth - this.floatDrag.offsetWidth
|
left = window.innerWidth - this.floatDrag.offsetWidth
|
||||||
}
|
}
|
||||||
if (top < 0) {
|
if (top < 0) {
|
||||||
top = 0
|
top = 0
|
||||||
} else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) {
|
} else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) {
|
||||||
top = window.outerHeight - this.floatDrag.offsetHeight
|
top = window.innerHeight - this.floatDrag.offsetHeight
|
||||||
}
|
}
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.top = top;
|
this.top = top;
|
||||||
|
|||||||
@ -4317,7 +4317,7 @@ function maybeScrollWindow(cm, rect) {
|
|||||||
var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
|
var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
|
||||||
if (rect.top + box.top < 0) {
|
if (rect.top + box.top < 0) {
|
||||||
doScroll = true;
|
doScroll = true;
|
||||||
} else if (rect.bottom + box.top > (window.outerHeight || document.documentElement.clientHeight)) {
|
} else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) {
|
||||||
doScroll = false;
|
doScroll = false;
|
||||||
}
|
}
|
||||||
if (doScroll != null && !phantom) {
|
if (doScroll != null && !phantom) {
|
||||||
@ -11172,7 +11172,7 @@ function findPosH(doc, pos, dir, unit, visually) {
|
|||||||
function findPosV(cm, pos, dir, unit) {
|
function findPosV(cm, pos, dir, unit) {
|
||||||
var doc = cm.doc, x = pos.left, y;
|
var doc = cm.doc, x = pos.left, y;
|
||||||
if (unit == "page") {
|
if (unit == "page") {
|
||||||
var pageSize = Math.min(cm.display.wrapper.clientHeight, window.outerHeight || document.documentElement.clientHeight);
|
var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
|
||||||
var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
|
var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
|
||||||
y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
|
y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
|
||||||
|
|
||||||
|
|||||||
@ -622,24 +622,26 @@ export default {
|
|||||||
|
|
||||||
dialogStyle() {
|
dialogStyle() {
|
||||||
const {windowHeight, hasOpenDialog} = this;
|
const {windowHeight, hasOpenDialog} = this;
|
||||||
let height = Math.min(1100, windowHeight)
|
const height = Math.min(1100, windowHeight)
|
||||||
if (!height) {
|
if (!height) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
if (!hasOpenDialog) {
|
if (!hasOpenDialog) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
const factor = height > 900 ? 200 : 70;
|
||||||
return {
|
return {
|
||||||
minHeight: (height - (height > 900 ? 200 : 150) - 48) + 'px'
|
minHeight: (height - factor - 48) + 'px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
taskDetailStyle() {
|
taskDetailStyle() {
|
||||||
const {modalMode, windowHeight, hasOpenDialog} = this;
|
const {modalMode, windowHeight, hasOpenDialog} = this;
|
||||||
let height = Math.min(1100, windowHeight)
|
const height = Math.min(1100, windowHeight)
|
||||||
if (modalMode && hasOpenDialog) {
|
if (modalMode && hasOpenDialog) {
|
||||||
|
const factor = height > 900 ? 200 : 70;
|
||||||
return {
|
return {
|
||||||
maxHeight: (height - (height > 900 ? 200 : 150) - 30) + 'px'
|
maxHeight: (height - factor - 30) + 'px'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {}
|
return {}
|
||||||
@ -1242,8 +1244,8 @@ export default {
|
|||||||
resizeDialog() {
|
resizeDialog() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
this.$Electron.sendSyncMessage('windowSize', {
|
this.$Electron.sendSyncMessage('windowSize', {
|
||||||
width: Math.max(1100, window.outerWidth),
|
width: Math.max(1100, this.windowWidth),
|
||||||
height: Math.max(720, window.outerHeight),
|
height: Math.max(720, this.windowHeight),
|
||||||
minWidth: 800,
|
minWidth: 800,
|
||||||
minHeight: 600,
|
minHeight: 600,
|
||||||
autoZoom: true,
|
autoZoom: true,
|
||||||
|
|||||||
8
resources/assets/js/store/state.js
vendored
8
resources/assets/js/store/state.js
vendored
@ -1,12 +1,12 @@
|
|||||||
const stateData = {
|
const stateData = {
|
||||||
// 浏览器尺寸信息
|
// 浏览器尺寸信息
|
||||||
windowWidth: window.outerWidth,
|
windowWidth: $A(window).width(),
|
||||||
windowHeight: window.outerHeight,
|
windowHeight: $A(window).height(),
|
||||||
windowScrollY: 0,
|
windowScrollY: 0,
|
||||||
|
|
||||||
// 浏览器窗口类型
|
// 浏览器窗口类型
|
||||||
windowLarge: window.outerWidth > 768, // 大窗口
|
windowLarge: $A(window).width() > 768, // 大窗口
|
||||||
windowSmall: window.outerWidth <= 768, // 小窗口
|
windowSmall: $A(window).width() <= 768, // 小窗口
|
||||||
|
|
||||||
// 播放中的音频地址
|
// 播放中的音频地址
|
||||||
audioPlaying: null,
|
audioPlaying: null,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user