|
@@ -32,7 +32,7 @@ import {
|
|
|
FileTypeList,
|
|
FileTypeList,
|
|
|
PropertySource,
|
|
PropertySource,
|
|
|
} from '@/pages/device/data';
|
|
} from '@/pages/device/data';
|
|
|
-import { useMemo, useState } from 'react';
|
|
|
|
|
|
|
+import { useEffect, useMemo, useState } from 'react';
|
|
|
import { productModel } from '@/pages/device/Product';
|
|
import { productModel } from '@/pages/device/Product';
|
|
|
import { service } from '@/pages/device/components/Metadata';
|
|
import { service } from '@/pages/device/components/Metadata';
|
|
|
import { Store } from 'jetlinks-store';
|
|
import { Store } from 'jetlinks-store';
|
|
@@ -57,11 +57,15 @@ import { onlyMessage } from '@/utils/util';
|
|
|
|
|
|
|
|
interface Props {
|
|
interface Props {
|
|
|
type: 'product' | 'device';
|
|
type: 'product' | 'device';
|
|
|
|
|
+ tabs?: string;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const Edit = observer((props: Props) => {
|
|
const Edit = observer((props: Props) => {
|
|
|
const intl = useIntl();
|
|
const intl = useIntl();
|
|
|
const [loading, setLoading] = useState<boolean>(false);
|
|
const [loading, setLoading] = useState<boolean>(false);
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ console.log(props.tabs);
|
|
|
|
|
+ }, []);
|
|
|
const form = useMemo(
|
|
const form = useMemo(
|
|
|
() =>
|
|
() =>
|
|
|
createForm({
|
|
createForm({
|
|
@@ -969,6 +973,7 @@ const Edit = observer((props: Props) => {
|
|
|
state: {
|
|
state: {
|
|
|
visible:
|
|
visible:
|
|
|
props.type === 'product' &&
|
|
props.type === 'product' &&
|
|
|
|
|
+ props.tabs !== 'tags' &&
|
|
|
"{{['int','float','double','long','date','string','boolean'].includes($deps[0])}}",
|
|
"{{['int','float','double','long','date','string','boolean'].includes($deps[0])}}",
|
|
|
// value: []
|
|
// value: []
|
|
|
},
|
|
},
|