wl-design-mobile 0.8.19 → 0.8.21

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 (101) hide show
  1. package/README.md +6 -6
  2. package/api/doc.js +25 -25
  3. package/api/x1.js +56 -56
  4. package/btn/components/lambo-info-btn.vue +123 -123
  5. package/btn/components/lambo-primary-btn.vue +117 -117
  6. package/btn/components/lambo-text-btn.vue +116 -116
  7. package/btn/lambo-btn-divide.vue +35 -120
  8. package/btn/lambo-btn-group.vue +46 -46
  9. package/btn/lambo-btn-split-line.vue +41 -41
  10. package/btn/lambo-btn.vue +68 -68
  11. package/btn/lambo-extend-btn.vue +121 -121
  12. package/btn/lambo-icon-btn.vue +82 -82
  13. package/card-item/card-row-icon.vue +71 -71
  14. package/card-item/filtrate-row.vue +73 -73
  15. package/card-item/lambo-card-footer.vue +40 -40
  16. package/card-item/lambo-card-head.vue +66 -66
  17. package/card-item/lambo-card-row.vue +59 -59
  18. package/collapse/lambo-collapse.vue +93 -93
  19. package/config/config.js +14 -14
  20. package/detail/lambo-detail-grid.vue +58 -58
  21. package/detail/lambo-detail-row.vue +59 -59
  22. package/doc/file/compoents/lambo-file-list.vue +42 -42
  23. package/doc/file/compoents/lambo-file-row.vue +77 -77
  24. package/doc/file/lambo-file-upload-collapse.vue +107 -107
  25. package/doc/file-type/file-type.js +286 -286
  26. package/doc/img/comonents/lambo-img-grid.vue +109 -109
  27. package/doc/img/lambo-img-upload-collapse.vue +107 -107
  28. package/doc/img/styles/css/index.css +3 -3
  29. package/edit/list/Lambo-edit-list.vue +87 -87
  30. package/edit/list/lambo-edit-card-group.vue +100 -100
  31. package/edit/list/styles/css/index.css +39 -39
  32. package/edit/select/lambo-edit-date-range.vue +147 -147
  33. package/edit/select/lambo-edit-date-time.vue +122 -122
  34. package/edit/select/lambo-edit-date.vue +120 -120
  35. package/edit/select/lambo-edit-input-textarea.vue +91 -91
  36. package/edit/select/lambo-edit-input.vue +91 -91
  37. package/edit/select/lambo-edit-multi-select.vue +168 -168
  38. package/edit/select/lambo-edit-search-single-select.vue +186 -186
  39. package/edit/select/lambo-edit-single-select.vue +162 -162
  40. package/edit/select/styles/css/index.css +133 -133
  41. package/flow/approval/flow-approval.vue +552 -552
  42. package/flow/comps/flow-attachment-list.vue +230 -230
  43. package/flow/comps/flow-attachment-modal.vue +194 -194
  44. package/flow/comps/flow-copy-users.vue +358 -358
  45. package/flow/comps/flow-node-card.vue +150 -150
  46. package/flow/comps/flow-node-header.vue +172 -172
  47. package/flow/comps/flow-util.js +156 -156
  48. package/flow/comps/icons/approved.svg +11 -11
  49. package/flow/comps/icons/canceled.svg +11 -11
  50. package/flow/comps/icons/rejected.svg +11 -11
  51. package/flow/comps/icons/underway.svg +11 -11
  52. package/flow/detail/flow-detail.vue +467 -467
  53. package/flow/index.js +51 -51
  54. package/flow/lambo-flow-detail.vue +912 -912
  55. package/flow/lambo-flow-edit.vue +15 -15
  56. package/flow/submit/flow-submit.vue +383 -383
  57. package/icon/lambo-required-red-star.vue +47 -47
  58. package/icon/lambo-vector-icon.vue +71 -71
  59. package/list/lambo-list.vue +412 -413
  60. package/nav/lambo-top-nav.vue +81 -81
  61. package/order/comps/icons/approved.svg +10 -10
  62. package/order/comps/icons/underway.svg +10 -10
  63. package/order/comps/order-attachment-list.vue +228 -228
  64. package/order/comps/order-attachment-modal.vue +194 -194
  65. package/order/comps/order-node-card.vue +126 -126
  66. package/order/comps/order-node-header.vue +133 -133
  67. package/order/comps/order-util.js +132 -132
  68. package/order/detail/order-detail.vue +432 -432
  69. package/order/handle/order-handle.vue +517 -517
  70. package/order/index.js +33 -33
  71. package/package.json +38 -37
  72. package/search/lambo-date-range-page.vue +196 -196
  73. package/search/lambo-date-range.vue +111 -111
  74. package/search/lambo-date.vue +105 -105
  75. package/search/lambo-input.vue +74 -74
  76. package/search/lambo-multi-select.vue +129 -129
  77. package/search/lambo-org-select-page.vue +109 -109
  78. package/search/lambo-search-box.vue +61 -61
  79. package/search/lambo-search-single-select.vue +152 -152
  80. package/search/lambo-single-select.vue +123 -123
  81. package/search/lambo-week-date-select.vue +521 -521
  82. package/search/styles/css/index.css +138 -138
  83. package/styles/base.less +77 -77
  84. package/styles/components/btn.less +7 -7
  85. package/styles/components/search.less +33 -33
  86. package/styles/components/tag.less +181 -181
  87. package/styles/index.less +4 -4
  88. package/table/lambo-ag-table.vue +227 -227
  89. package/tag/lambo-tag.vue +23 -23
  90. package/title/lambo-title1.vue +151 -151
  91. package/title/lambo-title2.vue +37 -37
  92. package/title/lambo-title3.vue +77 -77
  93. package/util/assist.js +43 -43
  94. package/util/axios/cacheconf.js +19 -19
  95. package/util/axios/index.js +11 -11
  96. package/util/axios/interceptors.js +101 -101
  97. package/util/bus.js +4 -4
  98. package/util/jssdk-sczy.js +104 -104
  99. package/util/jssdk.js +608 -565
  100. package/util/math.js +76 -76
  101. package/util/token.js +36 -36
