fix: vueDraggable disabled
This commit is contained in:
parent
948ec2fde6
commit
4715e4d84e
@ -201,6 +201,6 @@ function getModelFn() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open, dialogVisible })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
||||||
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
||||||
@ -154,7 +154,7 @@ const permissionPrecise = computed (() => {
|
|||||||
return permissionMap['knowledge'][apiType.value]
|
return permissionMap['knowledge'][apiType.value]
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['clickCard','changeState', 'deleteParagraph', 'refresh', 'refreshMigrateParagraph','move'])
|
const emit = defineEmits(['dialogVisibleChange','clickCard','changeState', 'deleteParagraph', 'refresh', 'refreshMigrateParagraph','move'])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const changeStateloading = ref(false)
|
const changeStateloading = ref(false)
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
@ -222,7 +222,7 @@ function editParagraph(row: any) {
|
|||||||
const cardClick = permissionPrecise.value.doc_edit(id)
|
const cardClick = permissionPrecise.value.doc_edit(id)
|
||||||
|
|
||||||
function handleClickCard(row: any) {
|
function handleClickCard(row: any) {
|
||||||
if (!cardClick)
|
if (!cardClick || dialogVisible.value)
|
||||||
{return }
|
{return }
|
||||||
if (!props.disabled) {
|
if (!props.disabled) {
|
||||||
editParagraph(row)
|
editParagraph(row)
|
||||||
@ -248,6 +248,11 @@ function refresh(data?: any) {
|
|||||||
function refreshMigrateParagraph() {
|
function refreshMigrateParagraph() {
|
||||||
emit('refreshMigrateParagraph', props.data)
|
emit('refreshMigrateParagraph', props.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dialogVisible = computed(()=> ParagraphDialogRef.value?.dialogVisible || SelectDocumentDialogRef.value?.dialogVisible || GenerateRelatedDialogRef.value?.dialogVisible)
|
||||||
|
watch(dialogVisible, (val: boolean)=>{
|
||||||
|
emit('dialogVisibleChange', val)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.paragraph-box {
|
.paragraph-box {
|
||||||
|
|||||||
@ -8,9 +8,6 @@
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@click.stop
|
@click.stop
|
||||||
@mousemove.stop
|
|
||||||
@mousedown.stop
|
|
||||||
@keydown.stop
|
|
||||||
>
|
>
|
||||||
<el-row v-loading="loading">
|
<el-row v-loading="loading">
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
@ -165,6 +162,6 @@ const handleDebounceClick = debounce(() => {
|
|||||||
submitHandle()
|
submitHandle()
|
||||||
}, 200)
|
}, 200)
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open, dialogVisible })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@ -86,6 +86,6 @@ function changeDocument(document_id: string) {
|
|||||||
localStorage.setItem(id + 'chat_document_id', document_id)
|
localStorage.setItem(id + 'chat_document_id', document_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open, dialogVisible })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|||||||
@ -85,7 +85,7 @@
|
|||||||
<VueDraggable
|
<VueDraggable
|
||||||
ref="el"
|
ref="el"
|
||||||
v-model="paragraphDetail"
|
v-model="paragraphDetail"
|
||||||
:disabled="isBatch === true || shareDisabled || !permissionPrecise.doc_edit(id)"
|
:disabled="isBatch === true || shareDisabled || dialogVisible || !permissionPrecise.doc_edit(id)"
|
||||||
handle=".handle"
|
handle=".handle"
|
||||||
:animation="150"
|
:animation="150"
|
||||||
ghostClass="ghost"
|
ghostClass="ghost"
|
||||||
@ -118,6 +118,7 @@
|
|||||||
@refresh="refresh"
|
@refresh="refresh"
|
||||||
@refreshMigrateParagraph="refreshMigrateParagraph"
|
@refreshMigrateParagraph="refreshMigrateParagraph"
|
||||||
:disabled="shareDisabled"
|
:disabled="shareDisabled"
|
||||||
|
@dialogVisibleChange="dialogVisibleChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -163,7 +164,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref, onMounted, computed } from 'vue'
|
import { reactive, ref, onMounted, computed, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import ParagraphDialog from './component/ParagraphDialog.vue'
|
import ParagraphDialog from './component/ParagraphDialog.vue'
|
||||||
import ParagraphCard from './component/ParagraphCard.vue'
|
import ParagraphCard from './component/ParagraphCard.vue'
|
||||||
@ -201,6 +202,14 @@ const title = ref('')
|
|||||||
const search = ref('')
|
const search = ref('')
|
||||||
const searchType = ref('title')
|
const searchType = ref('title')
|
||||||
|
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
watch(()=>ParagraphDialogRef.value?.dialogVisible, (val: boolean) => {
|
||||||
|
dialogVisible.value = val
|
||||||
|
})
|
||||||
|
function dialogVisibleChange(val: boolean) {
|
||||||
|
dialogVisible.value = val
|
||||||
|
}
|
||||||
|
|
||||||
const handleClick = (e: MouseEvent, ele: any) => {
|
const handleClick = (e: MouseEvent, ele: any) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
document.querySelector(`${ele}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
document.querySelector(`${ele}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user