@tplc/wot 0.1.52 → 0.1.54

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,14 @@
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.1.53](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.75...v0.1.53) (2025-01-06)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 兼容引擎 ([7b6fc3c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7b6fc3cfe4ecba868c3fb095b1f9b103b724d9f7))
11
+ * 瀑布流调整策略 ([a7988e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a7988e037342c211e45369ae4c324566b4b50f4a))
12
+
5
13
  ### [0.1.52](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.51...v0.1.52) (2025-01-05)
6
14
 
7
15
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  @include b(img) {
5
5
  position: relative;
6
- display: inline-block;
6
+ display: block;
7
7
 
8
8
  @include e(image) {
9
9
  box-sizing: border-box;
@@ -170,6 +170,21 @@
170
170
  @include e(text-active) {
171
171
  color: $-color-theme;
172
172
  }
173
+ @include e(button) {
174
+ width: 100%;
175
+ height: 72rpx;
176
+ line-height: 72rpx;
177
+ border-radius: 8rpx;
178
+ font-size: 28rpx;
179
+ color: #333;
180
+ box-sizing: border-box;
181
+ text-align: center;
182
+ border: 1px solid #eee;
183
+ &--active {
184
+ color: $-color-theme;
185
+ border: 1px solid $-color-theme;
186
+ }
187
+ }
173
188
 
174
189
  @include e(footer) {
175
190
  padding: 24px 15px;
@@ -9,7 +9,7 @@ import {
9
9
  } from '../common/props'
10
10
  import type { FormItemRule } from '../wd-form/types'
11
11
 
12
- export type SelectPickerType = 'checkbox' | 'radio'
12
+ export type SelectPickerType = 'checkbox' | 'radio' | 'button'
13
13
 
14
14
  export const selectPickerProps = {
15
15
  ...baseProps,
@@ -98,6 +98,37 @@
98
98
  </view>
99
99
  </wd-checkbox-group>
100
100
  </view>
101
+ <!-- 多选/单选 -->
102
+ <view
103
+ v-if="type === 'button' && !isArray(selectList)"
104
+ id="wd-radio-group"
105
+ class="grid gap-3 grid-cols-3 mb-3"
106
+ >
107
+ <view
108
+ v-for="item in filterColumns"
109
+ :key="item[valueKey]"
110
+ :id="'radio' + item[valueKey]"
111
+ @click="
112
+ handleChange({
113
+ value: item[valueKey],
114
+ })
115
+ "
116
+ :disabled="item.disabled"
117
+ :round="false"
118
+ plain
119
+ class="wd-select-picker__button"
120
+ :class="`${selectList === item[valueKey] ? 'wd-select-picker__button--active' : ''} ${item.disabled ? 'wd-select-picker__button--disabled' : ''}`"
121
+ >
122
+ <block v-if="filterable && filterVal">
123
+ <block v-for="text in item[labelKey]" :key="text.label">
124
+ {{ text.label }}
125
+ </block>
126
+ </block>
127
+ <block v-else>
128
+ {{ item[labelKey] }}
129
+ </block>
130
+ </view>
131
+ </view>
101
132
  <!-- 单选 -->
102
133
  <view v-if="type === 'radio' && !isArray(selectList)" id="wd-radio-group">
103
134
  <wd-radio-group
@@ -372,7 +403,7 @@ function handleChange({
372
403
  }) {
373
404
  selectList.value = value
374
405
  emit('change', { value })
375
- if (props.type === 'radio' && !props.showConfirm) {
406
+ if (['radio', 'button'].includes(props.type) && !props.showConfirm) {
376
407
  onConfirm()
377
408
  }
378
409
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.52",
4
+ "version": "0.1.54",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -1,6 +1,6 @@
1
1
  import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue'
2
2
  import type { FormItemRule } from '../wd-form/types'
3
- export type SelectPickerType = 'checkbox' | 'radio'
3
+ export type SelectPickerType = 'checkbox' | 'radio' | 'button'
4
4
  export declare const selectPickerProps: {
5
5
  /** 选择器左侧文案 */
6
6
  label: StringConstructor