fix: fix vue/no-ref-as-operand
and vue/return-in-computed-property
ESLint errors (#2679)
This commit is contained in:
parent
ed8a1811cc
commit
3b1a66c93c
9 changed files with 14 additions and 10 deletions
|
@ -22,7 +22,7 @@ onMounted(() => {
|
|||
|
||||
const commandMode = computed(() => input.value.startsWith('>'))
|
||||
|
||||
const query = computed(() => commandMode ? '' : input.value.trim())
|
||||
const query = computed(() => commandMode.value ? '' : input.value.trim())
|
||||
|
||||
const { accounts, hashtags, loading } = useSearch(query)
|
||||
|
||||
|
@ -61,7 +61,7 @@ const searchResult = computed<QueryResult>(() => {
|
|||
}
|
||||
})
|
||||
|
||||
const result = computed<QueryResult>(() => commandMode
|
||||
const result = computed<QueryResult>(() => commandMode.value
|
||||
? registry.query(scopes.value.map(s => s.id).join('.'), input.value.slice(1).trim())
|
||||
: searchResult.value,
|
||||
)
|
||||
|
|
|
@ -92,7 +92,7 @@ async function removeList() {
|
|||
async function clearError() {
|
||||
actionError.value = undefined
|
||||
await nextTick()
|
||||
if (isEditing)
|
||||
if (isEditing.value)
|
||||
input.value?.focus()
|
||||
else
|
||||
deleteBtn.value?.focus()
|
||||
|
|
|
@ -17,7 +17,7 @@ const isMute = computed(() => props.extraOptionType === 'mute')
|
|||
function handleChoice(choice: ConfirmDialogChoice['choice']) {
|
||||
const dialogChoice = {
|
||||
choice,
|
||||
...isMute && {
|
||||
...isMute.value && {
|
||||
extraOptions: {
|
||||
mute: {
|
||||
duration: hasDuration.value ? duration.value : 0,
|
||||
|
|
|
@ -72,7 +72,7 @@ function onEnter(e: KeyboardEvent) {
|
|||
}
|
||||
|
||||
function escapeAutocomplete(evt: KeyboardEvent) {
|
||||
if (!autocompleteShow)
|
||||
if (!autocompleteShow.value)
|
||||
return
|
||||
autocompleteShow.value = false
|
||||
evt.stopPropagation()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue