|
|
|
|
@ -3,6 +3,7 @@ import ModalFooter from '@/components/modal-footer';
|
|
|
|
|
import SealInput from '@/components/seal-form/seal-input';
|
|
|
|
|
import { useIntl } from '@umijs/max';
|
|
|
|
|
import { Form, Modal } from 'antd';
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import SimpleBar from 'simplebar-react';
|
|
|
|
|
import 'simplebar-react/dist/simplebar.min.css';
|
|
|
|
|
@ -93,7 +94,32 @@ const UpdateLabels: React.FC<ViewModalProps> = (props) => {
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item<FormData> name="labels">
|
|
|
|
|
<Form.Item<FormData>
|
|
|
|
|
name="labels"
|
|
|
|
|
rules={[
|
|
|
|
|
() => ({
|
|
|
|
|
validator(rule, value) {
|
|
|
|
|
if (_.keys(value).length > 0) {
|
|
|
|
|
if (_.some(_.keys(value), (k: string) => !value[k])) {
|
|
|
|
|
return Promise.reject(
|
|
|
|
|
intl.formatMessage(
|
|
|
|
|
{
|
|
|
|
|
id: 'common.validate.value'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: intl.formatMessage({
|
|
|
|
|
id: 'resources.form.label'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<LabelSelector
|
|
|
|
|
label={intl.formatMessage({
|
|
|
|
|
id: 'resources.table.labels'
|
|
|
|
|
|