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