mali-applet-ui 0.2.85 → 0.2.87

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.
@@ -15,9 +15,9 @@
15
15
  </view>
16
16
  <input
17
17
  v-model="inpVal"
18
- type="text"
19
18
  class="ml-input-inp"
20
19
  autocomplete="off"
20
+ :type="type"
21
21
  :confirm-type="type === 'search' ? 'search' : 'done'"
22
22
  :placeholder="placeholder"
23
23
  :maxlength="maxlength"
@@ -45,7 +45,10 @@ export default {
45
45
  },
46
46
  props: {
47
47
  value: [Number, String],
48
- type: String,
48
+ type: {
49
+ type: String,
50
+ default: 'String'
51
+ },
49
52
  align: String,
50
53
  border: Boolean,
51
54
  disabled: Boolean,
@@ -54,8 +54,8 @@ export default {
54
54
  position: absolute;
55
55
  top: 30%;
56
56
  left: 50%;
57
- width: 220rpx;
58
- height: 220rpx;
57
+ width: 240rpx;
58
+ height: 240rpx;
59
59
  border-radius: 20rpx;
60
60
  transform: translateX(-50%);
61
61
  text-align: center;
@@ -178,7 +178,7 @@ export default {
178
178
  },
179
179
  loadList () {
180
180
  if (this.simpleValue) {
181
- this.fileList = (this.urlList || []).map(url => {
181
+ this.fileList = (this.urlList && this.urlList.length ? this.urlList : this.value).map(url => {
182
182
  const name = this.getUrlName(url)
183
183
  const obj = {
184
184
  id: null,
@@ -195,7 +195,9 @@ export default {
195
195
  }
196
196
  })
197
197
  this.isUpdate = true
198
- this.$emit('input', this.fileList)
198
+ if (this.urlList && this.urlList.length) {
199
+ this.$emit('input', this.fileList)
200
+ }
199
201
  } else {
200
202
  this.fileList = (this.value || []).map(item => {
201
203
  item.tempPath = this.getUrl(item)
@@ -206,7 +208,11 @@ export default {
206
208
  updateModel () {
207
209
  const urlList = this.fileList.map(item => item[this.urlField])
208
210
  this.$emit('update:urlList', urlList)
209
- this.$emit('input', this.fileList)
211
+ if (this.simpleValue) {
212
+ this.$emit('input', urlList)
213
+ } else {
214
+ this.$emit('input', this.fileList)
215
+ }
210
216
  this.$emit('change', { value: this.simpleValue ? urlList : this.fileList })
211
217
  },
212
218
  removeEvent (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.2.85",
3
+ "version": "0.2.87",
4
4
  "description": "码里云小程序组件库",
5
5
  "scripts": {
6
6
  "release": "node script/release.js && npm publish"