Skip to content

Commit 69c3008

Browse files
authored
1 parent 8d78175 commit 69c3008

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/api/sfc-script-setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ import * as Form from './form-components'
127127
</template>
128128
```
129129

130-
## Using Custom Directives
130+
## カスタムディレクティブの使用
131131

132-
Globally registered custom directives just work as normal. Local custom directives don't need to be explicitly registered with `<script setup>`, but they must follow the naming scheme `vNameOfDirective`:
132+
グローバルに登録されたカスタムディレクティブは通常通りに動作します。`<script setup>` ではローカルのカスタムディレクティブは明示的に登録する必要はありませんが、`vNameOfDirective` という命名規則に従う必要があります:
133133

134134
```vue
135135
<script setup>
136136
const vMyDirective = {
137137
beforeMount: (el) => {
138-
// do something with the element
138+
// 要素を使って何かする
139139
}
140140
}
141141
</script>
@@ -144,7 +144,7 @@ const vMyDirective = {
144144
</template>
145145
```
146146

147-
If you're importing a directive from elsewhere, it can be renamed to fit the required naming scheme:
147+
他の場所からディレクティブをインポートする場合、必須の命名規則に合うようにリネームすることができます:
148148

149149
```vue
150150
<script setup>

0 commit comments

Comments
 (0)