aieditor-team / AiEditor

AiEditor is a next-generation rich text editor for AI.
https://AiEditor.dev
GNU Lesser General Public License v2.1
1.09k stars 111 forks source link

源代码查看使用 100vw - 10px 问题 #112

Open nenge123 opened 1 week ago

nenge123 commented 1 week ago

使用vw会导致溢出文件,建议改成100%

.aie-container [data-tippy-root] {
    max-width: calc(100vw - 10px); 
}

捕获

建议使用gird去定义这种框,这样他总会按照当前主容器大小占满, 从而减少max-width: calc(100vw - 10px);等计算,因为flex会不占满容器!

清除.aie-popover-content =>/* width: 850px; *//* max-width: calc(100% - 10px); */

.aie-container [data-tippy-root] {
    width: calc(100% - 10px);
    max-width: 1000px !important;

}
aie-container .tippy-box {
/** max-width: 1000px !important; **/
}
.aie-popover{
    display: grid;
    align-items: stretch;
    justify-items: stretch;
    grid-template-columns: auto;
    grid-template-areas:
        "header"
        "content"
        "footer";
    grid-template-rows: max-content auto max-content;
}
.aie-popover-header{
    grid-area: header;
}
.aie-popover-content{
    grid-area: content;
}
.aie-popover-footer{
    grid-area: footer;
}
nenge123 commented 1 week ago

另外希望能提供ESM打包方式,可以模块化导入,方便代码复用 减少加载时间

nenge123 commented 1 week ago

@yangfuhai yangfuhai

yangfuhai commented 1 week ago

来个 pr 吧

nenge123 commented 1 week ago

来个 pr 吧

😅但是上层容器里有个莫名其妙的max-width:350px的强制默认值 根本找不到哪里删掉