|
|
@@ -1,13 +1,14 @@
|
|
|
+import React, { forwardRef, useEffect, useState, useLayoutEffect } from 'react'
|
|
|
import { getAuthCache } from '@/utils/auth'
|
|
|
import { CASCADER_HISTORY_KEY } from '@/utils/cache/cacheEnum'
|
|
|
import { isUnDef } from '@/utils/is'
|
|
|
-import type { CascaderProps } from 'antd'
|
|
|
import { Cascader, Divider, Tag } from 'antd'
|
|
|
-import React, { forwardRef, useEffect, useState, useLayoutEffect } from 'react'
|
|
|
import { connect } from '@umijs/max'
|
|
|
-import type { Dispatch } from '@umijs/max'
|
|
|
+import { authSaveRecord } from './shared'
|
|
|
import styles from './index.less'
|
|
|
-import { saveRecordToAuth } from './util'
|
|
|
+
|
|
|
+import type { Dispatch } from '@umijs/max'
|
|
|
+import type { CascaderProps } from 'antd'
|
|
|
import type { CascaderRef } from 'antd/lib/cascader'
|
|
|
|
|
|
type LazyCascaderProps<T> = {
|
|
|
@@ -27,7 +28,6 @@ function CLazyCascader<T>({
|
|
|
popupVisible = false,
|
|
|
showFooter = false,
|
|
|
defaultValue,
|
|
|
- onBlur,
|
|
|
isEditFormItem,
|
|
|
...resetProps
|
|
|
}: LazyCascaderProps<T>) {
|
|
|
@@ -57,7 +57,7 @@ function CLazyCascader<T>({
|
|
|
const len = nvalue?.length
|
|
|
if (len === 3) {
|
|
|
const { name, id } = selectedOptions[2]
|
|
|
- const htr = saveRecordToAuth(
|
|
|
+ const htr = authSaveRecord(
|
|
|
name,
|
|
|
id,
|
|
|
selectedOptions.map(item => ({ id: item.id, name: item.name }))
|