wl-design-mobile 0.1.5 → 0.1.6
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/btn/lambo-btn-group.vue +1 -1
- package/card-item/lambo-card-head.vue +1 -1
- package/card-item/lambo-card-row.vue +2 -2
- package/list/components/table/lambo-table-footer.vue +0 -0
- package/list/components/table/lambo-table-head.vue +44 -0
- package/list/components/table/lambo-table-row.vue +0 -0
- package/list/lambo-list.vue +5 -4
- package/list/lambo-table-list.vue +50 -30
- package/nav/lambo-top-nav.vue +4 -0
- package/package.json +1 -1
package/btn/lambo-btn-group.vue
CHANGED
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ul class="table-header" ref="listRowDiv">
|
|
4
|
+
<li v-for="(item, index) in columns" :key="index" class="header-cell"
|
|
5
|
+
:style="{flex: `1 0 ${item.minWidth}`, textAlign: item.align || 'center' }">
|
|
6
|
+
{{ item.title }}
|
|
7
|
+
</li>
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'LamboTableHead',
|
|
14
|
+
props: {
|
|
15
|
+
columns: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {}
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<style scoped lang="css">
|
|
26
|
+
.table-header {
|
|
27
|
+
width: 100%;
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
margin-right: 10px;
|
|
30
|
+
display: flex;
|
|
31
|
+
padding-top: 24px;
|
|
32
|
+
padding-bottom: 12px;
|
|
33
|
+
border-bottom: 1px solid #eee;
|
|
34
|
+
overflow-x: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.header-cell {
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
padding: 8px; /* 适当的内边距 */
|
|
40
|
+
border: 1px solid #ddd; /* 可选:用于显示边框 */
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
|
|
File without changes
|
package/list/lambo-list.vue
CHANGED
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
finishedTxt: "",
|
|
56
56
|
pageNum: 1, // 当前页数
|
|
57
57
|
pageSize: 10, // 每页数据条数
|
|
58
|
-
listHeight: '100vh',
|
|
58
|
+
listHeight: '100vh',
|
|
59
59
|
refreshing: false,
|
|
60
60
|
offset: 0,
|
|
61
61
|
limit: 10,
|
|
@@ -100,14 +100,14 @@ export default {
|
|
|
100
100
|
{title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
|
|
101
101
|
{title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
|
|
102
102
|
]
|
|
103
|
-
this.list.push(arr)
|
|
103
|
+
this.list.push(...arr)
|
|
104
104
|
this.finished = false
|
|
105
105
|
this.offset = this.pageNum * 10
|
|
106
106
|
this.pageNum++;
|
|
107
107
|
}else{
|
|
108
108
|
let params = {offset: this.offset, limit: this.limit, ...this.searchParams}
|
|
109
109
|
axios.get(this.url, {params}).then(res => {
|
|
110
|
-
console.log("lambo-
|
|
110
|
+
console.log("lambo-list -- onLoad -- loadData:", res)
|
|
111
111
|
if (res && res.code === 1) {
|
|
112
112
|
let pageData = res.data
|
|
113
113
|
|
|
@@ -184,6 +184,7 @@ export default {
|
|
|
184
184
|
overflow-y: auto;
|
|
185
185
|
background-color: var(--scl-white-1);
|
|
186
186
|
padding: 0 8px 0 14px;
|
|
187
|
+
margin-top: -6px;
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
.list-item {
|
|
@@ -191,7 +192,7 @@ export default {
|
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
.card-item {
|
|
194
|
-
padding:
|
|
195
|
+
padding: 10px 0 0 0;
|
|
195
196
|
background-color: var(--scl-white-1);
|
|
196
197
|
}
|
|
197
198
|
|
|
@@ -76,37 +76,57 @@ export default {
|
|
|
76
76
|
this.list = [];
|
|
77
77
|
this.refreshing = false;
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.finishedTxt = "没有更多了"
|
|
98
|
-
} else {
|
|
99
|
-
this.finished = true; // 数据加载完毕
|
|
100
|
-
}
|
|
101
|
-
this.loading = false; // 加载状态结束
|
|
102
|
-
} else {
|
|
103
|
-
console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]数据失败", res)
|
|
104
|
-
Toast.fail("查询[" + this.title + "]数据失败:" + res.data || '')
|
|
79
|
+
this.list = [
|
|
80
|
+
{
|
|
81
|
+
"distCtId": "000000000000O0000000000000000051",
|
|
82
|
+
"carCode": "JN2408220001",
|
|
83
|
+
"carName": "123",
|
|
84
|
+
"distCtName": "济南烟草卷烟配送中心"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"distCtId": "000000000000O0000000000000000051",
|
|
88
|
+
"carCode": "JN2408220002",
|
|
89
|
+
"carName": "1",
|
|
90
|
+
"distCtName": "济南烟草卷烟配送中心"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"distCtId": "000000000000O0000000000000000051",
|
|
94
|
+
"carCode": "JN2408290001",
|
|
95
|
+
"carName": "14",
|
|
96
|
+
"distCtName": "济南烟草卷烟配送中心"
|
|
105
97
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
// let params = {offset: this.offset, limit: this.limit, ...this.searchParams}
|
|
101
|
+
// axios.get(this.url, {params}).then(res => {
|
|
102
|
+
// console.log("lambo-init-table-list -- onLoad -- loadData:", res)
|
|
103
|
+
// if (res && res.code === 1) {
|
|
104
|
+
// let pageData = res.data
|
|
105
|
+
//
|
|
106
|
+
// if (pageData && pageData.rows.length > 0) {
|
|
107
|
+
// for (let item of pageData.rows) {
|
|
108
|
+
// if (this.list.length < pageData.total) {
|
|
109
|
+
// this.list.push(item)
|
|
110
|
+
// this.finished = false
|
|
111
|
+
// } else {
|
|
112
|
+
// this.finished = true // 数据加载完毕
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
// this.offset = this.pageNum * 10
|
|
116
|
+
// this.pageNum++;
|
|
117
|
+
// this.finishedTxt = "没有更多了"
|
|
118
|
+
// } else {
|
|
119
|
+
// this.finished = true; // 数据加载完毕
|
|
120
|
+
// }
|
|
121
|
+
// this.loading = false; // 加载状态结束
|
|
122
|
+
// } else {
|
|
123
|
+
// console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]数据失败", res)
|
|
124
|
+
// Toast.fail("查询[" + this.title + "]数据失败:" + res.data || '')
|
|
125
|
+
// }
|
|
126
|
+
// }).catch(err => {
|
|
127
|
+
// console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]异常:", err)
|
|
128
|
+
// Toast.fail("查询[" + this.url + "]数据异常")
|
|
129
|
+
// })
|
|
110
130
|
},
|
|
111
131
|
getListHeight() {
|
|
112
132
|
const windowHeight = window.innerHeight;
|
package/nav/lambo-top-nav.vue
CHANGED