stellar-ui-plus 1.20.6 → 1.20.7
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.
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
| `watermarkStyle` | 水印样式 | `Object` | `{}` | - | - |
|
|
13
13
|
| `number` | 数量 | `number` | `1` | - | - |
|
|
14
14
|
| `stepper` | 是否显示步进器 | `boolean` | `false` | - | - |
|
|
15
|
-
| `
|
|
15
|
+
| `disabledStepper` | 禁用步进器 | `boolean` | `false` | - | - |
|
|
16
|
+
| `disableInput` | 禁用步进器输入框 | `boolean` | `false` | - | - |
|
|
17
|
+
| `disablePlus` | 禁用步进器加号 | `boolean` | `false` | - | - |
|
|
18
|
+
| `disableMinus` | 禁用步进器减号 | `boolean` | `false` | - | - |
|
|
16
19
|
| `precision` | 数值精度 | `number` | `0` | - | - |
|
|
17
20
|
| `step` | 步进器步长 | `number` | `1` | - | - |
|
|
18
21
|
| `min` | 步进器最小值 | `number` | `1` | - | - |
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
25
28
|
| ----- | ----- | ------- | -------- |
|
|
26
29
|
| `change` | 数值/选择改变时触发 | `data`:正在发生改变的数据:{ number?: number; checked?: boolean; applyForNumber?: number }<br/>`goods`:当前商品信息 | - |
|
|
27
|
-
| `click` | 点击确定按钮时触发 | `type
|
|
30
|
+
| `click` | 点击确定按钮时触发 | `type`:点击位置:'image' / 'title' / 'code' / 'price' / 'originalPrice' / 'stepper' | - |
|
|
28
31
|
| `plus` | 点击加号前置钩子函数 | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
29
32
|
| `minus` | 点击减号前置钩子函数 | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
30
33
|
| `click-suggest` | 点击建议模块触发 | `type`:点击的区域:'method' / 'back' / 'item' / 'right'<br/>`item`:type为item时,点击的item对象 | - |
|
|
@@ -75,12 +75,26 @@ export default {
|
|
|
75
75
|
type: Boolean,
|
|
76
76
|
default: () => false,
|
|
77
77
|
},
|
|
78
|
-
/**
|
|
78
|
+
/** 禁用步进器 */
|
|
79
|
+
disabledStepper: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: () => false,
|
|
82
|
+
},
|
|
83
|
+
/** 禁用步进器输入框 */
|
|
79
84
|
disableInput: {
|
|
80
85
|
type: Boolean,
|
|
81
86
|
default: () => false,
|
|
82
87
|
},
|
|
83
|
-
|
|
88
|
+
/** 禁用步进器加号 */
|
|
89
|
+
disablePlus: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: () => false,
|
|
92
|
+
},
|
|
93
|
+
/** 禁用步进器减号 */
|
|
94
|
+
disableMinus: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: () => false,
|
|
97
|
+
},
|
|
84
98
|
/** 数值精度 */
|
|
85
99
|
precision: {
|
|
86
100
|
type: Number,
|
|
@@ -75,9 +75,27 @@
|
|
|
75
75
|
"type": "boolean",
|
|
76
76
|
"default": false
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
"name": "disabledStepper",
|
|
80
|
+
"description": "禁用步进器",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": false
|
|
83
|
+
},
|
|
78
84
|
{
|
|
79
85
|
"name": "disableInput",
|
|
80
|
-
"description": "
|
|
86
|
+
"description": "禁用步进器输入框",
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"default": false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "disablePlus",
|
|
92
|
+
"description": "禁用步进器加号",
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "disableMinus",
|
|
98
|
+
"description": "禁用步进器减号",
|
|
81
99
|
"type": "boolean",
|
|
82
100
|
"default": false
|
|
83
101
|
},
|
|
@@ -129,11 +147,11 @@
|
|
|
129
147
|
{
|
|
130
148
|
"name": "[event]click",
|
|
131
149
|
"description": "点击确定按钮时触发",
|
|
132
|
-
"type": "(type: 'image' | 'title' | 'code' | 'price' | 'originalPrice') => void",
|
|
150
|
+
"type": "(type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => void",
|
|
133
151
|
"params": [
|
|
134
152
|
{
|
|
135
153
|
"name": "type",
|
|
136
|
-
"description": "
|
|
154
|
+
"description": "点击位置:'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'"
|
|
137
155
|
}
|
|
138
156
|
]
|
|
139
157
|
},
|
|
@@ -16,7 +16,7 @@ const emits = defineEmits<{
|
|
|
16
16
|
(e: 'update:number', number?: number): void;
|
|
17
17
|
(e: 'update:checked', checked?: boolean): void;
|
|
18
18
|
(e: 'change', change: { number?: number; checked?: boolean; applyForNumber?: number }, data: GoodsInfoType): void;
|
|
19
|
-
(e: 'click', type: 'image' | 'title' | 'code' | 'price' | 'originalPrice'): void;
|
|
19
|
+
(e: 'click', type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'): void;
|
|
20
20
|
(e: 'plus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
|
|
21
21
|
(e: 'minus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
|
|
22
22
|
(e: 'click-suggest', type: 'method' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }): void;
|
|
@@ -81,7 +81,7 @@ const checkboxChange = () => {
|
|
|
81
81
|
emits('change', { checked: _checked.value }, props.data);
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
const onClick = (type: 'image' | 'title' | 'code' | 'price' | 'originalPrice') => {
|
|
84
|
+
const onClick = (type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => {
|
|
85
85
|
emits('click', type);
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -191,7 +191,7 @@ const clickSuggest = (type: 'method' | 'back' | 'item' | 'right', item?: { label
|
|
|
191
191
|
:showUnit="false"
|
|
192
192
|
/>
|
|
193
193
|
</view>
|
|
194
|
-
<view class="ste-goods-info-price-right" v-if="stepper">
|
|
194
|
+
<view class="ste-goods-info-price-right" v-if="stepper" @click="onClick('stepper')">
|
|
195
195
|
<steStepper
|
|
196
196
|
v-model="_number"
|
|
197
197
|
:precision="precision"
|
|
@@ -200,7 +200,10 @@ const clickSuggest = (type: 'method' | 'back' | 'item' | 'right', item?: { label
|
|
|
200
200
|
:min="min"
|
|
201
201
|
:max="max"
|
|
202
202
|
btnSize="40"
|
|
203
|
+
:disabled="disabledStepper"
|
|
203
204
|
:disableInput="disableInput"
|
|
205
|
+
:disablePlus="disablePlus"
|
|
206
|
+
:disableMinus="disableMinus"
|
|
204
207
|
@change="numberChange"
|
|
205
208
|
@plus="plus"
|
|
206
209
|
@minus="minus"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stellar-ui-plus",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"publish-vscode-plugin": "cd ../../../plugins/ste-helper & pnpm run publish"
|
|
14
|
+
"publish-vscode-plugin": "cd ../../../plugins/ste-helper & pnpm run publish",
|
|
15
|
+
"prepublishOnly": "pnpm run publish-vscode-plugin"
|
|
15
16
|
}
|
|
16
17
|
}
|