forked from XiaoMo/ChatGPT-Next-Web
fix: #2087 chat box font size use global config
This commit is contained in:
parent
93c666b03d
commit
fa9ceb5875
@ -927,6 +927,9 @@ export function Chat() {
|
|||||||
onBlur={() => setAutoScroll(false)}
|
onBlur={() => setAutoScroll(false)}
|
||||||
rows={inputRows}
|
rows={inputRows}
|
||||||
autoFocus={autoFocus}
|
autoFocus={autoFocus}
|
||||||
|
style={{
|
||||||
|
fontSize: config.fontSize,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={<SendWhiteIcon />}
|
icon={<SendWhiteIcon />}
|
||||||
|
@ -152,6 +152,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) {
|
|||||||
const width = getDomContentWidth(dom);
|
const width = getDomContentWidth(dom);
|
||||||
measureDom.style.width = width + "px";
|
measureDom.style.width = width + "px";
|
||||||
measureDom.innerText = dom.value !== "" ? dom.value : "1";
|
measureDom.innerText = dom.value !== "" ? dom.value : "1";
|
||||||
|
measureDom.style.fontSize = dom.style.fontSize;
|
||||||
const endWithEmptyLine = dom.value.endsWith("\n");
|
const endWithEmptyLine = dom.value.endsWith("\n");
|
||||||
const height = parseFloat(window.getComputedStyle(measureDom).height);
|
const height = parseFloat(window.getComputedStyle(measureDom).height);
|
||||||
const singleLineHeight = parseFloat(
|
const singleLineHeight = parseFloat(
|
||||||
|
Loading…
Reference in New Issue
Block a user