mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
refactor: dashboard sq-text loss blur
This commit is contained in:
@@ -38,7 +38,11 @@ export const dashboardStore = defineStore('dashboard', {
|
||||
setFullscreenFlag(val: boolean) {
|
||||
this.fullscreenFlag = val
|
||||
},
|
||||
setCurComponent(value: any) {
|
||||
setCurComponent: function (value: any) {
|
||||
if (!value && this.curComponent) {
|
||||
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
this.curComponent.editing = false
|
||||
}
|
||||
this.curComponent = value
|
||||
this.curComponentId = value && value.id ? value.id : null
|
||||
},
|
||||
|
||||
@@ -735,10 +735,13 @@ function containerMouseDown(e: MouseEvent) {
|
||||
infoBox.value.startX = e.pageX
|
||||
infoBox.value.startY = e.pageY
|
||||
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
if (curComponent.value?.component !== 'SQText') {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
}
|
||||
// if (curComponent.value?.component !== 'SQText') {
|
||||
// e.preventDefault()
|
||||
// e.stopPropagation()
|
||||
// }
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
||||
function getNowPosition(addSizeX: number, addSizeY: number, moveXSize: number, moveYSize: number) {
|
||||
|
||||
@@ -65,11 +65,6 @@ const init = reactive({
|
||||
menubar: false,
|
||||
placeholder: '',
|
||||
inline: true,
|
||||
setup: function (editor: any) {
|
||||
editor.on('blur', function () {
|
||||
configItem.value.editing = false
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
const isDisabled = computed(() => props.disabled || !configItem.value.editing)
|
||||
|
||||
Reference in New Issue
Block a user