w-ui-v1 1.0.8 → 1.0.10

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/index.ts CHANGED
@@ -4,17 +4,20 @@ import WMenu from './w-menu/w-menu.vue'
4
4
  import wSwitchLang from './w-switch-lang/w-switch-lang.vue'
5
5
  import WTable from './w-table/w-table.vue'
6
6
  import wTest from './w-test/w-test.vue'
7
-
8
- interface NamedComponent {
9
- name: string
10
- new (): any
11
- }
12
- const coms: NamedComponent[] = [
7
+ import wSelectPicker from './w-select-picker/w-select-picker.vue'
8
+ import wDetail from './w-detail/w-detail.vue'
9
+ import wAdd from './w-add/w-add.vue'
10
+ import WSearch from './w-search/w-search.vue'
11
+ const coms: any[] = [
13
12
  wTest,
14
13
  wLogin,
15
14
  wSwitchLang,
16
15
  WMenu,
17
16
  WTable,
17
+ wSelectPicker,
18
+ wDetail,
19
+ wAdd,
20
+ WSearch
18
21
  ]
19
22
  // 批量组件注册
20
23
  function install(Vue: App) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -5,16 +5,37 @@ export function pageConfig(sourceId: string) {
5
5
  url: `/v3/ltmpl/config?sourceId=${sourceId}`,
6
6
  })
7
7
  }
8
+ //勾选列表页面详细配置
9
+ export function selectPageConfig(sourceId: string) {
10
+ return request({
11
+ url: `/v3/select/config?sourceId=${sourceId}`,
12
+ })
13
+ }
8
14
 
9
- // 添加页面详细配置
15
+ // 新增页面详细配置
10
16
  export function addPageConfig(sourceId: string) {
11
17
  return request({
12
18
  url: `/v3/add-dtmpl/config?sourceId=${sourceId}`,
13
19
  })
14
20
  }
15
21
 
22
+ //详情页面详细配置
23
+ export function detailPageConfig(sourceId: string) {
24
+ return request({
25
+ url: `/v3/view-dtmpl/config?sourceId=${sourceId}`,
26
+ })
27
+ }
28
+
29
+ //详情页面数据
30
+ export function detailPageData(sourceId: string,code: string) {
31
+ return request({
32
+ url: `/v3/view-dtmpl/data?sourceId=${sourceId}&code=${code}`,
33
+ })
34
+ }
35
+
36
+
16
37
  // 获取页面数据key
17
- export function getPageKey(sourceId: string, query: string) {
38
+ export function getPageKey(sourceId: string, query: string='') {
18
39
  return request({
19
40
  url: `/v3/ltmpl/query/key?sourceId=${sourceId}&menuId=${sourceId}&${query}`,
20
41
  })
@@ -33,3 +54,12 @@ export function getPageTotal(queryKey: string) {
33
54
  url: `/v3/ltmpl/query/count?queryKey=${queryKey}`,
34
55
  })
35
56
  }
