+
+ :placeholder="placeholder"/>
{{this.$t('standardSelect.standardSelection')}}
-
+
@@ -19,27 +19,17 @@ export default {
name: 'StandardSelection',
components: { StandardSelectionModal },
props: {
- query: {
- type: Object,
- default: () => {
- return {}
- }
- },
value: {
type: String,
default: ''
- }
- },
- computed: {
- isDisabled () {
- if (this.query.dbFieldName === 'replaced_standard') {
- return true
- }
- return false
- }
- },
- data () {
- return {
+ },
+ placeholder: {
+ type: String,
+ default: ''
+ },
+ isDisabled: {
+ type: Boolean,
+ default: false
}
},
methods: {
@@ -49,33 +39,37 @@ export default {
},
// 输入框输入监听
indexClick (event) {
- console.log(event.target.value)
- this.$emit('input', event.target.value)
+ this.$emit('change', event.target.value)
},
modalInput (value) {
- this.$emit('input', value)
+ this.$emit('change', value)
},
- modalChange (fieldName, value) {
- this.$emit('change', fieldName, value)
+ modalNameChange (value) {
+ this.$emit('nameChange', value)
}
+ },
+ model: {
+ prop: 'value',
+ event: 'change'
}
}
diff --git a/src/components/selection/StandardSelectionModal.vue b/src/components/selection/StandardSelectionModal.vue
index 18e989d7..5dbec23b 100644
--- a/src/components/selection/StandardSelectionModal.vue
+++ b/src/components/selection/StandardSelectionModal.vue
@@ -11,26 +11,27 @@