wl-design-mobile 0.4.9 → 0.5.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wl-design-mobile",
3
- "version": "0.4.9",
3
+ "version": "0.5.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div>
3
+ <div class="search-row">
4
+ <!-- 必选的红色星号 -->
5
+ <lambo-required-red-star :required="required"></lambo-required-red-star>
6
+ <!-- 时间框的名字段 -->
7
+ <div class="search-input-title">{{ title }}</div>
8
+ <div class="search-lambo-input">{{ dateStr }}</div>
9
+ <lambo-vector-icon :icon="icon" @click="onOpen"></lambo-vector-icon>
10
+ </div>
11
+ <div>
12
+ <van-calendar v-model:show="showBottom" :value="defaultDateArr" type="single" :max-date="maxDate"
13
+ :min-date="minDate" :style="{ maxHeight: '65%' }" color="#0070D2" @confirm="onConfirm"
14
+ get-container="body"/>
15
+ </div>
16
+ </div>
17
+ </template>
18
+ <script>
19
+ import {deepCopy} from '../util/assist'
20
+ import moment from 'moment'
21
+ import LamboRequiredRedStar from '../icon/lambo-required-red-star.vue'
22
+ import LamboVectorIcon from '../icon/lambo-vector-icon.vue'
23
+
24
+ export default {
25
+ name: 'LamboDate',
26
+ components: {LamboVectorIcon, LamboRequiredRedStar},
27
+ props: {
28
+ required: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ title: {
33
+ type: String,
34
+ default: false
35
+ },
36
+ defaultDate: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ minDate: {
41
+ type: Date,
42
+ default: () => new Date((new Date()).getFullYear() - 3, (new Date()).getMonth(), (new Date()).getDate())
43
+ },
44
+ maxDate: {
45
+ type: Date,
46
+ default: () => new Date((new Date()).getFullYear() + 3, (new Date()).getMonth(), (new Date()).getDate())
47
+ }
48
+ },
49
+ data() {
50
+ return {
51
+ icon: 'date.png',
52
+ showBottom: false,
53
+ dateStr: '',
54
+ selectItem: {
55
+ date: "",
56
+ date8: ""
57
+ },
58
+ defaultDateArr: ""
59
+ }
60
+ },
61
+ methods: {
62
+ onOpen() {
63
+ this.showBottom = true
64
+ },
65
+ onConfirm(time) {
66
+ console.log(" onConfirm time:", time)
67
+ let startDate1 = moment(time).format("yyyyMMDD") || ''
68
+ let startDateFormat = moment(time).format('yyyy-MM-DD') || ''
69
+ if (startDate1 && startDateFormat) {
70
+ this.selectItem.date8 = startDate1
71
+ this.selectItem.date = startDateFormat
72
+ this.dateStr = startDateFormat
73
+ this.$emit("on-ok", this.selectItem)
74
+ }
75
+ this.showBottom = false
76
+ },
77
+ initDefaultVal() {
78
+ // 默认值处理
79
+ if (this.defaultDate) {
80
+ let defDateArr = this.defaultDate
81
+ if (defDateArr) {
82
+ this.selectItem.date8 = deepCopy(defDateArr)
83
+ let startDate8 = defDateArr
84
+ let startDateFormat = moment(startDate8).format('yyyy-MM-DD') || ''
85
+ this.selectItem.date = startDateFormat
86
+ this.dateStr = startDateFormat
87
+ let startDateObj = moment(startDate8).toDate()
88
+ this.defaultDateArr = startDateObj
89
+ }
90
+ }
91
+ }
92
+ },
93
+ created() {
94
+ this.initDefaultVal()
95
+ }
96
+ }
97
+ </script>
98
+ <style scoped>
99
+ @import "../styles/index.less";
100
+ @import "./styles/css/index.css";
101
+ </style>
package/util/jssdk.js CHANGED
@@ -237,7 +237,7 @@ let JsSDK = (function () {
237
237
  Toast.loading({
238
238
  duration: 0, // 持续展示 toast
239
239
  forbidClick: false,
240
- message: '正在上传,请稍候',
240
+ message: '正在上传',
241
241
  });
242
242
  setTimeout(() => {
243
243
  wx.uploadImage({
@@ -280,7 +280,7 @@ let JsSDK = (function () {
280
280
  Toast.loading({
281
281
  duration: 0, // 持续展示 toast
282
282
  forbidClick: false,
283
- message: '正在上传,请稍候',
283
+ message: '正在上传',
284
284
  });
285
285
  let uploadPromises = localIds.map(localId => {
286
286
  return new Promise((resolve, reject) => {