Show commit hash in component detail

This commit is contained in:
the1812 2021-12-05 12:39:30 +08:00
parent 5c80c0af46
commit 91bb03639f
2 changed files with 44 additions and 25 deletions

8
.vscode/tasks.json vendored
View File

@ -110,7 +110,13 @@
{ {
"type": "shell", "type": "shell",
"command": "rm -r ./node_modules/.cache/webpack/", "command": "rm -r ./node_modules/.cache/webpack/",
"label": "缓存:清除webpack cache:clean-webpack", "label": "缓存:清除 webpack cache:clean-webpack",
"problemMatcher": []
},
{
"type": "shell",
"command": "rm -r ./node_modules/.cache/babel-loader/",
"label": "缓存:清除 babel cache:clean-babel",
"problemMatcher": [] "problemMatcher": []
}, },
{ {

View File

@ -48,6 +48,12 @@
</template> </template>
<div class="component-detail-grow"></div> <div class="component-detail-grow"></div>
<div class="component-detail-internal-data"> <div class="component-detail-internal-data">
<div v-if="componentData.commitHash" class="component-detail-internal-data-row">
<div class="internal-name">
Commit: {{ componentData.commitHash.substr(0, 9) }}
</div>
</div>
<div class="component-detail-internal-data-row">
<div class="internal-name"> <div class="internal-name">
内部名称: {{ componentData.name }} 内部名称: {{ componentData.name }}
</div> </div>
@ -73,6 +79,7 @@
</template> </template>
</MiniToast> </MiniToast>
</div> </div>
</div>
<!-- <div class="component-detail-separator"></div> --> <!-- <div class="component-detail-separator"></div> -->
</template> </template>
</div> </div>
@ -203,15 +210,21 @@ export default Vue.extend({
} }
} }
&-internal-data { &-internal-data {
@include h-center(); @include v-stretch();
justify-content: center;
flex-shrink: 0;
position: sticky; position: sticky;
bottom: 0; bottom: 0;
justify-content: space-between;
min-height: 24px; min-height: 24px;
box-sizing: content-box; box-sizing: content-box;
background-color: inherit; background-color: inherit;
padding: 8px 12px; padding: 8px 12px;
&-row {
@include h-center();
justify-content: space-between;
}
.internal-name { .internal-name {
opacity: 0.5; opacity: 0.5;
} }