feat:optimize add content block
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user