57
+
58
+ //获取枚举
59
+ export function getEnum(mstrucIds:string) {
60
+ return request({
61
+ url: `/v3/enum`,
62
+ method: 'POST',
63
+ data: mstrucIds
64
+ })
65
+ }
package/utils/http.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // 用promise 封装uni.request
2
2
  export default function request(options: any): Promise<any> {
3
- const baseUrl = uni.getStorageSync('baseUrl') || 'http://1.94.178.181:8082'
3
+ const baseUrl = uni.getStorageSync('baseUrl')||'/'
4
4
  const hydrocarbonProgramToken = uni.getStorageSync('hydrocarbonProgramToken') || ''
5
5
  const token = uni.getStorageSync('token') || ''
6
6
  const header = options.header || {}
@@ -0,0 +1,275 @@
1
+ <template>
2
+ <view>
3
+ <view v-if="loading" style="height: 100px;display: flex;justify-content: center;align-items: center;">
4
+ <wd-loading />
5
+ </view>
6
+ <wd-collapse v-model="value" v-else>
7
+ <wd-collapse-item :title="item.title" :name="item.id" v-for="(item, index) in pageConf.groups" :key="index">
8
+ <wd-card style="box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 17px 0px;margin: 0;" title=" "
9
+ v-if="item.type === 'fieldGroup'">
10
+ <wd-form ref="form" :model="model">
11
+ <wd-cell-group v-for="(subItem, subIndex) in item.fields" :key="subIndex">
12
+ <view v-if="!subItem.hidden" style="border-bottom: 1px solid rgb(243 242 242);">
13
+ <wd-input v-if="subItem.extControlType === 'text'" :disabled="subItem.disabled"
14
+ :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
15
+ v-model="model[subItem.id]"
16
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
17
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
18
+ <wd-picker v-if="subItem.extControlType === 'select'" :disabled="subItem.disabled"
19
+ :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
20
+ v-model="model[subItem.id]"
21
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
22
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]"
23
+ :columns="Enumcolumn[subItem.mstrucId]" />
24
+ <wd-textarea auto-height v-if="subItem.extControlType === 'textarea'"
25
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
26
+ :prop="subItem.id" clearable v-model="model[subItem.id]"
27
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
28
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
29
+ <wd-input
30
+ v-if="subItem.extControlType === 'decimal' || subItem.extControlType === 'int'"
31
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
32
+ :prop="subItem.id" clearable v-model="model[subItem.id]" type="number"
33
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
34
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
35
+ <wd-calendar v-if="subItem.extControlType === 'datetime'" :disabled="subItem.disabled"
36
+ :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
37
+ v-model="model[subItem.id]" type="datetime"
38
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
39
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" />
40
+ </view>
41
+
42
+ </wd-cell-group>
43
+
44
+ </wd-form>
45
+ <template #footer>
46
+
47
+ </template>
48
+ </wd-card>
49
+ <view v-if="item.type === 'relation'">
50
+ <view v-if="item.pointSourceId">
51
+ <view class="row-add" v-if="item.buttons.includes('selectAdd')">
52
+ <wd-button hairline type="info" size="small" icon="add"
53
+ @click="selectrow(item)">选择</wd-button>
54
+ </view>
55
+ </view>
56
+ <view v-else>
57
+ <wd-card style="box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 17px 0px;margin: 0 0 10px 0;"
58
+ v-for="(PItem, PIndex) in model[item.id]">
59
+ <template #title>
60
+ <view style="display: flex;justify-content: flex-end;">
61
+ <wd-button size="small" type="icon" icon="delete"
62
+ @click="remove(item.id, PIndex, item.title)"></wd-button>
63
+ </view>
64
+ </template>
65
+ <wd-form ref="form" :model="PItem">
66
+ <wd-cell-group v-for="(subItem, subIndex) in item.fields" :key="subIndex">
67
+ <view v-if="!subItem.hidden" style="border-bottom: 1px solid rgb(243 242 242);">
68
+ <wd-input v-if="subItem.extControlType === 'text'" :disabled="subItem.disabled"
69
+ :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
70
+ v-model="PItem[subItem.id]"
71
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
72
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
73
+ <wd-picker v-if="subItem.extControlType === 'select'"
74
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
75
+ :prop="subItem.id" clearable v-model="PItem[subItem.id]"
76
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
77
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]"
78
+ :columns="Enumcolumn[subItem.mstrucId]" />
79
+ <wd-textarea auto-height v-if="subItem.extControlType === 'textarea'"
80
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
81
+ :prop="subItem.id" clearable v-model="PItem[subItem.id]"
82
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
83
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
84
+ <wd-input
85
+ v-if="subItem.extControlType === 'decimal' || subItem.extControlType === 'int'"
86
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
87
+ :prop="subItem.id" clearable v-model="model[subItem.id]" type="number"
88
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
89
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
90
+ <wd-calendar v-if="subItem.extControlType === 'datetime'"
91
+ :disabled="subItem.disabled" :label="subItem.title" label-width="100px"
92
+ :prop="subItem.id" clearable v-model="model[subItem.id]" type="number"
93
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
94
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" />
95
+ </view>
96
+
97
+ </wd-cell-group>
98
+
99
+ </wd-form>
100
+ <template #footer>
101
+
102
+ </template>
103
+ </wd-card>
104
+ <view class="row-add" v-if="item.buttons.includes('rowAdd')">
105
+ <wd-button hairline type="info" size="small" icon="add"
106
+ @click="addrow(item.id)">加一条</wd-button>
107
+ </view>
108
+ </view>
109
+
110
+ </view>
111
+
112
+
113
+ </wd-collapse-item>
114
+ </wd-collapse>
115
+ <view class="footer-button">
116
+ <wd-button block @click="handleSubmit" icon="save">保存</wd-button>
117
+ </view>
118
+ <wd-message-box />
119
+ <wd-popup safe-area-inset-bottom position="right" v-model="showSelectRow" custom-style="width: 100vw;">
120
+ <WSelectTable :sourceId="pointSourceId" >
121
+ <template #close>
122
+ <view style="display: flex;justify-content: flex-end;">
123
+ <wd-button type="icon" icon="close" @click="showSelectRow=false"></wd-button>
124
+ </view>
125
+
126
+ </template>
127
+ </WSelectTable>
128
+ </wd-popup>
129
+ </view>
130
+ </template>
131
+
132
+ <script setup lang="ts">
133
+ import WSelectTable from '../w-table/w-selectTable.vue';
134
+ import { onLoad } from '@dcloudio/uni-app'
135
+ import { ref, defineProps, reactive } from 'vue';
136
+ import {
137
+ addPageConfig,
138
+ getEnum
139
+ } from '../utils/apis/pageConfig'
140
+ import { useMessage } from 'wot-design-uni'
141
+ const message = useMessage()
142
+ defineOptions({
143
+ name: 'w-add'
144
+ })
145
+ const props = defineProps({
146
+ sourceId: {
147
+ type: String,
148
+ default: ''
149
+ },
150
+
151
+ })
152
+ const sourceId = ref('')
153
+ const pageConf = ref({ groups: [] })
154
+ //表单数据
155
+ const model = ref({})
156
+ const loading = ref(false)
157
+ const value = ref([])
158
+ const Enumcolumn = ref({})
159
+ const showSelectRow = ref(false)
160
+ const pointSourceId= ref('')
161
+ onLoad((option: any) => {
162
+ sourceId.value = props.sourceId || option.sourceId
163
+ getPageConfig()
164
+ })
165
+
166
+ function getPageConfig() {
167
+ loading.value = true
168
+ addPageConfig(sourceId.value).then((res: any) => {
169
+ pageConf.value = res.data.dtmplConfig
170
+
171
+ let fieldGroup = {}
172
+ let relation = {}
173
+ res.data.dtmplConfig.groups.forEach((item: any) => {
174
+ value.value.push(item.id)
175
+ if (item.type === 'relation') {
176
+ let t = []
177
+ // item.fields.forEach((subItem: any) => {
178
+ // t[0][subItem.id] = subItem.defaultValue || ''
179
+ // })
180
+ relation[item.id] = t
181
+ }
182
+ if (item.type === 'fieldGroup') {
183
+ item.fields.forEach((subItem: any) => {
184
+ if (subItem.extControlType === 'datetime') {
185
+ fieldGroup[subItem.id] = null
186
+ return
187
+ }
188
+ fieldGroup[subItem.id] = subItem.defaultValue || ''
189
+
190
+ })
191
+ }
192
+
193
+ })
194
+ model.value = {
195
+ ...relation,
196
+ ...fieldGroup//一般为基本信息
197
+ }
198
+ getEnumer()
199
+ loading.value = false
200
+ })
201
+
202
+ }
203
+ //获取枚举
204
+ async function getEnumer() {
205
+ let params = []
206
+ pageConf.value.groups?.forEach((item: any) => {
207
+ item.fields?.forEach((subItem: any) => {
208
+ if (subItem.extControlType === 'select') {
209
+ params.push(`mstrucIds=${subItem.mstrucId}`)
210
+ }
211
+ })
212
+ });
213
+ if (!params.length) return
214
+ const res = await getEnum(params.join("&"))
215
+ Enumcolumn.value = res.data?.enumMap || {}
216
+ }
217
+
218
+ //保存
219
+ async function handleSubmit() {
220
+ console.log(model.value)
221
+ }
222
+
223
+ //选择数据
224
+ function selectrow(item: any) {
225
+ pointSourceId.value=item.pointSourceId
226
+ showSelectRow.value = true
227
+ }
228
+
229
+ //新加一行
230
+ function addrow(key: any) {
231
+
232
+ let data = pageConf.value.groups.find((item: any) => {
233
+ return item.id === key
234
+ })
235
+ let t = {}
236
+ data.fields.forEach((subItem: any) => {
237
+ t[subItem.id] = subItem.defaultValue || ''
238
+ })
239
+ model.value[key].push(t)
240
+ }
241
+ //删除一行
242
+ function remove(key: any, index: any, title: string) {
243
+ message
244
+ .confirm({
245
+ msg: `${title}--确定删除第${index + 1}条数据吗?`,
246
+ title: '删除'
247
+ })
248
+ .then(() => {
249
+ model.value[key].splice(index, 1)
250
+ })
251
+ .catch(() => {
252
+ console.log('点击了取消按钮')
253
+ })
254
+
255
+ }
256
+ </script>
257
+
258
+ <style scoped lang="scss">
259
+ .footer-button {
260
+ width: 100%;
261
+ box-sizing: border-box;
262
+ padding: 5px 10px 5px 10px;
263
+ position: sticky;
264
+ bottom: 0;
265
+ background-color: #fff;
266
+
267
+ }
268
+
269
+ .row-add {
270
+ // background-color: #fff;
271
+ // margin: 0 0 8px 0;
272
+ display: flex;
273
+ justify-content: center;
274
+ }
275
+ </style>
@@ -0,0 +1,95 @@
1
+ const hydrocarbonProgramToken = uni.getStorageSync('hydrocarbonProgramToken') || ''
2
+ const token = uni.getStorageSync('token') || ''
3
+ const baseUrl = uni.getStorageSync('baseUrl') || '/'
4
+ // 单项数据转换
5
+ export function getValue(content: any, title: any): any {
6
+ // 判断title 是否为字符串
7
+ if (typeof title === 'string') {
8
+ // 判断title 是否有 '时间'字符
9
+ if (title.includes('时间')) {
10
+ // 判断是否为数组
11
+ if (Array.isArray(content)) {
12
+ const newArr = content.map((item) => {
13
+ return formatTime(splitString(item))
14
+ })
15
+
16
+ // 数组转换为字符串
17
+ return newArr.join(',')
18
+ }
19
+ else {
20
+ return formatTime(content)
21
+ }
22
+ }
23
+ }
24
+
25
+ // 判断是否为数组
26
+ if (Array.isArray(content)) {
27
+ const newArr = content.map((item) => {
28
+ return splitString(item)
29
+ })
30
+
31
+ // 数组转换为字符串
32
+ return newArr.join(',')
33
+ }
34
+
35
+ // 判断是否为JSON字符串
36
+ if (typeof content === 'string' && content.startsWith('{') && content.endsWith('}')) {
37
+ // 解析JSON字符串
38
+ const obj = JSON.parse(content)
39
+
40
+ // 图片链接
41
+ if (obj.base?.path && (obj.base?.type.includes('jpg') || obj.base?.type.includes('png'))) {
42
+
43
+ return {
44
+ url: `${baseUrl}/v3/files${obj.base.path}?@token=${token}&@programToken=${hydrocarbonProgramToken}`,
45
+ type: '图片',
46
+ }
47
+ }
48
+ }
49
+
50
+ // 根据content中 "@R@" 分割字符串,取最后一项
51
+ return splitString(content)
52
+ }
53
+
54
+ // 根据 "@R@" 分割字符串,取最后一项
55
+ function splitString(str: string) {
56
+ // 判断是否为字符串类型
57
+ if (typeof str !== 'string') {
58
+ // 如果不是字符串类型,直接返回
59
+ return str
60
+ }
61
+
62
+ if (str) {
63
+ // 判断是否有 "@R@"
64
+ if (str.includes('@R@')) {
65
+ // 分割字符串
66
+ const splitStr = str.split('@R@')
67
+ // 返回分割后的数组的最后一项
68
+ return splitStr[splitStr.length - 1]
69
+ }
70
+ else {
71
+ // 返回原字符串
72
+ return str
73
+ }
74
+ }
75
+ // 返回原字符串
76
+ return str
77
+ }
78
+
79
+ // 判断字符串中是否存在'y'字符
80
+ export function hasY(str: string) {
81
+ // 判断是否为字符串
82
+ if (typeof str === 'string') {
83
+ return str.includes('y')
84
+ }
85
+ return false
86
+ }
87
+
88
+ // 格式化时间
89
+ function formatTime(str: string) {
90
+ if (typeof str === 'string') {
91
+ // 去掉小数点
92
+ return str.split('.')[0]
93
+ }
94
+ return str
95
+ }
@@ -0,0 +1,198 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ computed,
4
+ defineProps,
5
+ ref,
6
+ } from 'vue'
7
+ import { hasY,getValue } from './utils/utils'
8
+
9
+ const props = defineProps({
10
+ page: {
11
+ type: Object,
12
+ required: true,
13
+ },
14
+ itemData: {
15
+ type: Object,
16
+ required: true,
17
+ },
18
+ carIndex: {
19
+ type: Number,
20
+ required: true,
21
+ },
22
+ sourceId: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ })
27
+
28
+ // 处理单项数据、配置
29
+ const items = computed(() => {
30
+ return props.page.columns?.filter((item: any) => {
31
+ // 过滤掉操作列
32
+ return item.title !== '操作'
33
+ }).filter((item: any) => {
34
+ // 过滤掉title 中有 'y'字符的列
35
+ return !hasY(item.title)
36
+ }).map((item: any) => {
37
+ return {
38
+ title: item.title,
39
+ content: props.itemData?.fieldMap[item.id],
40
+ data:props.itemData?.fieldMap[item.id],
41
+ id: item.id,
42
+ mstrucId: item.mstrucId,
43
+ sourceId: item.sourceId,
44
+ buttons:item.buttons
45
+ }
46
+ }) || []
47
+ })
48
+
49
+
50
+
51
+ const isExpanded = ref(false)
52
+ const defaultVisible = 4 // 默认显示行数量
53
+
54
+ const visibleItems = computed(() => {
55
+ return isExpanded.value ? items.value : items.value.slice(0, defaultVisible)
56
+ })
57
+
58
+ const showMore = computed(() => {
59
+ return items.value.length > defaultVisible
60
+ })
61
+
62
+ function toggleExpand() {
63
+ isExpanded.value = !isExpanded.value
64
+ }
65
+
66
+ // 跳转页页面
67
+ function goto(type: string,item:any={},subItem:string='') {
68
+
69
+ switch (type) {
70
+ case 'detail':
71
+ uni.navigateTo({
72
+ url: `/pages/detail/detail?sourceId=${props.sourceId}&code=${props.itemData.code}`,
73
+ })
74
+ break
75
+ case 'link':
76
+ let data=item.data.find((item:any)=>{
77
+ return item.includes(subItem)
78
+ }).split('@R@')[0]
79
+ uni.navigateTo({
80
+ url: `/pages/detail/detail?sourceId=${item.sourceId}&code=${data}`,
81
+ })
82
+ break
83
+ case 'singleDelete':
84
+
85
+ break
86
+ }
87
+
88
+ }
89
+ </script>
90
+
91
+ <template>
92
+ <wd-card :title="getValue(visibleItems[0]?.content, visibleItems[0]?.title) || ' '">
93
+ <view class="table_collapse">
94
+ <view v-for="(item, index) in visibleItems" :key="index" class="cloum">
95
+ <wd-row style="border-bottom:1px solid #e8e5e5;padding: 10rpx;">
96
+ <wd-col :span="6">
97
+ <view class="lable">
98
+ <text>{{ item.title }}:</text>
99
+ </view>
100
+ </wd-col>
101
+ <wd-col :span="18">
102
+ <wd-img v-if="getValue(item.content, item.title)?.type === '图片'" width="100rpx" height="100rpx"
103
+ :src="getValue(item.content, item.title).url" :enable-preview="true" />
104
+ <view v-else-if="item.title === '序号'">
105
+ {{
106
+ carIndex + 1
107
+ }}
108
+ </view>
109
+ <view v-else-if="item.buttons.includes('detail')">
110
+ <view @click="goto('link',item,subItem)" style="color: #4d80f0;" v-for="(subItem, subIndex) in getValue(item.content, item.title)?.split(',')" :key="subIndex">
111
+ <text> {{ subItem}}</text>
112
+ </view>
113
+ </view>
114
+ <view v-else class="value">
115
+ {{ getValue(item.content, item.title) }}
116
+ </view>
117
+ </wd-col>
118
+ </wd-row>
119
+ </view>
120
+ <wd-button v-if="showMore" type="icon" :icon="isExpanded ? 'arrow-up' : 'arrow-down'" size="small"
121
+ custom-class="expand-btn" @click="toggleExpand" />
122
+ </view>
123
+ <template #footer>
124
+ <wd-button size="small" class="btn" v-if="props.page.buttons.includes('detail')" @click="goto('detail')">
125
+ 详情
126
+ </wd-button>
127
+ <wd-button size="small" class="btn" v-if="props.page.buttons.includes('dtmplEdit')">
128
+ 编辑
129
+ </wd-button>
130
+ <wd-button size="small" class="btn" type="error" v-if="props.page.buttons.includes('singleDelete')">
131
+ 删除
132
+ </wd-button>
133
+ </template>
134
+ </wd-card>
135
+ </template>
136
+
137
+ <style lang="scss" scoped>
138
+ .table_collapse {
139
+
140
+ color: #000;
141
+ background-color: #F8F8F8;
142
+ padding: 20rpx;
143
+
144
+ /* 添加过渡动画 */
145
+ .cloum {
146
+ transition: all 0.3s ease;
147
+ overflow: hidden;
148
+ max-height: 100px;
149
+ color: #3e3e3e;
150
+
151
+ .lable {
152
+ // font-weight: 600;
153
+ text-align: left;
154
+ margin-right: 20rpx;
155
+ }
156
+
157
+ .value {
158
+ color: #000;
159
+ // text-align: justify; /* 文字两端对齐 */
160
+ // word-break: break-all; /* 强制英文/数字换行时断词 */
161
+ word-break: break-all;
162
+ /* 所有字符(包括中文)强制换行 */
163
+ white-space: normal;
164
+ /* 确保不保留空白符 */
165
+ }
166
+
167
+ }
168
+
169
+ position: relative; // 添加定位上下文
170
+ padding-bottom: 80rpx; // 为按钮预留空间
171
+
172
+ .expand-btn {
173
+ /* 尺寸调整 */
174
+ padding: 8rpx 20rpx;
175
+ font-size: 24rpx;
176
+ line-height: 1.2;
177
+
178
+ /* 定位调整 */
179
+ position: absolute;
180
+ right: 50%;
181
+ transform: translateX(50%);
182
+ bottom: 0;
183
+ width: auto !important;
184
+ margin-top: 0;
185
+
186
+ /* 视觉样式 */
187
+ // background: #ffffff;
188
+ // border: 1px solid #ebedf0;
189
+ // border-radius: 16rpx;
190
+ // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
191
+ }
192
+
193
+ }
194
+
195
+ .btn {
196
+ margin-left: 10rpx;
197
+ }
198
+ </style>