wl-design-mobile 0.0.3 → 0.0.5

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,124 +1,127 @@
1
- .edit-box {
2
- min-height: 70px;
3
- display: flex;
4
- justify-content: space-between;
5
- padding: 12px 14px;
6
- border-bottom: 1px solid var(--scl-white-2);
7
- background-color: var(--scl-white-1);
8
- }
9
-
10
- .edit-left-box {
11
- width: 100%;
12
- }
13
-
14
- /* 覆盖value的padding */
15
- .edit-left-box /deep/ .van-cell {
16
- padding: 0;
17
- }
18
-
19
- .edit-left-top {
20
- display: flex;
21
- align-items: center;
22
- height: 16px;
23
- margin-bottom: 12px
24
- }
25
-
26
- .edit-red-icon {
27
- margin-right: 4px
28
- }
29
-
30
- .edit-title {
31
- font-size: 12px;
32
- font-family: Regular;
33
- color: var(--scl-gray-2)
34
- }
35
-
36
- .edit-lambo-input {
37
- border: none;
38
- outline: none;
39
- background: none;
40
- height: 18px;
41
- font-size: 14px;
42
- color: var(--scl-gray-5);
43
- display: flex;
44
- justify-content: flex-start;
45
- align-items: center;
46
- flex: 1;
47
- }
48
-
49
- .edit-lambo-input-textarea {
50
- border: none;
51
- outline: none;
52
- background: none;
53
- font-size: 14px;
54
- color: var(--scl-gray-5);
55
- display: flex;
56
- justify-content: flex-start;
57
- align-items: center;
58
- flex: 1;
59
- }
60
-
61
- .edit-right-icon {
62
- display: flex;
63
- align-items: center
64
- }
65
-
66
-
67
- .edit-top-div {
68
- display: flex;
69
- justify-content: space-between;
70
- height: 44px;
71
- line-height: 44px;
72
- width: 100%;
73
- position: fixed;
74
- z-index: 300;
75
- }
76
-
77
- .edit-cancel-btn {
78
- border: none;
79
- color: var(--scl-gray-3);
80
- }
81
-
82
- .edit-confirm-btn {
83
- border: none;
84
- color: var(--scl-blue);
85
- }
86
-
87
- .edit-select-title {
88
- font-size: 16px;
89
- font-weight: bold;
90
- }
91
-
92
- /*修改单选多选的滚动条样式*/
93
- /deep/ .van-radio-group {
94
- position: relative;
95
- }
96
-
97
- /*修改单选多选的滚动条样式*/
98
- /deep/ .van-cell-group {
99
- padding-top: 44px;
100
- }
101
-
102
- /*修改单选多选的滚动条样式*/
103
- /deep/ .van-cell:first-child {
104
- padding-top: 10px;
105
- }
106
-
107
-
108
- /*滚动条样式*/
109
- /deep/ ::-webkit-scrollbar {
110
- width: 6px;
111
- }
112
-
113
- /*滚动条样式*/
114
- /deep/ ::-webkit-scrollbar-thumb {
115
- border-radius: var(--ind-border-radius-xl);
116
- background: rgba(45, 140, 240, 0.6);
117
- }
118
-
119
- /*滚动条样式*/
120
- /deep/ ::-webkit-scrollbar-track {
121
- -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
122
- border-radius: var(--ind-border-radius-xl);
123
- background: rgba(231, 242, 250, 0.4);
124
- }
1
+ .edit-box {
2
+ min-height: 50px;
3
+ height: auto;
4
+ display: flex;
5
+ justify-content: space-between;
6
+ padding: 12px 0;
7
+ border-bottom: 1px solid var(--scl-white-2);
8
+ background-color: var(--scl-white-1);
9
+ }
10
+
11
+ .edit-left-box {
12
+ width: 100%;
13
+ }
14
+
15
+ /* 覆盖value的padding */
16
+ .edit-left-box /deep/ .van-cell {
17
+ padding: 0;
18
+ }
19
+
20
+ .edit-left-top {
21
+ display: flex;
22
+ align-items: center;
23
+ height: 16px;
24
+ padding: 0 15px;
25
+ margin-bottom: 12px
26
+ }
27
+
28
+ .edit-red-icon {
29
+ margin-right: 4px
30
+ }
31
+
32
+ .edit-title {
33
+ font-size: 12px;
34
+ font-family: Regular;
35
+ color: var(--scl-gray-2)
36
+ }
37
+
38
+ .edit-lambo-input {
39
+ border: none;
40
+ outline: none;
41
+ background: none;
42
+ height: 18px;
43
+ font-size: 14px;
44
+ color: var(--scl-gray-5);
45
+ display: flex;
46
+ justify-content: flex-start;
47
+ align-items: center;
48
+ flex: 1;
49
+ margin-right: 8px;
50
+ }
51
+
52
+ .edit-lambo-input-textarea {
53
+ border: none;
54
+ outline: none;
55
+ background: none;
56
+ font-size: 14px;
57
+ color: var(--scl-gray-5);
58
+ display: flex;
59
+ justify-content: flex-start;
60
+ align-items: center;
61
+ flex: 1;
62
+ }
63
+
64
+ .edit-right-icon {
65
+ display: flex;
66
+ align-items: center
67
+ }
68
+
69
+
70
+ .edit-top-div {
71
+ display: flex;
72
+ justify-content: space-between;
73
+ height: 44px;
74
+ line-height: 44px;
75
+ width: 100%;
76
+ position: fixed;
77
+ z-index: 300;
78
+ }
79
+
80
+ .edit-cancel-btn {
81
+ border: none;
82
+ color: var(--scl-gray-3);
83
+ }
84
+
85
+ .edit-confirm-btn {
86
+ border: none;
87
+ color: var(--scl-blue);
88
+ }
89
+
90
+ .edit-select-title {
91
+ font-size: 16px;
92
+ font-weight: bold;
93
+ }
94
+
95
+ /*修改单选多选的滚动条样式*/
96
+ /deep/ .van-radio-group {
97
+ position: relative;
98
+ }
99
+
100
+ /*修改单选多选的滚动条样式*/
101
+ /deep/ .van-cell-group {
102
+ padding-top: 44px;
103
+ }
104
+
105
+ /*修改单选多选的滚动条样式*/
106
+ /deep/ .van-cell:first-child {
107
+ padding-top: 10px;
108
+ }
109
+
110
+
111
+ /*滚动条样式*/
112
+ /deep/ ::-webkit-scrollbar {
113
+ width: 6px;
114
+ }
115
+
116
+ /*滚动条样式*/
117
+ /deep/ ::-webkit-scrollbar-thumb {
118
+ border-radius: var(--ind-border-radius-xl);
119
+ background: rgba(45, 140, 240, 0.6);
120
+ }
121
+
122
+ /*滚动条样式*/
123
+ /deep/ ::-webkit-scrollbar-track {
124
+ -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
125
+ border-radius: var(--ind-border-radius-xl);
126
+ background: rgba(231, 242, 250, 0.4);
127
+ }
@@ -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.3",
3
+ "version": "0.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
package/styles/base.less CHANGED
@@ -33,6 +33,7 @@
33
33
  --scl-gray-4: #999999;
