|
|
|
|
@ -1962,83 +1962,85 @@ var EditPage = function EditPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(Label/* default */.Z, {
|
|
|
|
|
nameWidth: 130,
|
|
|
|
|
name: "\u9009\u62E9\u6807\u7B7E",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
value: selectedTag,
|
|
|
|
|
style: {
|
|
|
|
|
width: 'calc(100% - 110px)'
|
|
|
|
|
},
|
|
|
|
|
mode: "multiple",
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6807\u7B7E",
|
|
|
|
|
options: tags === null || tags === void 0 ? void 0 : tags.map(function (item) {
|
|
|
|
|
return {
|
|
|
|
|
value: item,
|
|
|
|
|
label: item
|
|
|
|
|
};
|
|
|
|
|
}),
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
setSelectedTag(e);
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Addmodules.aBtn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setId(id + 1);
|
|
|
|
|
setAddTags(addtags.concat({
|
|
|
|
|
id: id,
|
|
|
|
|
value: ''
|
|
|
|
|
}));
|
|
|
|
|
}), mirrorOrigin === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(Label/* default */.Z, {
|
|
|
|
|
nameWidth: 130,
|
|
|
|
|
name: "\u9009\u62E9\u6807\u7B7E",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
value: selectedTag,
|
|
|
|
|
style: {
|
|
|
|
|
width: 'calc(100% - 110px)'
|
|
|
|
|
},
|
|
|
|
|
mode: "multiple",
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6807\u7B7E",
|
|
|
|
|
options: tags === null || tags === void 0 ? void 0 : tags.map(function (item) {
|
|
|
|
|
return {
|
|
|
|
|
value: item,
|
|
|
|
|
label: item
|
|
|
|
|
};
|
|
|
|
|
}),
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
setSelectedTag(e);
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Addmodules.aBtn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setId(id + 1);
|
|
|
|
|
setAddTags(addtags.concat({
|
|
|
|
|
id: id,
|
|
|
|
|
value: ''
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: "\u6DFB\u52A0\u6807\u7B7E"
|
|
|
|
|
})]
|
|
|
|
|
}), addtags.length != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Label/* default */.Z, {
|
|
|
|
|
name: "\u6DFB\u52A0\u6807\u7B7E",
|
|
|
|
|
nameWidth: 130,
|
|
|
|
|
align: "baseline",
|
|
|
|
|
required: true,
|
|
|
|
|
errorKey: "tag_name",
|
|
|
|
|
errorValue: tagError,
|
|
|
|
|
errorName: "\u8BF7\u586B\u5199\u6807\u7B7E\u540D\u79F0",
|
|
|
|
|
errorStyle: {
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
paddingBottom: 8
|
|
|
|
|
},
|
|
|
|
|
children: "\u6DFB\u52A0\u6807\u7B7E"
|
|
|
|
|
children: addtags === null || addtags === void 0 ? void 0 : addtags.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
width: 'calc(100% - 110px)',
|
|
|
|
|
marginBottom: 15
|
|
|
|
|
},
|
|
|
|
|
placeholder: "\u8BF7\u586B\u5199\u6807\u7B7E\u540D\u79F0",
|
|
|
|
|
size: "large",
|
|
|
|
|
maxLength: 32,
|
|
|
|
|
showCount: true,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
var value = e.target.value;
|
|
|
|
|
addtags[index].value = value;
|
|
|
|
|
setAddTags(toConsumableArray_default()(addtags));
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
color: '#9096A3',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var newtags = addtags.filter(function (val, key) {
|
|
|
|
|
return val.id !== item.id;
|
|
|
|
|
});
|
|
|
|
|
setAddTags(toConsumableArray_default()(newtags));
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-piliangshanchu3 delete-hover"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}, item.id);
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), addtags.length != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Label/* default */.Z, {
|
|
|
|
|
name: "\u6DFB\u52A0\u6807\u7B7E",
|
|
|
|
|
nameWidth: 130,
|
|
|
|
|
align: "baseline",
|
|
|
|
|
required: true,
|
|
|
|
|
errorKey: "tag_name",
|
|
|
|
|
errorValue: tagError,
|
|
|
|
|
errorName: "\u8BF7\u586B\u5199\u6807\u7B7E\u540D\u79F0",
|
|
|
|
|
errorStyle: {
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
paddingBottom: 8
|
|
|
|
|
},
|
|
|
|
|
children: addtags === null || addtags === void 0 ? void 0 : addtags.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
width: 'calc(100% - 110px)',
|
|
|
|
|
marginBottom: 15
|
|
|
|
|
},
|
|
|
|
|
placeholder: "\u8BF7\u586B\u5199\u6807\u7B7E\u540D\u79F0",
|
|
|
|
|
size: "large",
|
|
|
|
|
maxLength: 32,
|
|
|
|
|
showCount: true,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
var value = e.target.value;
|
|
|
|
|
addtags[index].value = value;
|
|
|
|
|
setAddTags(toConsumableArray_default()(addtags));
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
color: '#9096A3',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var newtags = addtags.filter(function (val, key) {
|
|
|
|
|
return val.id !== item.id;
|
|
|
|
|
});
|
|
|
|
|
setAddTags(toConsumableArray_default()(newtags));
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-piliangshanchu3 delete-hover"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}, item.id);
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Label/* default */.Z, {
|
|
|
|
|
name: "\u63CF\u8FF0",
|
|
|
|
|
nameWidth: 130,
|
|
|
|
|
@ -2137,7 +2139,7 @@ var EditPage = function EditPage(_ref) {
|
|
|
|
|
osVersion: secondSelectValue,
|
|
|
|
|
architecture: architecture,
|
|
|
|
|
diskSize: systemDiskSize,
|
|
|
|
|
tags: selectedTag.concat(addtags),
|
|
|
|
|
// tags: selectedTag.concat(addtags),
|
|
|
|
|
description: description
|
|
|
|
|
}
|
|
|
|
|
});
|