uview-plus 3.1.49 → 3.1.50
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/README.md +10 -10
- package/changelog.md +5 -14
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-album/props.js +12 -11
- package/components/u-alert/props.js +9 -8
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-back-top/props.js +11 -10
- package/components/u-back-top/u-back-top.vue +1 -1
- package/components/u-badge/props.js +15 -14
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/props.js +29 -28
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +28 -27
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/props.js +18 -17
- package/components/u-cell/u-cell.vue +3 -12
- package/components/u-cell-group/props.js +3 -2
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox/u-checkbox.vue +1 -1
- package/components/u-checkbox-group/props.js +17 -16
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code/u-code.vue +0 -5
- package/components/u-code-input/props.js +17 -16
- package/components/u-col/props.js +6 -5
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-column-notice/props.js +11 -10
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-down/u-count-down.vue +1 -6
- package/components/u-count-to/props.js +12 -11
- package/components/u-datetime-picker/props.js +25 -37
- package/components/u-datetime-picker/u-datetime-picker.vue +3 -22
- package/components/u-divider/props.js +9 -8
- package/components/u-dropdown/props.js +1 -0
- package/components/u-dropdown-item/props.js +1 -0
- package/components/u-empty/props.js +12 -11
- package/components/u-form/props.js +9 -8
- package/components/u-form/u-form.vue +1 -1
- package/components/u-form-item/props.js +9 -13
- package/components/u-form-item/u-form-item.vue +0 -1
- package/components/u-gap/props.js +5 -4
- package/components/u-grid/props.js +4 -3
- package/components/u-grid-item/props.js +3 -2
- package/components/u-grid-item/u-grid-item.vue +0 -5
- package/components/u-icon/props.js +18 -17
- package/components/u-icon/u-icon.vue +6 -9
- package/components/u-image/props.js +17 -16
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +6 -5
- package/components/u-index-list/u-index-list.vue +2 -3
- package/components/u-input/props.js +36 -35
- package/components/u-input/u-input.vue +4 -10
- package/components/u-keyboard/props.js +17 -16
- package/components/u-line/props.js +7 -6
- package/components/u-line-progress/props.js +6 -5
- package/components/u-link/props.js +8 -7
- package/components/u-list/props.js +15 -14
- package/components/u-list-item/props.js +2 -1
- package/components/u-loading-icon/props.js +12 -11
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loadmore/props.js +19 -18
- package/components/u-modal/props.js +17 -16
- package/components/u-navbar/props.js +17 -16
- package/components/u-no-network/props.js +4 -3
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notify/props.js +10 -9
- package/components/u-notify/u-notify.vue +0 -5
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-box/u-number-box.vue +1 -21
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-overlay/props.js +5 -4
- package/components/u-parse/props.js +9 -8
- package/components/u-parse/u-parse.vue +1 -6
- package/components/u-picker/props.js +17 -16
- package/components/u-picker-column/props.js +1 -0
- package/components/u-popup/props.js +16 -15
- package/components/u-radio/props.js +14 -13
- package/components/u-radio-group/props.js +18 -17
- package/components/u-rate/props.js +15 -14
- package/components/u-read-more/props.js +9 -8
- package/components/u-row/props.js +4 -3
- package/components/u-row-notice/props.js +8 -7
- package/components/u-row-notice/u-row-notice.vue +0 -5
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-search/props.js +25 -24
- package/components/u-skeleton/props.js +12 -11
- package/components/u-slider/props.js +12 -11
- package/components/u-status-bar/props.js +2 -1
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/props.js +8 -7
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/props.js +5 -4
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-sticky/props.js +7 -6
- package/components/u-sticky/u-sticky.vue +0 -5
- package/components/u-subsection/props.js +10 -9
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action-item/nvue.js +0 -5
- package/components/u-swipe-action-item/props.js +7 -6
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-switch/props.js +12 -11
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-table/props.js +1 -0
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tag/props.js +16 -15
- package/components/u-td/props.js +1 -0
- package/components/u-text/props.js +22 -21
- package/components/u-textarea/props.js +24 -23
- package/components/u-toast/u-toast.vue +0 -5
- package/components/u-toolbar/props.js +7 -6
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tr/props.js +1 -0
- package/components/u-transition/props.js +5 -4
- package/components/u-transition/transition.js +9 -8
- package/components/u-transition/u-transition.vue +1 -1
- package/components/u-upload/props.js +23 -22
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +5 -1
- package/libs/config/props/actionSheet.js +1 -1
- package/libs/config/props/album.js +1 -1
- package/libs/config/props/avatarGroup.js +1 -1
- package/libs/config/props/backtop.js +2 -2
- package/libs/config/props/badge.js +1 -1
- package/libs/config/props/calendar.js +3 -3
- package/libs/config/props/checkboxGroup.js +1 -1
- package/libs/config/props/datetimePicker.js +1 -1
- package/libs/config/props/form.js +3 -3
- package/libs/config/props/formItem.js +0 -1
- package/libs/config/props/indexList.js +1 -1
- package/libs/config/props/noticeBar.js +1 -1
- package/libs/config/props/picker.js +2 -2
- package/libs/config/props/popup.js +1 -1
- package/libs/config/props/search.js +2 -2
- package/libs/config/props/slider.js +1 -1
- package/libs/config/props/swiper.js +1 -1
- package/libs/config/props/tabs.js +7 -7
- package/libs/config/props/text.js +2 -2
- package/libs/config/props/toast.js +1 -1
- package/libs/config/props/tooltip.js +1 -1
- package/libs/config/props/upload.js +3 -3
- package/libs/css/components.scss +1 -11
- package/libs/css/flex.scss +71 -73
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -43,7 +43,7 @@ const $u = {
|
|
|
43
43
|
test,
|
|
44
44
|
type: ['primary', 'success', 'error', 'warning', 'info'],
|
|
45
45
|
http: new Request(),
|
|
46
|
-
config, //
|
|
46
|
+
config, // uView配置信息相关,比如版本号
|
|
47
47
|
zIndex,
|
|
48
48
|
debounce,
|
|
49
49
|
throttle,
|
|
@@ -68,6 +68,10 @@ const install = (Vue) => {
|
|
|
68
68
|
// #ifndef APP-NVUE
|
|
69
69
|
// 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
|
|
70
70
|
Vue.config.globalProperties.$u = $u
|
|
71
|
+
// 暂时兼容vue2的$nextTick写法
|
|
72
|
+
Vue.config.globalProperties.$nextTick = (cb) => {
|
|
73
|
+
cb();
|
|
74
|
+
}
|
|
71
75
|
Vue.mixin(mixin)
|
|
72
76
|
// #endif
|
|
73
77
|
}
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
mode: 'single',
|
|
17
17
|
startText: '开始',
|
|
18
18
|
endText: '结束',
|
|
19
|
-
customList: [],
|
|
19
|
+
customList: () => [],
|
|
20
20
|
color: '#3c9cff',
|
|
21
21
|
minDate: 0,
|
|
22
22
|
maxDate: 0,
|
|
@@ -35,8 +35,8 @@ export default {
|
|
|
35
35
|
maxRange: Number.MAX_SAFE_INTEGER, // Infinity
|
|
36
36
|
rangePrompt: '',
|
|
37
37
|
showRangePrompt: true,
|
|
38
|
-
allowSameDay: false,
|
|
39
|
-
round: 0,
|
|
38
|
+
allowSameDay: false,
|
|
39
|
+
round: 0,
|
|
40
40
|
monthNum: 3
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
export default {
|
|
11
11
|
// form 组件
|
|
12
12
|
form: {
|
|
13
|
-
model: {},
|
|
14
|
-
rules: {},
|
|
13
|
+
model: () => ({}),
|
|
14
|
+
rules: () => ({}),
|
|
15
15
|
errorType: 'message',
|
|
16
16
|
borderBottom: true,
|
|
17
17
|
labelPosition: 'left',
|
|
18
18
|
labelWidth: 45,
|
|
19
19
|
labelAlign: 'left',
|
|
20
|
-
labelStyle: {}
|
|
20
|
+
labelStyle: () => ({})
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
popupMode: 'bottom',
|
|
15
15
|
showToolbar: true,
|
|
16
16
|
title: '',
|
|
17
|
-
columns: [],
|
|
17
|
+
columns: () => [],
|
|
18
18
|
loading: false,
|
|
19
19
|
itemHeight: 44,
|
|
20
20
|
cancelText: '取消',
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
visibleItemCount: 5,
|
|
25
25
|
keyName: 'text',
|
|
26
26
|
closeOnClickOverlay: false,
|
|
27
|
-
defaultIndex: [],
|
|
27
|
+
defaultIndex: () => [],
|
|
28
28
|
immediateChange: false
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
clearabled: true,
|
|
17
17
|
focus: false,
|
|
18
18
|
showAction: true,
|
|
19
|
-
actionStyle: {},
|
|
19
|
+
actionStyle: () => ({}),
|
|
20
20
|
actionText: '搜索',
|
|
21
21
|
inputAlign: 'left',
|
|
22
|
-
inputStyle: {},
|
|
22
|
+
inputStyle: () => ({}),
|
|
23
23
|
disabled: false,
|
|
24
24
|
borderColor: 'transparent',
|
|
25
25
|
searchIconColor: '#909399',
|
|
@@ -11,20 +11,20 @@ export default {
|
|
|
11
11
|
//
|
|
12
12
|
tabs: {
|
|
13
13
|
duration: 300,
|
|
14
|
-
list: [],
|
|
14
|
+
list: () => [],
|
|
15
15
|
lineColor: '#3c9cff',
|
|
16
|
-
activeStyle: {
|
|
16
|
+
activeStyle: () => ({
|
|
17
17
|
color: '#303133'
|
|
18
|
-
},
|
|
19
|
-
inactiveStyle: {
|
|
18
|
+
}),
|
|
19
|
+
inactiveStyle: () => ({
|
|
20
20
|
color: '#606266'
|
|
21
|
-
},
|
|
21
|
+
}),
|
|
22
22
|
lineWidth: 20,
|
|
23
23
|
lineHeight: 3,
|
|
24
24
|
lineBgSize: 'cover',
|
|
25
|
-
itemStyle: {
|
|
25
|
+
itemStyle: () => ({
|
|
26
26
|
height: '44px'
|
|
27
|
-
},
|
|
27
|
+
}),
|
|
28
28
|
scrollable: true,
|
|
29
29
|
current: 0,
|
|
30
30
|
keyName: 'name'
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
// upload组件
|
|
12
12
|
upload: {
|
|
13
13
|
accept: 'image',
|
|
14
|
-
capture: ['album', 'camera'],
|
|
14
|
+
capture: () => ['album', 'camera'],
|
|
15
15
|
compressed: true,
|
|
16
16
|
camera: 'back',
|
|
17
17
|
maxDuration: 60,
|
|
@@ -23,11 +23,11 @@ export default {
|
|
|
23
23
|
disabled: false,
|
|
24
24
|
imageMode: 'aspectFill',
|
|
25
25
|
name: '',
|
|
26
|
-
sizeType: ['original', 'compressed'],
|
|
26
|
+
sizeType: () => ['original', 'compressed'],
|
|
27
27
|
multiple: false,
|
|
28
28
|
deletable: true,
|
|
29
29
|
maxSize: Number.MAX_VALUE,
|
|
30
|
-
fileList: [],
|
|
30
|
+
fileList: () => [],
|
|
31
31
|
uploadText: '',
|
|
32
32
|
width: 80,
|
|
33
33
|
height: 80,
|
package/libs/css/components.scss
CHANGED
|
@@ -3,17 +3,7 @@
|
|
|
3
3
|
/* #ifndef APP-NVUE */
|
|
4
4
|
// 由于uView是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column;
|
|
5
5
|
// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常
|
|
6
|
-
view,
|
|
7
|
-
scroll-view,
|
|
8
|
-
swiper-item,
|
|
9
|
-
.u-empty,
|
|
10
|
-
.u-empty__wrap,
|
|
11
|
-
.u-tabs,
|
|
12
|
-
.u-tabs__wrapper,
|
|
13
|
-
.u-tabs__wrapper__scroll-view-wrapper,
|
|
14
|
-
.u-tabs__wrapper__scroll-view,
|
|
15
|
-
.u-tabs__wrapper__nav,
|
|
16
|
-
.u-tabs__wrapper__nav__line {
|
|
6
|
+
view, scroll-view, swiper-item {
|
|
17
7
|
display: flex;
|
|
18
8
|
flex-direction: column;
|
|
19
9
|
flex-shrink: 0;
|
package/libs/css/flex.scss
CHANGED
|
@@ -85,40 +85,40 @@
|
|
|
85
85
|
|
|
86
86
|
// 自动伸缩
|
|
87
87
|
.u-flex-fill {
|
|
88
|
-
flex: 1 1 auto
|
|
88
|
+
flex: 1 1 auto
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// 边界自动伸缩
|
|
92
92
|
.u-margin-top-auto,
|
|
93
93
|
.u-m-t-auto {
|
|
94
|
-
margin-top: auto !important
|
|
94
|
+
margin-top: auto !important
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.u-margin-right-auto,
|
|
98
98
|
.u-m-r-auto {
|
|
99
|
-
margin-right: auto !important
|
|
99
|
+
margin-right: auto !important
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.u-margin-bottom-auto,
|
|
103
103
|
.u-m-b-auto {
|
|
104
|
-
margin-bottom: auto !important
|
|
104
|
+
margin-bottom: auto !important
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.u-margin-left-auto,
|
|
108
108
|
.u-m-l-auto {
|
|
109
|
-
margin-left: auto !important
|
|
109
|
+
margin-left: auto !important
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.u-margin-center-auto,
|
|
113
113
|
.u-m-c-auto {
|
|
114
114
|
margin-left: auto !important;
|
|
115
|
-
margin-right: auto !important
|
|
115
|
+
margin-right: auto !important
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.u-margin-middle-auto,
|
|
119
119
|
.u-m-m-auto {
|
|
120
120
|
margin-top: auto !important;
|
|
121
|
-
margin-bottom: auto !important
|
|
121
|
+
margin-bottom: auto !important
|
|
122
122
|
}
|
|
123
123
|
/* #endif */
|
|
124
124
|
|
|
@@ -134,54 +134,52 @@
|
|
|
134
134
|
|
|
135
135
|
// 主轴起点对齐
|
|
136
136
|
.u-flex-start {
|
|
137
|
-
justify-content: flex-start
|
|
137
|
+
justify-content: flex-start
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
// 主轴中间对齐
|
|
141
141
|
.u-flex-center {
|
|
142
|
-
justify-content: center
|
|
142
|
+
justify-content: center
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// 主轴终点对齐
|
|
146
146
|
.u-flex-end {
|
|
147
|
-
justify-content: flex-end
|
|
147
|
+
justify-content: flex-end
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// 主轴等比间距
|
|
151
151
|
.u-flex-between {
|
|
152
|
-
justify-content: space-between
|
|
152
|
+
justify-content: space-between
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// 主轴均分间距
|
|
156
156
|
.u-flex-around {
|
|
157
|
-
justify-content: space-around
|
|
157
|
+
justify-content: space-around
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// 交叉轴起点对齐
|
|
161
161
|
.u-flex-items-start {
|
|
162
|
-
align-items: flex-start
|
|
162
|
+
align-items: flex-start
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// 交叉轴中间对齐
|
|
166
166
|
.u-flex-items-center {
|
|
167
|
-
align-items: center
|
|
167
|
+
align-items: center
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
// 交叉轴终点对齐
|
|
171
171
|
.u-flex-items-end {
|
|
172
|
-
align-items: flex-end
|
|
172
|
+
align-items: flex-end
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
// 交叉轴第一行文字基线对齐
|
|
176
176
|
.u-flex-items-baseline {
|
|
177
|
-
|
|
178
|
-
align-items: baseline;
|
|
179
|
-
/* #endif */
|
|
177
|
+
align-items: baseline
|
|
180
178
|
}
|
|
181
179
|
|
|
182
180
|
// 交叉轴方向拉伸对齐
|
|
183
181
|
.u-flex-items-stretch {
|
|
184
|
-
align-items: stretch
|
|
182
|
+
align-items: stretch
|
|
185
183
|
}
|
|
186
184
|
|
|
187
185
|
|
|
@@ -189,54 +187,54 @@
|
|
|
189
187
|
|
|
190
188
|
// 子元素交叉轴起点对齐
|
|
191
189
|
.u-flex-self-start {
|
|
192
|
-
align-self: flex-start
|
|
190
|
+
align-self: flex-start
|
|
193
191
|
}
|
|
194
192
|
|
|
195
193
|
// 子元素交叉轴居中对齐
|
|
196
194
|
.u-flex-self-center {
|
|
197
|
-
align-self: center
|
|
195
|
+
align-self: center
|
|
198
196
|
}
|
|
199
197
|
|
|
200
198
|
// 子元素交叉轴终点对齐
|
|
201
199
|
.u-flex-self-end {
|
|
202
|
-
align-self: flex-end
|
|
200
|
+
align-self: flex-end
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
// 子元素交叉轴第一行文字基线对齐
|
|
206
204
|
.u-flex-self-baseline {
|
|
207
|
-
align-self: baseline
|
|
205
|
+
align-self: baseline
|
|
208
206
|
}
|
|
209
207
|
|
|
210
208
|
// 子元素交叉轴方向拉伸对齐
|
|
211
209
|
.u-flex-self-stretch {
|
|
212
|
-
align-self: stretch
|
|
210
|
+
align-self: stretch
|
|
213
211
|
}
|
|
214
212
|
|
|
215
213
|
// 多轴交叉时的对齐方式
|
|
216
214
|
|
|
217
215
|
// 起点对齐
|
|
218
216
|
.u-flex-content-start {
|
|
219
|
-
align-content: flex-start
|
|
217
|
+
align-content: flex-start
|
|
220
218
|
}
|
|
221
219
|
|
|
222
220
|
// 居中对齐
|
|
223
221
|
.u-flex-content-center {
|
|
224
|
-
align-content: center
|
|
222
|
+
align-content: center
|
|
225
223
|
}
|
|
226
224
|
|
|
227
225
|
// 终点对齐
|
|
228
226
|
.u-flex-content-end {
|
|
229
|
-
align-content: flex-end
|
|
227
|
+
align-content: flex-end
|
|
230
228
|
}
|
|
231
229
|
|
|
232
230
|
// 两端对齐
|
|
233
231
|
.u-flex-content-between {
|
|
234
|
-
align-content: space-between
|
|
232
|
+
align-content: space-between
|
|
235
233
|
}
|
|
236
234
|
|
|
237
235
|
// 均分间距
|
|
238
236
|
.u-flex-content-around {
|
|
239
|
-
align-content: space-around
|
|
237
|
+
align-content: space-around
|
|
240
238
|
}
|
|
241
239
|
|
|
242
240
|
// 全部居中对齐
|
|
@@ -244,55 +242,55 @@
|
|
|
244
242
|
justify-content: center;
|
|
245
243
|
align-items: center;
|
|
246
244
|
align-self: center;
|
|
247
|
-
align-content: center
|
|
245
|
+
align-content: center
|
|
248
246
|
}
|
|
249
247
|
|
|
250
248
|
// 是否可以放大
|
|
251
249
|
.u-flex-grow {
|
|
252
|
-
flex-grow: 1
|
|
250
|
+
flex-grow: 1
|
|
253
251
|
}
|
|
254
252
|
|
|
255
253
|
// 是否可以缩小
|
|
256
254
|
.u-flex-shrink {
|
|
257
|
-
flex-shrink: 1
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// 定义内外边距,历遍1-80
|
|
261
|
-
@for $i from 0 through 80 {
|
|
262
|
-
// 只要双数和能被5除尽的数
|
|
263
|
-
@if $i % 2 == 0 or $i % 5 == 0 {
|
|
264
|
-
// 得出:u-margin-30或者u-m-30
|
|
265
|
-
.u-margin-#{$i}, .u-m-#{$i} {
|
|
266
|
-
margin: $i + rpx!important;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// 得出:u-padding-30或者u-p-30
|
|
270
|
-
.u-padding-#{$i}, .u-p-#{$i} {
|
|
271
|
-
padding: $i + rpx!important;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
@each $short, $long in l left, t top, r right, b bottom {
|
|
275
|
-
// 缩写版,结果如: u-m-l-30
|
|
276
|
-
// 定义外边距
|
|
277
|
-
.u-m-#{$short}-#{$i} {
|
|
278
|
-
margin-#{$long}: $i + rpx!important;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// 定义内边距
|
|
282
|
-
.u-p-#{$short}-#{$i} {
|
|
283
|
-
padding-#{$long}: $i + rpx!important;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// 完整版,结果如:u-margin-left-30
|
|
287
|
-
// 定义外边距
|
|
288
|
-
.u-margin-#{$long}-#{$i} {
|
|
289
|
-
margin-#{$long}: $i + rpx!important;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// 定义内边距
|
|
293
|
-
.u-padding-#{$long}-#{$i} {
|
|
294
|
-
padding-#{$long}: $i + rpx!important;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
255
|
+
flex-shrink: 1
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// 定义内外边距,历遍1-80
|
|
259
|
+
@for $i from 0 through 80 {
|
|
260
|
+
// 只要双数和能被5除尽的数
|
|
261
|
+
@if $i % 2 == 0 or $i % 5 == 0 {
|
|
262
|
+
// 得出:u-margin-30或者u-m-30
|
|
263
|
+
.u-margin-#{$i}, .u-m-#{$i} {
|
|
264
|
+
margin: $i + rpx!important;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// 得出:u-padding-30或者u-p-30
|
|
268
|
+
.u-padding-#{$i}, .u-p-#{$i} {
|
|
269
|
+
padding: $i + rpx!important;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@each $short, $long in l left, t top, r right, b bottom {
|
|
273
|
+
// 缩写版,结果如: u-m-l-30
|
|
274
|
+
// 定义外边距
|
|
275
|
+
.u-m-#{$short}-#{$i} {
|
|
276
|
+
margin-#{$long}: $i + rpx!important;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// 定义内边距
|
|
280
|
+
.u-p-#{$short}-#{$i} {
|
|
281
|
+
padding-#{$long}: $i + rpx!important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// 完整版,结果如:u-margin-left-30
|
|
285
|
+
// 定义外边距
|
|
286
|
+
.u-margin-#{$long}-#{$i} {
|
|
287
|
+
margin-#{$long}: $i + rpx!important;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// 定义内边距
|
|
291
|
+
.u-padding-#{$long}-#{$i} {
|
|
292
|
+
padding-#{$long}: $i + rpx!important;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|