34
34
  --scl-gray-5: #CCCCCC;
35
35
  --scl-gray-6: #DDDDDD;
36
+ --scl-gray-7: #F5F5F5;
36
37
 
37
38
  --scl-red-1: #e84c6b;
38
39
  --scl-red-2: #fb6d5f;
@@ -1,125 +0,0 @@
1
- <template>
2
- <div class="btns">
3
- <ul class="big-btn-ul">
4
- <van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading" :plain="plain"
5
- :type="type" class="big-btn" size="large" @click="handleClick"> {{ text }}
6
- <slot name="extend"></slot>
7
- </van-button>
8
-
9
- </ul>
10
- </div>
11
- </template>
12
- <script>
13
-
14
- export default {
15
- name: 'LamboBigButton',
16
- components: {},
17
- props: {
18
- /**
19
- * 填充类型按钮 plain传false type传primary
20
- * 线框类型按钮 plain传true type传info
21
- * 无框类型按钮 plain传false type传default
22
- */
23
- type: {
24
- type: String,
25
- default: 'primary'
26
- },
27
- plain: {
28
- type: Boolean,
29
- default: false
30
- },
31
- text: {
32
- type: String,
33
- default: '大号按钮'
34
- },
35
- position: {
36
- type: String,
37
- default: 'left'
38
- },
39
- disabled: {
40
- type: Boolean,
41
- default: false
42
- },
43
- icon: {
44
- type: String,
45
- default: null
46
- },
47
- loading: {
48
- type: Boolean,
49
- default: false
50
- }
51
- },
52
- data() {
53
- return {}
54
- },
55
- methods: {
56
- handleClick(event) {
57
- this.$emit('click', event);
58
- }
59
- },
60
- created() {
61
-
62
- },
63
- mounted() {
64
-
65
- }
66
- }
67
- </script>
68
- <style scoped>
69
- @import "../styles/index.less";
70
-
71
- .big-btn {
72
- height: 38px;
73
- border-radius: 3px;
74
- }
75
-
76
- /*填充按钮primary类型按钮样式 */
77
- /deep/ .big-btn-ul .van-button--primary {
78
- background: var(--scl-blue);
79
- border: 1px solid var(--scl-blue);
80
- }
81
-
82
- /*填充按钮primary类型不可用按钮样式 */
83
- /deep/ .big-btn-ul .van-button--disabled {
84
- cursor: not-allowed;
85
- opacity: 1;
86
- background-color: var(--scl-gray-6);
87
- color: #000000;
88
- border: 0px solid var(--scl-gray-6);
89
- }
90
-
91
- /*按钮文字样式*/
92
- /deep/ .big-btn-ul .van-button__text {
93
- font-size: 14px;
94
- padding: 10px 0px;
95
- font-family: 微软雅黑, serif Regular;
96
- }
97
-
98
- /*线框按钮按钮样式*/
99
- /deep/ .big-btn-ul .van-button--plain.van-button--info {
100
- color: var(--scl-blue);
101
- border: 1px solid var(--scl-blue);
102
- }
103
-
104
- /*线框按钮不可用按钮样式*/
105
- /deep/ .big-btn-ul .van-button--plain.van-button--info.van-button--disabled {
106
- color: #000000;
107
- border: 1px solid var(--scl-gray-6);
108
- background-color: #ffffff;
109
- }
110
-
111
- /*无框类型按钮样式 */
112
- /deep/ .big-btn-ul .van-button--default {
113
- background: var(--scl-white-1);
114
- border: 1px solid var(--scl-white-1);
115
- color: var(--scl-blue);
116
- }
117
-
118
- /*无框按钮不可用按钮样式*/
119
- /deep/ .big-btn-ul .van-button--default.van-button--disabled {
120
- color: #000000;
121
- border: 1px solid var(--scl-white-1);
122
- background-color: var(--scl-white-1);
123
- }
124
-
125
- </style>
@@ -1,47 +0,0 @@
1
- <template>
2
- <div class="button-group">
3
- <slot name="opt"></slot>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- name: 'LamboButtonGroup',
10
- components: {},
11
- props: {},
12
- data() {
13
- return {}
14
- },
15
- methods: {},
16
- created() {
17
-
18
- },
19
- mounted() {
20
-
21
- }
22
- }
23
- </script>
24
- <style scoped>
25
- @import "../styles/index.less";
26
-
27
- .button-group {
28
- display: flex;
29
- padding: 0 14px;
30
- background-color: var(--scl-white-1)
31
- }
32
-
33
- .button-group-line {
34
- width: 100%;
35
- height: 1px;
36
- border-bottom: 1px solid var(--scl-white-2);
37
- }
38
-
39
- .button-group /deep/ .btns {
40
- flex: 1;
41
- text-align: center;
42
- }
43
-
44
- .button-group /deep/ .btns:nth-child(n+2) {
45
- border-left: 1px solid var(--scl-white-2);
46
- }
47
- </style>
@@ -1,124 +0,0 @@
1
- <template>
2
- <div class="btns">
3
- <ul class="mid-btn-ul">
4
- <van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading" :plain="plain"
5
- :type="type" class="mid-btn" size="normal" @click="handleClick"> {{ text }}
6
- <slot name="extend"></slot>
7
- </van-button>
8
- </ul>
9
- </div>
10
- </template>
11
- <script>
12
-
13
- export default {
14
- name: 'LamboMediumButton',
15
- components: {},
16
- props: {
17
- /**
18
- * 填充类型按钮 plain传false type传primary
19
- * 线框类型按钮 plain传true type传info
20
- * 无框类型按钮 plain传false type传default
21
- */
22
- type: {
23
- type: String,
24
- default: 'primary'
25
- },
26
- plain: {
27
- type: Boolean,
28
- default: false
29
- },
30
- text: {
31
- type: String,
32
- default: '中号按钮'
33
- },
34
- position: {
35
- type: String,
36
- default: 'left'
37
- },
38
- disabled: {
39
- type: Boolean,
40
- default: false
41
- },
42
- icon: {
43
- type: String,
44
- default: null
45
- },
46
- loading: {
47
- type: Boolean,
48
- default: false
49
- }
50
- },
51
- data() {
52
- return {}
53
- },
54
- methods: {
55
- handleClick(event) {
56
- this.$emit('click', event);
57
- }
58
- },
59
- created() {
60
-
61
- },
62
- mounted() {
63
-
64
- }
65
- }
66
- </script>
67
- <style scoped>
68
- @import "../styles/index.less";
69
-
70
- .mid-btn {
71
- height: 30px;
72
- border-radius: 3px;
73
- }
74
-
75
- /*填充按钮primary类型按钮样式 */
76
- /deep/ .mid-btn-ul .van-button--primary {
77
- background: var(--scl-blue);
78
- border: 1px solid var(--scl-blue);
79
- }
80
-
81
- /*填充按钮primary类型不可用按钮样式 */
82
- /deep/ .mid-btn-ul .van-button--disabled {
83
- cursor: not-allowed;
84
- opacity: 1;
85
- background-color: var(--scl-gray-6);
86
- color: #000000;
87
- border: 0px solid var(--scl-gray-6);
88
- }
89
-
90
- /*按钮文字样式*/
91
- /deep/ .mid-btn-ul .van-button__text {
92
- font-size: 12px;
93
- padding: 10px 0px;
94
- font-family: 微软雅黑, serif Regular;
95
- }
96
-
97
- /*线框按钮按钮样式*/
98
- /deep/ .mid-btn-ul .van-button--plain.van-button--info {
99
- color: var(--scl-blue);
100
- border: 1px solid var(--scl-blue);
101
- }
102
-
103
- /*线框按钮不可用按钮样式*/
104
- /deep/ .mid-btn-ul .van-button--plain.van-button--info.van-button--disabled {
105
- color: #000000;
106
- border: 1px solid var(--scl-gray-6);
107
- background-color: #ffffff;
108
- }
109
-
110
- /*无框类型按钮样式 */
111
- /deep/ .mid-btn-ul .van-button--default {
112
- background: var(--scl-white-1);
113
- border: 1px solid var(--scl-white-1);
114
- color: var(--scl-blue);
115
- }
116
-
117
- /*无框按钮不可用按钮样式*/
118
- /deep/ .mid-btn-ul .van-button--default.van-button--disabled {
119
- color: #000000;
120
- border: 1px solid var(--scl-white-1);
121
- background-color: var(--scl-white-1);
122
- }
123
-
124
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <div>
3
- <div slot="btns"></div>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- export default {
9
- name: 'LamboSmallButtonGroup',
10
- components: {},
11
- props: {},
12
- data() {
13
- return {
14
-
15
- }
16
- },
17
- methods: {
18
-
19
- },
20
- created() {
21
-
22
- },
23
- mounted() {
24
-
25
- }
26
- }
27
- </script>
28
- <style scoped>
29
- @import "../styles/index.less";
30
-
31
- </style>