wl-design-mobile 0.1.4 → 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.
@@ -32,7 +32,7 @@ export default {
32
32
  display: flex;
33
33
  padding: 0 14px;
34
34
  background-color: var(--scl-white-1);
35
- border-bottom: 1px solid var(--scl-white-2);
35
+ border-bottom: 1px var(--scl-white-2);
36
36
  }
37
37
 
38
38
  .button-group /deep/ .btn-sel {
@@ -59,6 +59,6 @@ export default {
59
59
 
60
60
  .title-tb {
61
61
  border-collapse: collapse;
62
- margin: 0px 0px 14px 0px;
62
+ margin: 0px 0px 10px 0px;
63
63
  }
64
64
  </style>
@@ -51,10 +51,10 @@ export default {
51
51
 
52
52
  .title-tb {
53
53
  border-collapse: collapse;
54
- margin: 0px 0px 14px 0px;
54
+ margin: 0px 0px 8px 0px;
55
55
  }
56
56
 
57
57
  .tb-tr {
58
- margin-bottom: 14px;
58
+ margin-bottom: 8px;
59
59
  }
60
60
  </style>
@@ -18,18 +18,22 @@
18
18
  <div>
19
19
  <van-popup v-model:show="showBottom" :style="{ height: '33%' }" position="bottom">
20
20
  <van-checkbox-group v-model="selectItem.K">
21
- <div class="edit-top-div">
22
- <van-button class="edit-cancel-btn" size="normal" @click="cancel">取消</van-button>
23
- <span class="edit-select-title">请选择</span>
24
- <van-button class="edit-confirm-btn" size="normal" @click="onConfirm">确认</van-button>
21
+ <div class="bottom-div">
22
+ <div class="edit-top-div">
23
+ <van-button class="edit-cancel-btn" size="normal" @click="cancel">取消</van-button>
24
+ <span class="edit-select-title">请选择</span>
25
+ <van-button class="edit-confirm-btn" size="normal" @click="onConfirm">确认</van-button>
26
+ </div>
27
+ <div class="cell-group-div">
28
+ <van-cell-group>
29
+ <van-cell v-for="(c, index) in data" :key="index" :title="`${c.V}`" clickable @click="checkboxClick(c)">
30
+ <template #right-icon>
31
+ <van-checkbox ref="checkboxes" :name="c.K" checked-color="#0070D2" shape="square"/>
32
+ </template>
33
+ </van-cell>
34
+ </van-cell-group>
35
+ </div>
25
36
  </div>
26
- <van-cell-group>
27
- <van-cell v-for="(c, index) in data" :key="index" :title="`${c.V}`" clickable @click="checkboxClick(c)">
28
- <template #right-icon>
29
- <van-checkbox ref="checkboxes" :name="c.K" checked-color="#0070D2" shape="square"/>
30
- </template>
31
- </van-cell>
32
- </van-cell-group>
33
37
  </van-checkbox-group>
34
38
  </van-popup>
35
39
  </div>
@@ -18,18 +18,22 @@
18
18
  <div>
19
19
  <van-popup v-model:show="showBottom" :style="{ height: '33%' }" position="bottom">
20
20
  <van-radio-group v-model="selectItem.K">
21
- <div class="edit-top-div">
22
- <van-button class="edit-cancel-btn" size="normal" @click="cancel">取消</van-button>
23
- <span class="edit-select-title">请选择</span>
24
- <van-button class="edit-confirm-btn" size="normal" @click="onConfirm">确认</van-button>
21
+ <div class="bottom-div">
22
+ <div class="edit-top-div">
23
+ <van-button class="edit-cancel-btn" size="normal" @click="cancel">取消</van-button>
24
+ <span class="edit-select-title">请选择</span>
25
+ <van-button class="edit-confirm-btn" size="normal" @click="onConfirm">确认</van-button>
26
+ </div>
27
+ <div class="cell-group-div">
28
+ <van-cell-group>
29
+ <van-cell v-for="(c, index) in data" :key="index" :title="`${c.V}`" clickable @click="radioClick(c)">
30
+ <template #right-icon>
31
+ <van-radio :name="c.K" checked-color="#0070D2"/>
32
+ </template>
33
+ </van-cell>
34
+ </van-cell-group>
35
+ </div>
25
36
  </div>
26
- <van-cell-group>
27
- <van-cell v-for="(c, index) in data" :key="index" :title="`${c.V}`" clickable @click="radioClick(c)">
28
- <template #right-icon>
29
- <van-radio :name="c.K" checked-color="#0070D2"/>
30
- </template>
31
- </van-cell>
32
- </van-cell-group>
33
37
  </van-radio-group>
34
38
  </van-popup>
35
39
  </div>
@@ -117,7 +121,7 @@ export default {
117
121
  this.valName = this.selectItem.V
118
122
  this.$emit('on-ok', this.selectItem)
119
123
  } else {
120
- Toast.fail('条件选择失败,请联系管理员')
124
+ // Toast.fail('请选择内容')
121
125
  console.error('lambo-select -- 条件选择失败,this.selectItem:', this.selectItem)
122
126
  this.val = ''
123
127
  this.valName = ''
@@ -144,6 +148,7 @@ export default {
144
148
  },
145
149
  },
146
150
  created() {
151
+
147
152
  },
148
153
  }
149
154
  </script>
@@ -66,9 +66,11 @@
66
66
  justify-content: space-between;
67
67
  height: 44px;
68
68
  line-height: 44px;
69
+ background-color: rgb(255, 255, 255, 1);
69
70
  width: 100%;
70
71
  position: fixed;
71
- z-index: 300;
72
+ z-index: 1;
73
+ box-shadow: 0 2px 10px rgba(125, 126, 128, .16);
72
74
  }
73
75
 
74
76
  .edit-cancel-btn {
@@ -83,7 +85,6 @@
83
85
 
84
86
  .edit-select-title {
85
87
  font-size: 16px;
86
- font-weight: bold;
87
88
  }
88
89
 
89
90
  /*修改单选多选的滚动条样式*/
@@ -120,3 +121,14 @@
120
121
  border-radius: var(--ind-border-radius-xl);
121
122
  background: rgba(231, 242, 250, 0.4);
122
123
  }
124
+
125
+ .bottom-div {
126
+ display: flex;
127
+ flex-direction: column;
128
+ }
129
+
130
+ .cell-group-div {
131
+ flex: 1;
132
+ overflow-y: auto;
133
+ margin-top: 44px;
134
+ }
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
@@ -55,7 +55,7 @@ export default {
55
55
  finishedTxt: "",
56
56
  pageNum: 1, // 当前页数
57
57
  pageSize: 10, // 每页数据条数
58
- listHeight: '100vh', // 默认列表高度为视口高度的80%
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-init-list -- onLoad -- loadData:", res)
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: 20px 0 0 0;
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
- let params = {offset: this.offset, limit: this.limit, ...this.searchParams}
81
- axios.get(this.url, {params}).then(res => {
82
- console.log("lambo-init-table-list -- onLoad -- loadData:", res)
83
- if (res && res.code === 1) {
84
- let pageData = res.data
85
-
86
- if (pageData && pageData.rows.length > 0) {
87
- for (let item of pageData.rows) {
88
- if (this.list.length < pageData.total) {
89
- this.list.push(item)
90
- this.finished = false
91
- } else {
92
- this.finished = true // 数据加载完毕
93
- }
94
- }
95
- this.offset = this.pageNum * 10
96
- this.pageNum++;
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
- }).catch(err => {
107
- console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]异常:", err)
108
- Toast.fail("查询[" + this.url + "]数据异常")
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;
@@ -61,6 +61,10 @@ export default {
61
61
  height: 48px;
62
62
  }
63
63
 
64
+ .van-sticky {
65
+ position: fixed;
66
+ }
67
+
64
68
  ::v-deep .van-nav-bar__left {
65
69
  padding: 0px 8px 0px 14px;
66
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wl-design-mobile",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",