更新:登录功能

This commit is contained in:
2025-11-04 12:37:04 +08:00
commit a21fb92916
897 changed files with 51500 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
@import '../common/abstracts/variable';
@import '../common/abstracts/mixin';
@include b(row) {
&::after {
display: table;
clear: both;
content: "";
}
}

View File

@@ -0,0 +1,16 @@
import { type InjectionKey } from 'vue'
import { baseProps, makeNumberProp } from '../common/props'
export type RowProvide = {
props: { gutter?: number }
}
export const ROW_KEY: InjectionKey<RowProvide> = Symbol('wd-row')
export const rowProps = {
...baseProps,
/**
* 列元素之间的间距单位为px
*/
gutter: makeNumberProp(0)
}

View File

@@ -0,0 +1,42 @@
<template>
<view :class="`wd-row ${customClass}`" :style="rowStyle">
<!-- 每一行 -->
<slot />
</view>
</template>
<script lang="ts">
export default {
name: 'wd-row',
options: {
virtualHost: true,
addGlobalClass: true,
styleIsolation: 'shared'
}
}
</script>
<script lang="ts" setup>
import { computed, type CSSProperties } from 'vue'
import { useChildren } from '../composables/useChildren'
import { ROW_KEY, rowProps } from './types'
import { addUnit, objToStyle } from '../common/util'
const props = defineProps(rowProps)
const { linkChildren } = useChildren(ROW_KEY)
linkChildren({ props })
const rowStyle = computed(() => {
const style: CSSProperties = {}
const { gutter } = props
if (gutter < 0) {
console.error('[wot ui] warning(wd-row): attribute gutter must be greater than or equal to 0')
} else if (gutter) {
style.marginLeft = addUnit(gutter / 2)
style.marginRight = addUnit(gutter / 2)
}
return `${objToStyle(style)}${props.customStyle}`
})
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>