@tplc/wot 0.1.53 → 0.1.55

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,8 @@
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.55](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.8...v0.1.55) (2025-01-20)
6
+
5
7
  ### [0.1.53](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.75...v0.1.53) (2025-01-06)
6
8
 
7
9
 
@@ -129,4 +129,12 @@
129
129
  border-left: none;
130
130
  }
131
131
  }
132
+ @include when(no-border) {
133
+ .wd-input-number__action::after {
134
+ border: none !important;
135
+ }
136
+ .wd-input-number__input-border {
137
+ display: none;
138
+ }
139
+ }
132
140
  }
@@ -75,4 +75,8 @@ export const inputNumberProps = {
75
75
  * 输入框占位符
76
76
  */
77
77
  placeholder: makeStringProp(''),
78
+ /**
79
+ * 是否显示边框
80
+ */
81
+ bordered: makeBooleanProp(true),
78
82
  }
@@ -1,13 +1,18 @@
1
1
  <template>
2
2
  <view
3
- :class="`wd-input-number ${customClass} ${disabled ? 'is-disabled' : ''} ${withoutInput ? 'is-without-input' : ''}`"
3
+ :class="`wd-input-number ${!bordered ? 'is-no-border' : ''} ${customClass} ${disabled ? 'is-disabled' : ''} ${withoutInput ? 'is-without-input' : ''}`"
4
4
  :style="customStyle"
5
5
  >
6
6
  <view
7
7
  :class="`wd-input-number__action ${minDisabled || disableMinus ? 'is-disabled' : ''}`"
8
8
  @click="sub"
9
9
  >
10
- <wd-icon name="decrease" custom-class="wd-input-number__action-icon"></wd-icon>
10
+ <slot name="decrease" />
11
+ <wd-icon
12
+ name="decrease"
13
+ custom-class="wd-input-number__action-icon"
14
+ v-if="!$slots.decrease"
15
+ ></wd-icon>
11
16
  </view>
12
17
  <view v-if="!withoutInput" class="wd-input-number__inner" @click.stop="">
13
18
  <input
@@ -27,7 +32,8 @@
27
32
  :class="`wd-input-number__action ${maxDisabled || disablePlus ? 'is-disabled' : ''}`"
28
33
  @click="add"
29
34
  >
30
- <wd-icon name="add" custom-class="wd-input-number__action-icon"></wd-icon>
35
+ <slot name="increase" />
36
+ <wd-icon name="add" custom-class="wd-input-number__action-icon" v-if="!$slots.increase" />
31
37
  </view>
32
38
  </view>
33
39
  </template>
@@ -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.53",
4
+ "version": "0.1.55",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -97,6 +97,13 @@ export declare const inputNumberProps: {
97
97
  type: import('vue').PropType<string>
98
98
  default: string
99
99
  }
