This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5afd2d2
commit 0bb1865
Showing
10 changed files
with
163 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
{ | ||
"TypeScript Header": { | ||
"body": [ | ||
"// **************************************************************************************************************************", | ||
"// COPYRIGHT © 2006 - $CURRENT_YEAR WANG YUCAI. ALL RIGHTS RESERVED.", | ||
"// LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION.", | ||
"// **************************************************************************************************************************", | ||
"$1" | ||
], | ||
"description": "TypeScript 头部注释", | ||
"prefix": "dnvue", | ||
"scope": "typescript, javascript" | ||
}, | ||
"HTML Header": { | ||
"body": [ | ||
"<!-- ", | ||
" **************************************************************************************************************************", | ||
" COPYRIGHT © 2006 - $CURRENT_YEAR WANG YUCAI. ALL RIGHTS RESERVED.", | ||
" LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION.", | ||
" **************************************************************************************************************************", | ||
"-->", | ||
"$1" | ||
], | ||
"description": "HTML 头部注释", | ||
"prefix": "dnvue", | ||
"scope": "html, vue" | ||
} | ||
"TypeScript Header": { | ||
"body": [ | ||
"// **************************************************************************************************************************", | ||
"// COPYRIGHT © 2006 - $CURRENT_YEAR WANG YUCAI. ALL RIGHTS RESERVED.", | ||
"// LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION.", | ||
"// **************************************************************************************************************************", | ||
"$1" | ||
], | ||
"description": "TypeScript 头部注释", | ||
"prefix": "dnvue", | ||
"scope": "typescript, javascript" | ||
}, | ||
"HTML Header": { | ||
"body": [ | ||
"<!-- ", | ||
" **************************************************************************************************************************", | ||
" COPYRIGHT © 2006 - $CURRENT_YEAR WANG YUCAI. ALL RIGHTS RESERVED.", | ||
" LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION.", | ||
" **************************************************************************************************************************", | ||
"-->", | ||
"$1" | ||
], | ||
"description": "HTML 头部注释", | ||
"prefix": "dnvue", | ||
"scope": "html, vue" | ||
}, | ||
"Vue Setup Grammar": { | ||
"body": ["<script lang=\"ts\" setup>", "$1", "</script>"], | ||
"description": "VUE3 Setup Grammar", | ||
"prefix": "dnvue", | ||
"scope": "vue" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,8 @@ | |
} | ||
|
||
>div#{&}-content { | ||
flex: 1; | ||
flex : 1; | ||
padding: 0 !important; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
packages/app/src/assets/theme/lib/components/_v-content-container.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@use "../_variables"as *; | ||
@use "sass:math"as *; | ||
|
||
@mixin generate-var { | ||
--v-content-container--padding : #{div(10, $v-text-size--base)}rem; | ||
--v-content-container-header--background : var(--md-grey-100); | ||
--v-content-container-operation--background: var(--md-grey-50); | ||
} | ||
|
||
@mixin generate-cls { | ||
.v-content-container { | ||
background-color: transparent; | ||
|
||
>div { | ||
padding : var(--v-content-container--padding); | ||
background-color: #FFFFFF; | ||
width : percentage($number: 1); | ||
} | ||
|
||
>div[data-v-role=header] { | ||
background-color: var(--v-content-container-header--background); | ||
height : auto; | ||
|
||
>span { | ||
font: { | ||
size: var(--v-text-size--nm); | ||
} | ||
} | ||
} | ||
|
||
>div[data-v-role=operation] { | ||
background-color: var(--v-content-container-operation--background); | ||
height : 200px; | ||
} | ||
|
||
>div[data-v-role=content] { | ||
flex : 1; | ||
} | ||
|
||
>div[data-v-role=footer] { | ||
background-color: var(--v-content-container-operation--background); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/app/src/components/v-container/v-content-container.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!-- | ||
************************************************************************************************************************** | ||
COPYRIGHT © 2006 - 2022 WANG YUCAI. ALL RIGHTS RESERVED. | ||
LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION. | ||
************************************************************************************************************************** | ||
--> | ||
|
||
<template> | ||
<v-flexbox direction="column" class="animate__animated animate__fadeIn v-content-container"> | ||
<v-flexbox align-items="center" justify-content="space-between" data-v-role="header" v-if="readonlyHeaderSlotVisible"> | ||
<span>{{ title }}</span> | ||
<slot name="header" /> | ||
</v-flexbox> | ||
<div data-v-role="operation" v-if="readonlyOperationSlotVisible"> | ||
<slot name="operation" /> | ||
</div> | ||
<div data-v-role="content"> | ||
<slot /> | ||
</div> | ||
<div data-v-role="footer" v-if="readonlyFooterSlotVisible"> | ||
<slot name="footer" /> | ||
</div> | ||
</v-flexbox> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { vFlexbox } from "../v-flexbox"; | ||
import { DnvueComponentProps } from "../component-props"; | ||
import { computed, useSlots } from "vue"; | ||
const slots = useSlots(); | ||
const props = defineProps( | ||
Object.assign({}, DnvueComponentProps, { | ||
/** | ||
* 设置或获取一个字符串,用于表示标题文本。 | ||
*/ | ||
title: { | ||
type: String, | ||
default: "", | ||
}, | ||
}) | ||
); | ||
const readonlyHeaderSlotVisible = computed<boolean>(() => { | ||
return !String.isNullOrWhitespace(props.title) || (slots["header"] !== null && slots["header"] !== undefined); | ||
}); | ||
const readonlyOperationSlotVisible = computed<boolean>(() => { | ||
return slots["operation"] !== null && slots["operation"] !== undefined; | ||
}); | ||
const readonlyFooterSlotVisible = computed<boolean>(() => { | ||
return slots["footer"] !== null && slots["footer"] !== undefined; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/app/src/index-app/views/home/dashboard/dashboard.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- | ||
************************************************************************************************************************** | ||
COPYRIGHT © 2006 - 2022 WANG YUCAI. ALL RIGHTS RESERVED. | ||
LICENSED UNDER THE MIT LICENSE. SEE LICENSE FILE IN THE PROJECT ROOT FOR FULL LICENSE INFORMATION. | ||
************************************************************************************************************************** | ||
--> | ||
|
||
<template> | ||
<v-content-container :title="$t('DATA_TABLE')"> | ||
|
||
</v-content-container> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { vContentContainer } from "../../../../components"; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters