Skip to content

Commit

Permalink
fix(mp): uni-app-x scroll-view direction默认值应为vertical
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangyaqi committed Nov 13, 2024
1 parent ed5db23 commit b3b1693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const transformDirection = function (
directionPropIndex === -1 ||
(scrollXPropIndex !== -1 && scrollYPropIndex !== -1)
) {
node.props.push(createAttributeNode('scroll-y', 'true'))
return
}
const directionProp = node.props[directionPropIndex]
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-mp-compiler/__tests__/tagAndPropForX.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('compiler: transform tagAndProp', () => {
test('list-view', () => {
assert(
`<list-view />`,
`<scroll-view enable-flex=\"true\"/>`,
`<scroll-view enable-flex=\"true\" scroll-y=\"true\"/>`,
`(_ctx, _cache) => {
const __returned__ = {}
return __returned__
Expand Down

0 comments on commit b3b1693

Please sign in to comment.