fix: Duplicated key
							parent
							
								
									ef14b966f7
								
							
						
					
					
						commit
						684ab06102
					
				| 
						 | 
				
			
			@ -13,9 +13,9 @@ import { computed, watch, ref, onMounted, unref, useSlots, useAttrs } from 'vue'
 | 
			
		|||
import { Tree } from 'ant-design-vue'
 | 
			
		||||
import { isArray, isFunction } from '@/utils/is'
 | 
			
		||||
import { get } from 'lodash-es'
 | 
			
		||||
import { handleTree as handleTreeFn } from '@/utils/tree'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { LoadingOutlined } from '@ant-design/icons-vue'
 | 
			
		||||
import { handleTree } from '@/utils/tree'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ApiTree' })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -81,7 +81,7 @@ async function fetch() {
 | 
			
		|||
  loading.value = false
 | 
			
		||||
  if (!result) return
 | 
			
		||||
  if (props.handleTree) {
 | 
			
		||||
    result = handleTree(result, props.handleTree)
 | 
			
		||||
    result = handleTreeFn(result, props.handleTree)
 | 
			
		||||
  }
 | 
			
		||||
  if (!isArray(result)) {
 | 
			
		||||
    result = get(result, props.resultField)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ import { isArray, isFunction } from '@/utils/is'
 | 
			
		|||
import { get, set } from 'lodash-es'
 | 
			
		||||
import { propTypes } from '@/utils/propTypes'
 | 
			
		||||
import { LoadingOutlined } from '@ant-design/icons-vue'
 | 
			
		||||
import { handleTree } from '@/utils/tree'
 | 
			
		||||
import { handleTree as handleTreeFn } from '@/utils/tree'
 | 
			
		||||
 | 
			
		||||
defineOptions({ name: 'ApiTreeSelect' })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -82,7 +82,7 @@ async function fetch() {
 | 
			
		|||
    result = get(result, props.resultField)
 | 
			
		||||
  }
 | 
			
		||||
  if (props.handleTree) {
 | 
			
		||||
    result = handleTree(result, props.handleTree)
 | 
			
		||||
    result = handleTreeFn(result, props.handleTree)
 | 
			
		||||
  }
 | 
			
		||||
  if (props.parentLabel) {
 | 
			
		||||
    let tree: Recordable = { id: props.parentId, children: [] }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ import 'tinymce/plugins/wordcount'
 | 
			
		|||
 | 
			
		||||
import { computed, nextTick, ref, unref, watch, onDeactivated, onBeforeUnmount, useAttrs } from 'vue'
 | 
			
		||||
import ImgUpload from './ImgUpload.vue'
 | 
			
		||||
import { toolbar, plugins } from './tinymce'
 | 
			
		||||
import { toolbar as defaultToolbar, plugins as defaultPlugins } from './tinymce'
 | 
			
		||||
import { buildShortUUID } from '@/utils/uuid'
 | 
			
		||||
import { bindHandlers } from './helper'
 | 
			
		||||
import { onMountedOrActivated } from '@/hooks/core/onMountedOrActivated'
 | 
			
		||||
| 
						 | 
				
			
			@ -72,11 +72,11 @@ const props = defineProps({
 | 
			
		|||
 | 
			
		||||
  toolbar: {
 | 
			
		||||
    type: Array as PropType<string[]>,
 | 
			
		||||
    default: toolbar
 | 
			
		||||
    default: defaultToolbar
 | 
			
		||||
  },
 | 
			
		||||
  plugins: {
 | 
			
		||||
    type: Array as PropType<string[]>,
 | 
			
		||||
    default: plugins
 | 
			
		||||
    default: defaultPlugins
 | 
			
		||||
  },
 | 
			
		||||
  modelValue: {
 | 
			
		||||
    type: String
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue