@ebiz/designer-components 0.0.18-beta.20 → 0.0.18-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebiz/designer-components",
3
- "version": "0.0.18-beta.20",
3
+ "version": "0.0.18-beta.22",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="ebiz-detail-block">
3
3
  <t-row v-for="(item, index) in detailItems" :key="index" class="detail-item">
4
- <t-col :span="6" class="label">{{ item.label }}</t-col>
5
- <t-col :span="18" class="value">{{ item.value }}</t-col>
4
+ <t-col :span="6" class="label" :style="labelStyle">{{ item.label }}</t-col>
5
+ <t-col :span="18" class="value" :style="valueStyle">{{ item.value }}</t-col>
6
6
  </t-row>
7
7
  </div>
8
8
  </template>
@@ -19,10 +19,41 @@ const props = defineProps({
19
19
  labelMap: {
20
20
  type: Object,
21
21
  default: () => { }
22
+ },
23
+ gap: {
24
+ type: [String, Number],
25
+ default: '0'
26
+ },
27
+ labelSize: {
28
+ type: [String, Number],
29
+ default: '14'
30
+ },
31
+ labelColor: {
32
+ type: String,
33
+ default: '#86909C'
34
+ },
35
+ valueSize: {
36
+ type: [String, Number],
37
+ default: '14'
38
+ },
39
+ valueColor: {
40
+ type: String,
41
+ default: '#0A0A0A'
22
42
  }
23
43
  })
24
44
 
25
- const { model, labelMap } = toRefs(props)
45
+ const { model, labelMap, gap, labelSize, labelColor, valueSize, valueColor } = toRefs(props)
46
+
47
+ const labelStyle = computed(() => ({
48
+ fontSize: typeof labelSize.value === 'number' ? `${labelSize.value}px` : labelSize.value,
49
+ color: labelColor.value,
50
+ marginBottom: typeof gap.value === 'number' ? `${gap.value}px` : gap.value
51
+ }))
52
+
53
+ const valueStyle = computed(() => ({
54
+ fontSize: typeof valueSize.value === 'number' ? `${valueSize.value}px` : valueSize.value,
55
+ color: valueColor.value
56
+ }))
26
57
 
27
58
  const detailItems = computed(() => {
28
59
  return Object.entries(model.value).map(([key, value]) => ({
@@ -38,18 +69,14 @@ const detailItems = computed(() => {
38
69
  }
39
70
 
40
71
  .detail-item {
41
- margin-bottom: 16px;
42
72
  line-height: 32px;
43
73
  }
44
74
 
45
75
  .label {
46
- color: #86909C;
47
76
  width: 50%;
48
- padding-right: 16px;
49
77
  }
50
78
 
51
79
  .value {
52
- color: #0A0A0A;
53
80
  width: 50%;
54
81
  }
55
82
  </style>
@@ -154,7 +154,11 @@ const handleRemoteSearch = async (keyword) => {
154
154
  keyword
155
155
  }
156
156
  };
157
- const res = await dataService.fetch(params, props.apiConfig);
157
+ const res = await dataService.fetch(params, {
158
+ key: props.apiConfig.key,
159
+ apiId: props.apiConfig.apiId,
160
+ apiType: 'MULTIPLE_DATA_SEARCH'
161
+ });
158
162
  const { labelField, valueField } = props.optionsConfig;
159
163
 
160
164
  options.value = res.data.map(item => ({
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <ebiz-route-breadcrumb />
4
- <ebiz-detail-block :model="model" :labelMap="labelMap"/>
4
+ <ebiz-detail-block :model="model" :labelMap="labelMap" :gap="10" :labelSize="20" :labelColor="'#000'" :valueSize="20" :valueColor="'#000'"/>
5
5
  </div>
6
6
  </template>
7
7