Skip to content

Commit b4569fc

Browse files
fix: tree style
1 parent df9245a commit b4569fc

File tree

13 files changed

+168
-109
lines changed

13 files changed

+168
-109
lines changed

ui/src/components/dynamics-form/constructor/index.vue

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,25 @@
77
:model="form_data"
88
v-bind="$attrs"
99
>
10-
<el-form-item :label="$t('dynamicsForm.paramForm.field.label')" :required="true" prop="field" :rules="rules.field">
10+
<el-form-item
11+
:label="$t('dynamicsForm.paramForm.field.label')"
12+
:required="true"
13+
prop="field"
14+
:rules="rules.field"
15+
>
1116
<el-input
1217
v-model="form_data.field"
1318
:maxlength="64"
1419
:placeholder="$t('dynamicsForm.paramForm.field.placeholder')"
1520
show-word-limit
1621
/>
1722
</el-form-item>
18-
<el-form-item :label="$t('dynamicsForm.paramForm.name.label')" :required="true" prop="label" :rules="rules.label">
23+
<el-form-item
24+
:label="$t('dynamicsForm.paramForm.name.label')"
25+
:required="true"
26+
prop="label"
27+
:rules="rules.label"
28+
>
1929
<el-input
2030
v-model="form_data.label"
2131
:maxlength="64"
@@ -31,11 +41,25 @@
3141
:placeholder="$t('dynamicsForm.paramForm.tooltip.placeholder')"
3242
/>
3343
</el-form-item>
34-
<el-form-item :label="$t('dynamicsForm.paramForm.required.label')" :required="true" prop="required" :rules="rules.required">
44+
<el-form-item
45+
:label="$t('dynamicsForm.paramForm.required.label')"
46+
:required="true"
47+
prop="required"
48+
:rules="rules.required"
49+
@click.prevent
50+
>
3551
<el-switch v-model="form_data.required" :active-value="true" :inactive-value="false" />
3652
</el-form-item>
37-
<el-form-item :label="$t('dynamicsForm.paramForm.input_type.label')" :required="true" prop="input_type" :rules="rules.input_type">
38-
<el-select v-model="form_data.input_type" :placeholder="$t('dynamicsForm.paramForm.input_type.placeholder')">
53+
<el-form-item
54+
:label="$t('dynamicsForm.paramForm.input_type.label')"
55+
:required="true"
56+
prop="input_type"
57+
:rules="rules.input_type"
58+
>
59+
<el-select
60+
v-model="form_data.input_type"
61+
:placeholder="$t('dynamicsForm.paramForm.input_type.placeholder')"
62+
>
3963
<el-option
4064
v-for="input_type in input_type_list"
4165
:key="input_type.value"
@@ -65,8 +89,11 @@ const props = withDefaults(
6589
}>(),
6690
{
6791
input_type_list: () =>
68-
input_type_list_data.map((item) => ({ label: item.label, value: item.value + 'Constructor' }))
69-
}
92+
input_type_list_data.map((item) => ({
93+
label: item.label,
94+
value: item.value + 'Constructor',
95+
})),
96+
},
7097
)
7198
const emit = defineEmits(['update:modelValue'])
7299
@@ -78,13 +105,13 @@ const form_data = ref<any>({
78105
field: '',
79106
tooltip: '',
80107
required: false,
81-
input_type: ''
108+
input_type: '',
82109
})
83110
const rules = {
84111
label: [{ required: true, message: t('dynamicsForm.paramForm.name.requiredMessage') }],
85112
field: [{ required: true, message: t('dynamicsForm.paramForm.field.requiredMessage') }],
86113
required: [{ required: true, message: t('dynamicsForm.paramForm.required.requiredMessage') }],
87-
input_type: [{ required: true, message: t('dynamicsForm.paramForm.input_type.requiredMessage') }]
114+
input_type: [{ required: true, message: t('dynamicsForm.paramForm.input_type.requiredMessage') }],
88115
}
89116
const getData = () => {
90117
let label: string | any = form_data.value.label
@@ -93,7 +120,7 @@ const getData = () => {
93120
input_type: 'TooltipLabel',
94121
label: form_data.value.label,
95122
attrs: { tooltip: form_data.value.tooltip },
96-
props_info: {}
123+
props_info: {},
97124
}
98125
}
99126
return {
@@ -102,7 +129,7 @@ const getData = () => {
102129
field: form_data.value.field,
103130
default_value: form_data.value.default_value,
104131
show_default_value: form_data.value.show_default_value,
105-
...componentFormRef.value.getData()
132+
...componentFormRef.value.getData(),
106133
}
107134
}
108135

ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
2-
<el-form-item :label="$t('dynamicsForm.Slider.showInput.label')" required prop="showInput">
2+
<el-form-item
3+
:label="$t('dynamicsForm.Slider.showInput.label')"
4+
required
5+
prop="showInput"
6+
@click.prevent
7+
>
38
<el-switch v-model="formValue.showInput" />
49
</el-form-item>
510
<el-form-item :label="$t('dynamicsForm.Slider.valueRange.label')" required>
@@ -9,8 +14,8 @@
914
{
1015
required: true,
1116
message: $t('dynamicsForm.Slider.valueRange.minRequired'),
12-
trigger: 'change'
13-
}
17+
trigger: 'change',
18+
},
1419
]"
1520
prop="min"
1621
>
@@ -26,8 +31,8 @@
2631
{
2732
required: true,
2833
message: $t('dynamicsForm.Slider.valueRange.maxRequired'),
29-
trigger: 'change'
30-
}
34+
trigger: 'change',
35+
},
3136
]"
3237
prop="max"
3338
><el-input-number
@@ -89,7 +94,7 @@ const formValue = computed({
8994
},
9095
get: () => {
9196
return props.modelValue
92-
}
97+
},
9398
})
9499
95100
const getData = () => {
@@ -101,19 +106,19 @@ const getData = () => {
101106
step: formValue.value.step,
102107
precision: formValue.value.precision,
103108
'show-input-controls': false,
104-
'show-input': formValue.value.showInput
109+
'show-input': formValue.value.showInput,
105110
},
106111
props_info: {
107112
rules: [
108113
{
109114
message: formValue.value.label + ' ' + t('dynamicsForm.tip.requiredMessage'),
110115
trigger: 'blur',
111-
required: formValue.value.required
112-
}
113-
]
116+
required: formValue.value.required,
117+
},
118+
],
114119
},
115120
show_default_value: true,
116-
default_value: formValue.value.default_value
121+
default_value: formValue.value.default_value,
117122
}
118123
}
119124
watch(
@@ -122,7 +127,7 @@ watch(
122127
if (formValue.value.min > formValue.value.max) {
123128
formValue.value.max = formValue.value.min
124129
}
125-
}
130+
},
126131
)
127132
const rander = (form_data: any) => {
128133
const attrs = form_data.attrs
@@ -147,8 +152,8 @@ const step_rules = [
147152
}
148153
return true
149154
},
150-
trigger: 'blur'
151-
}
155+
trigger: 'blur',
156+
},
152157
]
153158
defineExpose({ getData, rander })
154159
onBeforeMount(() => {

ui/src/components/dynamics-form/constructor/items/SwitchInputConstructor.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
prop="default_value"
66
:rules="
77
formValue.required
8-
? [{ required: true, message: `${$t('dynamicsForm.default.label')}${$t('dynamicsForm.default.requiredMessage')}` }]
8+
? [
9+
{
10+
required: true,
11+
message: `${$t('dynamicsForm.default.label')}${$t('dynamicsForm.default.requiredMessage')}`,
12+
},
13+
]
914
: []
1015
"
16+
@click.prevent
1117
>
1218
<el-switch v-model="formValue.default_value" />
1319
</el-form-item>
@@ -25,15 +31,15 @@ const formValue = computed({
2531
},
2632
get: () => {
2733
return props.modelValue
28-
}
34+
},
2935
})
3036
3137
const getData = () => {
3238
return {
3339
input_type: 'SwitchInput',
3440
show_default_value: true,
3541
attrs: {},
36-
default_value: formValue.value.default_value
42+
default_value: formValue.value.default_value,
3743
}
3844
}
3945

