@xtdev/xt-miniprogram-ui 1.2.59 → 1.2.60

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.
Files changed (82) hide show
  1. package/package.json +1 -1
  2. package/libs/package.json +0 -1
  3. package/libs/xt-button/README.md +0 -60
  4. package/libs/xt-button/index.js +0 -116
  5. package/libs/xt-button/index.json +0 -7
  6. package/libs/xt-button/index.wxml +0 -31
  7. package/libs/xt-button/index.wxss +0 -70
  8. package/libs/xt-card-cell/README.md +0 -67
  9. package/libs/xt-card-cell/index.js +0 -43
  10. package/libs/xt-card-cell/index.json +0 -6
  11. package/libs/xt-card-cell/index.wxml +0 -34
  12. package/libs/xt-card-cell/index.wxss +0 -89
  13. package/libs/xt-cell/README.md +0 -41
  14. package/libs/xt-cell/index.js +0 -42
  15. package/libs/xt-cell/index.json +0 -7
  16. package/libs/xt-cell/index.wxml +0 -12
  17. package/libs/xt-cell/index.wxss +0 -50
  18. package/libs/xt-date-picker/README.md +0 -77
  19. package/libs/xt-date-picker/index.js +0 -443
  20. package/libs/xt-date-picker/index.json +0 -7
  21. package/libs/xt-date-picker/index.wxml +0 -58
  22. package/libs/xt-date-picker/index.wxss +0 -118
  23. package/libs/xt-date-picker-loop/README.md +0 -77
  24. package/libs/xt-date-picker-loop/index.js +0 -684
  25. package/libs/xt-date-picker-loop/index.json +0 -8
  26. package/libs/xt-date-picker-loop/index.wxml +0 -61
  27. package/libs/xt-date-picker-loop/index.wxss +0 -117
  28. package/libs/xt-dialog/README.md +0 -157
  29. package/libs/xt-dialog/index.js +0 -142
  30. package/libs/xt-dialog/index.json +0 -5
  31. package/libs/xt-dialog/index.wxml +0 -64
  32. package/libs/xt-dialog/index.wxss +0 -129
  33. package/libs/xt-form/index.js +0 -83
  34. package/libs/xt-form/index.json +0 -5
  35. package/libs/xt-form/index.wxml +0 -67
  36. package/libs/xt-form/index.wxss +0 -141
  37. package/libs/xt-icon/README.md +0 -39
  38. package/libs/xt-icon/index.js +0 -25
  39. package/libs/xt-icon/index.json +0 -5
  40. package/libs/xt-icon/index.wxml +0 -2
  41. package/libs/xt-icon/index.wxss +0 -159
  42. package/libs/xt-popover/README.md +0 -71
  43. package/libs/xt-popover/index.js +0 -209
  44. package/libs/xt-popover/index.json +0 -7
  45. package/libs/xt-popover/index.wxml +0 -43
  46. package/libs/xt-popover/index.wxss +0 -135
  47. package/libs/xt-search/README.md +0 -55
  48. package/libs/xt-search/index.js +0 -88
  49. package/libs/xt-search/index.json +0 -7
  50. package/libs/xt-search/index.wxml +0 -17
  51. package/libs/xt-search/index.wxss +0 -82
  52. package/libs/xt-stepper/README.md +0 -52
  53. package/libs/xt-stepper/index.js +0 -158
  54. package/libs/xt-stepper/index.json +0 -5
  55. package/libs/xt-stepper/index.wxml +0 -11
  56. package/libs/xt-stepper/index.wxss +0 -77
  57. package/libs/xt-steps/README.md +0 -79
  58. package/libs/xt-steps/index.js +0 -37
  59. package/libs/xt-steps/index.json +0 -7
  60. package/libs/xt-steps/index.wxml +0 -34
  61. package/libs/xt-steps/index.wxss +0 -186
  62. package/libs/xt-tabs/README.md +0 -98
  63. package/libs/xt-tabs/index.js +0 -35
  64. package/libs/xt-tabs/index.json +0 -6
  65. package/libs/xt-tabs/index.wxml +0 -10
  66. package/libs/xt-tabs/index.wxss +0 -76
  67. package/libs/xt-tag/README.md +0 -65
  68. package/libs/xt-tag/index.js +0 -38
  69. package/libs/xt-tag/index.json +0 -7
  70. package/libs/xt-tag/index.wxml +0 -5
  71. package/libs/xt-tag/index.wxss +0 -36
  72. package/libs/xt-toast/README.md +0 -65
  73. package/libs/xt-toast/index.js +0 -85
  74. package/libs/xt-toast/index.json +0 -7
  75. package/libs/xt-toast/index.wxml +0 -6
  76. package/libs/xt-toast/index.wxss +0 -27
  77. package/libs/xt-uploader/README.md +0 -46
  78. package/libs/xt-uploader/index.js +0 -233
  79. package/libs/xt-uploader/index.json +0 -7
  80. package/libs/xt-uploader/index.wxml +0 -15
  81. package/libs/xt-uploader/index.wxss +0 -68
  82. package/libs/xt-uploader/utils.js +0 -69
