refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
:disabled="isReadOnly"
|
||||
@input="onViewSelected"
|
||||
:options="[
|
||||
{ label: $locale.baseText('parameterInput.fixed'), value: 'fixed'},
|
||||
{ label: $locale.baseText('parameterInput.expression'), value: 'expression'},
|
||||
{ label: $locale.baseText('parameterInput.fixed'), value: 'fixed' },
|
||||
{ label: $locale.baseText('parameterInput.expression'), value: 'expression' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
@@ -51,13 +51,13 @@ export default Vue.extend({
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isDefault (): boolean {
|
||||
isDefault(): boolean {
|
||||
return this.parameter.default === this.value;
|
||||
},
|
||||
isValueExpression(): boolean {
|
||||
return isValueExpression(this.parameter, this.value);
|
||||
},
|
||||
shouldShowOptions (): boolean {
|
||||
shouldShowOptions(): boolean {
|
||||
if (this.isReadOnly === true) {
|
||||
return false;
|
||||
}
|
||||
@@ -80,17 +80,17 @@ export default Vue.extend({
|
||||
|
||||
return false;
|
||||
},
|
||||
selectedView () {
|
||||
selectedView() {
|
||||
if (this.isValueExpression) {
|
||||
return 'expression';
|
||||
}
|
||||
|
||||
return 'fixed';
|
||||
},
|
||||
hasRemoteMethod (): boolean {
|
||||
hasRemoteMethod(): boolean {
|
||||
return !!this.getArgument('loadOptionsMethod') || !!this.getArgument('loadOptions');
|
||||
},
|
||||
actions (): Array<{label: string, value: string, disabled?: boolean}> {
|
||||
actions(): Array<{ label: string; value: string; disabled?: boolean }> {
|
||||
const actions = [
|
||||
{
|
||||
label: this.$locale.baseText('parameterInput.resetValue'),
|
||||
@@ -99,7 +99,12 @@ export default Vue.extend({
|
||||
},
|
||||
];
|
||||
|
||||
if (this.hasRemoteMethod || (this.parameter.type === 'resourceLocator' && isResourceLocatorValue(this.value) && this.value.mode === 'list')) {
|
||||
if (
|
||||
this.hasRemoteMethod ||
|
||||
(this.parameter.type === 'resourceLocator' &&
|
||||
isResourceLocatorValue(this.value) &&
|
||||
this.value.mode === 'list')
|
||||
) {
|
||||
return [
|
||||
{
|
||||
label: this.$locale.baseText('parameterInput.refreshList'),
|
||||
@@ -117,15 +122,15 @@ export default Vue.extend({
|
||||
this.$emit('menu-expanded', visible);
|
||||
},
|
||||
onViewSelected(selected: string) {
|
||||
if (selected === 'expression' ) {
|
||||
this.$emit('optionSelected', this.isValueExpression? 'openExpression': 'addExpression');
|
||||
if (selected === 'expression') {
|
||||
this.$emit('optionSelected', this.isValueExpression ? 'openExpression' : 'addExpression');
|
||||
}
|
||||
|
||||
if (selected === 'fixed' && this.isValueExpression) {
|
||||
this.$emit('optionSelected', 'removeExpression');
|
||||
}
|
||||
},
|
||||
getArgument (argumentName: string): string | number | boolean | undefined {
|
||||
getArgument(argumentName: string): string | number | boolean | undefined {
|
||||
if (this.parameter.typeOptions === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user