这是一个可放大缩小,拖拽的弹窗组件,主要基于element-ui的vue2版本的包,故使用时,前端项目需要安装element-ui
效果展示
组件位置(把gitee仓库的文件cv出来放这里就行了)
代码使用
js
<template>
<div>
<el-button
type="primary"
size="mini"
icon="el-icon-plus"
@click="openDialog"
>弹窗</el-button
>
<Dialog ref="SidePage" title="弹窗窗~" width="343px" height="300px">
<div style="width: 100%; height: 100%; background-color: #4080ff">
内容
</div>
</Dialog>
</div>
</template>
<script>
import Dialog from "../components/le-dialog/index.vue";
export default {
components: { Dialog },
methods: {
openDialog() {
this.$refs.SidePage.openWindow();
},
},
};
</script>
<style scoped lang="scss"></style>