2017-03-09 18:31:47 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-06-27 09:51:38 +08:00
|
|
|
<p>
|
|
|
|
Name: {{ value }}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<Button @click="handleRender">Custom content</Button>
|
|
|
|
</p>
|
2017-03-09 18:31:47 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-06-27 09:51:38 +08:00
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
value: ''
|
|
|
|
}
|
|
|
|
},
|
2017-03-09 18:31:47 +08:00
|
|
|
methods: {
|
2018-06-27 09:51:38 +08:00
|
|
|
handleRender () {
|
|
|
|
this.$Modal.confirm({
|
|
|
|
title: '真不错呀',
|
|
|
|
render: (h) => {
|
|
|
|
return h('Input', {
|
|
|
|
props: {
|
|
|
|
value: this.value,
|
|
|
|
autofocus: true,
|
|
|
|
placeholder: 'Please enter your name...'
|
|
|
|
},
|
|
|
|
on: {
|
|
|
|
input: (val) => {
|
|
|
|
this.value = val;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
2017-03-09 18:31:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|