-
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
daixu
committed
Oct 18, 2021
1 parent
04298d1
commit a46853a
Showing
17 changed files
with
384 additions
and
129 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,66 @@ | ||
$icons: ( | ||
pen, eraser, redo, undo, clear, save, import, export, info, | ||
alpha_circle, alpha_chalk, alpha_calligraphy, alpha_square | ||
); | ||
|
||
@mixin hl { | ||
background-color: rgba($color: #fff, $alpha: .8); | ||
} | ||
|
||
@mixin after_title { | ||
position: absolute; | ||
width: 60px; | ||
// line-height: 24px; | ||
font-size: 12px; | ||
text-align: center; | ||
left: 20px; | ||
top: -10px; | ||
padding: 5px; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
color: #333; | ||
content: attr(title); | ||
z-index: 10; | ||
} | ||
|
||
.icon { | ||
background-size: 32px; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
@each $icon in $icons { | ||
&-#{$icon} { | ||
background-image: url("~@/assets/images/#{$icon}.png"); | ||
} | ||
} | ||
} | ||
|
||
.list-panel { | ||
background-image: linear-gradient(to top, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.6) 100%); | ||
box-shadow: 0 1px 3px rgb(0 0 0 / 10%), 0 1px #cecece; | ||
display: flex; | ||
margin-top: 16px; | ||
li { | ||
position: relative; | ||
cursor: pointer; | ||
float: left; | ||
// width: 60px; | ||
flex: 1; | ||
height: 54px; | ||
// border: 1px solid #cccccc; | ||
&:hover { | ||
@include hl; | ||
&:after { | ||
@include after_title; | ||
} | ||
} | ||
& ~ li { | ||
border-left: none; | ||
} | ||
} | ||
.li-active { | ||
@include hl; | ||
} | ||
.li-disabled { | ||
opacity: .5; | ||
} | ||
} |
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,22 +1,53 @@ | ||
<template> | ||
<div class="header-wrapper"> | ||
TODO HEADER | ||
<div title="import" class="header-item icon icon-import"></div> | ||
<div title="export" class="header-item icon icon-export" @click="exportJSON"></div> | ||
<div title="info" class="header-item icon icon-info"></div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { defineComponent, getCurrentInstance } from 'vue' | ||
export default defineComponent({ | ||
name: 'Header' | ||
name: 'Header', | ||
setup () { | ||
const eventBus = getCurrentInstance()?.appContext.config.globalProperties.eventBus | ||
const exportJSON = function () { | ||
eventBus.emit('command', 'exportJSON') | ||
} | ||
return { | ||
exportJSON | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "../assets/styles/common.scss"; | ||
.header-wrapper { | ||
background: rgba(255, 255, 255, 0.3); | ||
height: 32px; | ||
height: 44px; | ||
display: flex; | ||
align-items: center; | ||
.header-item { | ||
flex: 1; | ||
text-align: center; | ||
cursor: pointer; | ||
position: relative; | ||
&:hover { | ||
background-color: rgba($color: #fff, $alpha: .5); | ||
&:after { | ||
@include after_title; | ||
left: auto; | ||
top: auto; | ||
bottom: -20px; | ||
} | ||
} | ||
} | ||
.icon { | ||
background-size: 24px; | ||
} | ||
} | ||
</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
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
Oops, something went wrong.