wl-design-mobile 0.0.1 → 0.0.2

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.
Files changed (53) hide show
  1. package/api/doc.js +25 -0
  2. package/api/x1.js +56 -0
  3. package/btn/lambo-big-button.vue +125 -121
  4. package/btn/lambo-button-group.vue +47 -47
  5. package/btn/lambo-medium-button.vue +123 -121
  6. package/btn/lambo-small-button-group.vue +31 -31
  7. package/btn/lambo-small-button-select.vue +53 -53
  8. package/btn/lambo-small-button.vue +123 -121
  9. package/card-item/card-row-icon.vue +0 -1
  10. package/card-item/filtrate-row.vue +1 -0
  11. package/collapse/lambo-collapse.vue +80 -80
  12. package/config/config.js +14 -0
  13. package/detail/lambo-detail-grid.vue +87 -57
  14. package/detail/lambo-detail-row.vue +59 -59
  15. package/doc/file/lambo-file-upload.vue +176 -179
  16. package/doc/file/styles/css/index.css +118 -118
  17. package/doc/img/lambo-img-upload.vue +109 -109
  18. package/edit/list/Lambo-edit-list.vue +90 -90
  19. package/edit/list/lambo-edit-card-group.vue +103 -103
  20. package/edit/select/lambo-edit-date-range.vue +135 -135
  21. package/edit/select/lambo-edit-date-time.vue +105 -0
  22. package/edit/select/lambo-edit-date.vue +108 -108
  23. package/edit/select/lambo-edit-input-textarea.vue +92 -92
  24. package/edit/select/lambo-edit-input.vue +92 -92
  25. package/edit/select/lambo-edit-multi-select.vue +160 -160
  26. package/edit/select/lambo-edit-single-select.vue +153 -153
  27. package/flow/lambo-flow-detail.vue +30 -30
  28. package/flow/lambo-flow-edit.vue +30 -30
  29. package/icon/lambo-required-red-star.vue +47 -47
  30. package/list/lambo-list.vue +1 -1
  31. package/nav/lambo-top-nav.vue +89 -89
  32. package/package.json +4 -2
  33. package/search/lambo-date-range-page.vue +191 -191
  34. package/search/lambo-date-range.vue +107 -107
  35. package/search/lambo-input.vue +74 -74
  36. package/search/lambo-multi-select.vue +125 -125
  37. package/search/lambo-org-select-page.vue +109 -109
  38. package/search/lambo-search-box.vue +55 -55
  39. package/search/lambo-single-select.vue +119 -119
  40. package/styles/base.less +75 -75
  41. package/styles/components/btn.less +7 -7
  42. package/styles/components/search.less +33 -33
  43. package/styles/components/tag.less +181 -181
  44. package/styles/index.less +4 -4
  45. package/tag/lambo-tag.vue +25 -0
  46. package/title/lambo-title1.vue +129 -129
  47. package/title/lambo-title2.vue +37 -37
  48. package/util/assist.js +43 -0
  49. package/util/axios/cacheconf.js +19 -0
  50. package/util/axios/index.js +11 -0
  51. package/util/axios/interceptors.js +101 -0
  52. package/util/bus.js +4 -0
  53. package/util/token.js +36 -0
