Skip to content

Commit 16bd695

Browse files
committed
修改:错误单词拼写
1 parent fa59035 commit 16bd695

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

uview-ui/components/u-select/u-select.vue

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* @event {Function} confirm 点击确定按钮,返回当前选择的值
7070
* @example <u-select v-model="show" :list="list"></u-select>
7171
*/
72-
72+
7373
export default {
7474
props: {
7575
// 列数据
@@ -155,7 +155,7 @@ export default {
155155
// 每次队列发生变化时,保存选择的结果
156156
selectValue: [],
157157
// 上一次列变化时的index
158-
lastSelectIndex: [],
158+
lastSelectIndex: [],
159159
// 列数
160160
columnNum: 0,
161161
// 列是否还在滑动中,微信小程序如果在滑动中就点确定,结果可能不准确
@@ -262,39 +262,39 @@ export default {
262262
// 列选项
263263
columnChange(e) {
264264
let index = null;
265-
let cloumnIndex = e.detail.value;
265+
let columnIndex = e.detail.value;
266266
// 由于后面是需要push进数组的,所以需要先清空数组
267267
this.selectValue = [];
268268
if(this.mode == 'mutil-column-auto') {
269269
// 对比前后两个数组,寻找变更的是哪一列,如果某一个元素不同,即可判定该列发生了变化
270270
this.lastSelectIndex.map((val, idx) => {
271-
if (val != cloumnIndex[idx]) index = idx;
271+
if (val != columnIndex[idx]) index = idx;
272272
});
273-
this.defaultSelector = cloumnIndex;
273+
this.defaultSelector = columnIndex;
274274
for (let i = index + 1; i < this.columnNum; i++) {
275275
// 当前变化列的下一列的数据,需要获取上一列的数据,同时需要指定是上一列的第几个的children,再往后的
276276
// 默认是队列的第一个为默认选项
277-
this.columnData[i] = this.columnData[i - 1][i - 1 == index ? cloumnIndex[index] : 0][this.childName];
277+
this.columnData[i] = this.columnData[i - 1][i - 1 == index ? columnIndex[index] : 0][this.childName];
278278
// 改变的列之后的所有列,默认选中第一个
279279
this.defaultSelector[i] = 0;
280280
}
281281
// 在历遍的过程中,可能由于上一步修改this.columnData,导致产生连锁反应,程序触发columnChange,会有多次调用
282282
// 只有在最后一次数据稳定后的结果是正确的,此前的历遍中,可能会产生undefined,故需要判断
283-
cloumnIndex.map((item, index) => {
284-
let data = this.columnData[index][cloumnIndex[index]];
283+
columnIndex.map((item, index) => {
284+
let data = this.columnData[index][columnIndex[index]];
285285
let tmp = {
286286
value: data ? data[this.valueName] : null,
287287
label: data ? data[this.labelName] : null,
288288
};
289289
// 判断是否有需要额外携带的参数
290290
if(data && data.extra) tmp.extra = data.extra;
291291
this.selectValue.push(tmp);
292-
292+
293293
})
294294
// 保存这一次的结果,用于下次列发生变化时作比较
295-
this.lastSelectIndex = cloumnIndex;
295+
this.lastSelectIndex = columnIndex;
296296
} else if(this.mode == 'single-column') {
297-
let data = this.columnData[0][cloumnIndex[0]];
297+
let data = this.columnData[0][columnIndex[0]];
298298
// 初始默认选中值
299299
let tmp = {
300300
value: data ? data[this.valueName] : null,
@@ -305,8 +305,8 @@ export default {
305305
this.selectValue.push(tmp);
306306
} else if(this.mode == 'mutil-column') {
307307
// 初始默认选中值
308-
cloumnIndex.map((item, index) => {
309-
let data = this.columnData[index][cloumnIndex[index]];
308+
columnIndex.map((item, index) => {
309+
let data = this.columnData[index][columnIndex[index]];
310310
// 初始默认选中值
311311
let tmp = {
312312
value: data ? data[this.valueName] : null,
@@ -340,38 +340,38 @@ export default {
340340
@import "../../libs/css/style.components.scss";
341341
342342
.u-select {
343-
343+
344344
&__action {
345345
position: relative;
346346
line-height: $u-form-item-height;
347347
height: $u-form-item-height;
348-
348+
349349
&__icon {
350350
position: absolute;
351351
right: 20rpx;
352352
top: 50%;
353353
transition: transform .4s;
354354
transform: translateY(-50%);
355355
z-index: 1;
356-
356+
357357
&--reverse {
358358
transform: rotate(-180deg) translateY(50%);
359359
}
360360
}
361361
}
362-
362+
363363
&__hader {
364364
&__title {
365365
color: $u-content-color;
366366
}
367367
}
368-
368+
369369
&--border {
370370
border-radius: 6rpx;
371371
border-radius: 4px;
372372
border: 1px solid $u-form-item-border-color;
373373
}
374-
374+
375375
&__header {
376376
display: flex;
377377
align-items: center;

uview-ui/components/u-waterfall/u-waterfall.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<view class="u-waterfall">
3-
<view id="u-left-cloumn" class="u-cloumn"><slot name="left" :leftList="leftList"></slot></view>
4-
<view id="u-right-cloumn" class="u-cloumn"><slot name="right" :rightList="rightList"></slot></view>
3+
<view id="u-left-column" class="u-column"><slot name="left" :leftList="leftList"></slot></view>
4+
<view id="u-right-column" class="u-column"><slot name="right" :rightList="rightList"></slot></view>
55
</view>
66
</template>
77

@@ -73,8 +73,8 @@ export default {
7373
methods: {
7474
async splitData() {
7575
if (!this.tempList.length) return;
76-
let leftRect = await this.$uGetRect('#u-left-cloumn');
77-
let rightRect = await this.$uGetRect('#u-right-cloumn');
76+
let leftRect = await this.$uGetRect('#u-left-column');
77+
let rightRect = await this.$uGetRect('#u-right-column');
7878
// 如果左边小于或等于右边,就添加到左边,否则添加到右边
7979
let item = this.tempList[0];
8080
// 解决多次快速上拉后,可能数据会乱的问题,因为经过上面的两个await节点查询阻塞一定时间,加上后面的定时器干扰
@@ -116,7 +116,7 @@ export default {
116116
// 清除某一条指定的数据,根据id实现
117117
remove(id) {
118118
// 如果findIndex找不到合适的条件,就会返回-1
119-
let index = -1;
119+
let index = -1;
120120
index = this.leftList.findIndex(val => val[this.idKey] == id);
121121
if(index != -1) {
122122
// 如果index不等于-1,说明已经找到了要找的id,根据index索引删除这一条数据
@@ -133,7 +133,7 @@ export default {
133133
// 修改某条数据的某个属性
134134
modify(id, key, value) {
135135
// 如果findIndex找不到合适的条件,就会返回-1
136-
let index = -1;
136+
let index = -1;
137137
index = this.leftList.findIndex(val => val[this.idKey] == id);
138138
if(index != -1) {
139139
// 如果index不等于-1,说明已经找到了要找的id,修改对应key的值
@@ -167,7 +167,7 @@ export default {
167167
align-items: flex-start;
168168
}
169169
170-
.u-cloumn {
170+
.u-column {
171171
display: flex;
172172
flex: 1;
173173
flex-direction: column;

0 commit comments

Comments
 (0)