flat: 暂存
This commit is contained in:
100
src/components/promptDialog/index.vue
Normal file
100
src/components/promptDialog/index.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="visible"
|
||||
width="40%"
|
||||
:before-close="handleClose"
|
||||
append-to-body>
|
||||
<span>{{ subTitle }}</span>
|
||||
<div class="input_box">
|
||||
<el-input type="textarea" v-model="input" placeholder="请输入内容"></el-input>
|
||||
</div>
|
||||
<div class="kuajie">
|
||||
<div class="kuajie_span" v-for="(item, index) in tips" :key="index" @click="input += item">{{ index + 1 }}:{{
|
||||
item
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="warning" @click="handleCancel">驳回</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
const classEnum = {
|
||||
small: '56px',
|
||||
default: '86px',
|
||||
large: '106px',
|
||||
largeX: '126px',
|
||||
largeXX: '146px',
|
||||
largeXXL: '186px',
|
||||
}
|
||||
export default {
|
||||
name: "promptDialog",
|
||||
data() {
|
||||
return {
|
||||
input: '',
|
||||
}
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
fullScreen: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
title: String,
|
||||
subTitle: String,
|
||||
tips: {
|
||||
default: [],
|
||||
type: Array,
|
||||
required: false,
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$emit('onClose')
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('onCancel', this.input)
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$emit('onConfirm', this.input)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.input_box {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.kuajie {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 30px;
|
||||
|
||||
.kuajie_span {
|
||||
padding: 5px 5px;
|
||||
margin-right: 20px;
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.kuajie_span:active {
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user