-
-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:haoziqaq/varlet into main
- Loading branch information
Showing
171 changed files
with
6,652 additions
and
6,430 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,6 +1,5 @@ | ||
{ | ||
"printWidth": 120, | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"semi": false | ||
} |
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 |
---|---|---|
@@ -1,61 +1,61 @@ | ||
<template> | ||
<div> | ||
<header>{{ componentName }}</header> | ||
<div class="router-view__block"> | ||
<router-view /> | ||
</div> | ||
</div> | ||
<div> | ||
<header>{{ componentName }}</header> | ||
<div class="router-view__block"> | ||
<router-view /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export default { | ||
data() { | ||
return { | ||
componentName: '', | ||
} | ||
}, | ||
watch: { | ||
$route(this: any, to: any) { | ||
const index = to.path.lastIndexOf('/') | ||
const componentName = to.path.slice(index + 1).replace(/-([a-z])/g, (all: string, i: string) => i.toUpperCase()) | ||
this.componentName = componentName[0]?.toUpperCase() + componentName.slice(1) | ||
}, | ||
}, | ||
data() { | ||
return { | ||
componentName: '', | ||
} | ||
}, | ||
watch: { | ||
$route(this: any, to: any) { | ||
const index = to.path.lastIndexOf('/') | ||
const componentName = to.path.slice(index + 1).replace(/-([a-z])/g, (all: string, i: string) => i.toUpperCase()) | ||
this.componentName = componentName[0]?.toUpperCase() + componentName.slice(1) | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
background: white; | ||
min-height: 100%; | ||
font-family: '微软雅黑 Light', sans-serif; | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
margin: 0; | ||
padding: 0; | ||
background: white; | ||
min-height: 100%; | ||
font-family: '微软雅黑 Light', sans-serif; | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
} | ||
::-webkit-scrollbar { | ||
display: none; | ||
width: 0; | ||
background: transparent; | ||
display: none; | ||
width: 0; | ||
background: transparent; | ||
} | ||
header { | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 56px; | ||
background-color: #fff; | ||
font-weight: 500; | ||
font-size: 18px; | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 56px; | ||
background-color: #fff; | ||
font-weight: 500; | ||
font-size: 18px; | ||
} | ||
.router-view__block { | ||
padding: 0 15px 30px; | ||
padding: 0 15px 30px; | ||
} | ||
* { | ||
box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
</style> |
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,21 +1,21 @@ | ||
<template> | ||
<div class="app-type"> | ||
<slot /> | ||
</div> | ||
<div class="app-type"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
name: 'AppType', | ||
name: 'AppType', | ||
}) | ||
</script> | ||
|
||
<style lang="less"> | ||
.app-type { | ||
padding: 12px 0; | ||
color: #888; | ||
font-size: 14px; | ||
padding: 12px 0; | ||
color: #888; | ||
font-size: 14px; | ||
} | ||
</style> |
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
Oops, something went wrong.