Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Former-commit-id: 86e06eeb49126166c17a5454c48561f1fd2510ce [formerly df68cffbd2f71e5f562e754e993591aad533454f] [formerly 86e06eeb49126166c17a5454c48561f1fd2510ce [formerly df68cffbd2f71e5f562e754e993591aad533454f] [formerly 86e06eeb49126166c17a5454c48561f1fd2510ce [formerly df68cffbd2f71e5f562e754e993591aad533454f] [formerly df68cffbd2f71e5f562e754e993591aad533454f [formerly 96c0137 [formerly 16ec15a14e588607c87f0d01dc6cb56a717f7d0e]]]]]
Former-commit-id: fc4e7c9
Former-commit-id: c637351
Former-commit-id: ddb9f02c5eac0af91e681b627c9932d57d922885 [formerly 130ae5e0e7a9c883cb59b5da30f8375d14231a5b]
Former-commit-id: 382efc728275de6bcac8fc455dbdfea16c78cb45
Former-commit-id: 3e1fcbe1ee8a34c4f0cd3ceb2ec38fc40548f66a
Former-commit-id: d55dd8f037a1ec9bc3563678601220aa856d65a3
Former-commit-id: 21e55790bfeb96d9356d3eeb56d43837f4f04f93
Former-commit-id: a8308a6fec8dbf1397e0fcdf9fb3ebfa8124ccec
  • Loading branch information
FairyEver committed Jan 16, 2019
2 parents b8497d5 + 2b586d1 commit 47d35f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-admin",
"version": "1.6.12",
"version": "1.6.13",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open",
Expand Down
8 changes: 8 additions & 0 deletions src/components/d2-container/components/d2-source.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div
v-if="show"
class="d2-source"
:class="{ 'd2-source--active': isActive }"
@click="handleClick">
Expand All @@ -21,6 +22,13 @@ export default {
isActive: false
}
},
computed: {
show () {
return process.env.VUE_APP_BUILD_MODE === 'TRAVIS' ||
process.env.NODE_ENV === 'development' &&
this.filename
}
},
mounted () {
// 一秒后显示按钮
setTimeout(() => {
Expand Down
5 changes: 2 additions & 3 deletions src/components/d2-container/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ export default {
scroll: e => this.$emit('scroll', e)
}
}, slots),
// 只在预览和开发模式下显示源码按钮
process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.NODE_ENV === 'development' ? h(d2Source, {
h(d2Source, {
props: this.$attrs
}) : undefined
})
])
},
methods: {
Expand Down

0 comments on commit 47d35f1

Please sign in to comment.