|
|
@ -23,7 +23,16 @@ import {
|
|
|
|
import NodeList, { MOTION_KEY, MotionEntity } from './NodeList';
|
|
|
|
import NodeList, { MOTION_KEY, MotionEntity } from './NodeList';
|
|
|
|
import { conductCheck } from './utils/conductUtil';
|
|
|
|
import { conductCheck } from './utils/conductUtil';
|
|
|
|
import DropIndicator from './DropIndicator';
|
|
|
|
import DropIndicator from './DropIndicator';
|
|
|
|
import { computed, defineComponent, onMounted, onUnmounted, reactive, ref, watchEffect } from 'vue';
|
|
|
|
import {
|
|
|
|
|
|
|
|
computed,
|
|
|
|
|
|
|
|
defineComponent,
|
|
|
|
|
|
|
|
onMounted,
|
|
|
|
|
|
|
|
onUnmounted,
|
|
|
|
|
|
|
|
reactive,
|
|
|
|
|
|
|
|
ref,
|
|
|
|
|
|
|
|
shallowRef,
|
|
|
|
|
|
|
|
watchEffect,
|
|
|
|
|
|
|
|
} from 'vue';
|
|
|
|
import initDefaultProps from '../_util/props-util/initDefaultProps';
|
|
|
|
import initDefaultProps from '../_util/props-util/initDefaultProps';
|
|
|
|
import type { CheckInfo } from './props';
|
|
|
|
import type { CheckInfo } from './props';
|
|
|
|
import { treeProps } from './props';
|
|
|
|
import { treeProps } from './props';
|
|
|
@ -59,12 +68,12 @@ export default defineComponent({
|
|
|
|
const destroyed = ref(false);
|
|
|
|
const destroyed = ref(false);
|
|
|
|
let delayedDragEnterLogic: Record<Key, number> = {};
|
|
|
|
let delayedDragEnterLogic: Record<Key, number> = {};
|
|
|
|
const indent = ref();
|
|
|
|
const indent = ref();
|
|
|
|
const selectedKeys = ref([]);
|
|
|
|
const selectedKeys = shallowRef([]);
|
|
|
|
const checkedKeys = ref([]);
|
|
|
|
const checkedKeys = shallowRef([]);
|
|
|
|
const halfCheckedKeys = ref([]);
|
|
|
|
const halfCheckedKeys = shallowRef([]);
|
|
|
|
const loadedKeys = ref([]);
|
|
|
|
const loadedKeys = shallowRef([]);
|
|
|
|
const loadingKeys = ref([]);
|
|
|
|
const loadingKeys = shallowRef([]);
|
|
|
|
const expandedKeys = ref([]);
|
|
|
|
const expandedKeys = shallowRef([]);
|
|
|
|
|
|
|
|
|
|
|
|
const dragState = reactive({
|
|
|
|
const dragState = reactive({
|
|
|
|
dragging: false,
|
|
|
|
dragging: false,
|
|
|
@ -87,7 +96,7 @@ export default defineComponent({
|
|
|
|
const treeData = computed(() => {
|
|
|
|
const treeData = computed(() => {
|
|
|
|
return props.treeData !== undefined ? props.treeData : convertTreeToData(props.children);
|
|
|
|
return props.treeData !== undefined ? props.treeData : convertTreeToData(props.children);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const keyEntities = ref({});
|
|
|
|
const keyEntities = shallowRef({});
|
|
|
|
|
|
|
|
|
|
|
|
const focused = ref(false);
|
|
|
|
const focused = ref(false);
|
|
|
|
const activeKey = ref<Key>(null);
|
|
|
|
const activeKey = ref<Key>(null);
|
|
|
|