$log
的来源:
Vue.prototype.$log = console.log
禁止的地方:
<template>
<!-- Place 1 -->
<div @click="$log">
<!-- Place 2 -->
{{ $log }}
<!-- Place 3 -->
{{ $log('foo') }}
</div>
</template>
<script>
import Vue from 'vue'
// Place 4
Vue.prototype.$log('foo')
export default {
created() {
// Place 5
this.$log('foo')
},
}
</script>
一些可能有帮助的其他信息:
1条答案
按热度按时间vi4fp9gy1#
在深入研究了
no-restricted-syntax
、vue/no-restricted-syntax
规则和AST
s之后,我终于得到了这个工作,下面是工作规则: