parent
8078f366ed
commit
6895400abe
@ -1,47 +1,5 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[26588],{
|
||||
|
||||
/***/ 46820:
|
||||
/*!********************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules ***!
|
||||
\********************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_SearchOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(26508);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/SearchOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_SearchOutlined = (SearchOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(91851);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_SearchOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_SearchOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SearchOutlined_SearchOutlined));
|
||||
|
||||
/***/ }),
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[1643],{
|
||||
|
||||
/***/ 9432:
|
||||
/*!*********************************************************************!*\
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,441 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[44731],{
|
||||
|
||||
/***/ 20576:
|
||||
/*!*********************************************************!*\
|
||||
!*** ./src/pages/XgdNews/addNews/index.tsx + 3 modules ***!
|
||||
\*********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
"default": function() { return /* binding */ XgdNews_addNews; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
||||
var regeneratorRuntime = __webpack_require__(10574);
|
||||
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
||||
var asyncToGenerator = __webpack_require__(39343);
|
||||
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(11006);
|
||||
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
||||
var es_form = __webpack_require__(78241);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
||||
var breadcrumb = __webpack_require__(66104);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
||||
var input = __webpack_require__(1056);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/HomeOutlined.js + 1 modules
|
||||
var HomeOutlined = __webpack_require__(56503);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/addNews/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var addNewsmodules = ({"contentWrapper":"contentWrapper___qc2Bs","nav":"nav___txjSF","btnWrapper":"btnWrapper___CqsYo","createBtn":"createBtn___KT_Hw"});
|
||||
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
||||
var markdown_editor = __webpack_require__(61816);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
|
||||
var upload = __webpack_require__(6557);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/addNews/FileUpload.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
var FileUpload = function FileUpload(_ref) {
|
||||
var value = _ref.value,
|
||||
onChange = _ref.onChange,
|
||||
_ref$initValues = _ref.initValues,
|
||||
initValues = _ref$initValues === void 0 ? [] : _ref$initValues;
|
||||
var _useState = (0,_react_17_0_2_react.useState)(function () {
|
||||
if (initValues.length > 0) {
|
||||
return initValues.map(function (file) {
|
||||
return {
|
||||
uid: file.name,
|
||||
name: file.name,
|
||||
url: file.url,
|
||||
size: 0,
|
||||
type: ''
|
||||
};
|
||||
});
|
||||
}
|
||||
return [];
|
||||
}),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
fileList = _useState2[0],
|
||||
setFileList = _useState2[1];
|
||||
var verifyFile = function verifyFile(file, fileList) {
|
||||
var isProperSize = file.size <= 300 * 1024 * 1024;
|
||||
console.log(file.size);
|
||||
if (!isProperSize) {
|
||||
message/* default */.ZP.error('文件超过300MB');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var handleChange = function handleChange(_ref2) {
|
||||
var newFileList = _ref2.fileList;
|
||||
var idArr = newFileList.map(function (fileItem) {
|
||||
var _fileItem$response;
|
||||
return (_fileItem$response = fileItem.response) === null || _fileItem$response === void 0 ? void 0 : _fileItem$response.id;
|
||||
});
|
||||
onChange(idArr);
|
||||
setFileList(newFileList);
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
||||
action: "/api/attachments.json",
|
||||
beforeUpload: verifyFile,
|
||||
onChange: handleChange,
|
||||
fileList: fileList,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
children: "\u4E0A\u4F20\u6587\u4EF6"
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var addNews_FileUpload = (FileUpload);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules
|
||||
var PlusOutlined = __webpack_require__(378);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
||||
var modal = __webpack_require__(43418);
|
||||
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
||||
var env = __webpack_require__(26078);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/addNews/CoverUpload.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var getBase64 = function getBase64(file) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = function () {
|
||||
return resolve(reader.result);
|
||||
};
|
||||
reader.onerror = function (error) {
|
||||
return reject(error);
|
||||
};
|
||||
});
|
||||
};
|
||||
var verifyFile = function verifyFile(file) {
|
||||
var isProperSize = file.size / 1024 / 1024 < 2; //小于2MB
|
||||
if (!isProperSize) {
|
||||
message/* default */.ZP.error('照片超过2MB');
|
||||
}
|
||||
return isProperSize;
|
||||
};
|
||||
var CoverUpload = function CoverUpload(_ref) {
|
||||
var onChange = _ref.onChange,
|
||||
coverUrl = _ref.coverUrl;
|
||||
var _useState = (0,_react_17_0_2_react.useState)(function () {
|
||||
if (coverUrl) {
|
||||
return [{
|
||||
uid: '-1',
|
||||
size: 0,
|
||||
type: '',
|
||||
name: '',
|
||||
url: "".concat(env/* default */.Z.API_SERVER).concat(coverUrl)
|
||||
}];
|
||||
}
|
||||
return [];
|
||||
}),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
fileList = _useState2[0],
|
||||
setFileList = _useState2[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
if (coverUrl) {
|
||||
var coverId = coverUrl.match(/\d+$/);
|
||||
(coverId === null || coverId === void 0 ? void 0 : coverId.length) && onChange(coverId[0]);
|
||||
}
|
||||
}, [coverUrl]);
|
||||
var handleChange = function handleChange(_ref2) {
|
||||
var newFileList = _ref2.fileList,
|
||||
file = _ref2.file;
|
||||
if (file.status === 'done') {
|
||||
var response = file.response;
|
||||
if (response.id) {
|
||||
onChange(response.id);
|
||||
} else {
|
||||
message/* default */.ZP.error(response.message);
|
||||
}
|
||||
}
|
||||
if (file.status === 'removed') {
|
||||
onChange(undefined);
|
||||
}
|
||||
setFileList(newFileList);
|
||||
};
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
previewVisible = _useState4[0],
|
||||
setPreviewVisible = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
previewImage = _useState6[0],
|
||||
setPreviewImage = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
previewTitle = _useState8[0],
|
||||
setPreviewTitle = _useState8[1];
|
||||
var handlePreview = /*#__PURE__*/function () {
|
||||
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(file) {
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
if (!(!file.url && !file.preview)) {
|
||||
_context.next = 4;
|
||||
break;
|
||||
}
|
||||
_context.next = 3;
|
||||
return getBase64(file.originFileObj);
|
||||
case 3:
|
||||
file.preview = _context.sent;
|
||||
case 4:
|
||||
setPreviewImage(file.url || file.preview);
|
||||
setPreviewVisible(true);
|
||||
setPreviewTitle(file.name || file.url.substring(file.url.lastIndexOf('/') + 1));
|
||||
case 7:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function handlePreview(_x) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var handleCancel = function handleCancel() {
|
||||
return setPreviewVisible(false);
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
||||
action: "/api/attachments.json",
|
||||
listType: "picture-card",
|
||||
accept: "image/jpeg,image/jpg,image/png",
|
||||
beforeUpload: verifyFile,
|
||||
onChange: handleChange,
|
||||
fileList: fileList,
|
||||
onPreview: handlePreview,
|
||||
children: fileList.length === 1 ? null : /*#__PURE__*/(0,jsx_runtime.jsx)(PlusOutlined/* default */.Z, {})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
children: "\u6CE8\u610F\uFF1A\u652F\u6301\u4E0A\u4F20.jpg/.png\u683C\u5F0F\u7684\u56FE\u7247\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u4F7F\u7528290*218\u50CF\u7D20"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
visible: previewVisible,
|
||||
title: previewTitle,
|
||||
footer: null,
|
||||
onCancel: handleCancel,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
alt: "example",
|
||||
style: {
|
||||
width: '100%'
|
||||
},
|
||||
src: previewImage
|
||||
})
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var addNews_CoverUpload = (CoverUpload);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(43788);
|
||||
// EXTERNAL MODULE: ./src/service/home.ts
|
||||
var home = __webpack_require__(8830);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/addNews/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var FormMarkdownEditor = function FormMarkdownEditor(_ref) {
|
||||
var _ref$value = _ref.value,
|
||||
value = _ref$value === void 0 ? '' : _ref$value,
|
||||
_ref$onChange = _ref.onChange,
|
||||
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
||||
onChange: onChange,
|
||||
watch: true,
|
||||
defaultValue: value
|
||||
});
|
||||
};
|
||||
var addNews = function addNews() {
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
var _useState = (0,_react_17_0_2_react.useState)(),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
initValue = _useState2[0],
|
||||
setInitValue = _useState2[1];
|
||||
var _useParams = (0,_umi_production_exports.useParams)(),
|
||||
id = _useParams.id;
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
if (id) {
|
||||
(0,home/* getSchoolNewsDetail */.sJ)(id).then(function (res) {
|
||||
setInitValue(res.school_inform);
|
||||
});
|
||||
} else {
|
||||
setInitValue({});
|
||||
}
|
||||
}, []);
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
btnLoading = _useState4[0],
|
||||
setBtnLoading = _useState4[1];
|
||||
var handleCreate = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var formValues, res, _res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.prev = 0;
|
||||
_context.next = 3;
|
||||
return form.validateFields();
|
||||
case 3:
|
||||
formValues = form.getFieldsValue();
|
||||
setBtnLoading(true);
|
||||
if (!id) {
|
||||
_context.next = 13;
|
||||
break;
|
||||
}
|
||||
_context.next = 8;
|
||||
return (0,home/* editSchoolNews */.X4)(id, formValues);
|
||||
case 8:
|
||||
res = _context.sent;
|
||||
setBtnLoading(false);
|
||||
if (res.status === 0) {
|
||||
message/* default */.ZP.success('编辑成功');
|
||||
_umi_production_exports.history.push('/');
|
||||
}
|
||||
_context.next = 18;
|
||||
break;
|
||||
case 13:
|
||||
_context.next = 15;
|
||||
return (0,home/* addSchoolNews */.St)(formValues);
|
||||
case 15:
|
||||
_res = _context.sent;
|
||||
setBtnLoading(false);
|
||||
if (_res.status === 0) {
|
||||
message/* default */.ZP.success('新建成功');
|
||||
_umi_production_exports.history.push('/');
|
||||
}
|
||||
case 18:
|
||||
_context.next = 22;
|
||||
break;
|
||||
case 20:
|
||||
_context.prev = 20;
|
||||
_context.t0 = _context["catch"](0);
|
||||
case 22:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee, null, [[0, 20]]);
|
||||
}));
|
||||
return function handleCreate() {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: "".concat(addNewsmodules.contentWrapper, " ").concat(addNewsmodules.nav),
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
||||
href: "/",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(HomeOutlined/* default */.Z, {})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
||||
children: id ? '编辑校内动态' : '新建校内动态'
|
||||
})]
|
||||
})
|
||||
}), initValue && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: addNewsmodules.contentWrapper,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
||||
form: form,
|
||||
autoComplete: "off",
|
||||
labelCol: {
|
||||
span: 2
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 20
|
||||
},
|
||||
initialValues: initValue,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
label: "\u6807\u9898",
|
||||
name: "name",
|
||||
required: true,
|
||||
rules: [{
|
||||
required: true
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
||||
maxLength: 60
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
label: "\u5C01\u9762\u56FE",
|
||||
required: true,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
name: "cover_id",
|
||||
rules: [{
|
||||
required: true,
|
||||
message: '请上传封面图'
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(addNews_CoverUpload, {
|
||||
coverUrl: initValue === null || initValue === void 0 ? void 0 : initValue.cover_url
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
label: "\u5185\u5BB9",
|
||||
name: "description",
|
||||
required: true,
|
||||
rules: [{
|
||||
required: true
|
||||
}],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormMarkdownEditor, {})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
label: "\u9644\u4EF6",
|
||||
name: "attachment_ids",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(addNews_FileUpload, {
|
||||
initValues: initValue === null || initValue === void 0 ? void 0 : initValue.attachments
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: addNewsmodules.btnWrapper,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
onClick: handleCreate,
|
||||
className: addNewsmodules.createBtn,
|
||||
type: "primary",
|
||||
loading: btnLoading,
|
||||
children: id ? '确认' : '确认新建'
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
onClick: function onClick() {
|
||||
return _umi_production_exports.history.push('/');
|
||||
},
|
||||
children: "\u53D6\u6D88"
|
||||
})]
|
||||
})]
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var XgdNews_addNews = (addNews);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -0,0 +1,20 @@
|
||||
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/XgdNews/addNews/index.less?modules ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.contentWrapper___qc2Bs {
|
||||
background: #fff;
|
||||
border-radius: 20px;
|
||||
margin: 0 14px;
|
||||
padding: 14px;
|
||||
}
|
||||
.nav___txjSF {
|
||||
margin-top: 14px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.btnWrapper___CqsYo {
|
||||
text-align: center;
|
||||
}
|
||||
.btnWrapper___CqsYo .createBtn___KT_Hw {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
@ -0,0 +1,981 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[57852],{
|
||||
|
||||
/***/ 75769:
|
||||
/*!*******************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***!
|
||||
\*******************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_CheckOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(26508);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/CheckOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_CheckOutlined = (CheckOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(91851);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CheckOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_CheckOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_CheckOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(CheckOutlined_CheckOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 52063:
|
||||
/*!******************************************************************************************************!*\
|
||||
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules ***!
|
||||
\******************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ icons_LeftOutlined; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
||||
var esm_extends = __webpack_require__(26508);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/LeftOutlined.js
|
||||
// This icon file is generated automatically.
|
||||
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
||||
/* harmony default export */ var asn_LeftOutlined = (LeftOutlined);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
||||
var AntdIcon = __webpack_require__(91851);
|
||||
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js
|
||||
|
||||
// GENERATE BY ./scripts/generate.ts
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
|
||||
|
||||
|
||||
var LeftOutlined_LeftOutlined = function LeftOutlined(props, ref) {
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
||||
ref: ref,
|
||||
icon: asn_LeftOutlined
|
||||
}));
|
||||
};
|
||||
if (false) {}
|
||||
/* harmony default export */ var icons_LeftOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(LeftOutlined_LeftOutlined));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 69705:
|
||||
/*!************************************************************!*\
|
||||
!*** ./src/pages/XgdNews/newsDetail/index.tsx + 1 modules ***!
|
||||
\************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
"default": function() { return /* binding */ XgdNews_newsDetail; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
||||
var slicedToArray = __webpack_require__(11006);
|
||||
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/typography/index.js + 18 modules
|
||||
var typography = __webpack_require__(53877);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
||||
var row = __webpack_require__(95237);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
||||
var col = __webpack_require__(43604);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js + 2 modules
|
||||
var popconfirm = __webpack_require__(14478);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/newsDetail/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var newsDetailmodules = ({"contentWrapper":"contentWrapper___LbdQx","title":"title___JbTz4","date":"date____ZbYO","back":"back___Er9zR","edit":"edit___FSiqK","delete":"delete___N1i6B","header":"header___LpsUu"});
|
||||
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
||||
var RenderHtml = __webpack_require__(32666);
|
||||
// EXTERNAL MODULE: ./src/service/home.ts
|
||||
var home = __webpack_require__(8830);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(43788);
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules
|
||||
var LeftOutlined = __webpack_require__(52063);
|
||||
// EXTERNAL MODULE: ./src/utils/authority.ts
|
||||
var authority = __webpack_require__(71633);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/XgdNews/newsDetail/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Title = typography/* default */.Z.Title;
|
||||
var newsDetail = function newsDetail() {
|
||||
var _useParams = (0,_umi_production_exports.useParams)(),
|
||||
id = _useParams.id;
|
||||
var _useState = (0,_react_17_0_2_react.useState)(),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
detail = _useState2[0],
|
||||
setDetail = _useState2[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
(0,home/* getSchoolNewsDetail */.sJ)(id).then(function (res) {
|
||||
if (res.status) {
|
||||
return;
|
||||
} else {
|
||||
var _ref = res,
|
||||
school_inform = _ref.school_inform;
|
||||
setDetail(school_inform);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
var handleDelete = function handleDelete() {
|
||||
(0,home/* deleteSchoolNews */.SE)(id).then(function (res) {
|
||||
if (!res.status) {
|
||||
message/* default */.ZP.success('删除成功');
|
||||
_umi_production_exports.history.push('/');
|
||||
}
|
||||
});
|
||||
};
|
||||
return detail ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: newsDetailmodules.contentWrapper,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
className: newsDetailmodules.header,
|
||||
justify: "space-between",
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
||||
className: newsDetailmodules.back,
|
||||
onClick: function onClick() {
|
||||
return _umi_production_exports.history.push('/');
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(LeftOutlined/* default */.Z, {}), "\u8FD4\u56DE"]
|
||||
}), (0,authority/* isCommonSuperAdminOrOperation */.ag)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: newsDetailmodules.edit,
|
||||
onClick: function onClick() {
|
||||
return _umi_production_exports.history.push("/editnews/".concat(detail.id));
|
||||
},
|
||||
children: "\u7F16\u8F91"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(popconfirm/* default */.Z, {
|
||||
title: "\u786E\u8BA4\u5220\u9664\u8BE5\u52A8\u6001?",
|
||||
onConfirm: handleDelete,
|
||||
onCancel: function onCancel() {},
|
||||
okText: "\u786E\u8BA4",
|
||||
cancelText: "\u53D6\u6D88",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: newsDetailmodules["delete"],
|
||||
children: "\u5220\u9664"
|
||||
})
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Title, {
|
||||
className: newsDetailmodules.title,
|
||||
children: detail.name
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
||||
className: newsDetailmodules.date,
|
||||
children: ["\u53D1\u5E03\u65F6\u95F4:", detail.created_at]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
||||
value: detail.description,
|
||||
style: {
|
||||
marginBottom: 24
|
||||
}
|
||||
}), detail.attachments.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: ["\u9644\u4EF6:", detail.attachments.map(function (attachment, index) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
||||
href: attachment.url,
|
||||
children: attachment.name
|
||||
})
|
||||
}, index);
|
||||
})]
|
||||
})]
|
||||
}) : null;
|
||||
};
|
||||
/* harmony default export */ var XgdNews_newsDetail = (newsDetail);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 77578:
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js ***!
|
||||
\**********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Z: function() { return /* binding */ getRenderPropValue; }
|
||||
/* harmony export */ });
|
||||
const getRenderPropValue = propValue => {
|
||||
if (!propValue) {
|
||||
return null;
|
||||
}
|
||||
if (typeof propValue === 'function') {
|
||||
return propValue();
|
||||
}
|
||||
return propValue;
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 14478:
|
||||
/*!**************************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js + 2 modules ***!
|
||||
\**************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
Z: function() { return /* binding */ popconfirm; }
|
||||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
|
||||
var ExclamationCircleFilled = __webpack_require__(86850);
|
||||
// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js
|
||||
var _classnames_2_3_2_classnames = __webpack_require__(12124);
|
||||
var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/KeyCode.js
|
||||
var KeyCode = __webpack_require__(84821);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/hooks/useMergedState.js
|
||||
var useMergedState = __webpack_require__(84381);
|
||||
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js
|
||||
var omit = __webpack_require__(99468);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
||||
var _react_17_0_2_react = __webpack_require__(59301);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
||||
var reactNode = __webpack_require__(92343);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
||||
var context = __webpack_require__(36355);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popover/index.js
|
||||
var popover = __webpack_require__(60324);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/ActionButton.js
|
||||
var ActionButton = __webpack_require__(92806);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/getRenderPropValue.js
|
||||
var getRenderPropValue = __webpack_require__(77578);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/button.js + 8 modules
|
||||
var button_button = __webpack_require__(67797);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/useLocale.js
|
||||
var useLocale = __webpack_require__(9763);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules
|
||||
var en_US = __webpack_require__(43710);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js
|
||||
var PurePanel = __webpack_require__(39722);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
||||
var genComponentStyleHook = __webpack_require__(83116);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/style/index.js
|
||||
"use client";
|
||||
|
||||
|
||||
// =============================== Base ===============================
|
||||
const genBaseStyle = token => {
|
||||
const {
|
||||
componentCls,
|
||||
iconCls,
|
||||
antCls,
|
||||
zIndexPopup,
|
||||
colorText,
|
||||
colorWarning,
|
||||
marginXXS,
|
||||
marginXS,
|
||||
fontSize,
|
||||
fontWeightStrong,
|
||||
colorTextHeading
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: {
|
||||
zIndex: zIndexPopup,
|
||||
[`&${antCls}-popover`]: {
|
||||
fontSize
|
||||
},
|
||||
[`${componentCls}-message`]: {
|
||||
marginBottom: marginXS,
|
||||
display: 'flex',
|
||||
flexWrap: 'nowrap',
|
||||
alignItems: 'start',
|
||||
[`> ${componentCls}-message-icon ${iconCls}`]: {
|
||||
color: colorWarning,
|
||||
fontSize,
|
||||
lineHeight: 1,
|
||||
marginInlineEnd: marginXS
|
||||
},
|
||||
[`${componentCls}-title`]: {
|
||||
fontWeight: fontWeightStrong,
|
||||
color: colorTextHeading,
|
||||
'&:only-child': {
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
[`${componentCls}-description`]: {
|
||||
marginTop: marginXXS,
|
||||
color: colorText
|
||||
}
|
||||
},
|
||||
[`${componentCls}-buttons`]: {
|
||||
textAlign: 'end',
|
||||
whiteSpace: 'nowrap',
|
||||
button: {
|
||||
marginInlineStart: marginXS
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
// ============================== Export ==============================
|
||||
/* harmony default export */ var popconfirm_style = ((0,genComponentStyleHook/* default */.Z)('Popconfirm', token => genBaseStyle(token), token => {
|
||||
const {
|
||||
zIndexPopupBase
|
||||
} = token;
|
||||
return {
|
||||
zIndexPopup: zIndexPopupBase + 60
|
||||
};
|
||||
}, {
|
||||
resetStyle: false
|
||||
}));
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/PurePanel.js
|
||||
"use client";
|
||||
|
||||
var __rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Overlay = props => {
|
||||
const {
|
||||
prefixCls,
|
||||
okButtonProps,
|
||||
cancelButtonProps,
|
||||
title,
|
||||
description,
|
||||
cancelText,
|
||||
okText,
|
||||
okType = 'primary',
|
||||
icon = /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
|
||||
showCancel = true,
|
||||
close,
|
||||
onConfirm,
|
||||
onCancel,
|
||||
onPopupClick
|
||||
} = props;
|
||||
const {
|
||||
getPrefixCls
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const [contextLocale] = (0,useLocale/* default */.Z)('Popconfirm', en_US/* default */.Z.Popconfirm);
|
||||
const theTitle = (0,getRenderPropValue/* getRenderPropValue */.Z)(title);
|
||||
const theDescription = (0,getRenderPropValue/* getRenderPropValue */.Z)(description);
|
||||
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-inner-content`,
|
||||
onClick: onPopupClick
|
||||
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-message`
|
||||
}, icon && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
||||
className: `${prefixCls}-message-icon`
|
||||
}, icon), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-message-text`
|
||||
}, theTitle && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-title`)
|
||||
}, theTitle), theDescription && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-description`
|
||||
}, theDescription))), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
||||
className: `${prefixCls}-buttons`
|
||||
}, showCancel && /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, Object.assign({
|
||||
onClick: onCancel,
|
||||
size: "small"
|
||||
}, cancelButtonProps), cancelText !== null && cancelText !== void 0 ? cancelText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText), /*#__PURE__*/_react_17_0_2_react.createElement(ActionButton/* default */.Z, {
|
||||
buttonProps: Object.assign(Object.assign({
|
||||
size: 'small'
|
||||
}, (0,button_button/* convertLegacyProps */.n)(okType)), okButtonProps),
|
||||
actionFn: onConfirm,
|
||||
close: close,
|
||||
prefixCls: getPrefixCls('btn'),
|
||||
quitOnNullishReturnValue: true,
|
||||
emitEvent: true
|
||||
}, okText !== null && okText !== void 0 ? okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText)));
|
||||
};
|
||||
const PurePanel_PurePanel = props => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
placement,
|
||||
className,
|
||||
style
|
||||
} = props,
|
||||
restProps = __rest(props, ["prefixCls", "placement", "className", "style"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
|
||||
const [wrapSSR] = popconfirm_style(prefixCls);
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(PurePanel/* default */.ZP, {
|
||||
placement: placement,
|
||||
className: _classnames_2_3_2_classnames_default()(prefixCls, className),
|
||||
style: style,
|
||||
content: /*#__PURE__*/_react_17_0_2_react.createElement(Overlay, Object.assign({
|
||||
prefixCls: prefixCls
|
||||
}, restProps))
|
||||
}));
|
||||
};
|
||||
/* harmony default export */ var popconfirm_PurePanel = (PurePanel_PurePanel);
|
||||
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/popconfirm/index.js
|
||||
"use client";
|
||||
|
||||
var popconfirm_rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Popconfirm = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
placement = 'top',
|
||||
trigger = 'click',
|
||||
okType = 'primary',
|
||||
icon = /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
|
||||
children,
|
||||
overlayClassName,
|
||||
onOpenChange,
|
||||
onVisibleChange
|
||||
} = props,
|
||||
restProps = popconfirm_rest(props, ["prefixCls", "placement", "trigger", "okType", "icon", "children", "overlayClassName", "onOpenChange", "onVisibleChange"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
||||
const [open, setOpen] = (0,useMergedState/* default */.Z)(false, {
|
||||
value: props.open,
|
||||
defaultValue: props.defaultOpen
|
||||
});
|
||||
// const isDestroyed = useDestroyed();
|
||||
const settingOpen = (value, e) => {
|
||||
setOpen(value, true);
|
||||
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);
|
||||
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value, e);
|
||||
};
|
||||
const close = e => {
|
||||
settingOpen(false, e);
|
||||
};
|
||||
const onConfirm = e => {
|
||||
var _a;
|
||||
return (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
|
||||
};
|
||||
const onCancel = e => {
|
||||
var _a;
|
||||
settingOpen(false, e);
|
||||
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(undefined, e);
|
||||
};
|
||||
const onKeyDown = e => {
|
||||
if (e.keyCode === KeyCode/* default */.Z.ESC && open) {
|
||||
settingOpen(false, e);
|
||||
}
|
||||
};
|
||||
const onInternalOpenChange = value => {
|
||||
const {
|
||||
disabled = false
|
||||
} = props;
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
settingOpen(value);
|
||||
};
|
||||
const prefixCls = getPrefixCls('popconfirm', customizePrefixCls);
|
||||
const overlayClassNames = _classnames_2_3_2_classnames_default()(prefixCls, overlayClassName);
|
||||
const [wrapSSR] = popconfirm_style(prefixCls);
|
||||
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(popover/* default */.Z, Object.assign({}, (0,omit/* default */.Z)(restProps, ['title']), {
|
||||
trigger: trigger,
|
||||
placement: placement,
|
||||
onOpenChange: onInternalOpenChange,
|
||||
open: open,
|
||||
ref: ref,
|
||||
overlayClassName: overlayClassNames,
|
||||
content: /*#__PURE__*/_react_17_0_2_react.createElement(Overlay, Object.assign({
|
||||
okType: okType,
|
||||
icon: icon
|
||||
}, props, {
|
||||
prefixCls: prefixCls,
|
||||
close: close,
|
||||
onConfirm: onConfirm,
|
||||
onCancel: onCancel
|
||||
})),
|
||||
"data-popover-inject": true
|
||||
}), (0,reactNode/* cloneElement */.Tm)(children, {
|
||||
onKeyDown: e => {
|
||||
var _a, _b;
|
||||
if ( /*#__PURE__*/_react_17_0_2_react.isValidElement(children)) {
|
||||
(_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
||||
}
|
||||
onKeyDown(e);
|
||||
}
|
||||
})));
|
||||
});
|
||||
// We don't care debug panel
|
||||
/* istanbul ignore next */
|
||||
Popconfirm._InternalPanelDoNotUseOrYouWillBeFired = popconfirm_PurePanel;
|
||||
if (false) {}
|
||||
/* harmony default export */ var popconfirm = (Popconfirm);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 39722:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/popover/PurePanel.js ***!
|
||||
\***************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* unused harmony exports getOverlay, RawPurePanel */
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124);
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var rc_tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-tooltip */ 55477);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider */ 36355);
|
||||
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
||||
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 17356);
|
||||
"use client";
|
||||
|
||||
var __rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const getOverlay = (prefixCls, title, content) => {
|
||||
if (!title && !content) return undefined;
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
||||
className: `${prefixCls}-title`
|
||||
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
||||
className: `${prefixCls}-inner-content`
|
||||
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_3__/* .getRenderPropValue */ .Z)(content)));
|
||||
};
|
||||
const RawPurePanel = props => {
|
||||
const {
|
||||
hashId,
|
||||
prefixCls,
|
||||
className,
|
||||
style,
|
||||
placement = 'top',
|
||||
title,
|
||||
content,
|
||||
children
|
||||
} = props;
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
||||
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className),
|
||||
style: style
|
||||
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", {
|
||||
className: `${prefixCls}-arrow`
|
||||
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_tooltip__WEBPACK_IMPORTED_MODULE_1__/* .Popup */ .G, Object.assign({}, props, {
|
||||
className: hashId,
|
||||
prefixCls: prefixCls
|
||||
}), children || getOverlay(prefixCls, title, content)));
|
||||
};
|
||||
const PurePanel = props => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls
|
||||
} = props,
|
||||
restProps = __rest(props, ["prefixCls"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
|
||||
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
|
||||
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(RawPurePanel, Object.assign({}, restProps, {
|
||||
prefixCls: prefixCls,
|
||||
hashId: hashId
|
||||
})));
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.ZP = (PurePanel);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 60324:
|
||||
/*!***********************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/popover/index.js ***!
|
||||
\***********************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124);
|
||||
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var _util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/getRenderPropValue */ 77578);
|
||||
/* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/motion */ 62892);
|
||||
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
|
||||
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../tooltip */ 6848);
|
||||
/* harmony import */ var _PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PurePanel */ 39722);
|
||||
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 17356);
|
||||
"use client";
|
||||
|
||||
var __rest = undefined && undefined.__rest || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// CSSINJS
|
||||
|
||||
const Overlay = _ref => {
|
||||
let {
|
||||
title,
|
||||
content,
|
||||
prefixCls
|
||||
} = _ref;
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
||||
className: `${prefixCls}-title`
|
||||
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
|
||||
className: `${prefixCls}-inner-content`
|
||||
}, (0,_util_getRenderPropValue__WEBPACK_IMPORTED_MODULE_2__/* .getRenderPropValue */ .Z)(content)));
|
||||
};
|
||||
const Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
title,
|
||||
content,
|
||||
overlayClassName,
|
||||
placement = 'top',
|
||||
trigger = 'hover',
|
||||
mouseEnterDelay = 0.1,
|
||||
mouseLeaveDelay = 0.1,
|
||||
overlayStyle = {}
|
||||
} = props,
|
||||
otherProps = __rest(props, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle"]);
|
||||
const {
|
||||
getPrefixCls
|
||||
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
|
||||
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
||||
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(prefixCls);
|
||||
const rootPrefixCls = getPrefixCls();
|
||||
const overlayCls = classnames__WEBPACK_IMPORTED_MODULE_0___default()(overlayClassName, hashId);
|
||||
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_tooltip__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, Object.assign({
|
||||
placement: placement,
|
||||
trigger: trigger,
|
||||
mouseEnterDelay: mouseEnterDelay,
|
||||
mouseLeaveDelay: mouseLeaveDelay,
|
||||
overlayStyle: overlayStyle
|
||||
}, otherProps, {
|
||||
prefixCls: prefixCls,
|
||||
overlayClassName: overlayCls,
|
||||
ref: ref,
|
||||
overlay: title || content ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Overlay, {
|
||||
prefixCls: prefixCls,
|
||||
title: title,
|
||||
content: content
|
||||
}) : null,
|
||||
transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_6__/* .getTransitionName */ .m)(rootPrefixCls, 'zoom-big', otherProps.transitionName),
|
||||
"data-popover-inject": true
|
||||
})));
|
||||
});
|
||||
if (false) {}
|
||||
Popover._InternalPanelDoNotUseOrYouWillBeFired = _PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP;
|
||||
/* harmony default export */ __webpack_exports__.Z = (Popover);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17356:
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/popover/style/index.js ***!
|
||||
\*****************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313);
|
||||
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style/motion */ 29878);
|
||||
/* harmony import */ var _style_placementArrow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/placementArrow */ 19447);
|
||||
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 33166);
|
||||
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 83116);
|
||||
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../theme/internal */ 37613);
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const genBaseStyle = token => {
|
||||
const {
|
||||
componentCls,
|
||||
popoverColor,
|
||||
minWidth,
|
||||
fontWeightStrong,
|
||||
popoverPadding,
|
||||
boxShadowSecondary,
|
||||
colorTextHeading,
|
||||
borderRadiusLG: borderRadius,
|
||||
zIndexPopup,
|
||||
marginXS,
|
||||
colorBgElevated,
|
||||
popoverBg
|
||||
} = token;
|
||||
return [{
|
||||
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
||||
left: {
|
||||
_skip_check_: true,
|
||||
value: 0
|
||||
},
|
||||
zIndex: zIndexPopup,
|
||||
fontWeight: 'normal',
|
||||
whiteSpace: 'normal',
|
||||
textAlign: 'start',
|
||||
cursor: 'auto',
|
||||
userSelect: 'text',
|
||||
transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,
|
||||
'--antd-arrow-background-color': colorBgElevated,
|
||||
'&-rtl': {
|
||||
direction: 'rtl'
|
||||
},
|
||||
'&-hidden': {
|
||||
display: 'none'
|
||||
},
|
||||
[`${componentCls}-content`]: {
|
||||
position: 'relative'
|
||||
},
|
||||
[`${componentCls}-inner`]: {
|
||||
backgroundColor: popoverBg,
|
||||
backgroundClip: 'padding-box',
|
||||
borderRadius,
|
||||
boxShadow: boxShadowSecondary,
|
||||
padding: popoverPadding
|
||||
},
|
||||
[`${componentCls}-title`]: {
|
||||
minWidth,
|
||||
marginBottom: marginXS,
|
||||
color: colorTextHeading,
|
||||
fontWeight: fontWeightStrong
|
||||
},
|
||||
[`${componentCls}-inner-content`]: {
|
||||
color: popoverColor
|
||||
}
|
||||
})
|
||||
},
|
||||
// Arrow Style
|
||||
(0,_style_placementArrow__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP)(token, {
|
||||
colorBg: 'var(--antd-arrow-background-color)'
|
||||
}),
|
||||
// Pure Render
|
||||
{
|
||||
[`${componentCls}-pure`]: {
|
||||
position: 'relative',
|
||||
maxWidth: 'none',
|
||||
margin: token.sizePopupArrow,
|
||||
display: 'inline-block',
|
||||
[`${componentCls}-content`]: {
|
||||
display: 'inline-block'
|
||||
}
|
||||
}
|
||||
}];
|
||||
};
|
||||
const genColorStyle = token => {
|
||||
const {
|
||||
componentCls
|
||||
} = token;
|
||||
return {
|
||||
[componentCls]: _theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .PresetColors */ .i.map(colorKey => {
|
||||
const lightColor = token[`${colorKey}6`];
|
||||
return {
|
||||
[`&${componentCls}-${colorKey}`]: {
|
||||
'--antd-arrow-background-color': lightColor,
|
||||
[`${componentCls}-inner`]: {
|
||||
backgroundColor: lightColor
|
||||
},
|
||||
[`${componentCls}-arrow`]: {
|
||||
background: 'transparent'
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
};
|
||||
};
|
||||
const genWireframeStyle = token => {
|
||||
const {
|
||||
componentCls,
|
||||
lineWidth,
|
||||
lineType,
|
||||
colorSplit,
|
||||
paddingSM,
|
||||
controlHeight,
|
||||
fontSize,
|
||||
lineHeight,
|
||||
padding
|
||||
} = token;
|
||||
const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight);
|
||||
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
||||
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
||||
const popoverPaddingHorizontal = padding;
|
||||
return {
|
||||
[componentCls]: {
|
||||
[`${componentCls}-inner`]: {
|
||||
padding: 0
|
||||
},
|
||||
[`${componentCls}-title`]: {
|
||||
margin: 0,
|
||||
padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`,
|
||||
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`
|
||||
},
|
||||
[`${componentCls}-inner-content`]: {
|
||||
padding: `${paddingSM}px ${popoverPaddingHorizontal}px`
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__.Z = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Popover', token => {
|
||||
const {
|
||||
colorBgElevated,
|
||||
colorText,
|
||||
wireframe
|
||||
} = token;
|
||||
const popoverToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_4__/* .merge */ .TS)(token, {
|
||||
popoverPadding: 12,
|
||||
popoverBg: colorBgElevated,
|
||||
popoverColor: colorText
|
||||
});
|
||||
return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_5__/* .initZoomMotion */ ._y)(popoverToken, 'zoom-big')];
|
||||
}, token => ({
|
||||
width: 177,
|
||||
minWidth: 177,
|
||||
zIndexPopup: token.zIndexPopupBase + 30
|
||||
}), {
|
||||
resetStyle: false,
|
||||
deprecatedTokens: [['width', 'minWidth']]
|
||||
}));
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15969:
|
||||
/*!*****************************************************************!*\
|
||||
!*** ./node_modules/_antd@5.9.0@antd/es/style/operationUnit.js ***!
|
||||
\*****************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ N: function() { return /* binding */ operationUnit; }
|
||||
/* harmony export */ });
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
const operationUnit = token => ({
|
||||
// FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
|
||||
// And Typography use this to generate link style which should not do this.
|
||||
color: token.colorLink,
|
||||
textDecoration: 'none',
|
||||
outline: 'none',
|
||||
cursor: 'pointer',
|
||||
transition: `color ${token.motionDurationSlow}`,
|
||||
'&:focus, &:hover': {
|
||||
color: token.colorLinkHover
|
||||
},
|
||||
'&:active': {
|
||||
color: token.colorLinkActive
|
||||
}
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 30034:
|
||||
/*!*********************************************************************!*\
|
||||
!*** ./node_modules/_rc-util@5.38.1@rc-util/es/Dom/styleChecker.js ***!
|
||||
\*********************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ G: function() { return /* binding */ isStyleSupport; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./canUseDom */ 42871);
|
||||
|
||||
var isStyleNameSupport = function isStyleNameSupport(styleName) {
|
||||
if ((0,_canUseDom__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)() && window.document.documentElement) {
|
||||
var styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
||||
var documentElement = window.document.documentElement;
|
||||
return styleNameList.some(function (name) {
|
||||
return name in documentElement.style;
|
||||
});
|
||||
}
|
||||
return false;
|
||||
};
|
||||
var isStyleValueSupport = function isStyleValueSupport(styleName, value) {
|
||||
if (!isStyleNameSupport(styleName)) {
|
||||
return false;
|
||||
}
|
||||
var ele = document.createElement('div');
|
||||
var origin = ele.style[styleName];
|
||||
ele.style[styleName] = value;
|
||||
return ele.style[styleName] !== origin;
|
||||
};
|
||||
function isStyleSupport(styleName, styleValue) {
|
||||
if (!Array.isArray(styleName) && styleValue !== undefined) {
|
||||
return isStyleValueSupport(styleName, styleValue);
|
||||
}
|
||||
return isStyleNameSupport(styleName);
|
||||
}
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -0,0 +1,161 @@
|
||||
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/XgdNews/newsDetail/index.less?modules ***!
|
||||
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.contentWrapper___LbdQx {
|
||||
background-color: #fff;
|
||||
margin: 20px 50px;
|
||||
padding: 24px;
|
||||
}
|
||||
.title___JbTz4 {
|
||||
text-align: center;
|
||||
}
|
||||
.date____ZbYO {
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
color: #6b758b;
|
||||
}
|
||||
.back___Er9zR {
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.edit___FSiqK {
|
||||
color: #165dff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.delete___N1i6B {
|
||||
color: red;
|
||||
margin-left: 24px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.header___LpsUu {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/PreviewAll/index.less?modules ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.wrp___dq7YK {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 108;
|
||||
}
|
||||
.wrp___dq7YK.bgBlack___ARIUV {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.wrp___dq7YK img,
|
||||
.wrp___dq7YK video {
|
||||
max-width: 100%;
|
||||
max-height: 80%;
|
||||
text-align: center;
|
||||
}
|
||||
.wrp___dq7YK iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #fff;
|
||||
border: none;
|
||||
}
|
||||
.monaco___VnZC3 {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.darkBlue___UprA9 * {
|
||||
font-size: 14px;
|
||||
}
|
||||
.darkBlue___UprA9 [class~='margin'],
|
||||
.darkBlue___UprA9 [class~='monaco-editor-background'] {
|
||||
background: #0a0e2d !important;
|
||||
}
|
||||
.darkBlue___UprA9 [class~='line-numbers'] {
|
||||
color: white !important;
|
||||
}
|
||||
.close___LKoWu {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
top: 40px;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
}
|
||||
.close___LKoWu > span {
|
||||
background: #4a4a4a;
|
||||
color: #fff;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.embed___hvpEJ {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[1].use[1]!./node_modules/_@umijs_bundler-webpack@4.0.88@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[4].oneOf[1].use[2]!./src/components/monaco-editor/index.css ***!
|
||||
\********************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.my-monaco-editor div,
|
||||
.my-diff-editor div {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.my-error-line-wrp {
|
||||
width: calc(100% - 20px) !important;
|
||||
background: rgba(245, 0, 0, 0.2) !important;
|
||||
height: auto !important;
|
||||
color: rgba(245, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
.noCopyPaste .quick-input-widget {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.breakpoints-select {
|
||||
|
||||
background: #FF0000;
|
||||
width: 8px !important;
|
||||
height: 8px !important;
|
||||
left: 7px !important;
|
||||
top: 7px;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.breakpoints-fake {
|
||||
background: rgba(255, 0, 0, 0.5);
|
||||
width: 8px !important;
|
||||
height: 8px !important;
|
||||
left: 7px !important;
|
||||
top: 7px;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.highlighted-line {
|
||||
background: #4B4B18;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 132 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue