更新:登录功能
This commit is contained in:
9
uni_modules/wot-design-uni/components/wd-gap/index.scss
Normal file
9
uni_modules/wot-design-uni/components/wd-gap/index.scss
Normal file
@@ -0,0 +1,9 @@
|
||||
@import "../common/abstracts/variable";
|
||||
@import "../common/abstracts/mixin";
|
||||
|
||||
@include b(gap) {
|
||||
@include m(safe) {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
17
uni_modules/wot-design-uni/components/wd-gap/types.ts
Normal file
17
uni_modules/wot-design-uni/components/wd-gap/types.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props'
|
||||
|
||||
export const gapProps = {
|
||||
...baseProps,
|
||||
/**
|
||||
* 背景颜色
|
||||
*/
|
||||
bgColor: makeStringProp('transparent'),
|
||||
/**
|
||||
* 是否开启底部安全区
|
||||
*/
|
||||
safeAreaBottom: makeBooleanProp(false),
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
height: makeNumericProp(15)
|
||||
}
|
||||
36
uni_modules/wot-design-uni/components/wd-gap/wd-gap.vue
Normal file
36
uni_modules/wot-design-uni/components/wd-gap/wd-gap.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<view :class="`wd-gap ${safeAreaBottom ? 'wd-gap--safe' : ''} ${customClass}`" :style="rootStyle"></view>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'wd-gap',
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
virtualHost: true,
|
||||
styleIsolation: 'shared'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { type CSSProperties, computed } from 'vue'
|
||||
import { addUnit, isDef, objToStyle } from '../common/util'
|
||||
import { gapProps } from './types'
|
||||
|
||||
const props = defineProps(gapProps)
|
||||
|
||||
const rootStyle = computed(() => {
|
||||
const rootStyle: CSSProperties = {}
|
||||
if (isDef(props.bgColor)) {
|
||||
rootStyle['background'] = props.bgColor
|
||||
}
|
||||
if (isDef(props.height)) {
|
||||
rootStyle['height'] = addUnit(props.height)
|
||||
}
|
||||
return `${objToStyle(rootStyle)}${props.customStyle}`
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user