更新:登录功能
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
@import "./../common/abstracts/_mixin.scss";
|
||||
@import "./../common/abstracts/variable.scss";
|
||||
|
||||
.wot-theme-dark {
|
||||
@include b(navbar-capsule) {
|
||||
&::before {
|
||||
border: 2rpx solid $-dark-border-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
background: $-dark-border-color;
|
||||
}
|
||||
|
||||
:deep(.wd-navbar-capsule__icon) {
|
||||
color: $-dark-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@include b(navbar-capsule) {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: $-navbar-capsule-width;
|
||||
height: $-navbar-capsule-height;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
transform: scale(0.5);
|
||||
transform-origin: 0 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: calc($-navbar-capsule-border-radius * 2);
|
||||
border: 2rpx solid $-navbar-capsule-border-color;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 1px;
|
||||
height: 36rpx;
|
||||
background: $-navbar-capsule-border-color;
|
||||
}
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@include edeep(icon) {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
color: $-navbar-desc-font-color;
|
||||
font-size: $-navbar-capsule-icon-size;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import { baseProps } from '../common/props'
|
||||
|
||||
export const navbarCapsuleProps = {
|
||||
...baseProps
|
||||
}
|
||||
|
||||
export type NavbarCapsuleProps = ExtractPropTypes<typeof navbarCapsuleProps>
|
||||
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<view :class="`wd-navbar-capsule ${customClass}`" :style="customStyle">
|
||||
<wd-icon @click="handleBack" name="chevron-left" custom-class="wd-navbar-capsule__icon" />
|
||||
<wd-icon @click="handleBackHome" name="home" custom-class="wd-navbar-capsule__icon" />
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'wd-navbar-capsule',
|
||||
options: {
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
styleIsolation: 'shared'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import wdIcon from '../wd-icon/wd-icon.vue'
|
||||
import { navbarCapsuleProps } from './types'
|
||||
|
||||
const emit = defineEmits(['back', 'back-home'])
|
||||
defineProps(navbarCapsuleProps)
|
||||
|
||||
function handleBack() {
|
||||
emit('back')
|
||||
}
|
||||
function handleBackHome() {
|
||||
emit('back-home')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user