wui-components-v2 1.1.68 → 1.1.69

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.
@@ -8,15 +8,15 @@ import { useGlobalToast } from '../../composables/useGlobalToast'
8
8
  defineOptions({
9
9
  name: 'ActionPopup',
10
10
  })
11
- const props = defineProps<
12
- {
13
- fieldGroup?: Groups
14
- show: boolean
15
- code: string
16
- zpaging: any
17
- enumColumn?: Enums
18
- }
19
- >()
11
+ const props = defineProps<{
12
+ fieldGroup?: Groups
13
+ show: boolean
14
+ code: string
15
+ zpaging: any
16
+ enumColumn?: Enums
17
+ /** 提交成功后跳转的自定义页面路径,不传则默认刷新 */
18
+ successUrl?: string
19
+ }>()
20
20
  const emits = defineEmits(['update:show'])
21
21
  const btnLoading = ref(false)
22
22
  const toast = useGlobalToast()
@@ -59,10 +59,14 @@ async function action() {
59
59
  await actionDataSave(props.fieldGroup?.id || '', props.code, formatFileData(data))
60
60
  btnLoading.value = false
61
61
  show.value = false
62
- props.zpaging.reload()
63
62
  toast.success({ msg: '操作成功!' })
64
- }
65
- catch (error: any) {
63
+ // 如果传了 successUrl,跳转到自定义页面;否则默认刷新
64
+ if (props.successUrl) {
65
+ uni.navigateTo({ url: props.successUrl })
66
+ } else {
67
+ props.zpaging.reload()
68
+ }
69
+ } catch (error: any) {
66
70
  btnLoading.value = false
67
71
  toast.error(error)
68
72
  }
@@ -70,14 +74,39 @@ async function action() {
70
74
  </script>
71
75
 
72
76
  <template>
73
- <wd-popup v-model="show" position="bottom" closable :z-index="999999" @close="() => { show = false }">
74
- <view class="h-50vh w-100vw">
77
+ <wd-popup
78
+ v-model="show"
79
+ position="bottom"
80
+ closable
81
+ :z-index="999999"
82
+ @close="
83
+ () => {
84
+ show = false
85
+ }
86
+ "
87
+ >
88
+ <view class="h-50vh w-100vw bg-white dark:bg-[var(--wot-dark-background)]">
75
89
  <view class="h-44px bg-white dark:bg-[var(--wot-dark-background)]" />
76
90
  <view class="w-[calc(100%-44px)] overflow-auto bg-white dark:bg-[var(--wot-dark-background)]">
77
- <formControl v-if="props.fieldGroup" ref="formControlRef" :field-group="props.fieldGroup" :enum-column="enumColumn" />
91
+ <formControl
92
+ v-if="props.fieldGroup"
93
+ ref="formControlRef"
94
+ :field-group="props.fieldGroup"
95
+ :enum-column="enumColumn"
96
+ />
78
97
  <view class="h-44px bg-white dark:bg-[var(--wot-dark-background)]" />
79
- <view class="fixed bottom-0 left-0 right-0 box-border w-100% flex p-2 bg-white dark:bg-[var(--wot-dark-background)]">
80
- <wd-button :loading="btnLoading" custom-class="flex-1" @click="() => { action() }">
98
+ <view
99
+ class="fixed bottom-0 left-0 right-0 box-border w-100% flex p-2 bg-white dark:bg-[var(--wot-dark-background)]"
100
+ >
101
+ <wd-button
102
+ :loading="btnLoading"
103
+ custom-class="flex-1"
104
+ @click="
105
+ () => {
106
+ action()
107
+ }
108
+ "
109
+ >
81
110
  提交
82
111
  </wd-button>
83
112
  </view>
@@ -10,6 +10,10 @@ import { useGlobalToast } from '../../composables/useGlobalToast'
10
10
  defineOptions({
11
11
  name: 'EvaluationPage',
12
12
  })
13
+ const props = defineProps<{
14
+ /** 评价提交成功后的跳转地址,不传则默认刷新详情 */
15
+ successUrl?: string
16
+ }>()
13
17
  const toast = useGlobalToast()
14
18
  const sourceId = ref('')
15
19
  const id = ref('')
@@ -125,7 +129,6 @@ async function getOperationPageConfig() {
125
129
  if (res.ltmplConfig?.rowActions) {
126
130
  evaluationActions.value = res.ltmplConfig.rowActions.filter((item: rowActions) => item.title.includes('评价'))
127
131
  }
128
- console.log(res, '222222222')
129
132
  } catch (error) {
130
133
  console.log(error)
131
134
  }
@@ -187,6 +190,7 @@ async function handleEvaluationClick() {
187
190
  :zpaging="mockZpaging"
188
191
  :field-group="actionItem"
189
192
  :code="code"
193
+ :success-url="props.successUrl + '?sourceId=' + sourceId"
190
194
  />
191
195
  </view>
192
196
  </template>
@@ -16,6 +16,10 @@ const props = defineProps({
16
16
  type: String,
17
17
  default: '/pages/login/index',
18
18
  },
19
+ showLogout: {
20
+ type: Boolean,
21
+ default: true,
22
+ },
19
23
  })
20
24
 
21
25
  const { currentThemeColor, isDark } = useManualTheme()
@@ -114,6 +118,7 @@ async function clearCache() {
114
118
  />
115
119
  <wd-cell title="清空缓存" :is-link="true" :clickable="true" :custom-style="cellStyle" @click="clearCache" />
116
120
  <wd-cell
121
+ v-if="showLogout"
117
122
  title="退出登录"
118
123
  icon="logout"
119
124
  :is-link="true"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.1.68",
3
+ "version": "1.1.69",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",
@@ -179,7 +179,7 @@
179
179
  }
180
180
 
181
181
  .wot-theme-dark .wd-popup {
182
- background-color: transparent !important;
182
+ background-color: #1b1b1e !important;
183
183
  }
184
184
 
185
185
  .wot-theme-dark .wd-popup__container {
@@ -303,7 +303,9 @@
303
303
  }
304
304
 
305
305
  .wot-theme-dark .wd-picker-view__mask {
306
- background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2)), linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2)) !important;
306
+ background-image:
307
+ linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2)),
308
+ linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2)) !important;
307
309
  }
