programing

ESLint VueJS v-slot

prostudy 2022. 7. 17. 17:49
반응형

ESLint VueJS v-slot

v-slot에서 수식자를 사용하는 Eslint에 문제가 발생했습니다.

이 질문에서 nokazn의 답변을 따르려고 했습니다.v-directive는 수식어를 지원하지 않습니다.vuejs의 보풀 매뉴얼은 https://eslint.vuejs.org/rules/valid-v-slot.html 입니다.

나는 나의 것을 추가한다..eslintrc.js파일:

'vue/valid-v-slot': ['error', {
  allowModifiers: true,
}],

그런데 lint 파일 검증에서 다음과 같은 오류가 발생했습니다.

Configuration for rule "vue/valid-v-slot" is invalid:
    Value [{"allowModifiers":true}] should NOT have more than 0 items.

보풀로 받아들이려고 하는 것은 다음 코드입니다.

<v-data-table
        :headers="headers"
        :items="data"
        disable-pagination
        fixed-header
      >
        <template v-slot:item.EDIT>
          <v-btn icon>
            <v-icon>mdi-pencil</v-icon>
          </v-btn>
        </template>
      </v-data-table>

(이 코드는, 보풀 에러와 함께 동작하고 있는 것에 주의해 주세요).

여기서도 같은 문제:"vue/valid-v-slot": "off"날 위해 일해!

<template  v-slot:[`item.monto`]='{ item }'>
          ${{ formatCLP(item.monto) }}
        </template>

언급URL : https://stackoverflow.com/questions/64860946/eslint-vuejs-v-slot

반응형