source code button
Former-commit-id: 3632fad2449424c7ac0d9289b0d1cadcc13a95cb [formerly 3632fad2449424c7ac0d9289b0d1cadcc13a95cb [formerly 3632fad2449424c7ac0d9289b0d1cadcc13a95cb [formerly 3632fad2449424c7ac0d9289b0d1cadcc13a95cb [formerly 74cced6cdd9dbf4349a620c4b556d61805cc1c87 [formerly d8c5ac8a9e620b61c6a630a5159eb848cf5b9422]]]]] Former-commit-id: e774159b8321013bec2a12e0e8d69fa664b4e339 Former-commit-id: a60c4307ea5fc8811ed888f3f22124c7aff86948 Former-commit-id: dbdd213f423addf6216abe2be2440811826671e6 [formerly ec78ca6922bd98d9ff7a1e746576a78fb4600359] Former-commit-id: 887313222435ad271cfdb155783e0b6120aa26bf Former-commit-id: a271915674fb1bddaa1abad0e77fbf426b5f626d Former-commit-id: 6f581faa19c84f2def4464c23054ffab5c3c5f2c Former-commit-id: 90753e9c4a80f160dfd174ce954630d16e55b2de Former-commit-id: 509fb7ba39e3a254190525fabe98c96b407e9413
This commit is contained in:
32
src/components/d2-container/components/d2-source.vue
Normal file
32
src/components/d2-container/components/d2-source.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<div class="d2-source">
|
||||||
|
<d2-icon name="code"/> SourceCode
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '~@/assets/style/public.scss';
|
||||||
|
.d2-source {
|
||||||
|
$borderRadius: 4px;
|
||||||
|
$paddingLR: 15px;
|
||||||
|
$paddingTB: 7px;
|
||||||
|
$fontSize: 12px;
|
||||||
|
position: absolute;
|
||||||
|
right: - $borderRadius;
|
||||||
|
bottom: 20px;
|
||||||
|
font-size: $fontSize;
|
||||||
|
line-height: $fontSize;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: $borderRadius;
|
||||||
|
padding: $paddingTB $paddingLR;
|
||||||
|
padding-right: $borderRadius + $paddingLR;
|
||||||
|
background-color: rgba(#000, .7);
|
||||||
|
border: 1px solid #000;
|
||||||
|
color: #FFF;
|
||||||
|
transition: all .3s;
|
||||||
|
@extend %unable-select;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(#000, .9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
<script>
|
|
||||||
// 组件
|
// 组件
|
||||||
import d2ContainerFull from './components/d2-container-full.vue'
|
import d2ContainerFull from './components/d2-container-full.vue'
|
||||||
import d2ContainerFullBs from './components/d2-container-full-bs.vue'
|
import d2ContainerFullBs from './components/d2-container-full-bs.vue'
|
||||||
@@ -6,6 +5,8 @@ import d2ContainerGhost from './components/d2-container-ghost.vue'
|
|||||||
import d2ContainerGhostBs from './components/d2-container-ghost-bs.vue'
|
import d2ContainerGhostBs from './components/d2-container-ghost-bs.vue'
|
||||||
import d2ContainerCard from './components/d2-container-card.vue'
|
import d2ContainerCard from './components/d2-container-card.vue'
|
||||||
import d2ContainerCardBs from './components/d2-container-card-bs.vue'
|
import d2ContainerCardBs from './components/d2-container-card-bs.vue'
|
||||||
|
import d2Source from './components/d2-source.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'd2-container',
|
name: 'd2-container',
|
||||||
props: {
|
props: {
|
||||||
@@ -51,8 +52,8 @@ export default {
|
|||||||
on: {
|
on: {
|
||||||
scroll: e => this.$emit('scroll', e)
|
scroll: e => this.$emit('scroll', e)
|
||||||
}
|
}
|
||||||
}, slots)
|
}, slots),
|
||||||
|
h(d2Source)
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user