wui-components-v2 1.2.32 → 1.2.33

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.
@@ -33,10 +33,16 @@ const props = withDefaults(
33
33
  * 标题旁标签是否展示,由父级读取控制,默认不展示。
34
34
  */
35
35
  showLabel?: boolean
36
+ /**
37
+ * 是否显示详情弹窗(detailPopup),透传给 LabelValue。默认 true。
38
+ */
39
+ showDetailPopup?: boolean
36
40
  }>(),
37
41
  {
38
42
  // 标题旁标签默认不展示
39
43
  showLabel: false,
44
+ // 详情弹窗默认显示
45
+ showDetailPopup: true,
40
46
  }
41
47
  )
42
48
  const { currentThemeColor } = useManualTheme()
@@ -176,12 +182,12 @@ function toggleCollapse(contentId: string) {
176
182
  <view class="mb-3">
177
183
  <!-- 订单信息 -->
178
184
  <view class="text-sm space-y-3">
179
- <LabelValue :exhibit-data="exhibitData" :data="data" :index="index" />
185
+ <LabelValue :exhibit-data="exhibitData" :data="data" :index="index" :show-detail-popup="showDetailPopup" />
180
186
 
181
187
  <!-- 可折叠内容 -->
182
188
  <view class="fold-collapse" :class="expanded ? 'is-expanded' : 'is-collapsed'">
183
189
  <view class="space-y-3">
184
- <LabelValue :exhibit-data="collapseData" :data="data" :index="index" />
190
+ <LabelValue :exhibit-data="collapseData" :data="data" :index="index" :show-detail-popup="showDetailPopup" />
185
191
  </view>
186
192
  </view>
187
193
  </view>
@@ -16,6 +16,12 @@ const props = defineProps<{
16
16
  exhibitData: Columns[]
17
17
  data: Entities
18
18
  index: number
19
+ /**
20
+ * 是否显示详情弹窗(detailPopup)。默认 true。
21
+ * 为 true 时:字段配置了 detail 按钮时显示可点击的 detailPopup 弹窗
22
+ * 为 false 时:字段配置了 detail 按钮时仅显示「详情」文字,不可点击
23
+ */
24
+ showDetailPopup?: boolean
19
25
  }>()
20
26
  const { primary } = useManualTheme()
21
27
  const clums = computed(() => {
@@ -130,11 +136,14 @@ function isControlType(item: Columns): string {
130
136
  {{ index + 1 }}
131
137
  </view>
132
138
  <view v-else-if="item.buttons?.includes('detail')" class="flex flex-1 items-center text-gray-800 dark:text-white">
133
- <detailPopup
134
- :source="item"
135
- :text="formatItemData(data.fieldMap[item.sourceId], isControlType(item))"
136
- :code="data.fieldMap[item.sourceId]"
137
- />
139
+ <template v-if="props.showDetailPopup !== false">
140
+ <detailPopup
141
+ :source="item"
142
+ :text="formatItemData(data.fieldMap[item.sourceId], isControlType(item))"
143
+ :code="data.fieldMap[item.sourceId]"
144
+ />
145
+ </template>
146
+ <view>详情</view>
138
147
  </view>
139
148
  <openValueMore v-else :text="formatItemData(data.fieldMap[item.sourceId], isControlType(item))" />
140
149
  </view>
@@ -3,7 +3,7 @@ import { defineOptions, defineProps, onMounted, onUnmounted, ref } from 'vue'
3
3
  import { onLoad } from '@dcloudio/uni-app'
4
4
  import { listData, pageConfig, pageKey } from '../../api/page'
5
5
  import foldCard2 from '../fold-card2/fold-card2.vue'
6
- import type { Config, DeleteButtonConfig, DetailButtonConfig, EditButtonConfig, Entities } from '../../type'
6
+ import type { Config, EditButtonConfig, Entities } from '../../type'
7
7
  import Search from '../search/search.vue'
8
8
  import ListTopButtons from '../list-top-buttons/list-top-buttons.vue'
9
9
  import CardBotomButtons from '../card-botom-buttons/card-botom-buttons.vue'
@@ -38,15 +38,11 @@ withDefaults(
38
38
  */
39
39
  editButtonConfig?: EditButtonConfig
40
40
  /**
41
- * 自定义删除按钮配置:动态文字 / 显隐 / 点击行为。
42
- * 不传时走组件内置的「删除」按钮逻辑。
41
+ * 是否显示详情弹窗(detailPopup)。默认 true。
42
+ * 为 true 时:字段配置了 detail 按钮时显示可点击的 detailPopup 弹窗
43
+ * 为 false 时:字段配置了 detail 按钮时仅显示「详情」文字,不可点击
43
44
  */
44
- deleteButtonConfig?: DeleteButtonConfig
45
- /**
46
- * 自定义详情按钮配置:动态文字 / 显隐 / 点击行为。
47
- * 不传时走组件内置的「详情」按钮逻辑。
48
- */
49
- detailButtonConfig?: DetailButtonConfig
45
+ showDetailPopup?: boolean
50
46
  }>(),
51
47
  {
52
48
  // 操作按钮区域(编辑/删除/morebutns)默认显示
@@ -55,6 +51,8 @@ withDefaults(
55
51
  showTopButtons: true,
56
52
  // 标题旁标签默认不展示
57
53
  showLabel: false,
54
+ // 详情弹窗默认显示
55
+ showDetailPopup: true,
58
56
  }
59
57
  )
60
58
 
@@ -282,8 +280,6 @@ function tabSearchClick(data: any) {
282
280
  :is-show-action="isShowAction"
283
281
  :copy-mode="config.copyMode"
284
282
  :edit-button-config="editButtonConfig"
285
- :delete-button-config="deleteButtonConfig"
286
- :detail-button-config="detailButtonConfig"
287
283
  />
288
284
  </template>
289
285
  </productCard>
@@ -303,6 +299,7 @@ function tabSearchClick(data: any) {
303
299
  :second-column="config.secondColumn"
304
300
  :label-column="config.labelColumn"
305
301
  :show-label="showLabel"
302
+ :show-detail-popup="showDetailPopup"
306
303
  model="complex"
307
304
  >
308
305
  <template #buttons>
@@ -326,8 +323,6 @@ function tabSearchClick(data: any) {
326
323
  :is-show-action="isShowAction"
327
324
  :copy-mode="config.copyMode"
328
325
  :edit-button-config="editButtonConfig"
329
- :delete-button-config="deleteButtonConfig"
330
- :detail-button-config="detailButtonConfig"
331
326
  />
332
327
  </template>
333
328
  </foldCard2>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",