ui/src/components/folder-tree/MoveToDialog.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
append-to-body
66
:close-on-click-modal="false"
77
:close-on-press-escape="false"
8+
align-center
89
>
910
<folder-tree
1011
ref="treeRef"
1112
:source="source"
1213
:data="folderList"
1314
:treeStyle="{
14-
height: 'auto',
15+
height: 'calc(100vh - 320px)',
1516
border: '1px solid #ebeef5',
1617
borderRadius: '6px',
1718
padding: '8px',

ui/src/styles/element-plus.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
.el-message {
112112
--el-message-close-icon-color: var(--app-text-color-secondary);
113113
}
114+
.el-message__content {
115+
word-break: break-all;
116+
}
114117
.el-message-box {
115118
--el-messagebox-font-size: 16px;
116119
--el-messagebox-width: 475px;

ui/src/views/application-overview/xpack-component/XPackLimitDrawer.vue

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@
2323
step-strictly
2424
/>
2525
<span class="ml-4">{{
26-
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27-
}}</span>
26+
$t('views.applicationOverview.appInfo.LimitDialog.timesDays')
27+
}}</span>
2828
</el-form-item>
2929
<!-- 身份验证 -->
30-
<el-form-item :label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')">
30+
<el-form-item
31+
:label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')"
32+
@click.prevent
33+
>
3134
<el-switch size="small" v-model="form.authentication"></el-switch>
3235
</el-form-item>
3336
<el-radio-group
@@ -72,7 +75,7 @@
7275
style="margin: 0 4px 0 0 !important"
7376
>
7477
<el-icon>
75-
<RefreshRight/>
78+
<RefreshRight />
7679
</el-icon>
7780
</el-button>
7881
</el-tooltip>
@@ -109,7 +112,7 @@
109112
>
110113
<el-checkbox-group v-model="form.authentication_value.login_value">
111114
<template v-for="t in auth_list" :key="t.value">
112-
<el-checkbox :label="t.label" :value="t.value"/>
115+
<el-checkbox :label="t.label" :value="t.value" />
113116
</template>
114117
</el-checkbox-group>
115118
</el-form-item>
@@ -142,18 +145,18 @@
142145
</el-drawer>
143146
</template>
144147
<script setup lang="ts">
145-
import {ref, watch} from 'vue'
146-
import {useRoute, useRouter} from 'vue-router'
147-
import type {FormInstance, FormRules} from 'element-plus'
148+
import { ref, watch } from 'vue'
149+
import { useRoute, useRouter } from 'vue-router'
150+
import type { FormInstance, FormRules } from 'element-plus'
148151
import applicationApi from '@/api/application/application'
149-
import {MsgSuccess} from '@/utils/message'
150-
import {t} from '@/locales'
151-
import {copyClick} from '@/utils/clipboard'
152+
import { MsgSuccess } from '@/utils/message'
153+
import { t } from '@/locales'
154+
import { copyClick } from '@/utils/clipboard'
152155
153156
const router = useRouter()
154157
const route = useRoute()
155158
const {
156-
params: {id},
159+
params: { id },
157160
} = route
158161
159162
const emit = defineEmits(['refresh'])
@@ -198,7 +201,10 @@ const open = (data: any) => {
198201
form.value.authentication_value = data.authentication_value || {
199202
type: 'password',
200203
}
201-
if (form.value.authentication_value.type === 'password' && !form.value.authentication_value.password_value) {
204+
if (
205+
form.value.authentication_value.type === 'password' &&
206+
!form.value.authentication_value.password_value
207+
) {
202208
refreshAuthentication()
203209
}
204210
form.value.authentication = data.authentication
@@ -243,12 +249,16 @@ function refreshAuthentication() {
243249
}
244250
245251
function firstGeneration() {
246-
if (form.value.authentication && form.value.authentication_value.type === 'password' && !form.value.authentication_value.password_value) {
252+
if (
253+
form.value.authentication &&
254+
form.value.authentication_value.type === 'password' &&
255+
!form.value.authentication_value.password_value
256+
) {
247257
form.value.authentication_value.password_value = generateAuthenticationValue()
248258
}
249259
}
250260
251-
defineExpose({open})
261+
defineExpose({ open })
252262
</script>
253263
<style lang="scss" scoped>
254264
.authentication-append-input {

ui/src/views/application-workflow/component/DropdownMenu.vue

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@
7171
<el-tab-pane :label="$t('views.tool.title')" name="tool">
7272
<LayoutContainer>
7373
<template #left>
74-
<folder-tree
75-
:source="SourceTypeEnum.TOOL"
76-
:data="toolTreeData"
77-
:currentNodeKey="folder.currentFolder?.id"
78-
@handleNodeClick="folderClickHandle"
79-
:shareTitle="$t('views.shared.shared_tool')"
80-
:showShared="permissionPrecise['is_share']()"
81-
class="p-8"
82-
:canOperation="false"
83-
/>
74+
<div class="p-8">
75+
<folder-tree
76+
:source="SourceTypeEnum.TOOL"
77+
:data="toolTreeData"
78+
:currentNodeKey="folder.currentFolder?.id"
79+
@handleNodeClick="folderClickHandle"
80+
:shareTitle="$t('views.shared.shared_tool')"
81+
:showShared="permissionPrecise['is_share']()"
82+
:canOperation="false"
83+
/>
84+
</div>
8485
</template>
8586
<el-scrollbar height="450">
8687
<NodeContent
@@ -95,14 +96,15 @@
9596
<el-tab-pane :label="$t('views.application.title')" name="application">
9697
<LayoutContainer>
9798
<template #left>
98-
<folder-tree
99-
:source="SourceTypeEnum.APPLICATION"
100-
:data="applicationTreeData"
101-
:currentNodeKey="folder.currentFolder?.id"
102-
@handleNodeClick="folderClickHandle"
103-
class="p-8"
104-
:canOperation="false"
105-
/>
99+
<div class="p-8">
100+
<folder-tree
101+
:source="SourceTypeEnum.APPLICATION"
102+
:data="applicationTreeData"
103+
:currentNodeKey="folder.currentFolder?.id"
104+
@handleNodeClick="folderClickHandle"
105+
:canOperation="false"
106+
/>
107+
</div>
106108
</template>
107109
<el-scrollbar height="450">
108110
<NodeContent

0 commit comments

Comments
 (0)