Merge pull request #209 in YR/star-web-components from fix-dialog-word-break to master

* commit '2c62e62a6ae17e2eeca87a2947e70fe5512ea8fc':
  BUGFIX:#152161 修复使用下划线连接的长单词无法正确换行产生窗口截断的故障。
This commit is contained in:
汪昌棋 2022-12-22 16:02:16 +08:00
commit 9d64d98bed
2 changed files with 57 additions and 0 deletions

View File

@ -1,6 +1,10 @@
import {css} from 'lit'
export default css`
* {
word-wrap: anywhere;
}
dialog::backdrop {
background: green;
}

View File

@ -105,6 +105,29 @@ export class PanelDialog extends LitElement {
@click=${this.showPromptScroll}
></star-button>
</star-button-group>
<star-button-group>
<star-button
type="normal"
variant="primary"
size="small"
label="警告弹窗-多行滚动(长单词)"
@click=${this.showAlertScrollWord}
></star-button>
<star-button
type="normal"
variant="primary"
size="small"
label="确认弹窗-多行滚动(长单词)"
@click=${this.showConfirmScrollWord}
></star-button>
<star-button
type="normal"
variant="primary"
size="small"
label="输入弹窗-多行滚动(长单词)"
@click=${this.showPromptScrollWord}
></star-button>
</star-button-group>
</div>
<div>
<h3></h3>
@ -192,6 +215,15 @@ export class PanelDialog extends LitElement {
this.shadowRoot?.appendChild(starAlertDialog)
}
showAlertScrollWord() {
const starAlertDialog = new StarAlertDialog({
text: 'gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_!!!!!!',
onconfirm: () => console.log('确定'),
})
console.log(starAlertDialog)
this.shadowRoot?.appendChild(starAlertDialog)
}
showAlertCustomHeader() {
const starAlertDialog = new StarAlertDialog({
title: '⚠警告',
@ -251,6 +283,16 @@ export class PanelDialog extends LitElement {
this.shadowRoot?.appendChild(starConfirmDialog)
}
showConfirmScrollWord() {
const starConfirmDialog = new StarConfirmDialog({
title:
'gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_!!!!!!',
oncancel: () => console.log('取消'),
onconfirm: () => console.log('确定'),
})
this.shadowRoot?.appendChild(starConfirmDialog)
}
showConfirmMedia() {
const starConfirmDialog = new StarConfirmDialog({
image: icon,
@ -300,6 +342,17 @@ export class PanelDialog extends LitElement {
this.shadowRoot?.appendChild(starPromptDialog)
}
showPromptScrollWord() {
const starPromptDialog = new StarPromptDialog({
title:
'gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_gfsdgfjgsakjfgghjkfdgkasgfhgsagfkgksdfgasdf_:',
value: 'hello,world',
oncancel: () => console.log('取消'),
onconfirm: () => console.log('确定'),
})
this.shadowRoot?.appendChild(starPromptDialog)
}
showPromptCustomSubtitle() {
const starPromptDialog = new StarPromptDialog({
title: '内容',