diff --git a/components/tpx-date-input/tpx-date-input.vue b/components/tpx-date-input/tpx-date-input.vue
index f56bfc9..154aeb4 100644
--- a/components/tpx-date-input/tpx-date-input.vue
+++ b/components/tpx-date-input/tpx-date-input.vue
@@ -9,9 +9,11 @@
-
-
-
+
+
+
+
+
@@ -87,9 +89,7 @@
methods: {
handleSelectDate() {
- if(!this.showTools) {
- this.handleSwitchCladar()
- }
+ this.handleSwitchCladar()
},
handleChange(val){
this.$emit('change', val)
diff --git a/components/tpx-upload/tpx-upload.vue b/components/tpx-upload/tpx-upload.vue
index ccd1df4..7fce8dc 100644
--- a/components/tpx-upload/tpx-upload.vue
+++ b/components/tpx-upload/tpx-upload.vue
@@ -1,5 +1,18 @@
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
@@ -22,14 +35,6 @@
-
-
-
-
-
- {{item}}
-
-
@@ -59,7 +64,7 @@
return res
},
compItemstyle(){
- let style = `margin-bottom: 20rpx;`
+ let style = `margin-bottom: 16rpx;margin-right: 16rpx;`
if(this.direction == "row") {
// style += `width:${this.width}rpx;height:${this.height}rpx;`
}
@@ -122,6 +127,11 @@
return 1
}
},
+ disabled: {
+ default () {
+ return false
+ }
+ },
isSlot: {
default () {
return false
@@ -150,48 +160,20 @@
}
return coreMultiUploadFile(actMap[this.fileType], opt)
},
- handlePreview() {
+ handlePreview(index) {
uni.previewImage({
+ current: index,
urls: [
...this.list
]
})
},
- handleItem(e) {
- const that = this
- const index = e.currentTarget.dataset.index
- let { list, fileType } = this
- let itemList = ['更换', '删除', '预览']
- if (fileType == fileTypeEnum.video) {
- itemList.length--
- }
- uni.showActionSheet({
- itemList,
- success: (res) => {
- const {
- tapIndex
- } = res
- if (tapIndex == 0) {
- // 更换, 只能选择一个文件
- that.doChooseFile({
- count: 1
- }).then((res) => {
- list[index] = res[0]
- that.triggerChanged(list)
- })
- }
- if (tapIndex == 1) {
- list.splice(index, 1)
- that.triggerChanged(list)
- }
- if (tapIndex == 2) {
- this.handlePreview()
- }
- },
- fail: (res) => {
- console.log(res.errMsg)
- }
- })
+ handleDel(index){
+ this.list.splice(index, 1)
+ this.triggerChanged(this.list)
+ },
+ handleItem(index) {
+ this.handlePreview(index)
},
handleChooseFile: function() {
let that = this
@@ -238,4 +220,17 @@
align-items: center;
margin-bottom: 20rpx;
}
+ .cdimg {
+ position: relative;
+ .delIcon{
+ position: absolute;
+ height: 46rpx;
+ width: 46rpx;
+ right: -10rpx;
+ top: -10rpx;
+ .u-icon{
+ justify-content: end;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/pages/goods/edit.vue b/pages/goods/edit.vue
index 8491e7f..40dc041 100644
--- a/pages/goods/edit.vue
+++ b/pages/goods/edit.vue
@@ -201,8 +201,8 @@
-
-
+
+
@@ -252,6 +252,7 @@
ydList: [
{}
],
+ fujianFiles: []
},
goodinfoModal:{
show: false,