给prompt-dialog添加type属性
This commit is contained in:
parent
b7f64eef43
commit
eafe4f07c4
|
@ -1,8 +1,10 @@
|
|||
import {
|
||||
customElement,
|
||||
html,
|
||||
ifDefined,
|
||||
nothing,
|
||||
query,
|
||||
property,
|
||||
CSSResultArray,
|
||||
TemplateResult,
|
||||
} from '@star-web-components/base/star-base-element.js'
|
||||
|
@ -35,7 +37,8 @@ export class StarPromptDialog extends StarBaseDialog {
|
|||
}
|
||||
// 暴露给外部使用
|
||||
@query('input') public promptInput!: HTMLInputElement
|
||||
|
||||
@property({type: String}) type!: string
|
||||
@property({type: Number}) maxlength!: number
|
||||
public static override get styles(): CSSResultArray {
|
||||
return [super.styles, promptDialogStyles]
|
||||
}
|
||||
|
@ -57,10 +60,10 @@ export class StarPromptDialog extends StarBaseDialog {
|
|||
: nothing}
|
||||
<div class="star-prompt-main">
|
||||
<input
|
||||
type="text"
|
||||
type=${ifDefined(this.type)}
|
||||
value="${this.value}"
|
||||
class="star-prompt-input"
|
||||
maxlength="10"
|
||||
maxlength=${ifDefined(this.maxlength)}
|
||||
/>
|
||||
<star-button
|
||||
id="delete"
|
||||
|
|
Loading…
Reference in New Issue