44 <tiny-select
55 ref =" selectRef"
66 v-model =" selectValue"
7- placeholder =" 请根据显示值搜索 "
7+ placeholder =" 请选择多语言文案 "
88 filterable
9+ is-drop-inherit-width
910 :filter-method =" filterMethod"
1011 @change =" selectI18n"
1112 >
12- <tiny-option v-for =" item in langData" :key =" item.key" :label =" item[currentLang]" :value =" item.key" >
13- <div style =" display : flex " >
14- <span style =" flex : 1 " >{{ item.key }}</span >
15- <span style =" flex : 1 " >{{ item[currentLang] }}</span >
16- </div >
13+ <tiny-option v-for =" item in langData" :key =" item.key" :label =" item.key + item[currentLang]" :value =" item.key" >
1714 </tiny-option >
1815 </tiny-select >
1916 <div v-if =" paramsForm.length" class =" params-form" >
20- <label >国际化参数配置</label >
17+ <div class = " label" >国际化参数配置</div >
2118 <div v-for =" param in paramsForm" :key =" param.name" class =" params-item" >
2219 <label >{{ param.name }}</label >
2320 <tiny-input v-model =" param.value" @update:modelValue =" paramsChange" ></tiny-input >
2421 </div >
2522 </div >
2623 <slot name =" suffix" >
27- <tiny-button type =" info" @click =" openCreateForm" >
28- <icon-plus class =" icon-plus" ></icon-plus >
29- <span >创建新的多语言文案</span >
30- </tiny-button >
31- <tiny-button v-if =" isBind" type =" info" @click =" unbindI18n" > 解除关联 </tiny-button >
24+ <div class =" bottom-buttons" >
25+ <tiny-button v-if =" isBind" @click =" unbindI18n" >解除关联</tiny-button >
26+ <tiny-button type =" primary" @click =" openCreateForm" >
27+ <span >创建新的多语言文案</span >
28+ </tiny-button >
29+ </div >
3230 </slot >
3331 </div >
3432 <div v-show =" showEditItem" class =" addNewLanguage" >
4341 <input v-model =" editForm[locale.lang]" class =" tiny-input__inner" />
4442 </div >
4543 </div >
46- <div class =" add-btns " >
47- <tiny-button type = " info " @click =" activeI18n" >国际化管理 </tiny-button >
48- <tiny-button type =" info " @click =" addBindI18n" >添加并关联 </tiny-button >
44+ <div class =" bottom-buttons " >
45+ <tiny-button @click =" activeI18n" >国际化管理</tiny-button >
46+ <tiny-button type =" primary " @click =" addBindI18n" >添加并关联</tiny-button >
4947 </div >
5048 </div >
5149 </div >
@@ -57,15 +55,13 @@ import { useLayout, useTranslate } from '@opentiny/tiny-engine-meta-register'
5755import { PROP_DATA_TYPE } from ' ../js/constants'
5856import { utils } from ' @opentiny/tiny-engine-utils'
5957import { Select , Option , Button , Input } from ' @opentiny/vue'
60- import { iconPlus } from ' @opentiny/vue-icon'
6158
6259export default {
6360 components: {
6461 TinySelect: Select,
6562 TinyOption: Option,
6663 TinyButton: Button,
67- TinyInput: Input,
68- IconPlus: iconPlus ()
64+ TinyInput: Input
6965 },
7066 inheritAttrs: false ,
7167 props: {
@@ -169,10 +165,7 @@ export default {
169165
170166< style lang= " less" scoped>
171167.languageContent {
172- text- align: center;
173168 z- index: 99 ;
174- margin- top: 5px ;
175- margin- bottom: 16px ;
176169
177170 .tiny - svg {
178171 margin- right: 10px ;
@@ -182,17 +175,6 @@ export default {
182175 color: #ccc;
183176 }
184177 }
185- .tiny - button {
186- max- width: initial;
187- padding: 0 12px ;
188- background- color: var (-- ti- lowcode- tabs- border- color);
189- border- color: var (-- ti- lowcode- tootip- input- border- color);
190- color: var (-- ti- lowcode- toolbar- icon- color);
191- & : hover {
192- background- color: var (-- ti- lowcode- canvas- wrap- bg);
193- border- color: var (-- ti- lowcode- tabs- border- color);
194- }
195- }
196178 .addNewLanguage {
197179 .tiny - input {
198180 display: flex;
@@ -209,23 +191,33 @@ export default {
209191 .tiny - input__inner {
210192 flex: 1 ;
211193 }
212- .add - btns {
213- text- align: right;
214- padding: 0 8px ;
215- }
216194 }
217195}
218196.params - form {
219- & > label {
220- line- height: 30px ;
197+ .label {
198+ margin: 16px 0 ;
199+ font- size: 12px ;
200+ line- height: 18px ;
201+ }
202+ .params - item + .params - item {
203+ margin- top: 12px ;
221204 }
222205 .params - item {
223206 display: flex;
224207 align- items: center;
225208 label {
226209 width: 80px ;
227210 }
228- margin- bottom: 10px ;
211+ }
212+ }
213+ .bottom - buttons {
214+ display: flex;
215+ justify- content: flex- end;
216+ margin- top: 16px ;
217+ gap: 8px ;
218+ .tiny - button,
219+ .tiny - button .tiny - button-- default {
220+ margin: 0 ;
229221 }
230222}
231223< / style>
0 commit comments