ui: 调整消息媒体的大小
This commit is contained in:
@@ -11,8 +11,8 @@ customElements.define('chat-image', class extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.style.display = 'block'
|
||||
const e = new Image()
|
||||
e.style.maxWidth = "100%"
|
||||
e.style.maxHeight = "90%"
|
||||
e.style.maxWidth = "400px"
|
||||
e.style.maxHeight = "300px"
|
||||
e.style.marginTop = '5px'
|
||||
e.style.marginBottom = '5px'
|
||||
e.style.borderRadius = "var(--mdui-shape-corner-medium)"
|
||||
|
||||
@@ -7,6 +7,8 @@ customElements.define('chat-video', class extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.style.display = 'block'
|
||||
const e = new DOMParser().parseFromString(`<video controls></video>`, 'text/html').body.firstChild as HTMLVideoElement
|
||||
e.style.maxWidth = "400px"
|
||||
e.style.maxHeight = "300px"
|
||||
e.style.width = "100%"
|
||||
e.style.height = "100%"
|
||||
e.style.borderRadius = "var(--mdui-shape-corner-medium)"
|
||||
|
||||
Reference in New Issue
Block a user