mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 23:53:55 +08:00
feat: 添加语音盒子自定义主题功能
This commit is contained in:
@@ -64,6 +64,9 @@
|
||||
<el-button size="mini" type="text" @click="handleUnbind(scope.row.device_id)">
|
||||
{{ $t('device.unbind') }}
|
||||
</el-button>
|
||||
<el-button v-if="isGenerate(scope.row)" size="mini" type="text" @click="handleGenertor">
|
||||
{{ $t('device.deviceThemeGeneration') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -334,6 +337,10 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleGenertor() {
|
||||
sessionStorage.setItem('devicePath', window.location.href);
|
||||
window.location.href = `${window.location.origin}/generator/index.html`;
|
||||
},
|
||||
goFirst() {
|
||||
this.currentPage = 1;
|
||||
},
|
||||
@@ -467,6 +474,11 @@ export default {
|
||||
this.$message.error(msg || this.$t('message.error'))
|
||||
})
|
||||
},
|
||||
// 判断是否可以生成表情、主题、字体bin文件
|
||||
isGenerate(row) {
|
||||
const version = row.firmwareVersion.replace(/\./g, '');
|
||||
return Number(version) >= 200;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user