100
+ /**
101
+ * 是否显示边框
102
+ */
103
+ bordered: {
104
+ type: BooleanConstructor
105
+ default: boolean
106
+ }
100
107
  customStyle: {
101
108
  type: import('vue').PropType<string>
102
109
  default: string
@@ -1,86 +1,6 @@
1
- declare const _default: import('vue').DefineComponent<
2
- {
3
- modelValue: {
4
- type: (NumberConstructor | StringConstructor)[]
5
- required: true
6
- }
7
- min: {
8
- type: NumberConstructor
9
- default: number
10
- }
11
- max: {
12
- type: NumberConstructor
13
- default: number
14
- }
15
- step: {
16
- type: NumberConstructor
17
- default: number
18
- }
19
- stepStrictly: {
20
- type: BooleanConstructor
21
- default: boolean
22
- }
23
- precision: {
24
- type: NumberConstructor
25
- default: number
26
- }
27
- disabled: {
28
- type: BooleanConstructor
29
- default: boolean
30
- }
31
- disableInput: {
32
- type: BooleanConstructor
33
- default: boolean
34
- }
35
- disableMinus: {
36
- type: BooleanConstructor
37
- default: boolean
38
- }
39
- disablePlus: {
40
- type: BooleanConstructor
41
- default: boolean
42
- }
43
- withoutInput: {
44
- type: BooleanConstructor
45
- default: boolean
46
- }
47
- inputWidth: {
48
- type: (NumberConstructor | StringConstructor)[]
49
- default: number
50
- }
51
- allowNull: {
52
- type: BooleanConstructor
53
- default: boolean
54
- }
55
- placeholder: {
56
- type: import('vue').PropType<string>
57
- default: string
58
- }
59
- customStyle: {
60
- type: import('vue').PropType<string>
61
- default: string
62
- }
63
- customClass: {
64
- type: import('vue').PropType<string>
65
- default: string
66
- }
67
- },
68
- {},
69
- unknown,
70
- {},
71
- {},
72
- import('vue').ComponentOptionsMixin,
73
- import('vue').ComponentOptionsMixin,
74
- {
75
- 'update:modelValue': (...args: any[]) => void
76
- change: (...args: any[]) => void
77
- focus: (...args: any[]) => void
78
- blur: (...args: any[]) => void
79
- },
80
- string,
81
- import('vue').PublicProps,
82
- Readonly<
83
- import('vue').ExtractPropTypes<{
1
+ declare const _default: __VLS_WithTemplateSlots<
2
+ import('vue').DefineComponent<
3
+ {
84
4
  modelValue: {
85
5
  type: (NumberConstructor | StringConstructor)[]
86
6
  required: true
@@ -137,6 +57,10 @@ declare const _default: import('vue').DefineComponent<
137
57
  type: import('vue').PropType<string>
138
58
  default: string
139
59
  }
60
+ bordered: {
61
+ type: BooleanConstructor
62
+ default: boolean
63
+ }
140
64
  customStyle: {
141
65
  type: import('vue').PropType<string>
142
66
  default: string
@@ -145,30 +69,126 @@ declare const _default: import('vue').DefineComponent<
145
69
  type: import('vue').PropType<string>
146
70
  default: string
147
71
  }
148
- }>
149
- > & {
150
- 'onUpdate:modelValue'?: ((...args: any[]) => any) | undefined
151
- onFocus?: ((...args: any[]) => any) | undefined
152
- onBlur?: ((...args: any[]) => any) | undefined
153
- onChange?: ((...args: any[]) => any) | undefined
154
- },
72
+ },
73
+ {},
74
+ unknown,
75
+ {},
76
+ {},
77
+ import('vue').ComponentOptionsMixin,
78
+ import('vue').ComponentOptionsMixin,
79
+ {
80
+ 'update:modelValue': (...args: any[]) => void
81
+ change: (...args: any[]) => void
82
+ focus: (...args: any[]) => void
83
+ blur: (...args: any[]) => void
84
+ },
85
+ string,
86
+ import('vue').PublicProps,
87
+ Readonly<
88
+ import('vue').ExtractPropTypes<{
89
+ modelValue: {
90
+ type: (NumberConstructor | StringConstructor)[]
91
+ required: true
92
+ }
93
+ min: {
94
+ type: NumberConstructor
95
+ default: number
96
+ }
97
+ max: {
98
+ type: NumberConstructor
99
+ default: number
100
+ }
101
+ step: {
102
+ type: NumberConstructor
103
+ default: number
104
+ }
105
+ stepStrictly: {
106
+ type: BooleanConstructor
107
+ default: boolean
108
+ }
109
+ precision: {
110
+ type: NumberConstructor
111
+ default: number
112
+ }
113
+ disabled: {
114
+ type: BooleanConstructor
115
+ default: boolean
116
+ }
117
+ disableInput: {
118
+ type: BooleanConstructor
119
+ default: boolean
120
+ }
121
+ disableMinus: {
122
+ type: BooleanConstructor
123
+ default: boolean
124
+ }
125
+ disablePlus: {
126
+ type: BooleanConstructor
127
+ default: boolean
128
+ }
129
+ withoutInput: {
130
+ type: BooleanConstructor
131
+ default: boolean
132
+ }
133
+ inputWidth: {
134
+ type: (NumberConstructor | StringConstructor)[]
135
+ default: number
136
+ }
137
+ allowNull: {
138
+ type: BooleanConstructor
139
+ default: boolean
140
+ }
141
+ placeholder: {
142
+ type: import('vue').PropType<string>
143
+ default: string
144
+ }
145
+ bordered: {
146
+ type: BooleanConstructor
147
+ default: boolean
148
+ }
149
+ customStyle: {
150
+ type: import('vue').PropType<string>
151
+ default: string
152
+ }
153
+ customClass: {
154
+ type: import('vue').PropType<string>
155
+ default: string
156
+ }
157
+ }>
158
+ > & {
159
+ 'onUpdate:modelValue'?: ((...args: any[]) => any) | undefined
160
+ onFocus?: ((...args: any[]) => any) | undefined
161
+ onBlur?: ((...args: any[]) => any) | undefined
162
+ onChange?: ((...args: any[]) => any) | undefined
163
+ },
164
+ {
165
+ customStyle: string
166
+ customClass: string
167
+ max: number
168
+ disabled: boolean
169
+ placeholder: string
170
+ min: number
171
+ step: number
172
+ stepStrictly: boolean
173
+ precision: number
174
+ disableInput: boolean
175
+ disableMinus: boolean
176
+ disablePlus: boolean
177
+ withoutInput: boolean
178
+ inputWidth: string | number
179
+ allowNull: boolean
180
+ bordered: boolean
181
+ },
182
+ {}
183
+ >,
155
184
  {
156
- customStyle: string
157
- customClass: string
158
- max: number
159
- disabled: boolean
160
- placeholder: string
161
- min: number
162
- step: number
163
- stepStrictly: boolean
164
- precision: number
165
- disableInput: boolean
166
- disableMinus: boolean
167
- disablePlus: boolean
168
- withoutInput: boolean
169
- inputWidth: string | number
170
- allowNull: boolean
171
- },
172
- {}
185
+ decrease?(_: {}): any
186
+ increase?(_: {}): any
187
+ }
173
188
  >
174
189
  export default _default
190
+ type __VLS_WithTemplateSlots<T, S> = T & {
191
+ new (): {
192
+ $slots: S
193
+ }
194
+ }
@@ -113,8 +113,8 @@ declare const _default: __VLS_WithTemplateSlots<
113
113
  customClass: string
114
114
  fixed: boolean
115
115
  placeholder: boolean
116
- leftArrow: boolean
117
116
  bordered: boolean
117
+ leftArrow: boolean
118
118
  safeAreaInsetTop: boolean
119
119
  leftDisabled: boolean
120
120
  rightDisabled: boolean
@@ -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