Commit 4c2f499f authored by XieZhiXiong's avatar XieZhiXiong

fix: 伪造 label *

parent a34ef4b2
.label {
font-size: 12px;
color: #909399;
&::after {
margin-left: 4px;
font-size: 12px;
font-family: SimSun, sans-serif;
color: #ff4d4f;
content: '*';
}
}
\ No newline at end of file
...@@ -9,8 +9,8 @@ import NiceForm from '@/components/NiceForm'; ...@@ -9,8 +9,8 @@ import NiceForm from '@/components/NiceForm';
import { warehouseDetailSchema } from './schema'; import { warehouseDetailSchema } from './schema';
import { useLinkEnumEffect } from '@/components/NiceForm/linkages/linkEnum'; import { useLinkEnumEffect } from '@/components/NiceForm/linkages/linkEnum';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import styles from './index.less';
const formActions = createFormActions(); const formActions = createFormActions();
const { const {
...@@ -117,6 +117,12 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({ ...@@ -117,6 +117,12 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
setUnsaved(false); setUnsaved(false);
}; };
const AddressLabel = (
<div className={styles.label}>
仓库地址
</div>
);
return ( return (
<Spin spinning={infoLoading}> <Spin spinning={infoLoading}>
<PageHeaderWrapper <PageHeaderWrapper
...@@ -152,6 +158,9 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({ ...@@ -152,6 +158,9 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
<NiceForm <NiceForm
previewPlaceholder="' '" previewPlaceholder="' '"
editable={isEdit || !id} editable={isEdit || !id}
expressionScope={{
AddressLabel,
}}
effects={($, { setFieldState }) => { effects={($, { setFieldState }) => {
useLinkEnumEffect('areaResponses', result => useLinkEnumEffect('areaResponses', result =>
result.map(v => ({ result.map(v => ({
......
...@@ -35,7 +35,7 @@ export const warehouseDetailSchema: ISchema = { ...@@ -35,7 +35,7 @@ export const warehouseDetailSchema: ISchema = {
type: 'object', type: 'object',
'x-component': 'mega-layout', 'x-component': 'mega-layout',
'x-component-props': { 'x-component-props': {
label: '仓库地址', label: '{{AddressLabel}}',
wrapperCol: 24, wrapperCol: 24,
}, },
required: true, required: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment