diff --git a/src/components/Form/ImageSelect/index.vue b/src/components/Form/ImageSelect/index.vue
index 17a9ee3..078527e 100644
--- a/src/components/Form/ImageSelect/index.vue
+++ b/src/components/Form/ImageSelect/index.vue
@@ -2,31 +2,37 @@
+ >
+
+
+
+
{{ option.label }}
-
+ >
+
+
+
+
{{ option.label }}
@@ -37,6 +43,10 @@
export default {
name: 'ImageSelect',
props: {
+ value: {
+ type: Number,
+ default: 1
+ },
options: {
type: Array,
default: function() {
@@ -49,12 +59,21 @@ export default {
default: false
}
},
- methods: {
- onChange(e) {
- console.log(e)
- console.log(JSON.stringify(this.options))
- this.$emit('change', e)
+ data() {
+ return {
+ selectValue: this.value
}
+ },
+ watch: {
+ selectValue(val) {
+ this.$emit('input', val)
+ },
+ value(val) {
+ this.selectValue = val
+ }
+ },
+ methods: {
+
}
}
@@ -72,6 +91,7 @@ export default {
border: 1px solid rgba(0, 0, 0, 0.1) !important;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
margin: 3px !important;
+ background-color: #fff;
.image {
width: 100px;
height: 100px;
@@ -81,4 +101,14 @@ export default {
margin: 4px;
}
}
+::v-deep .image-slot {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+ //background: #f5f7fa;
+ color: #909399;
+ font-size: 30px;
+}