@@ -1,122 +1,122 @@
1
- <template>
2
- <div>
3
- <div class="edit-box" @click="changeColor">
4
- <div class="edit-left-box">
5
- <div class="edit-left-top">
6
- <div v-if="required" class="edit-red-icon">
7
- <lambo-required-red-star :required="required"></lambo-required-red-star>
8
- </div>
9
- <div class="edit-title">{{ title }}</div>
10
- </div>
11
- <van-field v-model="valName" :placeholder="placeholder" :readonly="true" class="edit-lambo-input" clear-trigger="focus"></van-field>
12
- </div>
13
- <div v-if="icon" class="edit-right-icon">
14
- <lambo-vector-icon :icon="icon"></lambo-vector-icon>
15
- </div>
16
- </div>
17
- <div>
18
- <van-popup v-model="showBottom" position="bottom" :style="{ maxHeight: '33%' }">
19
- <van-datetime-picker v-model="curDateTime" :type="type" title="选择时间" @confirm="onConfirm" @cancel="onCancelTime"/>
20
- </van-popup>
21
- </div>
22
- </div>
23
- </template>
24
- <script>
25
- import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
26
- import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
27
- import moment from "moment/moment";
28
-
29
- export default {
30
- name: 'LamboEditDateTime',
31
- components: {LamboRequiredRedStar, LamboVectorIcon},
32
- props: {
33
- icon: {
34
- type: String,
35
- default: "timeicon.png",
36
- },
37
- required: {
38
- type: Boolean,
39
- default: false,
40
- },
41
- title: {
42
- type: String,
43
- default: false,
44
- },
45
- placeholder: {
46
- type: String,
47
- default: '请选择',
48
- },
49
- type: {
50
- type: String,
51
- default: 'datetime',
52
- },
53
- defaultDate: {
54
- type: Date,
55
- default: () => null
56
- },
57
- },
58
- data() {
59
- return {
60
- valName: '',
61
- showBottom: false,
62
- selectItem: {
63
- dateStr: '',
64
- dateFormat: ''
65
- },
66
- curDateTime: null
67
- }
68
- },
69
- methods: {
70
- changeColor() {
71
- this.showBottom = !this.showBottom
72
- let searchRows = document.querySelectorAll('.edit-box')
73
- Array.from(searchRows).forEach(function (row, index) {
74
- row.addEventListener('click', function () {
75
- Array.from(searchRows).forEach(function (row) {
76
- row.style.borderBottom = '1px solid var(--scl-white-2)'
77
- })
78
- row.style.borderBottom = '1px solid var(--scl-blue)'
79
- })
80
- })
81
- },
82
- onConfirm(time) {
83
- console.log(" onConfirm time:", time)
84
- let dateStr = '';
85
- let dateFormat = '';
86
- if (this.type === 'time') {
87
- let formattedTime = moment(time, 'HH:mm').format("HHmm");
88
- dateStr = formattedTime || '';
89
- dateFormat = time || '';
90
- } else {
91
- dateStr = moment(time).format("YYYYMMDDHHmmss") || ''
92
- dateFormat = moment(time).format("YYYY-MM-DD HH:mm:ss") || ''
93
- }
94
- this.valName = dateFormat
95
- this.selectItem.dateStr = dateStr
96
- this.selectItem.dateFormat = dateFormat
97
- this.$emit("on-ok", this.selectItem)
98
- this.showBottom = false
99
- },
100
- onCancelTime() {
101
- this.showBottom = false;
102
- },
103
- initDefaultVal() {
104
- if (this.defaultDate) {
105
- this.curDateTime = this.defaultDate
106
- this.onConfirm(this.defaultDate)
107
- }
108
- }
109
- },
110
- created() {
111
- this.initDefaultVal()
112
- }
113
- }
114
- </script>
115
- <style scoped>
116
- @import "../../styles/index.less";
117
- @import "./styles/css/index.css";
118
-
119
- /deep/ .edit-left-box .van-cell {
120
- padding: 0px 0px;
121
- }
122
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="edit-box" @click="changeColor">
4
+ <div class="edit-left-box">
5
+ <div class="edit-left-top">
6
+ <div v-if="required" class="edit-red-icon">
7
+ <lambo-required-red-star :required="required"></lambo-required-red-star>
8
+ </div>
9
+ <div class="edit-title">{{ title }}</div>
10
+ </div>
11
+ <van-field v-model="valName" :placeholder="placeholder" :readonly="true" class="edit-lambo-input" clear-trigger="focus"></van-field>
12
+ </div>
13
+ <div v-if="icon" class="edit-right-icon">
14
+ <lambo-vector-icon :icon="icon"></lambo-vector-icon>
15
+ </div>
16
+ </div>
17
+ <div>
18
+ <van-popup v-model="showBottom" position="bottom" :style="{ maxHeight: '33%' }">
19
+ <van-datetime-picker v-model="curDateTime" :type="type" title="选择时间" @confirm="onConfirm" @cancel="onCancelTime"/>
20
+ </van-popup>
21
+ </div>
22
+ </div>
23
+ </template>
24
+ <script>
25
+ import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
26
+ import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
27
+ import moment from "moment/moment";
28
+
29
+ export default {
30
+ name: 'LamboEditDateTime',
31
+ components: {LamboRequiredRedStar, LamboVectorIcon},
32
+ props: {
33
+ icon: {
34
+ type: String,
35
+ default: "timeicon.png",
36
+ },
37
+ required: {
38
+ type: Boolean,
39
+ default: false,
40
+ },
41
+ title: {
42
+ type: String,
43
+ default: false,
44
+ },
45
+ placeholder: {
46
+ type: String,
47
+ default: '请选择',
48
+ },
49
+ type: {
50
+ type: String,
51
+ default: 'datetime',
52
+ },
53
+ defaultDate: {
54
+ type: Date,
55
+ default: () => null
56
+ },
57
+ },
58
+ data() {
59
+ return {
60
+ valName: '',
61
+ showBottom: false,
62
+ selectItem: {
63
+ dateStr: '',
64
+ dateFormat: ''
65
+ },
66
+ curDateTime: null
67
+ }
68
+ },
69
+ methods: {
70
+ changeColor() {
71
+ this.showBottom = !this.showBottom
72
+ let searchRows = document.querySelectorAll('.edit-box')
73
+ Array.from(searchRows).forEach(function (row, index) {
74
+ row.addEventListener('click', function () {
75
+ Array.from(searchRows).forEach(function (row) {
76
+ row.style.borderBottom = '1px solid var(--scl-white-2)'
77
+ })
78
+ row.style.borderBottom = '1px solid var(--scl-blue)'
79
+ })
80
+ })
81
+ },
82
+ onConfirm(time) {
83
+ console.log(" onConfirm time:", time)
84
+ let dateStr = '';
85
+ let dateFormat = '';
86
+ if (this.type === 'time') {
87
+ let formattedTime = moment(time, 'HH:mm').format("HHmm");
88
+ dateStr = formattedTime || '';
89
+ dateFormat = time || '';
90
+ } else {
91
+ dateStr = moment(time).format("YYYYMMDDHHmmss") || ''
92
+ dateFormat = moment(time).format("YYYY-MM-DD HH:mm:ss") || ''
93
+ }
94
+ this.valName = dateFormat
95
+ this.selectItem.dateStr = dateStr
96
+ this.selectItem.dateFormat = dateFormat
97
+ this.$emit("on-ok", this.selectItem)
98
+ this.showBottom = false
99
+ },
100
+ onCancelTime() {
101
+ this.showBottom = false;
102
+ },
103
+ initDefaultVal() {
104
+ if (this.defaultDate) {
105
+ this.curDateTime = this.defaultDate
106
+ this.onConfirm(this.defaultDate)
107
+ }
108
+ }
109
+ },
110
+ created() {
111
+ this.initDefaultVal()
112
+ }
113
+ }
114
+ </script>
115
+ <style scoped>
116
+ @import "../../styles/index.less";
117
+ @import "./styles/css/index.css";
118
+
119
+ /deep/ .edit-left-box .van-cell {
120
+ padding: 0px 0px;
121
+ }
122
+ </style>
@@ -1,120 +1,120 @@
1
- <template>
2
- <div>
3
- <div class="edit-box" @click="changeColor">
4
- <div class="edit-left-box">
5
- <div class="edit-left-top">
6
- <div v-if="required" class="edit-red-icon">
7
- <lambo-required-red-star :required="required"></lambo-required-red-star>
8
- </div>
9
- <div class="edit-title">{{ title }}</div>
10
- </div>
11
- <van-field v-model="valName" :placeholder="placeholder" :readonly="true"
12
- class="edit-lambo-input" clear-trigger="focus"></van-field>
13
- </div>
14
- <div v-if="icon" class="edit-right-icon">
15
- <lambo-vector-icon :icon="icon"></lambo-vector-icon>
16
- </div>
17
- </div>
18
- <div>
19
- <van-calendar v-model:show="showBottom" :default-date="defaultDate" :max-date="maxDate" :min-date="minDate"
20
- :style="{ maxHeight: '65%' }" color="#0070D2" type="single" @confirm="onConfirm" :allow-same-day="allowSameDay"/>
21
- </div>
22
- </div>
23
- </template>
24
- <script>
25
- import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
26
- import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
27
- import moment from "moment/moment";
28
-
29
- export default {
30
- name: 'LamboEditDate',
31
- components: {LamboRequiredRedStar, LamboVectorIcon},
32
- props: {
33
- icon: {
34
- type: String,
35
- default: "date.png",
36
- },
37
- required: {
38
- type: Boolean,
39
- default: false,
40
- },
41
- title: {
42
- type: String,
43
- default: false,
44
- },
45
- placeholder: {
46
- type: String,
47
- default: '请选择',
48
- },
49
- defaultDate: {
50
- type: Date,
51
- default: () => null
52
- },
53
- minDate: {
54
- type: Date,
55
- default: () => moment().subtract(3, 'years').toDate(),
56
- },
57
- maxDate: {
58
- type: Date,
59
- default: () => moment().add(3, 'years').toDate(),
60
- },
61
- allowSameDay: {
62
- type: Boolean,
63
- default: false
64
- },
65
- },
66
- data() {
67
- return {
68
- valName: '',
69
- showBottom: false,
70
- selectItem: {
71
- dateStr: '',
72
- dateFormat: ''
73
- },
74
- }
75
- },
76
- methods: {
77
- changeColor() {
78
- this.showBottom = !this.showBottom
79
- let searchRows = document.querySelectorAll('.edit-box')
80
- Array.from(searchRows).forEach(function (row, index) {
81
- row.addEventListener('click', function () {
82
- Array.from(searchRows).forEach(function (row) {
83
- row.style.borderBottom = '1px solid var(--scl-white-2)'
84
- })
85
- row.style.borderBottom = '1px solid var(--scl-blue)'
86
- })
87
- })
88
- },
89
- onConfirm(time) {
90
- console.log(" onConfirm time:", time)
91
- let dateStr = moment(time).format("yyyyMMDD") || ''
92
- let dateFormat = moment(time).format("yyyy-MM-DD") || ''
93
- this.valName = dateFormat
94
- this.selectItem.dateStr = dateStr
95
- this.selectItem.dateFormat = dateFormat
96
- this.$emit("on-ok", this.selectItem)
97
- this.showBottom = false
98
- },
99
- initDefaultVal() {
100
- // 默认值处理
101
- if (this.defaultDate) {
102
- this.onConfirm(this.defaultDate)
103
- }
104
- }
105
- },
106
- created() {
107
- this.initDefaultVal()
108
- },
109
- mounted() {
110
- }
111
- }
112
- </script>
113
- <style scoped>
114
- @import "../../styles/index.less";
115
- @import "./styles/css/index.css";
116
-
117
- /deep/ .edit-left-box .van-cell {
118
- padding: 0px 0px;
119
- }
120
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="edit-box" @click="changeColor">
4
+ <div class="edit-left-box">
5
+ <div class="edit-left-top">
6
+ <div v-if="required" class="edit-red-icon">
7
+ <lambo-required-red-star :required="required"></lambo-required-red-star>
8
+ </div>
9
+ <div class="edit-title">{{ title }}</div>
10
+ </div>
11
+ <van-field v-model="valName" :placeholder="placeholder" :readonly="true"
12
+ class="edit-lambo-input" clear-trigger="focus"></van-field>
13
+ </div>
14
+ <div v-if="icon" class="edit-right-icon">
15
+ <lambo-vector-icon :icon="icon"></lambo-vector-icon>
16
+ </div>
17
+ </div>
18
+ <div>
19
+ <van-calendar v-model:show="showBottom" :default-date="defaultDate" :max-date="maxDate" :min-date="minDate"
20
+ :style="{ maxHeight: '65%' }" color="#0070D2" type="single" @confirm="onConfirm" :allow-same-day="allowSameDay"/>
21
+ </div>
22
+ </div>
23
+ </template>
24
+ <script>
25
+ import LamboVectorIcon from '../../icon/lambo-vector-icon.vue'
26
+ import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
27
+ import moment from "moment/moment";
28
+
29
+ export default {
30
+ name: 'LamboEditDate',
31
+ components: {LamboRequiredRedStar, LamboVectorIcon},
32
+ props: {
33
+ icon: {
34
+ type: String,
35
+ default: "date.png",
36
+ },
37
+ required: {
38
+ type: Boolean,
39
+ default: false,
40
+ },
41
+ title: {
42
+ type: String,
43
+ default: false,
44
+ },
45
+ placeholder: {
46
+ type: String,
47
+ default: '请选择',
48
+ },
49
+ defaultDate: {
50
+ type: Date,
51
+ default: () => null
52
+ },
53
+ minDate: {
54
+ type: Date,
55
+ default: () => moment().subtract(3, 'years').toDate(),
56
+ },
57
+ maxDate: {
58
+ type: Date,
59
+ default: () => moment().add(3, 'years').toDate(),
60
+ },
61
+ allowSameDay: {
62
+ type: Boolean,
63
+ default: false
64
+ },
65
+ },
66
+ data() {
67
+ return {
68
+ valName: '',
69
+ showBottom: false,
70
+ selectItem: {
71
+ dateStr: '',
72
+ dateFormat: ''
73
+ },
74
+ }
75
+ },
76
+ methods: {
77
+ changeColor() {
78
+ this.showBottom = !this.showBottom
79
+ let searchRows = document.querySelectorAll('.edit-box')
80
+ Array.from(searchRows).forEach(function (row, index) {
81
+ row.addEventListener('click', function () {
82
+ Array.from(searchRows).forEach(function (row) {
83
+ row.style.borderBottom = '1px solid var(--scl-white-2)'
84
+ })
85
+ row.style.borderBottom = '1px solid var(--scl-blue)'
86
+ })
87
+ })
88
+ },
89
+ onConfirm(time) {
90
+ console.log(" onConfirm time:", time)
91
+ let dateStr = moment(time).format("yyyyMMDD") || ''
92
+ let dateFormat = moment(time).format("yyyy-MM-DD") || ''
93
+ this.valName = dateFormat
94
+ this.selectItem.dateStr = dateStr
95
+ this.selectItem.dateFormat = dateFormat
96
+ this.$emit("on-ok", this.selectItem)
97
+ this.showBottom = false
98
+ },
99
+ initDefaultVal() {
100
+ // 默认值处理
101
+ if (this.defaultDate) {
102
+ this.onConfirm(this.defaultDate)
103
+ }
104
+ }
105
+ },
106
+ created() {
107
+ this.initDefaultVal()
108
+ },
109
+ mounted() {
110
+ }
111
+ }
112
+ </script>
113
+ <style scoped>
114
+ @import "../../styles/index.less";
115
+ @import "./styles/css/index.css";
116
+
117
+ /deep/ .edit-left-box .van-cell {
118
+ padding: 0px 0px;
119
+ }
120
+ </style>
@@ -1,91 +1,91 @@
1
- <template>
2
- <div class="edit-box" @click="changeColor">
3
- <div class="edit-left-box">
4
- <div v-if="title" 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="innerValue" :autosize="true" :clearable="true" :maxlength="maxlength"
11
- :placeholder="placeholder" :type="type" class="edit-lambo-input-textarea" label="" v-bind="$attrs" @input="$emit('input', $event)"/>
12
- </div>
13
- <div v-if="icon" class="edit-right-icon">
14
- <lambo-vector-icon :icon="icon"></lambo-vector-icon>
15
- </div>
16
- </div>
17
- </template>
18
- <script>
19
- import redIcon from '../../assets/icon/required.png'
20
- import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
21
- import LamboVectorIcon from "../../icon/lambo-vector-icon.vue"
22
-
23
- export default {
24
- name: 'LamboEditInputTextarea',
25
- components: {LamboVectorIcon, LamboRequiredRedStar},
26
- model: {
27
- prop: 'value',
28
- event: 'input',
29
- },
30
- props: {
31
- required: {
32
- type: Boolean,
33
- default: false,
34
- },
35
- type: {
36
- default: 'textarea',
37
- },
38
- maxlength: {
39
- type: [String, Number],
40
- },
41
- placeholder: {
42
- type: String,
43
- default: '',
44
- },
45
- title: {
46
- type: String,
47
- default: '',
48
- },
49
- value: {
50
- type: String,
51
- default: '',
52
- },
53
- icon: {
54
- type: String,
55
- default: "",
56
- },
57
- },
58
- data() {
59
- return {
60
- requiredReadIcon: redIcon,
61
- innerValue: this.value
62
- }
63
- },
64
- methods: {
65
- changeColor() {
66
- let searchRows = document.querySelectorAll('.edit-box')
67
- Array.from(searchRows).forEach(function (row, index) {
68
- row.addEventListener('click', function () {
69
- Array.from(searchRows).forEach(function (row) {
70
- row.style.borderBottom = '1px solid var(--scl-white-2)'
71
- })
72
- row.style.borderBottom = '1px solid var(--scl-blue)'
73
- })
74
- })
75
- },
76
- },
77
- watch: {
78
- value(newVal) {
79
- this.innerValue = newVal
80
- },
81
- }
82
- }
83
- </script>
84
- <style scoped>
85
- @import "../../styles/index.less";
86
- @import "./styles/css/index.css";
87
-
88
- /deep/ .edit-left-box .van-cell {
89
- padding: 0px 0px;
90
- }
91
- </style>
1
+ <template>
2
+ <div class="edit-box" @click="changeColor">
3
+ <div class="edit-left-box">
4
+ <div v-if="title" 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="innerValue" :autosize="true" :clearable="true" :maxlength="maxlength"
11
+ :placeholder="placeholder" :type="type" class="edit-lambo-input-textarea" label="" v-bind="$attrs" @input="$emit('input', $event)"/>
12
+ </div>
13
+ <div v-if="icon" class="edit-right-icon">
14
+ <lambo-vector-icon :icon="icon"></lambo-vector-icon>
15
+ </div>
16
+ </div>
17
+ </template>
18
+ <script>
19
+ import redIcon from '../../assets/icon/required.png'
20
+ import LamboRequiredRedStar from '../../icon/lambo-required-red-star.vue'
21
+ import LamboVectorIcon from "../../icon/lambo-vector-icon.vue"
22
+
23
+ export default {
24
+ name: 'LamboEditInputTextarea',
25
+ components: {LamboVectorIcon, LamboRequiredRedStar},
26
+ model: {
27
+ prop: 'value',
28
+ event: 'input',
29
+ },
30
+ props: {
31
+ required: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ type: {
36
+ default: 'textarea',
37
+ },
38
+ maxlength: {
39
+ type: [String, Number],
40
+ },
41
+ placeholder: {
42
+ type: String,
43
+ default: '',
44
+ },
45
+ title: {
46
+ type: String,
47
+ default: '',
48
+ },
49
+ value: {
50
+ type: String,
51
+ default: '',
52
+ },
53
+ icon: {
54
+ type: String,
55
+ default: "",
56
+ },
57
+ },
58
+ data() {
59
+ return {
60
+ requiredReadIcon: redIcon,
61
+ innerValue: this.value
62
+ }
63
+ },
64
+ methods: {
65
+ changeColor() {
66
+ let searchRows = document.querySelectorAll('.edit-box')
67
+ Array.from(searchRows).forEach(function (row, index) {
68
+ row.addEventListener('click', function () {
69
+ Array.from(searchRows).forEach(function (row) {
70
+ row.style.borderBottom = '1px solid var(--scl-white-2)'
71
+ })
72
+ row.style.borderBottom = '1px solid var(--scl-blue)'
73
+ })
74
+ })
75
+ },
76
+ },
77
+ watch: {
78
+ value(newVal) {
79
+ this.innerValue = newVal
80
+ },
81
+ }
82
+ }
83
+ </script>
84
+ <style scoped>
85
+ @import "../../styles/index.less";
86
+ @import "./styles/css/index.css";
87
+
88
+ /deep/ .edit-left-box .van-cell {
89
+ padding: 0px 0px;
90
+ }
91
+ </style>