@@ -1,103 +1,103 @@
1
- <template>
2
- <div>
3
- <van-collapse v-model="activeNames">
4
- <van-collapse-item :name="activeNames.toString()">
5
- <div slot="title">
6
- <div class="indicator-title">
7
- <div class="color-line"/>
8
- {{ title + (index + 1) }}
9
- </div>
10
- </div>
11
- <div slot="right-icon" class="coll-title-icon">
12
- <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
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>
16
- </div>
17
- <slot></slot>
18
- </van-collapse-item>
19
- </van-collapse>
20
- </div>
21
- </template>
22
- <script>
23
- import LamboBigButton from '@/components/lambo/btn/lambo-big-button.vue'
24
- import LamboMediumButton from '@/components/lambo/btn/lambo-medium-button.vue'
25
- import LamboEditSingleSelect from "@/components/lambo/edit/select/lambo-edit-single-select.vue";
26
- import LamboEditMultiSelect from "@/components/lambo/edit/select/lambo-edit-multi-select.vue";
27
- import LamboEditInput from "@/components/lambo/edit/select/lambo-edit-input.vue";
28
-
29
- export default {
30
- name: 'LamboEditCardGroup',
31
- components: {
32
- LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
33
- LamboBigButton,
34
- LamboMediumButton
35
- },
36
- props: {
37
- lineList: {
38
- type: Array,
39
- default: () => []
40
- },
41
- title: {
42
- type: String,
43
- default: '',
44
- },
45
- index: {
46
- type: Number,
47
- default:
48
- 1,
49
- }
50
- },
51
- // watch: {
52
- // lineList: function (val, oldVal) {
53
- // },
54
- // },
55
- data() {
56
- return {
57
- type: 'default',
58
- // lineList: [],
59
- activeNames: ['0'],
60
- singleKv: [],
61
- defaultItem: {},
62
-
63
- multiKv: [],
64
- multiDefaultItem: {},
65
- multiIcon: 'boxs.png',
66
- }
67
- }
68
- ,
69
- methods: {
70
- deleteSpart(index) {
71
- console.log("删除--", index)
72
- this.lineList.splice(index, 1);
73
- // for (var i = 0; i < this.materialChangeList.length; i++) {
74
- // let obj = this.materialChangeList[i];
75
- // if (obj.line_no === item.line_no) {
76
- // this.materialChangeList.splice(i, 1);
77
- // }
78
- // }
79
- // for (var i = 0; i < this.materialChangeList.length; i++) {
80
- // let obj = this.materialChangeList[i];
81
- // obj.line_no = i + 1;
82
- // obj.title = '第' + obj.line_no + '个物资';
83
- // }
84
- }
85
- ,
86
- addSpart() {
87
- this.lineList.push({})
88
- }
89
- }
90
- ,
91
- created() {
92
-
93
- }
94
- ,
95
- mounted() {
96
-
97
- }
98
- }
99
- </script>
100
- <style scoped>
101
- @import "../../styles/index.less";
102
- @import './styles/css/index.css';
103
- </style>
1
+ <template>
2
+ <div>
3
+ <van-collapse v-model="activeNames">
4
+ <van-collapse-item :name="activeNames.toString()">
5
+ <div slot="title">
6
+ <div class="indicator-title">
7
+ <div class="color-line"/>
8
+ {{ title + (index + 1) }}
9
+ </div>
10
+ </div>
11
+ <div slot="right-icon" class="coll-title-icon">
12
+ <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
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>
16
+ </div>
17
+ <slot></slot>
18
+ </van-collapse-item>
19
+ </van-collapse>
20
+ </div>
21
+ </template>
22
+ <script>
23
+ import LamboBigButton from '../../btn/lambo-big-button.vue'
24
+ import LamboMediumButton from '../../btn/lambo-medium-button.vue'
25
+ import LamboEditSingleSelect from "../../edit/select/lambo-edit-single-select.vue";
26
+ import LamboEditMultiSelect from "../../edit/select/lambo-edit-multi-select.vue";
27
+ import LamboEditInput from "../../edit/select/lambo-edit-input.vue";
28
+
29
+ export default {
30
+ name: 'LamboEditCardGroup',
31
+ components: {
32
+ LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
33
+ LamboBigButton,
34
+ LamboMediumButton
35
+ },
36
+ props: {
37
+ lineList: {
38
+ type: Array,
39
+ default: () => []
40
+ },
41
+ title: {
42
+ type: String,
43
+ default: '',
44
+ },
45
+ index: {
46
+ type: Number,
47
+ default:
48
+ 1,
49
+ }
50
+ },
51
+ // watch: {
52
+ // lineList: function (val, oldVal) {
53
+ // },
54
+ // },
55
+ data() {
56
+ return {
57
+ type: 'default',
58
+ // lineList: [],
59
+ activeNames: ['0'],
60
+ singleKv: [],
61
+ defaultItem: {},
62
+
63
+ multiKv: [],
64
+ multiDefaultItem: {},
65
+ multiIcon: 'boxs.png',
66
+ }
67
+ }
68
+ ,
69
+ methods: {
70
+ deleteSpart(index) {
71
+ console.log("删除--", index)
72
+ this.lineList.splice(index, 1);
73
+ // for (var i = 0; i < this.materialChangeList.length; i++) {
74
+ // let obj = this.materialChangeList[i];
75
+ // if (obj.line_no === item.line_no) {
76
+ // this.materialChangeList.splice(i, 1);
77
+ // }
78
+ // }
79
+ // for (var i = 0; i < this.materialChangeList.length; i++) {
80
+ // let obj = this.materialChangeList[i];
81
+ // obj.line_no = i + 1;
82
+ // obj.title = '第' + obj.line_no + '个物资';
83
+ // }
84
+ }
85
+ ,
86
+ addSpart() {
87
+ this.lineList.push({})
88
+ }
89
+ }
90
+ ,
91
+ created() {
92
+
93
+ }
94
+ ,
95
+ mounted() {
96
+
97
+ }
98
+ }
99
+ </script>
100
+ <style scoped>
101
+ @import "../../styles/index.less";
102
+ @import './styles/css/index.css';
103
+ </style>
@@ -1,135 +1,135 @@
1
- <template>
2
- <div class="edit-box">
3
- <div class="edit-left-box">
4
- <div class="edit-left-top">
5
- <div v-if="required" class="edit-red-icon">
6
- <lambo-required-red-star :required="required"></lambo-required-red-star>
7
- </div>
8
- <div class="edit-title">{{ title }}</div>
9
- </div>
10
- <van-field v-model="valName" :placeholder="placeholder" :readonly="true"
11
- class="edit-lambo-input" clear-trigger="focus"></van-field>
12
- <van-calendar v-model:show="showBottom" :default-date="defaultDateArr" :max-date="maxDate" :min-date="minDate"
13
- :style="{ maxHeight: '65%' }" color="#0070D2" type="range" @confirm="onConfirm"/>
14
- </div>
15
- <div v-if="icon" class="edit-right-icon">
16
- <lambo-vector-icon :icon="icon" @click="changeColor"></lambo-vector-icon>
17
- </div>
18
- </div>
19
- </template>
20
- <script>
21
- import LamboVectorIcon from '@/components/lambo/icon/lambo-vector-icon.vue'
22
- import LamboRequiredRedStar from '@/components/lambo/icon/lambo-required-red-star.vue'
23
- import moment from "moment/moment";
24
- import {deepCopy} from "@/libs/assist";
25
-
26
- export default {
27
- name: 'LamboEditDateRange',
28
- components: {LamboRequiredRedStar, LamboVectorIcon},
29
- props: {
30
- icon: {
31
- type: String,
32
- default: "date.png",
33
- },
34
- required: {
35
- type: Boolean,
36
- default: false,
37
- },
38
- title: {
39
- type: String,
40
- default: false,
41
- },
42
- placeholder: {
43
- type: String,
44
- default: '请选择',
45
- },
46
- defaultDate: {
47
- type: Array,
48
- default: () => []
49
- }
50
- },
51
- data() {
52
- return {
53
- valName: '',
54
- showBottom: false,
55
- selectItem: {
56
- date: [],
57
- date8: []
58
- },
59
- minDate: new Date((new Date()).getFullYear() - 1, (new Date()).getMonth() + 1, (new Date()).getDate()),
60
- maxDate: new Date((new Date()).getFullYear() + 1, (new Date()).getMonth() + 1, (new Date()).getDate()),
61
- defaultDateArr: []
62
- }
63
- },
64
- methods: {
65
- changeColor() {
66
- this.showBottom = !this.showBottom
67
- let searchRows = document.querySelectorAll('.edit-box')
68
- Array.from(searchRows).forEach(function (row, index) {
69
- row.addEventListener('click', function () {
70
- Array.from(searchRows).forEach(function (row) {
71
- row.style.borderBottom = '1px solid var(--scl-white-2)'
72
- })
73
- row.style.borderBottom = '1px solid var(--scl-blue)'
74
- })
75
- })
76
- },
77
- onConfirm(time) {
78
- console.log(" onConfirm time:", time)
79
- if (Array.isArray(time)) {
80
- if (time.length === 2) {
81
- let startDate1 = moment(time[0]).format("yyyyMMDD") || ''
82
- let endDate1 = moment(time[1]).format("yyyyMMDD") || ''
83
- let startDateFormat = moment(time[0]).format('yyyy-MM-DD') || ''
84
- let endDateFormat = moment(time[1]).format('yyyy-MM-DD') || ''
85
- if (startDate1 && endDate1) {
86
- this.selectItem.date8 = [startDate1, endDate1]
87
- this.selectItem.date = [startDateFormat, endDateFormat]
88
- this.valName = startDateFormat + "~" + endDateFormat
89
- this.$emit("on-ok", this.selectItem)
90
- }
91
- }
92
- }
93
- this.showBottom = false
94
- },
95
- initDefaultVal() {
96
- // 默认值处理
97
- if (this.defaultDate && Array.isArray(this.defaultDate) && this.defaultDate.length === 2) {
98
- let defDateArr = this.defaultDate
99
- if (defDateArr && defDateArr.length === 2 && defDateArr[0] && defDateArr[1]) {
100
- this.selectItem.date8 = deepCopy(defDateArr)
101
-
102
- let startDate8 = defDateArr[0]
103
- let endDate8 = defDateArr[1]
104
- let startDateFormat = moment(startDate8).format('yyyy-MM-DD') || ''
105
- let endDateFormat = moment(endDate8).format('yyyy-MM-DD') || ''
106
-
107
- let startDate1 = moment(startDate8).format("yyyyMMDD") || ''
108
- let endDate1 = moment(endDate8).format("yyyyMMDD") || ''
109
-
110
- this.selectItem.date[0] = startDateFormat
111
- this.selectItem.date[1] = endDateFormat
112
-
113
- this.selectItem.date8 = [startDate1, endDate1]
114
- this.valName = startDateFormat + " ~ " + endDateFormat
115
-
116
- let startDateObj = moment(startDate8).toDate()
117
- let endDateObj = moment(endDate8).toDate()
118
- this.defaultDateArr = [startDateObj, endDateObj]
119
-
120
- this.$emit("on-ok", this.selectItem)
121
- }
122
- }
123
- }
124
- },
125
- created() {
126
- this.initDefaultVal()
127
- },
128
- mounted() {
129
- }
130
- }
131
- </script>
132
- <style scoped>
133
- @import "../../styles/index.less";
134
- @import "styles/css/index.css";
135
- </style>
1
+ <template>
2
+ <div class="edit-box">
3
+ <div class="edit-left-box">
4
+ <div class="edit-left-top">
5
+ <div v-if="required" class="edit-red-icon">
6
+ <lambo-required-red-star :required="required"></lambo-required-red-star>
7
+ </div>
8
+ <div class="edit-title">{{ title }}</div>
9
+ </div>
10
+ <van-field v-model="valName" :placeholder="placeholder" :readonly="true"
11
+ class="edit-lambo-input" clear-trigger="focus"></van-field>
12
+ <van-calendar v-model:show="showBottom" :default-date="defaultDateArr" :max-date="maxDate" :min-date="minDate"
13
+ :style="{ maxHeight: '65%' }" color="#0070D2" type="range" @confirm="onConfirm"/>
14
+ </div>
15
+ <div v-if="icon" class="edit-right-icon">
16
+ <lambo-vector-icon :icon="icon" @click="changeColor"></lambo-vector-icon>
17
+ </div>
18
+ </div>
19
+ </template>
20
+ <script>
21
+ import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
22
+ import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
23
+ import moment from "moment/moment";
24
+ import {deepCopy} from "../util/assist";
25
+
26
+ export default {
27
+ name: 'LamboEditDateRange',
28
+ components: {LamboRequiredRedStar, LamboVectorIcon},
29
+ props: {
30
+ icon: {
31
+ type: String,
32
+ default: "date.png",
33
+ },
34
+ required: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
38
+ title: {
39
+ type: String,
40
+ default: false,
41
+ },
42
+ placeholder: {
43
+ type: String,
44
+ default: '请选择',
45
+ },
46
+ defaultDate: {
47
+ type: Array,
48
+ default: () => []
49
+ }
50
+ },
51
+ data() {
52
+ return {
53
+ valName: '',
54
+ showBottom: false,
55
+ selectItem: {
56
+ date: [],
57
+ date8: []
58
+ },
59
+ minDate: new Date((new Date()).getFullYear() - 1, (new Date()).getMonth() + 1, (new Date()).getDate()),
60
+ maxDate: new Date((new Date()).getFullYear() + 1, (new Date()).getMonth() + 1, (new Date()).getDate()),
61
+ defaultDateArr: []
62
+ }
63
+ },
64
+ methods: {
65
+ changeColor() {
66
+ this.showBottom = !this.showBottom
67
+ let searchRows = document.querySelectorAll('.edit-box')
68
+ Array.from(searchRows).forEach(function (row, index) {
69
+ row.addEventListener('click', function () {
70
+ Array.from(searchRows).forEach(function (row) {
71
+ row.style.borderBottom = '1px solid var(--scl-white-2)'
72
+ })
73
+ row.style.borderBottom = '1px solid var(--scl-blue)'
74
+ })
75
+ })
76
+ },
77
+ onConfirm(time) {
78
+ console.log(" onConfirm time:", time)
79
+ if (Array.isArray(time)) {
80
+ if (time.length === 2) {
81
+ let startDate1 = moment(time[0]).format("yyyyMMDD") || ''
82
+ let endDate1 = moment(time[1]).format("yyyyMMDD") || ''
83
+ let startDateFormat = moment(time[0]).format('yyyy-MM-DD') || ''
84
+ let endDateFormat = moment(time[1]).format('yyyy-MM-DD') || ''
85
+ if (startDate1 && endDate1) {
86
+ this.selectItem.date8 = [startDate1, endDate1]
87
+ this.selectItem.date = [startDateFormat, endDateFormat]
88
+ this.valName = startDateFormat + "~" + endDateFormat
89
+ this.$emit("on-ok", this.selectItem)
90
+ }
91
+ }
92
+ }
93
+ this.showBottom = false
94
+ },
95
+ initDefaultVal() {
96
+ // 默认值处理
97
+ if (this.defaultDate && Array.isArray(this.defaultDate) && this.defaultDate.length === 2) {
98
+ let defDateArr = this.defaultDate
99
+ if (defDateArr && defDateArr.length === 2 && defDateArr[0] && defDateArr[1]) {
100
+ this.selectItem.date8 = deepCopy(defDateArr)
101
+
102
+ let startDate8 = defDateArr[0]
103
+ let endDate8 = defDateArr[1]
104
+ let startDateFormat = moment(startDate8).format('yyyy-MM-DD') || ''
105
+ let endDateFormat = moment(endDate8).format('yyyy-MM-DD') || ''
106
+
107
+ let startDate1 = moment(startDate8).format("yyyyMMDD") || ''
108
+ let endDate1 = moment(endDate8).format("yyyyMMDD") || ''
109
+
110
+ this.selectItem.date[0] = startDateFormat
111
+ this.selectItem.date[1] = endDateFormat
112
+
113
+ this.selectItem.date8 = [startDate1, endDate1]
114
+ this.valName = startDateFormat + " ~ " + endDateFormat
115
+
116
+ let startDateObj = moment(startDate8).toDate()
117
+ let endDateObj = moment(endDate8).toDate()
118
+ this.defaultDateArr = [startDateObj, endDateObj]
119
+
120
+ this.$emit("on-ok", this.selectItem)
121
+ }
122
+ }
123
+ }
124
+ },
125
+ created() {
126
+ this.initDefaultVal()
127
+ },
128
+ mounted() {
129
+ }
130
+ }
131
+ </script>
132
+ <style scoped>
133
+ @import "../../styles/index.less";
134
+ @import "styles/css/index.css";
135
+ </style>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <div class="edit-box">
3
+ <div class="edit-left-box">
4
+ <div class="edit-left-top">
5
+ <div v-if="required" class="edit-red-icon">
6
+ <lambo-required-red-star :required="required"></lambo-required-red-star>
7
+ </div>
8
+ <div class="edit-title">{{ title }}</div>
9
+ </div>
10
+ <van-field v-model="valName" :placeholder="placeholder" :readonly="true"
11
+ class="edit-lambo-input" clear-trigger="focus"></van-field>
12
+ <van-popup v-model="showBottom" position="bottom" :style="{ maxHeight: '33%' }">
13
+ <van-datetime-picker :type="type" title="选择时间" @confirm="onConfirm"
14
+ @cancel="onCancelTime"/>
15
+ </van-popup>
16
+ </div>
17
+ <div v-if="icon" class="edit-right-icon">
18
+ <lambo-vector-icon :icon="icon" @click="changeColor"></lambo-vector-icon>
19
+ </div>
20
+ </div>
21
+ </template>
22
+ <script>
23
+ import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
24
+ import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
25
+ import moment from "moment/moment";
26
+
27
+ export default {
28
+ name: 'LamboEditDateTime',
29
+ components: {LamboRequiredRedStar, LamboVectorIcon},
30
+ props: {
31
+ icon: {
32
+ type: String,
33
+ default: "timeicon.png",
34
+ },
35
+ required: {
36
+ type: Boolean,
37
+ default: false,
38
+ },
39
+ title: {
40
+ type: String,
41
+ default: false,
42
+ },
43
+ placeholder: {
44
+ type: String,
45
+ default: '请选择',
46
+ },
47
+ type: {
48
+ type: String,
49
+ default: 'datetime',
50
+ },
51
+ },
52
+ data() {
53
+ return {
54
+ valName: '',
55
+ showBottom: false,
56
+ selectItem: {
57
+ dateStr: '',
58
+ dateFormat: ''
59
+ },
60
+ }
61
+ },
62
+ methods: {
63
+ changeColor() {
64
+ this.showBottom = !this.showBottom
65
+ let searchRows = document.querySelectorAll('.edit-box')
66
+ Array.from(searchRows).forEach(function (row, index) {
67
+ row.addEventListener('click', function () {
68
+ Array.from(searchRows).forEach(function (row) {
69
+ row.style.borderBottom = '1px solid var(--scl-white-2)'
70
+ })
71
+ row.style.borderBottom = '1px solid var(--scl-blue)'
72
+ })
73
+ })
74
+ },
75
+ onConfirm(time) {
76
+ console.log(" onConfirm time:", time)
77
+ let dateStr = '';
78
+ let dateFormat = '';
79
+ if (this.type === 'time') {
80
+ let formattedTime = moment(time, 'HH:mm').format("HHmm");
81
+ dateStr = formattedTime || '';
82
+ dateFormat = time || '';
83
+ } else {
84
+ dateStr = moment(time).format("YYYYMMDDHHmmss") || ''
85
+ dateFormat = moment(time).format("YYYY-MM-DD HH:mm:ss") || ''
86
+ }
87
+ this.valName = dateFormat
88
+ this.selectItem.dateStr = dateStr
89
+ this.selectItem.dateFormat = dateFormat
90
+ this.$emit("on-ok", this.selectItem)
91
+ this.showBottom = false
92
+ },
93
+ onCancelTime() {
94
+ this.showBottom = false;
95
+ },
96
+ },
97
+ created() {
98
+ },
99
+ mounted() {
100
+ }
101
+ }
102
+ </script>
103
+ <style scoped>
104
+ @import "styles/css/index.css";
105
+ </style>