This commit is contained in:
Silent YANG 2024-06-04 14:51:04 +08:00
parent 0c05091e68
commit f7fc24572d
4 changed files with 17 additions and 2 deletions

View file

@ -147,6 +147,8 @@ export default {
'global.username': 'Username',
'global.password': 'Password',
'global.password2': 'Retype password ',
'image.negative': 'Negative',
'workplace.clickNotice': ' (Official firmware can only detect 8KB/64Kbit)',
...localeSettings,
...localeMessageBox,
...localeLogin,

View file

@ -147,6 +147,8 @@ export default {
'global.username': '请输入用户名',
'global.password': '请输入密码',
'global.password2': '请再次输入密码',
'image.negative': '反色',
'workplace.clickNotice': '(官方固件只能检测 8KB/64Kbit',
...localeSettings,
...localeMessageBox,
...localeLogin,

View file

@ -10,7 +10,7 @@
<a-card v-show="appStore.connectState" :style="{ marginTop: '2em', marginBottom: '2em' }" :title="$t('workplace.info')">
{{ $t('workplace.current') }}{{ appStore.firmwareVersion }} <br />
{{ $t('workplace.writeconfig') }}{{ appStore.configuration?.name }} <br />
{{ $t('workplace.eepromSize') }}{{ state.eepromSize }} <a-button size="mini" type="primary" @click="checkEeprom">{{ $t('workplace.checkIt') }}</a-button>
{{ $t('workplace.eepromSize') }}{{ state.eepromSize }} {{ state.eepromSize != t('workplace.clickCheck') && appStore.configuration?.uart == 'official' ? t('workplace.clickNotice') : ''}} <a-button size="mini" type="primary" @click="checkEeprom">{{ $t('workplace.checkIt') }}</a-button>
</a-card>
</a-space>
<div>

View file

@ -16,7 +16,8 @@
<br>
<a-space>
<a-button @click="selectFile">{{ $t('tool.selectImage') }}</a-button>
<a-button :disabled="state.matrix.length < 64" @click="saveIt">保存</a-button>
<a-button :disabled="state.matrix.length < 64" @click="negativeIt">{{ $t('image.negative') }}</a-button>
<a-button :disabled="state.matrix.length < 64" @click="saveIt">{{ $t('cps.save') }}</a-button>
<a-button type="primary" :disabled="state.matrix.length < 64" @click="flashIt">{{ $t('tool.write') }}</a-button>
</a-space>
</a-card>
@ -57,6 +58,16 @@ onMounted(async ()=>{
}
})
const negativeIt = () => {
const matrix = state.matrix
matrix.map((y: any, yi: any)=>{
y.map((x: any, xi: any)=>{
matrix[yi][xi] = x == '#fff' ? '#000' : '#fff'
})
})
state.matrix = matrix
}
const changePixel = (x: int, y: int) => {
if(state.mousedown){
const matrix = state.matrix