refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
function broadcast(componentName: string, eventName: string, params: any) { // tslint:disable-line:no-any
|
||||
// tslint:disable-next-line:no-any
|
||||
function broadcast(componentName: string, eventName: string, params: any) {
|
||||
// @ts-ignore
|
||||
(this as Vue).$children.forEach(child => {
|
||||
(this as Vue).$children.forEach((child) => {
|
||||
const name = child.$options.name;
|
||||
|
||||
if (name === componentName) {
|
||||
@@ -18,7 +19,8 @@ function broadcast(componentName: string, eventName: string, params: any) { // t
|
||||
|
||||
export default Vue.extend({
|
||||
methods: {
|
||||
$dispatch(componentName: string, eventName: string, params: any) { // tslint:disable-line:no-any
|
||||
// tslint:disable-next-line:no-any
|
||||
$dispatch(componentName: string, eventName: string, params: any) {
|
||||
let parent = this.$parent || this.$root;
|
||||
let name = parent.$options.name;
|
||||
|
||||
@@ -35,7 +37,8 @@ export default Vue.extend({
|
||||
parent.$emit.apply(parent, [eventName].concat(params));
|
||||
}
|
||||
},
|
||||
$broadcast(componentName: string, eventName: string, params: any) { // tslint:disable-line:no-any
|
||||
// tslint:disable-next-line:no-any
|
||||
$broadcast(componentName: string, eventName: string, params: any) {
|
||||
broadcast.call(this, componentName, eventName, params);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user