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:
|
|
48
|
+
type: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'String'
|
|
51
|
+
},
|
|
49
52
|
align: String,
|
|
50
53
|
border: Boolean,
|
|
51
54
|
disabled: Boolean,
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
178
178
|
},
|
|
179
179
|
loadList () {
|
|
180
180
|
if (this.simpleValue) {
|
|
181
|
-
this.fileList = (this.urlList
|
|
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
|
|
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
|
-
|
|
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) {
|