-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: 优化Drawer滚动 & 优化VirtualList参数配置 #330
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
.fixed-full(); | ||
display: flex; | ||
} | ||
|
||
&-wrapper { | ||
position: relative; | ||
display: flex; | ||
|
@@ -30,7 +30,7 @@ | |
border-radius: var(--f-border-radius-base); | ||
box-shadow: @shadow-down; | ||
} | ||
|
||
&-header { | ||
position: relative; | ||
display: flex; | ||
|
@@ -47,10 +47,13 @@ | |
} | ||
} | ||
|
||
&-body { | ||
&-body-wrapper { | ||
flex: 1; | ||
} | ||
|
||
&-body-container { | ||
box-sizing: border-box; | ||
padding: @padding-md calc(@padding-md + @padding-xs); | ||
overflow: auto; | ||
color: var(--f-sub-head-color); | ||
font-size: var(--f-font-size-base); | ||
} | ||
|
@@ -78,7 +81,7 @@ | |
&-mask-fade-enter-active { | ||
transition: opacity @animation-duration-slow @ease-base-in; | ||
} | ||
|
||
&-mask-fade-leave-to, | ||
&-mask-fade-enter-from { | ||
opacity: 0; | ||
|
@@ -155,4 +158,4 @@ | |
} | ||
} | ||
|
||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这段代码补丁中有以下几点可以改进:
没有发现明显的潜在问题或危险,建议在新增代码前先对整个样式表进行语法检查和格式化操作。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ export const virtualProps = { | |
dataSources: { | ||
type: Array as PropType<DataSource[]>, | ||
required: true, | ||
default: (): DataSource[] => [], | ||
}, | ||
keeps: { | ||
type: Number, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 以下是对此代码补丁的简要代码审查: 在这个代码补丁中,我们看到一些更改。具体来说,在 dataSources 属性中添加了一个默认值。 从代码来看,这似乎是合理的更改。这将确保即使没有传递数据源属性,代码也可以正常运行,并且不会抛出未定义的错误。另外,这个默认值似乎是由一个函数提供的,这意味着它可能取决于组件当前的状态,而不是简单的硬编码。 总体而言,这似乎是一个推荐的改进,因为它提高了代码的鲁棒性,降低了错误风险。 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ | |
:footer="true" | ||
@ok="show[4] = false" | ||
> | ||
<div>我是内容...</div> | ||
<div style="height: 1000px">我是内容...</div> | ||
<div>我是内容...</div> | ||
<div>我是内容...</div> | ||
</FDrawer> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这段代码看起来只是在修改了一个组件的样式,将其中一个 |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是一个 Vue 组件的代码补丁,需要对其进行简短的代码审查,包括可能存在的错误风险和改进意见。建议如下: