@tplc/business 0.2.63 → 0.2.65

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.65](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.52...v0.2.65) (2025-01-05)
6
+
7
+ ### [0.2.64](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.63...v0.2.64) (2025-01-05)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 支持业务组件地址切换 ([83912ed](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/83912ede332299ad4b46d0018336883eaf0788a1))
13
+
14
+
15
+ ### 🐛 Bug Fixes | Bug 修复
16
+
17
+ * headerinfo 卡顿 ([dd7049e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dd7049ea008d0e6863de93979d331b078e4a14fe))
18
+
5
19
  ### [0.2.63](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.62...v0.2.63) (2025-01-04)
6
20
 
7
21
  ### [0.2.62](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.61...v0.2.62) (2025-01-04)
@@ -1,18 +1,21 @@
1
1
  <template>
2
2
  <view class="filter-slider">
3
3
  <wd-slider
4
- hide-label
4
+ :hide-label="!showLabel"
5
5
  :max="max"
6
6
  :min="min"
7
7
  :minText="`${unit}${min}`"
8
8
  :maxText="`${unit}${max}+`"
9
9
  v-model="innerValue"
10
10
  @dragend="onDragend"
11
+ @dragstart="onDragStart"
11
12
  ref="slider"
12
13
  custom-class="px-4"
13
14
  custom-min-class="left-0 slider-text"
14
15
  custom-max-class="right--2 slider-text"
15
16
  :active-color="themeColor"
17
+ :step="50"
18
+ unit="¥"
16
19
  />
17
20
  <view class="grid grid-cols-4 gap-4 mt-2" v-if="options.length">
18
21
  <SelectTagView
@@ -41,6 +44,7 @@ defineOptions({
41
44
  },
42
45
  })
43
46
  const themeColor = inject('theme-color', '#3875FF')
47
+ const showLabel = ref(false)
44
48
  const slider = ref<SliderInstance>()
45
49
  const props = defineProps<FilterSliderProps>()
46
50
  const model = defineModel<number[]>()
@@ -59,6 +63,9 @@ const onItemClick = (value) => {
59
63
  const onDropOpened = () => {
60
64
  slider.value?.initSlider()
61
65
  }
66
+ const onDragStart = () => {
67
+ showLabel.value = true
68
+ }
62
69
 
63
70
  onMounted(() => {
64
71
  uni.$on('drop-opened', onDropOpened)
@@ -78,6 +85,7 @@ watch(
78
85
  { immediate: true },
79
86
  )
80
87
  const onDragend = () => {
88
+ showLabel.value = false
81
89
  if (innerValue.value?.[0] === props.max && innerValue.value?.[1] === props.max) {
82
90
  model.value = [innerValue.value?.[0]]
83
91
  } else {
@@ -96,14 +104,44 @@ const getChecked = (value) => {
96
104
  }
97
105
  </script>
98
106
  <style lang="scss">
107
+ @import '@tplc/wot/components/common/abstracts/variable';
99
108
  .filter-slider {
100
109
  position: relative;
101
110
  padding-top: 24rpx;
111
+
102
112
  :deep(.slider-text) {
103
113
  color: #999 !important;
104
114
  font-size: 24rpx !important;
105
115
  position: absolute;
106
116
  margin-bottom: 100rpx;
107
117
  }
118
+
119
+ :deep(.wd-slider__has-label) {
120
+ padding-top: 0rpx;
121
+
122
+ .wd-slider__label {
123
+ background: $-color-theme;
124
+ padding: 8rpx 16rpx;
125
+ border-radius: 48rpx;
126
+ color: #fff;
127
+ width: fit-content;
128
+ min-width: 30rpx;
129
+ font-size: 24rpx !important;
130
+ transform: translate3d(-25%, 0%, 0);
131
+ /** 底部中间一个三角 */
132
+ &:before {
133
+ content: '';
134
+ position: absolute;
135
+ left: 50%;
136
+ bottom: -6rpx;
137
+ width: 0;
138
+ height: 0;
139
+ border-left: 8rpx solid transparent;
140
+ border-right: 8rpx solid transparent;
141
+ border-top: 8rpx solid $-color-theme;
142
+ transform: translateX(-50%);
143
+ }
144
+ }
145
+ }
108
146
  }
109
147
  </style>
@@ -143,7 +143,7 @@ const value = computed(() => {
143
143
 
144
144
  <slot :value="value" v-if="prop === 'level'" name="level">
145
145
  <view :class="className" :style="style" class="inline pl-1 relative top-[-3px]">
146
- <wd-rate v-model="value" :num="value" readonly size="12px" space="2px" />
146
+ <wd-rate :model-value="Number(value)" :num="value" readonly size="12px" space="2px" />
147
147
  </view>
148
148
  </slot>
149
149
  <slot :value="value" v-if="prop === 'titleIcon'" name="titleIcon">
@@ -312,13 +312,17 @@ const value = computed(() => {
312
312
  </view>
313
313
  </slot>
314
314
  <slot :value="value" v-if="prop === 'headImg'" name="headImg">
315
- <view :class="className" :style="style" class="w-4 h-4">
316
- <wd-img :src="value" width="100%" height="100%" radius="50%" mode="aspectFill" />
317
- </view>
315
+ <img
316
+ :src="value + `?x-oss-process=image/resize,m_mfit,w_${64}&imageView2/2/w/${64}`"
317
+ class="block w-4 h-4 rounded-full"
318
+ :class="className"
319
+ :style="style"
320
+ mode="aspectFill"
321
+ />
318
322
  </slot>
319
323
  <slot :value="value" v-if="prop === 'userName'" name="userName">
320
324
  <view :class="className" :style="style" class="text-20rpx text-#333 truncate">
321
- <view>{{ value }}</view>
325
+ {{ value }}
322
326
  </view>
323
327
  </slot>
324
328
  </block>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.63",
3
+ "version": "0.2.65",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "vue": ">=3.2.47",
14
- "@tplc/wot": "0.1.50"
14
+ "@tplc/wot": "0.1.52"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",