308
310
 
309
311
  .wot-theme-dark .wd-picker-view__roller {
@@ -413,7 +415,9 @@
413
415
 
414
416
  .wot-theme-dark .wd-card {
415
417
  background: linear-gradient(180deg, #1e1e23 0%, #19191e 100%) !important;
416
- box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.25), 0 2rpx 8rpx rgba(0, 0, 0, 0.15) !important;
418
+ box-shadow:
419
+ 0 8rpx 32rpx rgba(0, 0, 0, 0.25),
420
+ 0 2rpx 8rpx rgba(0, 0, 0, 0.15) !important;
417
421
  border-color: rgba(255, 255, 255, 0.06) !important;
418
422
  }
419
423
 
@@ -437,7 +441,9 @@
437
441
 
438
442
  .wot-theme-dark .recent-section {
439
443
  background-color: #1e1e23 !important;
440
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
444
+ box-shadow:
445
+ 0 4px 16px rgba(0, 0, 0, 0.2),
446
+ inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
441
447
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
442
448
  }
443
449
 
@@ -445,6 +451,7 @@
445
451
  color: #d1d5db !important;
446
452
  }
447
453
 
454
+ /* 非TabBar区域内的普通图标(排除tabbar避免干扰选中态) */
448
455
  .wot-theme-dark .wd-cell .wd-icon,
449
456
  .wot-theme-dark .wd-navbar .wd-icon,
450
457
  .wot-theme-dark .wd-button .wd-icon {
@@ -483,3 +490,34 @@
483
490
  .wot-theme-dark .wd-search.is-plain .wd-search__cover {
484
491
  background-color: #252530 !important;
485
492
  }
493
+
494
+ /* Rate 评分星级 - 暗黑模式下恢复星星选中效果 */
495
+ .wot-theme-dark .wd-rate {
496
+ --wot-rate-color: #555555;
497
+ --wot-rate-active-color: #f5a623;
498
+ }
499
+
500
+ /* 恢复 wd-rate 星级颜色:放弃 background-clip:text(小程序不支持),改用原生 color 控制 SVG fill */
501
+ .wot-theme-dark .wd-rate .wd-rate__item-star {
502
+ background: none !important;
503
+ -webkit-background-clip: initial !important;
504
+ background-clip: initial !important;
505
+ color: var(--wot-rate-color, #555555) !important;
506
+ }
507
+
508
+ .wot-theme-dark .wd-rate .wd-rate__item-star svg,
509
+ .wot-theme-dark .wd-rate .wd-rate__item-star path {
510
+ fill: currentColor !important;
511
+ }
512
+
513
+ .wot-theme-dark .wd-rate .wd-rate__item-star--active,
514
+ .wot-theme-dark .wd-rate .wd-rate .wd-rate__item-star.wd-rate__item-star--active {
515
+ color: var(--wot-rate-active-color, #f5a623) !important;
516
+ }
517
+
518
+ .wot-theme-dark .wd-rate .wd-rate__item-star--active svg,
519
+ .wot-theme-dark .wd-rate .wd-rate__item-star--active path,
520
+ .wot-theme-dark .wd-rate .wd-rate .wd-rate__item-star.wd-rate__item-star--active svg,
521
+ .wot-theme-dark .wd-rate .wd-rate .wd-rate__item-star.wd-rate__item-star--active path {
522
+ fill: currentColor !important;
523
+ }
@@ -467,4 +467,32 @@
467
467
  background-color: #252530 !important;
468
468
  }
469
469
  }
470
+
471
+ /* Rate 评分星级 - 暗黑模式下恢复星星选中效果 */
472
+ .wd-rate {
473
+ --wot-rate-color: #555555;
474
+ --wot-rate-active-color: #f5a623;
475
+ }
476
+
477
+ /* 恢复 wd-rate 星级颜色:放弃 background-clip:text(小程序不支持),改用原生 color 控制 SVG fill */
478
+ .wd-rate .wd-rate__item-star {
479
+ background: none !important;
480
+ -webkit-background-clip: initial !important;
481
+ background-clip: initial !important;
482
+ color: var(--wot-rate-color, #555555) !important;
483
+
484
+ svg,
485
+ path {
486
+ fill: currentColor !important;
487
+ }
488
+
489
+ &.wd-rate__item-star--active {
490
+ color: var(--wot-rate-active-color, #f5a623) !important;
491
+
492
+ svg,
493
+ path {
494
+ fill: currentColor !important;
495
+ }
496
+ }
497
+ }
470
498
  }