feat:optimize add content block

This commit is contained in:
Hufe921
2022-11-29 21:23:31 +08:00
parent 67d69e9b74
commit c79f647bc7
6 changed files with 52 additions and 11 deletions
+4
View File
@@ -10,6 +10,7 @@ export interface IDialogData {
placeholder?: string;
width?: number;
height?: number;
required?: boolean;
}
export interface IDialogConfirm {
@@ -84,6 +85,9 @@ export class Dialog {
const optionName = document.createElement('span')
optionName.append(document.createTextNode(option.label))
optionItemContainer.append(optionName)
if (option.required) {
optionName.classList.add('dialog-option__item--require')
}
}
// 选项输入框
let optionInput: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
+9
View File
@@ -61,6 +61,7 @@
margin-right: 12px;
font-size: 14px;
color: #3d4757;
position: relative;
}
.dialog-option__item input,
@@ -84,6 +85,14 @@
border-color: #4991f2;
}
.dialog-option__item--require::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
position: absolute;
left: -8px;
}
.dialog-menu {
display: flex;
align-items: center;