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

feat(ui/col): add a direction API for col #716

Merged
merged 4 commits into from
Oct 7, 2022
Merged

Conversation

coder-fang
Copy link
Contributor

@coder-fang coder-fang commented Oct 6, 2022

Checklist


  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information


@vercel
Copy link

vercel bot commented Oct 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
varlet ✅ Ready (Inspect) Visit Preview Oct 7, 2022 at 1:12AM (UTC)
varlet-ui-playground ✅ Ready (Inspect) Visit Preview Oct 7, 2022 at 1:12AM (UTC)

@coder-fang coder-fang changed the title feat(ui/row): add a direction column style for row feat(ui/col): add a direction API for col Oct 6, 2022
@BeADre
Copy link
Member

BeADre commented Oct 6, 2022

The direction prop should be the same as Space component, and you should complete docs(en-us, zh-cn) and declaration files(varlet-ui/types/*)

@@ -43,7 +44,7 @@ export default defineComponent({
const span: ComputedRef<number> = computed(() => toNumber(props.span))
const offset: ComputedRef<number> = computed(() => toNumber(props.offset))
const { row, bindRow } = useRow()

const direction: ComputedRef<string> = computed(() => toString(props.direction))
Copy link
Member

Choose a reason for hiding this comment

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

it is unnecessary

@@ -1,6 +1,8 @@
import type { PropType } from 'vue'
import { SizeDescriptor } from './provide'

export type SpaceDirection = 'row' | 'column'
Copy link
Member

Choose a reason for hiding this comment

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

should be ColDirection

Comment on lines 29 to 32
direction: {
type: [String],
default: 'row',
},
Copy link
Member

Choose a reason for hiding this comment

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

same as col

@@ -8,6 +8,7 @@ export type SizeDescriptor = {
export interface ColProps extends BasicAttributes {
span?: string | number
offset?: string | number
direction?: string
Copy link
Member

Choose a reason for hiding this comment

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

and row.d.ts

@haoziqaq
Copy link
Member

haoziqaq commented Oct 7, 2022

This pr has some problem, I will fix it after i merging. Please focus on the following commit

@haoziqaq haoziqaq merged commit 6a30c8e into varletjs:dev Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants