wui-components-v2 1.1.56 → 1.1.58

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.
@@ -230,7 +230,7 @@ function select({ item }: { item: any }) {
230
230
  <wd-button v-if="morebutns.length > 3" size="small" type="info" @click="() => { showMoreButn = true }">
231
231
  更多
232
232
  </wd-button>
233
- <view v-else>
233
+ <view v-else class="flex gap-2 flex-wrap">
234
234
  <wd-button v-for="subitem in morebutns" :key="subitem.id" plain size="small" @click="() => { select({ item: subitem }) }">
235
235
  {{ subitem.title }}
236
236
  </wd-button>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <view class=" text-[#2164f3]">
3
+ 查看详情
4
+ </view>
5
+ </template>
6
+ <script setup>
7
+ import { ref, computed, onMounted } from 'vue'
8
+
9
+ defineOptions({
10
+ name: 'DetailPopup',
11
+ })
12
+ defineProps({
13
+ data: {
14
+ type: Object,
15
+ default: () => {},
16
+ },
17
+ })
18
+
19
+
20
+ const data = ref(null)
21
+
22
+ onMounted(() => {
23
+ // mounted logic
24
+ })
25
+ </script>
26
+
27
+ <style scoped>
28
+ </style>
@@ -23,9 +23,7 @@ const props = defineProps<{
23
23
  index: number
24
24
  }>()
25
25
  const contentRef = ref<any>()
26
- const {
27
- currentThemeColor,
28
- } = useManualTheme()
26
+ const { currentThemeColor } = useManualTheme()
29
27
  // 展示内容
30
28
  const exhibitData = computed(() => {
31
29
  const { collapseNum } = props
@@ -48,8 +46,7 @@ const collapseData = ref<Columns[]>([])
48
46
  const labelColumns = computed(() => {
49
47
  if (props.labelColumn && props.enumColumn) {
50
48
  return props.enumColumn[props.labelColumn.mstrucId]
51
- }
52
- else {
49
+ } else {
53
50
  return []
54
51
  }
55
52
  })
@@ -68,8 +65,7 @@ function toggleCollapse(contentId: string) {
68
65
  // content.classList.remove('max-h-0')
69
66
  // content.classList.add('max-h-[500px]')
70
67
  collapseIcon.value = 'arrow-up'
71
- }
72
- else {
68
+ } else {
73
69
  collapseData.value = []
74
70
  // 折叠
75
71
  // content?.classList.add('max-h-0')
@@ -92,22 +88,20 @@ function toggleCollapse(contentId: string) {
92
88
  <view class="mr-1 h-4 w-1 rounded-2xl" :style="{ backgroundColor: currentThemeColor.primary }" />
93
89
  </view>
94
90
  <view>
95
- <view class=" flex items-center gap-2">
96
- <view class=" overflow-hidden text-ellipsis whitespace-nowrap font-700">
97
- {{ formatItemData(data.fieldMap[props.primaryColumn.sourceId], props.primaryColumn.extControlType || props.primaryColumn.controlType) }}
98
- </view>
99
- <slot name="addressInfo" />
91
+ <view class="flex items-center gap-2">
92
+ <view class="overflow-hidden text-ellipsis font-700">
93
+ {{ formatItemData(data.fieldMap[props.primaryColumn.sourceId], props.primaryColumn.extControlType || props.primaryColumn.controlType) }}
94
+ </view>
95
+ <slot name="addressInfo" />
100
96
  </view>
101
- <slot name="detailAddress" />
97
+ <slot name="detailAddress" />
102
98
  </view>
103
99
  </view>
104
100
  <view
105
101
  v-if="props.labelColumn"
106
102
  class="whitespace-nowrap rounded px-1 py-1 text-sm text-white font-700"
107
103
  :style="{
108
- color: labelColumns?.find(
109
- item => props.labelColumn && item.value === data.fieldMap[props.labelColumn.sourceId],
110
- )?.css?.color,
104
+ color: labelColumns?.find(item => props.labelColumn && item.value === data.fieldMap[props.labelColumn.sourceId])?.css?.color,
111
105
  }"
112
106
  >
113
107
  {{ formatItemData(data.fieldMap[props.labelColumn.sourceId], props.labelColumn.extControlType || props.labelColumn.controlType) }}
@@ -135,13 +129,7 @@ function toggleCollapse(contentId: string) {
135
129
  <view class="flex items-center justify-between border-t border-gray-100">
136
130
  <!-- 折叠按钮 -->
137
131
  <view>
138
- <wd-icon
139
- v-if="showCollapse" id="toggle-btn-2" name="down"
140
- size="24px"
141
- :icon="collapseIcon"
142
- class="mr-auto flex items-center px-3 py-2 text-sm text-[#6b7280] !py-1"
143
- @click.stop="toggleCollapse(data.code)"
144
- />
132
+ <wd-icon v-if="showCollapse" id="toggle-btn-2" name="down" size="24px" :icon="collapseIcon" class="mr-auto flex items-center px-3 py-2 text-sm text-[#6b7280] !py-1" @click.stop="toggleCollapse(data.code)" />
145
133
  </view>
146
134
 
147
135
  <view class="flex items-center gap-1">
@@ -154,10 +142,10 @@ function toggleCollapse(contentId: string) {
154
142
  </template>
155
143
 
156
144
  <style>
157
- :deep(.wd-collapse-item__body){
158
- background-color:#f9f9f9 !important;
145
+ :deep(.wd-collapse-item__body) {
146
+ background-color: #f9f9f9 !important;
159
147
  }
160
- :deep(.wot-theme-dark .wd-collapse-item__body){
161
- background-color:#222222 !important;
148
+ :deep(.wot-theme-dark .wd-collapse-item__body) {
149
+ background-color: #222222 !important;
162
150
  }
163
151
  </style>