Skip to content
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

fix(transfer): [transfer] update smb design #2249

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const treeData = ref([
}
])
const treeConfig = ref({
showLine: true,
showCheckbox: true,
nodeKey: 'id',
checkStrictly: true,
Expand Down
1 change: 1 addition & 0 deletions examples/sites/demos/pc/app/transfer/nested-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default {
}
],
treeConfig: {
showLine: true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

LGTM: Addition of showLine property enhances tree visualization.

While showLine: true is consistently used across other components, it is not currently documented. Please update the Tree component documentation to include the showLine property to ensure clarity and maintain comprehensive documentation.

🔗 Analysis chain

LGTM: Addition of showLine property enhances tree visualization.

The addition of showLine: true to the treeConfig object is a valid enhancement. This property will enable the display of lines connecting tree nodes, improving the visual representation of the nested structure.

To ensure this change is consistent with the component's documentation and usage, let's verify:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the Tree component documentation mentions the showLine property
# and if it's used consistently in other examples.

# Search for Tree component documentation
echo "Searching for Tree component documentation:"
rg --type=vue --type=md "Tree.*component" -g '!node_modules'

# Search for other usage of showLine property in Tree configurations
echo "\nSearching for other usage of showLine property:"
rg --type=vue "showLine:\s*(true|false)" -g '!node_modules'

Length of output: 386


Script:

#!/bin/bash
# Description: Check if the Tree component documentation mentions the showLine property
# and if it's used consistently in other examples.

# Search for Tree component documentation in .md and .vue files
echo "Searching for Tree component documentation:"
rg "Tree.*component" -g '*.vue' -g '*.md' -g '!node_modules'

# Search for other usage of showLine property in Tree configurations within .vue files
echo "\nSearching for other usage of showLine property:"
rg "showLine:\s*(true|false)" -g '*.vue' -g '!node_modules'

Length of output: 2073

showCheckbox: true,
nodeKey: 'id',
checkStrictly: true,
Expand Down
2 changes: 2 additions & 0 deletions packages/theme/src/transfer/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
i,
span {
font-size: var(--ti-transfer-font-size);
transform: translateY(-3px); // 适配 xdesign, 让span居中
display: inline-block;
}

[class*='tiny-icon'] + span {
Expand Down
11 changes: 6 additions & 5 deletions packages/vue/src/transfer-panel/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
<span class="tiny-checkbox__inner">
<icon-check
v-if="!(state.checked.length > 0 && state.checked.indexOf(item[state.keyProp]) > -1)"
class="tiny-svg-size"
class="tiny-svg-size icon-no-checked"
style="fill: transparent"
/>
<icon-checked-sur v-else class="tiny-svg-size" />
<icon-checked-sur v-else class="tiny-svg-size icon-checked-sur" />
</span>
<input
type="checkbox"
Expand Down Expand Up @@ -129,7 +130,7 @@ import { renderless, api } from '@opentiny/vue-renderless/transfer-panel/vue'
import Checkbox from '@opentiny/vue-checkbox'
import Input from '@opentiny/vue-input'
import Pager from '@opentiny/vue-pager'
import { iconArrowUp, iconArrowDown, iconCheckedSur, iconCheck, iconSearch } from '@opentiny/vue-icon'
import { iconArrowUp, iconArrowDown, iconYes, iconSearch } from '@opentiny/vue-icon'

export const transferPanelProps = {
columns: Array,
Expand Down Expand Up @@ -172,8 +173,8 @@ export default defineComponent({
TinyPager: Pager,
IconArrowDown: iconArrowDown(),
IconArrowUp: iconArrowUp(),
IconCheckedSur: iconCheckedSur(),
IconCheck: iconCheck(),
IconCheckedSur: iconYes(),
IconCheck: iconYes(),
IconSearch: iconSearch(),
OptionContent: {
props: {
Expand Down
Loading