wl-design-mobile 0.0.4 → 0.0.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.
@@ -1,98 +1,98 @@
1
- .imgUplodaContainer {
2
- padding: 12px 14px;
3
- background: var(--scl-white-1);
4
- }
5
-
6
- .imgUplodaTitle {
7
- /*margin-bottom: 18px;*/
8
- display: flex;
9
- justify-content: space-between;
10
- }
11
-
12
- .imgUplodaTitle p {
13
- width: 100%;
14
- color: var(--scl-gray-3);
15
- font-size: 14px;
16
- position: absolute;
17
- top: -2px;
18
- }
19
-
20
- .imgUplodaTitle img {
21
- width: 20px;
22
- height: 20px;
23
- display: block;
24
- }
25
-
26
- /*右上角上传按钮样式*/
27
- /deep/ .van-button--primary {
28
- background: none;
29
- border: none;
30
- height: auto;
31
- }
32
-
33
- /*右上角上传按钮位置*/
34
- /deep/ .van-uploader__input-wrapper, .van-uploader {
35
- width: 100%;
36
- position: static;
37
- }
38
-
39
- /*上传按钮首次进页面控制图标大小*/
40
- /deep/ .van-icon__image {
41
- width: 1em;
42
- }
43
-
44
- /*图片上传区域及右上角上传按钮*/
45
- /deep/ .setUploader {
46
- position: relative;
47
- margin-bottom: 10px;
48
- }
49
-
50
- /*图片整体位置*/
51
- /deep/ .van-uploader__wrapper {
52
- margin-top: 30px;
53
- display: grid;
54
- justify-content: space-between;
55
- grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
56
- gap: 10px;
57
- }
58
-
59
- /*右上角上传按钮位置*/
60
- /deep/ .van-button--normal {
61
- width: 20px;
62
- position: absolute;
63
- top: -1px;
64
- right: -8px;
65
- }
66
-
67
- /*/deep/ .van-uploader__preview {*/
68
- /* width: 23%;*/
69
- /* height: auto;*/
70
- /* padding-left: 8px;*/
71
- /* margin: 8px 0 0 0;*/
72
- /*}*/
73
-
74
- /*预览图片样式*/
75
- /*/deep/ .van-uploader__preview-image {*/
76
- /* display: block;*/
77
- /* width: auto;*/
78
- /* height: 100px;*/
79
- /* overflow: hidden;*/
80
- /* border: 1px solid #515a6e38;*/
81
- /*}*/
82
-
83
- /*控制上传功能覆盖区域*/
84
- /deep/ .van-uploader__input {
85
- height: 20px;
86
- width: 20px;
87
- position: absolute;
88
- left: 95%;
89
- }
90
-
91
- /deep/ .van-uploader__preview {
92
- margin: 0;
93
- }
94
-
95
- /deep/ .van-uploader__preview-image {
96
- width: auto;
97
- height: 95px;
1
+ .imgUplodaContainer {
2
+ padding: 12px 14px;
3
+ background: var(--scl-white-1);
4
+ }
5
+
6
+ .imgUplodaTitle {
7
+ /*margin-bottom: 18px;*/
8
+ display: flex;
9
+ justify-content: space-between;
10
+ }
11
+
12
+ .imgUplodaTitle p {
13
+ width: 100%;
14
+ color: var(--scl-gray-3);
15
+ font-size: 14px;
16
+ position: absolute;
17
+ top: -2px;
18
+ }
19
+
20
+ .imgUplodaTitle img {
21
+ width: 20px;
22
+ height: 20px;
23
+ display: block;
24
+ }
25
+
26
+ /*右上角上传按钮样式*/
27
+ /deep/ .van-button--primary {
28
+ background: none;
29
+ border: none;
30
+ height: auto;
31
+ }
32
+
33
+ /*右上角上传按钮位置*/
34
+ /deep/ .van-uploader__input-wrapper, .van-uploader {
35
+ width: 100%;
36
+ position: static;
37
+ }
38
+
39
+ /*上传按钮首次进页面控制图标大小*/
40
+ /deep/ .van-icon__image {
41
+ width: 1em;
42
+ }
43
+
44
+ /*图片上传区域及右上角上传按钮*/
45
+ /deep/ .setUploader {
46
+ position: relative;
47
+ margin-bottom: 10px;
48
+ }
49
+
50
+ /*图片整体位置*/
51
+ /deep/ .van-uploader__wrapper {
52
+ margin-top: 30px;
53
+ display: grid;
54
+ justify-content: space-between;
55
+ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
56
+ gap: 10px;
57
+ }
58
+
59
+ /*右上角上传按钮位置*/
60
+ /deep/ .van-button--normal {
61
+ width: 20px;
62
+ position: absolute;
63
+ top: -1px;
64
+ right: -8px;
65
+ }
66
+
67
+ /*/deep/ .van-uploader__preview {*/
68
+ /* width: 23%;*/
69
+ /* height: auto;*/
70
+ /* padding-left: 8px;*/
71
+ /* margin: 8px 0 0 0;*/
72
+ /*}*/
73
+
74
+ /*预览图片样式*/
75
+ /*/deep/ .van-uploader__preview-image {*/
76
+ /* display: block;*/
77
+ /* width: auto;*/
78
+ /* height: 100px;*/
79
+ /* overflow: hidden;*/
80
+ /* border: 1px solid #515a6e38;*/
81
+ /*}*/
82
+
83
+ /*控制上传功能覆盖区域*/
84
+ /deep/ .van-uploader__input {
85
+ height: 20px;
86
+ width: 20px;
87
+ position: absolute;
88
+ left: 95%;
89
+ }
90
+
91
+ /deep/ .van-uploader__preview {
92
+ margin: 0;
93
+ }
94
+
95
+ /deep/ .van-uploader__preview-image {
96
+ width: auto;
97
+ height: 95px;
98
98
  }
@@ -11,8 +11,7 @@
11
11
  <div slot="right-icon" class="coll-title-icon">
12
12
  <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
13
13
  style="position:absolute;left: 1px;"/>
14
- <lambo-medium-button :disabled="false" :type="type" style="margin-top: -5px" text="删除"
15
- @click="deleteSpart"></lambo-medium-button>
14
+ <lambo-btn :type="'text'" :text="'删除'" :size="'normal'" style="margin-top: -5px" @click="deleteSpart"></lambo-btn>
16
15
  </div>
17
16
  <lambo-edit-single-select :data="singleKv" :default-item="defaultItem" :required="true"
18
17
  :title="'单选框'"></lambo-edit-single-select>
@@ -22,22 +21,20 @@
22
21
  <slot></slot>
23
22
  </van-collapse-item>
24
23
  </van-collapse>
25
- <lambo-big-button :disabled="false" :type="type" text="新增一条" @click="addSpart"></lambo-big-button>
24
+ <lambo-btn :type="'text'" :text="'新增一条'" :size="'big'" @click="addSpart"></lambo-btn>
26
25
  </div>
27
26
  </template>
28
27
  <script>
29
- import LamboBigButton from '../../btn/lambo-big-button.vue'
30
- import LamboMediumButton from '../../btn/lambo-medium-button.vue'
31
28
  import LamboEditSingleSelect from "../../edit/select/lambo-edit-single-select.vue";
32
29
  import LamboEditMultiSelect from "../../edit/select/lambo-edit-multi-select.vue";
33
30
  import LamboEditInput from "../../edit/select/lambo-edit-input.vue";
31
+ import LamboBtn from "../../btn/lambo-btn.vue";
34
32
 
35
33
  export default {
36
34
  name: 'LamboEditList',
37
35
  components: {
36
+ LamboBtn,
38
37
  LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
39
- LamboBigButton,
40
- LamboMediumButton
41
38
  },
42
39
  props: {},
43
40
  data() {
@@ -11,8 +11,7 @@
11
11
  <div slot="right-icon" class="coll-title-icon">
12
12
  <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
13
13
  style="position:absolute;left: 1px;"/>
14
- <lambo-medium-button :disabled="false" :type="type" style="margin-top: -5px" text="删除"
15
- @click="deleteSpart(index)"></lambo-medium-button>
14
+ <lambo-btn :type="'text'" :text="'删除'" :size="'normal'" style="margin-top: -5px" @click="deleteSpart(index)"></lambo-btn>
16
15
  </div>
17
16
  <slot></slot>
18
17
  </van-collapse-item>
@@ -20,18 +19,16 @@
20
19
  </div>
21
20
  </template>
22
21
  <script>
23
- import LamboBigButton from '../../btn/lambo-big-button.vue'
24
- import LamboMediumButton from '../../btn/lambo-medium-button.vue'
25
22
  import LamboEditSingleSelect from "../../edit/select/lambo-edit-single-select.vue";
26
23
  import LamboEditMultiSelect from "../../edit/select/lambo-edit-multi-select.vue";
27
24
  import LamboEditInput from "../../edit/select/lambo-edit-input.vue";
25
+ import LamboBtn from "../../btn/lambo-btn.vue";
28
26
 
29
27
  export default {
30
28
  name: 'LamboEditCardGroup',
31
29
  components: {
32
- LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
33
- LamboBigButton,
34
- LamboMediumButton
30
+ LamboBtn,
31
+ LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect
35
32
  },
36
33
  props: {
37
34
  lineList: {
@@ -1,39 +1,39 @@
1
- .coll-div {
2
- margin-bottom: 8px;
3
- }
4
-
5
- .indicator-title {
6
- display: flex;
7
- align-items: center;
8
- color: var(--scl-blue);
9
- font-size: 14px;
10
- font-family: 微软雅黑, serif Regular;
11
- }
12
-
13
- .indicator-title .color-line {
14
- width: 3px;
15
- height: 14px;
16
- margin-right: 8px;
17
- }
18
-
19
- .coll-title-icon {
20
- justify-content: center;
21
- align-items: center;
22
- align-content: center;
23
- }
24
-
25
- /* 覆盖折叠面板的标题的padding */
26
- /deep/ .van-cell {
27
- padding: 12px 10px;
28
- }
29
-
30
- /* 覆盖去掉折叠面板的标题下面的线 */
31
- /deep/ .van-cell::after {
32
- border: none;
33
- }
34
-
35
- /* 覆盖折叠面板的内容的padding */
36
- /deep/ .van-collapse-item__content {
37
- padding: 0px 0px 0px 0px;
38
- }
39
-
1
+ .coll-div {
2
+ margin-bottom: 8px;
3
+ }
4
+
5
+ .indicator-title {
6
+ display: flex;
7
+ align-items: center;
8
+ color: var(--scl-blue);
9
+ font-size: 14px;
10
+ font-family: 微软雅黑, serif Regular;
11
+ }
12
+
13
+ .indicator-title .color-line {
14
+ width: 3px;
15
+ height: 14px;
16
+ margin-right: 8px;
17
+ }
18
+
19
+ .coll-title-icon {
20
+ justify-content: center;
21
+ align-items: center;
22
+ align-content: center;
23
+ }
24
+
25
+ /* 覆盖折叠面板的标题的padding */
26
+ /deep/ .van-cell {
27
+ padding: 12px 10px;
28
+ }
29
+
30
+ /* 覆盖去掉折叠面板的标题下面的线 */
31
+ /deep/ .van-cell::after {
32
+ border: none;
33
+ }
34
+
35
+ /* 覆盖折叠面板的内容的padding */
36
+ /deep/ .van-collapse-item__content {
37
+ padding: 0px 0px 0px 0px;
38
+ }
39
+
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </div>
18
18
  <div>
19
- <van-popup v-model="showBottom" :style="{ height: '33%' }" position="bottom">
19
+ <van-popup v-model:show="showBottom" :style="{ height: '33%' }" position="bottom">
20
20
  <van-checkbox-group v-model="selectItem.K">
21
21
  <div class="edit-top-div">
22
22
  <van-button class="edit-cancel-btn" size="normal" @click="cancel">取消</van-button>
@@ -137,7 +137,6 @@ export default {
137
137
  changeColor() {
138
138
  let searchRows = document.querySelectorAll('.edit-box')
139
139
  Array.from(searchRows).forEach(function (row, index) {
140
- console.log(index)
141
140
  row.addEventListener('click', function () {
142
141
  Array.from(searchRows).forEach(function (row) {
143
142
  row.style.borderBottom = '1px solid var(--scl-white-2)'
@@ -46,6 +46,7 @@ export default {
46
46
  searchParams: {
47
47
  type: Object
48
48
  },
49
+ testMode: false,
49
50
  },
50
51
  data() {
51
52
  return {
@@ -86,37 +87,55 @@ export default {
86
87
  this.list = [];
87
88
  this.refreshing = false;
88
89
  }
89
-
90
- let params = {offset: this.offset, limit: this.limit, ...this.searchParams}
91
- axios.get(this.url, {params}).then(res => {
92
- console.log("lambo-init-list -- onLoad -- loadData:", res)
93
- if (res && res.code === 1) {
94
- let pageData = res.data
95
-
96
- if (pageData && pageData.rows.length > 0) {
97
- for (let item of pageData.rows) {
98
- if (this.list.length < pageData.total) {
99
- this.list.push(item)
100
- this.finished = false
101
- } else {
102
- this.finished = true // 数据加载完毕
90
+ if (this.testMode === true) {
91
+ let arr = [
92
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
93
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
94
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
95
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
96
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
97
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
98
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
99
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
100
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-01", person:"01", dpt: "储配部", note: "测试"},
101
+ {title: "盐城市亭湖区大树酒业商行", time: "2024-01-02", person:"02", dpt: "储配部", note: "测试"},
102
+ ]
103
+ this.list.push(arr)
104
+ this.finished = false
105
+ this.offset = this.pageNum * 10
106
+ this.pageNum++;
107
+ }else{
108
+ let params = {offset: this.offset, limit: this.limit, ...this.searchParams}
109
+ axios.get(this.url, {params}).then(res => {
110
+ console.log("lambo-init-list -- onLoad -- loadData:", res)
111
+ if (res && res.code === 1) {
112
+ let pageData = res.data
113
+
114
+ if (pageData && pageData.rows.length > 0) {
115
+ for (let item of pageData.rows) {
116
+ if (this.list.length < pageData.total) {
117
+ this.list.push(item)
118
+ this.finished = false
119
+ } else {
120
+ this.finished = true // 数据加载完毕
121
+ }
103
122
  }
123
+ this.offset = this.pageNum * 10
124
+ this.pageNum++;
125
+ this.finishedTxt = "没有更多了"
126
+ } else {
127
+ this.finished = true; // 数据加载完毕
104
128
  }
105
- this.offset = this.pageNum * 10
106
- this.pageNum++;
107
- this.finishedTxt = "没有更多了"
129
+ this.loading = false; // 加载状态结束
108
130
  } else {
109
- this.finished = true; // 数据加载完毕
131
+ console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]数据失败", res)
132
+ Toast.fail("查询[" + this.title + "]数据失败:" + res.data || '')
110
133
  }
111
- this.loading = false; // 加载状态结束
112
- } else {
113
- console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]数据失败", res)
114
- Toast.fail("查询[" + this.title + "]数据失败:" + res.data || '')
115
- }
116
- }).catch(err => {
117
- console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]异常:", err)
118
- Toast.fail("查询[" + this.url + "]数据异常")
119
- })
134
+ }).catch(err => {
135
+ console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]异常:", err)
136
+ Toast.fail("查询[" + this.url + "]数据异常")
137
+ })
138
+ }
120
139
  },
121
140
  getListHeight() {
122
141
  const windowHeight = window.innerHeight;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wl-design-mobile",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  </template>
17
17
  <script>
18
- import {deepCopy} from '@/libs/assist'
18
+ import {deepCopy} from '../util/assist'
19
19
  import moment from 'moment'
20
20
  import LamboRequiredRedStar from '../icon/lambo-required-red-star.vue'
21
21
  import LamboVectorIcon from '../icon/lambo-vector-icon.vue'