🎨 Style(custom): format with prettier

This commit is contained in:
Kuingsmile
2024-06-15 19:37:50 +08:00
parent 096f564c31
commit 5af8a6b529
157 changed files with 21365 additions and 22952 deletions

View File

@@ -5,22 +5,12 @@
:modal-append-to-body="false"
append-to-body
>
<el-input
v-model="inputBoxValue"
:placeholder="inputBoxOptions.placeholder"
/>
<el-input v-model="inputBoxValue" :placeholder="inputBoxOptions.placeholder" />
<template #footer>
<el-button
round
@click="handleInputBoxCancel"
>
<el-button round @click="handleInputBoxCancel">
{{ $T('CANCEL') }}
</el-button>
<el-button
type="primary"
round
@click="handleInputBoxConfirm"
>
<el-button type="primary" round @click="handleInputBoxConfirm">
{{ $T('CONFIRM') }}
</el-button>
</template>
@@ -35,10 +25,7 @@ import { T as $T } from '@/i18n/index'
import $bus from '@/utils/bus'
import { sendToMain } from '@/utils/common'
import {
SHOW_INPUT_BOX,
SHOW_INPUT_BOX_RESPONSE
} from '#/events/constants'
import { SHOW_INPUT_BOX, SHOW_INPUT_BOX_RESPONSE } from '#/events/constants'
const inputBoxValue = ref('')
const showInputBoxVisible = ref(false)
@@ -52,25 +39,25 @@ onBeforeMount(() => {
$bus.on(SHOW_INPUT_BOX, initInputBoxValue)
})
function ipcEventHandler (_: IpcRendererEvent, options: IShowInputBoxOption) {
function ipcEventHandler(_: IpcRendererEvent, options: IShowInputBoxOption) {
initInputBoxValue(options)
}
function initInputBoxValue (options: IShowInputBoxOption) {
function initInputBoxValue(options: IShowInputBoxOption) {
inputBoxValue.value = options.value || ''
inputBoxOptions.title = options.title || ''
inputBoxOptions.placeholder = options.placeholder || ''
showInputBoxVisible.value = true
}
function handleInputBoxCancel () {
function handleInputBoxCancel() {
// TODO: RPCServer
showInputBoxVisible.value = false
sendToMain(SHOW_INPUT_BOX, '')
$bus.emit(SHOW_INPUT_BOX_RESPONSE, '')
}
function handleInputBoxConfirm () {
function handleInputBoxConfirm() {
showInputBoxVisible.value = false
sendToMain(SHOW_INPUT_BOX, inputBoxValue.value)
$bus.emit(SHOW_INPUT_BOX_RESPONSE, inputBoxValue.value)
@@ -80,12 +67,10 @@ onBeforeUnmount(() => {
ipcRenderer.removeListener(SHOW_INPUT_BOX, ipcEventHandler)
$bus.off(SHOW_INPUT_BOX)
})
</script>
<script lang="ts">
export default {
name: 'InputBoxDialog'
}
</script>
<style lang='stylus'>
</style>
<style lang="stylus"></style>