-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
并额外写了 reset.css, helper.css body 全局属性, “透传” CSS 的 class
- Loading branch information
Showing
14 changed files
with
364 additions
and
50 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
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 @@ | ||
$font-hei: -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif; | ||
$font-kai: Baskerville, Georgia, "Liberation Serif", "Kaiti SC", STKaiti, "AR PL UKai CN", "AR PL UKai HK", "AR PL UKai TW", "AR PL UKai TW MBE", "AR PL KaitiM GB", KaiTi, KaiTi_GB2312, DFKai-SB, "TW\-Kai", serif; | ||
$font-song: Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif; | ||
$color-sky-blue:#0066cc; | ||
|
||
%clear-fix { | ||
&::after { | ||
content: ''; | ||
clear: both; | ||
display: none; | ||
} | ||
} | ||
|
||
|
||
|
||
|
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,5 +1,14 @@ | ||
*{margin:0;border:0;box-sizing:border-box} | ||
|
||
ul,ol{ | ||
list-style: none; | ||
} | ||
a{text-decoration: none;color:inherit} | ||
a{text-decoration: none;color:inherit} | ||
|
||
:focus{ | ||
outline: none; | ||
} | ||
|
||
button,input{ | ||
font: inherit; | ||
} |
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,61 @@ | ||
<template> | ||
<div class="choice-wrapper"> | ||
<div>类别</div> | ||
<ul> | ||
<li class="selected">默认</li> | ||
<li>衣</li> | ||
<li>食</li> | ||
<li>住</li> | ||
<li>行</li> | ||
</ul> | ||
</div> | ||
|
||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
import {Component} from 'vue-property-decorator'; | ||
@Component | ||
export default class Choice extends Vue { | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "~@/assets/helper.scss"; | ||
.choice-wrapper{ | ||
flex-grow: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background: #ffffff; | ||
padding:20px 0; | ||
>div{ | ||
margin: 0 20px; | ||
font-weight: bold; | ||
white-space: nowrap; | ||
} | ||
>ul{ | ||
flex-grow:1; | ||
display:flex; | ||
justify-content: left; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
padding-left:0; | ||
>li{ | ||
min-width: 52px; | ||
text-align: center; | ||
padding:5px 10px; | ||
margin:5px 10px; | ||
background: #ddd; | ||
border-radius: 15px; | ||
&.selected{ | ||
background: $color-sky-blue; | ||
color: #ffffff; | ||
} | ||
} | ||
} | ||
} | ||
</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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<label> | ||
<span>备注</span> | ||
<input type="text" placeholder="在这里添加备注"> | ||
</label> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
import {Component} from 'vue-property-decorator'; | ||
@Component | ||
export default class Note extends Vue { | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
label{ | ||
display: flex; | ||
justify-content: center; | ||
background: #ffffff; | ||
align-items: center; | ||
>span{ | ||
margin: 5px 20px; | ||
text-align: center; | ||
line-height: 46px; | ||
font-weight: bold; | ||
} | ||
>input{ | ||
flex-grow:1; | ||
text-align: right; | ||
margin-right: 25px; | ||
line-height: 46px; | ||
text-decoration: none; | ||
} | ||
} | ||
</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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div class="show"> | ||
<div class="text">金额</div> | ||
<div class="number">100.12</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
import {Component} from 'vue-property-decorator'; | ||
@Component | ||
export default class Show extends Vue { | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.show { | ||
background: #ffffff; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width:100vw; | ||
> .text { | ||
margin: 10px 20px; | ||
font-weight: bold; | ||
white-space: nowrap; | ||
} | ||
>.number{ | ||
flex-grow:1; | ||
text-align: right; | ||
margin-right: 25px; | ||
font-family: Consolas, monospace; | ||
} | ||
} | ||
</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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<div class="buttons"> | ||
<button>1</button> | ||
<button>2</button> | ||
<button>3</button> | ||
<button>删除</button> | ||
<button>4</button> | ||
<button>5</button> | ||
<button>6</button> | ||
<button class="clear">清空</button> | ||
<button>7</button> | ||
<button>8</button> | ||
<button>9</button> | ||
<button class="ok">确认</button> | ||
<button class="zero">0</button> | ||
<button>.</button> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
import {Component} from 'vue-property-decorator'; | ||
@Component | ||
export default class Write extends Vue { | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "~@/assets/helper.scss"; | ||
.buttons{ | ||
@extend %clear-fix; | ||
padding-left: 0; | ||
width:100vw; | ||
>button{ | ||
float:left; | ||
$height:64px; | ||
width:25%; | ||
height:$height; | ||
text-align: center; | ||
line-height: $height; | ||
&.ok{ | ||
height:$height*2; | ||
line-height: $height*2; | ||
float:right; | ||
} | ||
&.zero{ | ||
width:50%; | ||
} | ||
$bg: #f2f2f2; | ||
&:nth-child(1) { | ||
background: $bg; | ||
} | ||
&:nth-child(2), &:nth-child(5) { | ||
background: darken($bg, 4%); | ||
} | ||
&:nth-child(3), &:nth-child(6), &:nth-child(9) { | ||
background: darken($bg, 4*2%); | ||
} | ||
&:nth-child(4), &:nth-child(7), &:nth-child(10) { | ||
background: darken($bg, 4*3%); | ||
} | ||
&:nth-child(8), &:nth-child(11), &:nth-child(13) { | ||
background: darken($bg, 4*4%); | ||
} | ||
&:nth-child(14) { | ||
background: darken($bg, 4*5%); | ||
} | ||
&:nth-child(12) { | ||
background: darken($bg, 4*6%); | ||
} | ||
} | ||
} | ||
</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,29 +1,28 @@ | ||
<template> | ||
<div> | ||
<svg class="icon" :class='name'> | ||
<use :xlink:href="'#'+name"></use> | ||
</svg> | ||
</div> | ||
<svg class="icon"> | ||
<use :xlink:href="'#'+name"></use> | ||
</svg> | ||
</template> | ||
|
||
<script lang="ts"> | ||
const importAll = (requireContext: __WebpackModuleApi.RequireContext) => requireContext.keys().forEach(requireContext); | ||
try {importAll(require.context('../assets/icons', true, /\.svg$/));} catch (error) {console.log(error);} | ||
export default{ | ||
props:['name'] | ||
try { | ||
importAll(require.context('../assets/icons', true, /\.svg$/)); | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
export default { | ||
props: ['name'] | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.icon { | ||
width: 32px; height: 32px; | ||
width: 32px; | ||
height: 32px; | ||
vertical-align: -0.15em; | ||
fill: currentColor; | ||
overflow: hidden; | ||
&.person{ | ||
width:25px; | ||
height:25px; | ||
} | ||
overflow: hidden | ||
} | ||
</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.