|
|
@ -11,14 +11,22 @@ |
|
|
|
v-model="selectedValues" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ok_btn">确定</div> |
|
|
|
<div class="ok_btn" @click="chooseLog">确定</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { ref } from 'vue' |
|
|
|
import { ref, watch } from 'vue' |
|
|
|
const props = defineProps({ |
|
|
|
changeLogVal: { |
|
|
|
type: Function, |
|
|
|
}, |
|
|
|
logVal: { |
|
|
|
type: String, |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const columns = ref([ |
|
|
|
{ text: '1 Log', value: '1' }, |
|
|
|
{ text: '2 Log', value: '2' }, |
|
|
@ -34,7 +42,15 @@ const columns = ref([ |
|
|
|
{ text: '12 Log', value: '12' }, |
|
|
|
]) |
|
|
|
|
|
|
|
const selectedValues = ref(['6']) |
|
|
|
const chooseLog = () => { |
|
|
|
props.changeLogVal(selectedValues.value[0]) |
|
|
|
} |
|
|
|
|
|
|
|
const selectedValues = ref([]) |
|
|
|
|
|
|
|
watch(() => { |
|
|
|
selectedValues.value = [props.logVal] |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|