feat: update header and insertForm components

This commit is contained in:
yanglbme 2020-09-02 20:39:47 +08:00
parent 62565c1186
commit eacc33c598
2 changed files with 8 additions and 5 deletions

View File

@ -55,9 +55,9 @@
</el-tooltip>
<el-button :type="btnType" plain size="medium" @click="copy" placement="bottom-start">复制</el-button>
<el-button :type="btnType" plain size="medium" class="about" @click="$emit('showAboutDialog')">关于</el-button>
<el-tooltip content="夜间模式" placement="bottom-start">
<div class="mode__switch" v-if="!nightMode" @click="themeChanged"></div>
<div class="mode__switch mode__switch_black" v-else @click="themeChanged"></div>
<el-tooltip :content="btnContent" :effect="effect" placement="bottom-start">
<div class="mode__switch mode__switch_black" v-if="nightMode" @click="themeChanged"></div>
<div class="mode__switch" v-else @click="themeChanged"></div>
</el-tooltip>
<resetDialog :showResetConfirm="showResetConfirm" @confirm="confirmReset" @close="cancelReset"/>
</el-container>
@ -99,6 +99,9 @@ export default {
effect() {
return this.nightMode ? 'dark' : 'light'
},
btnContent() {
return this.nightMode ? '浅色模式' : '暗黑模式'
},
btnType() {
return this.nightMode ? 'default' : 'primary';
},

View File

@ -8,7 +8,7 @@
>
<el-row class="tb-options" type="flex" align="middle" :gutter="10">
<el-col :span="6">
<el-input-number
v-model="rowNum"
controls-position="right"
@ -19,7 +19,7 @@
></el-input-number>
</el-col>
<el-col :span="6">
<el-input-number
v-model="colNum"
controls-position="right"