wl-design-mobile 0.4.9 → 0.5.0

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.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "finch",
@@ -0,0 +1,92 @@
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"
13
+ :style="{ maxHeight: '65%' }" color="#0070D2" @confirm="onConfirm" get-container="body"/>
14
+ </div>
15
+ </div>
16
+ </template>
17
+ <script>
18
+ import {deepCopy} from '../util/assist'
19
+ import moment from 'moment'
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: 'LamboDate',
25
+ components: {LamboVectorIcon, LamboRequiredRedStar},
26
+ props: {
27
+ required: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ title: {
32
+ type: String,
33
+ default: false
34
+ },
35
+ defaultDate: {
36
+ type: String,
37
+ default: ""
38
+ }
39
+ },
40
+ data() {
41
+ return {
42
+ icon: 'date.png',
43
+ showBottom: false,
44
+ dateStr: '',
45
+ selectItem: {
46
+ date: "",
47
+ date8: ""
48
+ },
49
+ defaultDateArr: ""
50
+ }
51
+ },
52
+ methods: {
53
+ onOpen() {
54
+ this.showBottom = true
55
+ },
56
+ onConfirm(time) {
57
+ console.log(" onConfirm time:", time)
58
+ let startDate1 = moment(time).format("yyyyMMDD") || ''
59
+ let startDateFormat = moment(time).format('yyyy-MM-DD') || ''
60
+ if (startDate1 && startDateFormat) {
61
+ this.selectItem.date8 = startDate1
62
+ this.selectItem.date = startDateFormat
63
+ this.dateStr = startDateFormat
64
+ this.$emit("on-ok", this.selectItem)
65
+ }
66
+ this.showBottom = false
67
+ },
68
+ initDefaultVal() {
69
+ // 默认值处理
70
+ if (this.defaultDate) {
71
+ let defDateArr = this.defaultDate
72
+ if (defDateArr) {
73
+ this.selectItem.date8 = deepCopy(defDateArr)
74
+ let startDate8 = defDateArr
75
+ let startDateFormat = moment(startDate8).format('yyyy-MM-DD') || ''
76
+ this.selectItem.date[0] = startDateFormat
77
+ this.dateStr = startDateFormat
78
+ let startDateObj = moment(startDate8).toDate()
79
+ this.defaultDateArr = startDateObj
80
+ }
81
+ }
82
+ }
83
+ },
84
+ created() {
85
+ this.initDefaultVal()
86
+ }
87
+ }
88
+ </script>
89
+ <style scoped>
90
+ @import "../styles/index.less";
91
+ @import "./styles/css/index.css";
92
+ </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) => {