@@ -1,209 +0,0 @@
1
- Component({
2
- behaviors: [],
3
- observers: {},
4
- properties: {
5
- zIndx: {
6
- type: Number,
7
- value: 999,
8
- observer: function () {},
9
- },
10
- // 弹窗标题
11
- title: {
12
- type: String,
13
- value: "",
14
- observer: function () {},
15
- },
16
- // 弹窗类型
17
- type: {
18
- type: String,
19
- value: "operate",
20
- observer: function () {},
21
- },
22
- show: {
23
- type: Boolean,
24
- value: false,
25
- observer: async function (val) {
26
- if (val) {
27
- const res = await this.findIntersection();
28
- this.setData({
29
- sourceData: res,
30
- });
31
- }
32
- },
33
- },
34
- showCloseIcon: {
35
- type: Boolean,
36
- value: true,
37
- observer: function (val) {},
38
- },
39
-
40
- // 文本内容
41
- textContent: {
42
- type: String,
43
- value: "",
44
- observer: function () {},
45
- },
46
- // 列表每一项标题内容
47
- itemTextKey: {
48
- type: String,
49
- value: "",
50
- observer: function () {},
51
- },
52
- // 操作
53
- operates: {
54
- type: Array,
55
- value: [],
56
- observer: function () {},
57
- },
58
- // 源数据
59
- sourceData: {
60
- type: Array,
61
- value: [],
62
- observer: function (val) {},
63
- },
64
- // 选中数据
65
- selectData: {
66
- type: Array,
67
- value: [],
68
- observer: async function () {},
69
- },
70
- // 数据对比字段,用于找出选中的数据
71
- contrastId: {
72
- type: String,
73
- value: "",
74
- observer: function () {},
75
- },
76
- },
77
- data: {
78
- sourceData: [],
79
- multipleChooseData: [],
80
- },
81
- methods: {
82
- closePopover() {
83
- this.triggerEvent("onClose");
84
- this.resetSourceData();
85
- },
86
-
87
- async findIntersection() {
88
- const { sourceData, selectData, contrastId, type } = this.data;
89
-
90
- for (const selectItem of selectData) {
91
- for (const sourceItem of sourceData) {
92
- if (type === "multiple") {
93
- if (selectItem[contrastId] == sourceItem[contrastId]) {
94
- sourceItem.selected = true;
95
- }
96
- } else {
97
- if (selectItem[contrastId] == sourceItem[contrastId]) {
98
- sourceItem.selected = true;
99
- } else {
100
- sourceItem.selected = false;
101
- }
102
- }
103
- }
104
- }
105
- return this.deepClone(sourceData);
106
- },
107
- // 重置数据
108
- async resetSourceData() {
109
- const { sourceData } = this.data;
110
- for (const sourceItem of sourceData) {
111
- delete sourceItem.selected;
112
- }
113
-
114
- this.setData({
115
- sourceData: this.deepClone(sourceData),
116
- });
117
- },
118
-
119
- async formatSourceData(chooseItem) {
120
- const { sourceData, contrastId } = this.data;
121
- for (const sourceItem of sourceData) {
122
- if (
123
- chooseItem[contrastId] == sourceItem[contrastId] &&
124
- sourceItem.selected
125
- ) {
126
- sourceItem.selected = false;
127
- } else if (
128
- chooseItem[contrastId] == sourceItem[contrastId] &&
129
- !sourceItem.selected
130
- ) {
131
- sourceItem.selected = true;
132
- }
133
- }
134
- return sourceData;
135
- },
136
-
137
- confirm() {
138
- const { sourceData } = this.data;
139
- const chooseData = sourceData.filter((item) => item.selected);
140
-
141
- const deleteSelected = chooseData.map((item) => {
142
- delete item.selected;
143
- return item;
144
- });
145
- this.triggerEvent("onConfirm", { chooseData: deleteSelected });
146
- },
147
-
148
- async chooseItemClick(event) {
149
- const chooseItem = event.currentTarget.dataset.item;
150
- const { type } = this.data;
151
-
152
- if (type == "single") {
153
- delete chooseItem.selected;
154
- this.triggerEvent("onChooseItemClick", { chooseItem });
155
- } else if (type == "multiple") {
156
- const res = await this.formatSourceData(chooseItem);
157
-
158
- this.setData({
159
- sourceData: this.deepClone(res),
160
- });
161
- } else {
162
- this.triggerEvent("onChooseItemClick", { chooseItem });
163
- }
164
- },
165
-
166
- deepClone(target, map = new Map()) {
167
- if (typeof target === "object") {
168
- const isArray = Array.isArray(target);
169
- let cloneTarget = isArray ? [] : {};
170
-
171
- if (map.get(target)) {
172
- return map.get(target);
173
- }
174
- map.set(target, cloneTarget);
175
-
176
- const keys = isArray ? undefined : Object.keys(target);
177
- this.forEach(keys || target, (value, key) => {
178
- if (keys) {
179
- key = value;
180
- }
181
- cloneTarget[key] = this.deepClone(target[key], map);
182
- });
183
-
184
- return cloneTarget;
185
- } else {
186
- return target;
187
- }
188
- },
189
- forEach(array, iteratee) {
190
- let index = -1;
191
- const length = array.length;
192
- while (++index < length) {
193
- iteratee(array[index], index);
194
- }
195
- return array;
196
- },
197
- },
198
- pageLifetimes: {
199
- // 组件所在页面的生命周期函数
200
- show: function () {},
201
- hide: function () {},
202
- resize: function () {},
203
- },
204
- created: function () {},
205
- attached: function () {},
206
- ready: function () {},
207
- moved: function () {},
208
- detached: function () {},
209
- });
@@ -1,7 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "apply-shared",
4
- "usingComponents": {
5
- "xt-icon": "../xt-icon"
6
- }
7
- }
@@ -1,43 +0,0 @@
1
- <view wx:if="{{show}}" class="xt-popover-popup" style="z-index:{{zIndx}}">
2
- <view class="xt-popover">
3
- <view wx:if="{{ type == 'operate'}}" class="operate-wrapper">
4
- <view class="operate-content font40rpx">
5
- <block wx:for="{{operates}}" wx:for-item="operate" wx:for-index="idx" wx:key="idx">
6
- <view bindtap="chooseItemClick" data-item="{{operate}}" class="flex-center operate">
7
- {{operate[itemTextKey]}}
8
- </view>
9
- </block>
10
- </view>
11
- <view bindtap="closePopover" class="font40rpx flex-center cancel">取消</view>
12
- </view>
13
- <view wx:else class="content-wrapper">
14
- <view class="header">
15
- <view class="header-title">{{title}}</view>
16
- <image wx:if="{{showCloseIcon}}" bindtap="closePopover" class="close-icon" src="https://img.tanjiu.cn/home/zGMfEx8iJBb6JewsFrYXNWs8R8KRwjzD.png" mode="widthFix"></image>
17
- </view>
18
- <scroll-view scroll-y="true" class="content font40rpx {{ type == 'single' ? 'spec-content':''}}">
19
- <view class="content-info">
20
- <block wx:if="{{type == 'text'}}">{{textContent}}</block>
21
- <view wx:else class="list">
22
- <block wx:for="{{sourceData}}" wx:for-item="listItem" wx:for-index="idx" wx:key="idx">
23
- <view class="list-item" bindtap="chooseItemClick" data-item="{{listItem}}">
24
- <view class="list-item-label">{{listItem[itemTextKey]}}</view>
25
- <block wx:if="{{type == 'multiple'}}">
26
- <xt-icon wx:if="{{listItem.selected}}" icon="tongguo" size="44" style="color:#30BF67"></xt-icon>
27
- <xt-icon wx:else icon="weixuanzhong1" size="44" style="color:#999999"></xt-icon>
28
- </block>
29
- <block wx:if="{{type == 'single'}}">
30
- <xt-icon wx:if="{{listItem.selected}}" icon="zhengque" size="44" style="color:#30BF67"></xt-icon>
31
- </block>
32
- </view>
33
- </block>
34
- </view>
35
- <slot ></slot>
36
- </view>
37
- </scroll-view>
38
- <view wx:if="{{type == 'text' || type == 'multiple'}}" class="btn-wrapper">
39
- <view bindtap="confirm" class="confirm flex-center">确定</view>
40
- </view>
41
- </view>
42
- </view>
43
- </view>
@@ -1,135 +0,0 @@
1
- .xt-popover-popup {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- width: 100vw;
6
- height: 100vh;
7
- background: rgba(0, 0, 0, 0.7);
8
-
9
- transition-property: opacity;
10
- transition-timing-function: ease;
11
- }
12
- .xt-popover-popup .xt-popover {
13
- position: absolute;
14
- bottom: 0;
15
- width: 100%;
16
- background-color: #ffffff;
17
- border-radius: 20rpx 20rpx 0 0;
18
- overflow: hidden;
19
- box-sizing: border-box;
20
-
21
- padding-bottom: calc(constant(safe-area-inset-bottom) + 0rpx);
22
- padding-bottom: calc(env(safe-area-inset-bottom) + 0rpx);
23
-
24
- transition: all 0.5s ease-in;
25
- }
26
-
27
- .xt-popover .operate-wrapper {
28
- overflow: hidden;
29
- background: #ededed;
30
- }
31
-
32
- .xt-popover .operate-content {
33
- background-color: #ffffff;
34
- margin-bottom: 16rpx;
35
- box-sizing: border-box;
36
- }
37
-
38
- .xt-popover .operate {
39
- box-sizing: border-box;
40
- width: 100%;
41
- height: 120rpx;
42
- box-shadow: inset 0px -2rpx 0rpx 0rpx #ededed;
43
- }
44
-
45
- .xt-popover .cancel {
46
- width: 100%;
47
- min-height: 120rpx;
48
- background-color: #ffffff;
49
- }
50
-
51
- .xt-popover .flex-center {
52
- display: flex;
53
- align-items: center;
54
- justify-content: center;
55
- }
56
-
57
- .xt-popover .font40rpx {
58
- font-size: 40rpx;
59
- font-weight: 400;
60
- color: #000000;
61
- }
62
-
63
- .content-wrapper {
64
- box-sizing: border-box;
65
- background-color: #ffffff;
66
- }
67
-
68
- .xt-popover-popup .header {
69
- display: flex;
70
- flex-direction: row;
71
- align-items: center;
72
- justify-content: space-between;
73
- box-sizing: border-box;
74
- padding: 0 32rpx;
75
-
76
- width: 100%;
77
- height: 120rpx;
78
- background: #ffffff;
79
- box-shadow: inset 0px -2rpx 0rpx 0rpx #f5f5f5;
80
- font-size: 40rpx;
81
- font-weight: 600;
82
- color: #222222;
83
- }
84
-
85
- .xt-popover-popup .content {
86
- box-sizing: border-box;
87
- height: 924rpx;
88
- }
89
-
90
- .xt-popover-popup .spec-content {
91
- height: 1084rpx;
92
- }
93
-
94
- .xt-popover-popup .content-info {
95
- box-sizing: border-box;
96
- padding: 32rpx;
97
- text-align: justify;
98
- }
99
-
100
- .xt-popover-popup .close-icon {
101
- width: 48rpx;
102
- height: 48rpx;
103
- }
104
-
105
- .xt-popover-popup .btn-wrapper {
106
- box-sizing: border-box;
107
- width: 100%;
108
- padding: 32rpx;
109
- height: 160rpx;
110
- background: #ffffff;
111
- box-shadow: inset 0px 2rpx 0rpx 0rpx #ededed;
112
- }
113
-
114
- .xt-popover-popup .confirm {
115
- width: 100%;
116
- height: 100%;
117
- background: #6722ab;
118
- border-radius: 120rpx;
119
-
120
- font-size: 40rpx;
121
- font-weight: 600;
122
- color: #ffffff;
123
- }
124
-
125
- .xt-popover-popup .list-item {
126
- display: flex;
127
- flex-direction: row;
128
- justify-content: space-between;
129
- padding: 32rpx 0;
130
- }
131
-
132
- .xt-popover-popup .list-item-label {
133
- flex: 1;
134
- margin-right: 20rpx;
135
- }
@@ -1,55 +0,0 @@
1
- # Search搜索框
2
-
3
- ### 介绍
4
- 常用于列表过渡,通过输入搜索筛选数据
5
-
6
- ### 效果图
7
- ![效果图](https://img.tanjiu.cn/home/PdAzeR3aNa6kz7J6Aks6xinCwT8HRk2y.png "搜索框图")
8
-
9
- ### 引入
10
- 在app.json或页面配置json中引入
11
- ```
12
- "usingComponents": {
13
- "xt-search": "@xtdev/xt-miniprogram-ui/xt-search",
14
- }
15
- ```
16
-
17
- ## 代码演示
18
-
19
- ### 默认模式,横向展示
20
- ![效果图](https://img.tanjiu.cn/home/PdAzeR3aNa6kz7J6Aks6xinCwT8HRk2y.png "搜索框图")
21
-
22
- ```
23
- <xt-steps></xt-steps>
24
- ```
25
-
26
- ### 方形
27
- ![效果图](https://img.tanjiu.cn/home/wsXSS75BzmJ57ZhSHdij5JimWA6YcBXf.png "搜索框图")
28
-
29
- ```
30
- <xt-steps isCircle="{{false}}"></xt-steps>
31
- ```
32
-
33
-
34
- ## API
35
-
36
- #### xt-steps props
37
-
38
- | 参数 | 说明 | 类型 | 默认值 |
39
- | ----------- | ----------- | ---------- | ---------- |
40
- | isCircle | 是否为圆角 | `Boolean` | true |
41
- | placeholder | 当前输入框placeholder | `String` | 请输入内容 |
42
- | isFocus | 是否自动聚焦 | `Boolean` | true |
43
- | value | 默认值 | `String` | '' |
44
- | remote | 是否为远程搜索(点击输入框将只执行onFocus指令。适用于跳转新页面搜索场景) | `Boolean` | false |
45
- | rightBtnText | 提交按钮文案 | `String` | '搜索' |
46
-
47
- #### 事件
48
-
49
- | 事件名称 | 说明 | 参数 |
50
- | ----------- | ----------- | ----------- |
51
- | onFocus | 聚焦 | - |
52
- | onBlur | 失去焦点 | - |
53
- | onInput | 输入 | 输入框值 |
54
- | onClear | 清除 | - |
55
- | onSearch | 按钮提交 | 输入框值 |
@@ -1,88 +0,0 @@
1
- Component({
2
- /**
3
- * 组件的属性列表
4
- */
5
- properties: {
6
- // 搜索框样式,是否是圆的,默认为方
7
- isCircle: {
8
- type: Boolean,
9
- value: true
10
- },
11
- placeholder: {
12
- type: String,
13
- value: "请输入内容"
14
- },
15
- // 是否自动聚焦
16
- isFocus: {
17
- type: Boolean,
18
- value: false
19
- },
20
- value: {
21
- type: String,
22
- value: ''
23
- },
24
- // 是否远程搜索,如果为true。点击输入框将只执行onFocus指令。适用于跳转新页面搜索场景
25
- remote: {
26
- type: Boolean,
27
- value: false
28
- },
29
- rightBtnText: {
30
- type: String,
31
- value: '搜索'
32
- }
33
- },
34
-
35
- /**
36
- * 组件的初始数据
37
- */
38
- data: {
39
- isActive: false,
40
- // 输入框的输入值
41
- inputVal: ''
42
- },
43
-
44
- /**
45
- * 组件的方法列表
46
- */
47
- methods: {
48
- onFocus() {
49
- if (!this.data.remote) {
50
- this.setData({
51
- isActive: true
52
- });
53
- }
54
- this.triggerEvent('onFocus');
55
- },
56
- onBlur() {
57
- this.setData({
58
- isActive: false
59
- });
60
- this.triggerEvent('onBlur');
61
- },
62
- onInput(e) {
63
- this.setData({
64
- inputVal: e.detail.value
65
- });
66
- this.triggerEvent('onInput', e.detail.value);
67
- },
68
- clearInpVal() {
69
- this.setData({
70
- inputVal: ''
71
- });
72
- if (!this.data.isActive) {
73
- this.triggerEvent('onClear');
74
- }
75
- },
76
- onSearch() {
77
- this.triggerEvent('onSearch', this.data.inputVal);
78
- }
79
- },
80
- observers: {
81
- value(val) {
82
- this.setData({
83
- inputVal: val
84
- });
85
- }
86
- }
87
- });
88
-
@@ -1,7 +0,0 @@
1
- {
2
- "component": true,
3
- "styleIsolation": "apply-shared",
4
- "usingComponents": {
5
- "xt-icon": "../xt-icon"
6
- }
7
- }
@@ -1,17 +0,0 @@
1
- <!--components/xt-search.wxml-->
2
- <view class="xt-search-container">
3
- <view class=".xt-search-box {{isActive? 'xt-search-active':''}} {{isCircle? 'search-box-circle' : ''}}">
4
- <xt-icon class="xt-search-icon" slot="left-icon" icon="sousuo" size="32"></xt-icon>
5
- <view wx:if="{{remote}}" class="xt-search-input {{inputVal ?'' : 'placeholder'}}" bind:tap="onFocus">
6
- {{inputVal||placeholder}}
7
- </view>
8
- <input wx:else class="xt-search-input" placeholder-class="xt-palceholder" confirm-type="search" bind:focus="onFocus" bindblur="onBlur" bindinput="onInput" value="{{ inputVal }}" bind:confirm="onSearch" focus="{{isFocus}}" placeholder="{{placeholder}}" />
9
- <view slot="action" class="xt-search-btn {{isCircle? 'xt-search-btn-circle' : ''}}" placeholder="{{placeholder}}">
10
- <view wx:if="{{inputVal}}" class="xt-clearimg-box" catchtap="clearInpVal">
11
- <xt-icon class="xt-clear-img" icon="shibai-xiao" size="32"></xt-icon>
12
- </view>
13
- <text bind:tap="onSearch" class="xt-search-text">{{rightBtnText}}</text>
14
- </view>
15
- </view>
16
- <view slot="show-more"></view>
17
- </view>
@@ -1,82 +0,0 @@
1
- /* components/xt-search.wxss */
2
- .xt-search-container {
3
- position: relative;
4
- display: flex;
5
- }
6
-
7
- .xt-search-box {
8
- border: 2rpx solid #dddddd;
9
- background-color: white;
10
- box-sizing: border-box;
11
- overflow: hidden;
12
- display: flex;
13
- align-items: center;
14
- justify-content: space-between;
15
- height: 80rpx;
16
- border-radius: 10rpx;
17
- overflow: hidden;
18
- flex: 1;
19
- }
20
-
21
- .xt-search-box.search-box-circle {
22
- border-radius: 40rpx;
23
- }
24
-
25
- .xt-search-icon {
26
- color: #999999;
27
- padding-left: 24rpx;
28
- padding-right: 8rpx;
29
- }
30
-
31
- .xt-search-input {
32
- width: 100%;
33
- flex: 1;
34
- font-size: 34rpx;
35
- font-weight: 400;
36
- }
37
-
38
- .xt-palceholder {
39
- font-size: 34rpx;
40
- color: #999999;
41
- }
42
-
43
- .xt-clearimg-box {
44
- width: 64rpx;
45
- }
46
-
47
- .xt-clear-img {
48
- z-index: 999;
49
- color: #B8B8B8;
50
- }
51
-
52
- .xt-search-btn {
53
- display: flex;
54
- align-items: center;
55
- height: 40rpx;
56
- line-height: 40rpx;
57
- box-sizing: border-box;
58
- text-align: center;
59
- font-weight: 800;
60
- color: #6722ab;
61
- }
62
-
63
- .xt-search-btn .xt-search-text {
64
- font-size: 34rpx;
65
- width: 120rpx;
66
- display: inline-block;
67
- border-left: 2rpx solid #e5e5e5;
68
- line-height: 32rpx !important;
69
- }
70
-
71
- .xt-search-btn-circle .xt-search-text {
72
- width: 132rpx;
73
- font-size: 34rpx;
74
- }
75
-
76
- .xt-search-active {
77
- border-color: #6722ab;
78
- }
79
-
80
- .xt-placeholder {
81
- color: #999999;
82
- }
@@ -1,52 +0,0 @@
1
- <!--
2
- * @Author: Mr.Hu
3
- * @Date: 2023-07-17 17:45:42
4
- * @Description:
5
- * @LastEditors: Mr.Hu
6
- -->
7
- # 列表卡片
8
-
9
- ### 介绍
10
- 列表中的单个展示项
11
-
12
- ### 效果图
13
- ![效果图](https://img.tanjiu.cn/home/xRRapWMCmE6S44YQDWzaCyj78FjBFxjG.png "步进器效果图")
14
-
15
- ### 引入
16
- 在app.json或页面配置json中引入
17
- ```
18
- "usingComponents": {
19
- "xt-stepper": "@xtdev/xt-miniprogram-ui/xt-stepper",
20
- }
21
- ```
22
-
23
- ## 代码演示
24
-
25
- ### 基础用法
26
-
27
- ```
28
- <xt-stepper value="{{good.qty}}" step="{{good.step}}" min="{{good.min}}" max="{{good.max}}" bind:change="inputChange" stepTips="3的倍数瓶起购"/>
29
- ```
30
-
31
- ## API
32
-
33
- #### xt-stepper props
34
-
35
- | 参数 | 说明 | 类型 |
36
- | ----------- | ----------- | ---------- |
37
- | value | 输入框当前值 | `Number` |
38
- | min | 最小值 | `Number` |
39
- | max | 最大值 | `Number` |
40
- | step | 每次点击改变的间隔大小 | `Number` |
41
- | background | 背景色 | `String` |
42
- | color | 字体颜色(前景色) | `String` |
43
- | disabled | 是否为禁用步进器,默认否 | `Boolean` |
44
- | disableInput | 是否为禁用输入框,默认否 | `Boolean` |
45
-
46
- ## Event
47
-
48
- | 事件名 | 说明 | 回调参数 |
49
- | ----------- | ----------- | ----------- |
50
- | change | 输入框值改变时触发 | `Number` |
51
- | focus | 输入框聚焦时触发 | `event` |
52
- | blur | 输入框失焦时触发 | `event` |