可放大缩小弹窗组件,基于element-ui的vue2版本

193 阅读1分钟

源码地址在这里

这是一个可放大缩小,拖拽的弹窗组件,主要基于element-ui的vue2版本的包,故使用时,前端项目需要安装 element-ui

效果展示 图片.png

组件位置(把gitee仓库的文件cv出来放这里就行了) 图片.png

代码使用

<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>