You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
952 B
45 lines
952 B
<template>
|
|
<div>
|
|
<my-pop
|
|
:pop_type="pop_type"
|
|
:title="title"
|
|
:cancel="cancel"
|
|
:confirm="confirm"
|
|
:content="content"
|
|
:inp_placeholder="inp_placeholder"
|
|
@confirm="popConfirm"
|
|
@cancel="popCancel"
|
|
></my-pop>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import pop from "@/components/pop";
|
|
export default {
|
|
name: "HelloView",
|
|
components: {
|
|
"my-pop": pop,
|
|
},
|
|
data() {
|
|
return {
|
|
pop_type: "content",
|
|
title: "弹窗标题",
|
|
cancel: "取消",
|
|
confirm: "确认",
|
|
content: "弹窗显示的文本内容",
|
|
inp_placeholder: "请输入内容",
|
|
};
|
|
},
|
|
methods: {
|
|
// 弹窗左边按钮触发函数
|
|
popConfirm(e) {
|
|
// e 用于接受弹窗传递的数据
|
|
// 点击函数触发弹窗 confirm
|
|
console.log("click confirm");
|
|
},
|
|
// 弹窗右边按钮触发函数
|
|
popCancel() {
|
|
console.log("click cancel");
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|