Vue三种3D动态词云实现

这篇具有很好参考价值的文章主要介绍了Vue三种3D动态词云实现。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Vue三种3D动态词云实现

点击打开视频讲解,及效果展示

效果图:
Vue三种3D动态词云实现

一、Vue实现球体词云方式

<template>
  <section class="cloud-bed">
    <div class="cloud-box">
      <span
        v-for="(item, index) in dataList"
        :key="index"
        @click="getDataInfo(item)"
        :style="{color:item.color,background:item.bgColor}"
      >
        {{ item.name }}
      </span>
    </div>
  </section>
</template>
 
<script>
  export default {
    name: "word-cloud",
    data() {
      return {
        timer: 50, // 球体转动速率
        radius: 0, // 词云球体面积大小
        dtr: Math.PI/180, //鼠标滑过球体转动速度
        active: false, // 默认加载是否开启转动
        lasta: 0, // 上下转动
        lastb: 0.5, // 左右转动
        distr: true,
        tspeed: 0, // 鼠标移动上去时球体转动
        mouseX: 0,
        mouseY: 0,
        tagAttrList: [],
        tagContent: null,
        cloudContent: null,
        sinA: '',
        cosA: '',
        sinB: '',
        cosB: '',
        sinC: '',
        cosC: '',
        dataList: [
          {
            name: '页面卡顿\白屏',
            value: '1',
            bgColor:'rgb(57, 193, 207,0.12)',
            color:'#39c1cf',
          },
          {
            name: '闪退',
            value: '8',
            bgColor:'rgb(66, 105, 245,0.12)',
            color:'#4269f5',
          },
          {
            name: '登录问题',
            value: '9',
            bgColor:'rgb(184, 107, 215,0.12)',
            color:'#b86bd7',
          },
          {
            name: '功能bug',
            value: '3',
            bgColor:'rgb(243, 84, 83,0.12)',
            color:'#f35453',
          },
          {
            name: '无法收到短信',
            value: '6',
            bgColor:'rgb(250, 116, 20,0.12)',
            color:'#FA7414',
          },
          {
            name: '人脸/指纹认证失败',
            value: '10',
            bgColor:'rgb(255, 171, 30,0.12)',
            color:'#FFAB1E',
          },
          {
            name: '功能建议',
            value: '2',
            bgColor:'rgb(136, 104, 217,0.12)',
            color:'#8868D9',
          },
          {
            name: 'UI/UX',
            value: '5',
            bgColor:'rgb(42, 184, 230,0.12)',
            color:'#2AB8E6',
          },
          {
            name: '导航性',
            value: '7',
            bgColor:'rgb(117, 133, 162,0.12)',
            color:'#7585A2',
          },
        ]
      }
    },
    mounted () {
      this.$nextTick(() => {
        this.radius = document.querySelector('.cloud-box').offsetWidth / 2
        this.initWordCloud()
      })
    },
    beforeDestroy () {
      clearInterval(this.timer)
    },
    methods:{
      // 获取点击文本信息
      getDataInfo (item) {
        console.log(item, 'item')
      },
      initWordCloud () {
        this.cloudContent = document.querySelector('.cloud-box');
        this.tagContent = this.cloudContent.getElementsByTagName('span');
        for (let i = 0; i < this.tagContent.length; i++) {
          let tagObj = {};
          tagObj.offsetWidth = this.tagContent[i].offsetWidth;
          tagObj.offsetHeight = this.tagContent[i].offsetHeight;
          this.tagAttrList.push(tagObj);
        }
        this.sineCosine(0, 0, 0);
        this.positionAll();
        this.cloudContent.onmouseover = () => {
          this.active=true;
        };
        this.cloudContent.onmouseout = () => {
          this.active=false;
        };
        this.cloudContent.onmousemove = (ev) => {
          let oEvent = window.event || ev;
          this.mouseX = oEvent.clientX - (this.cloudContent.offsetLeft + this.cloudContent.offsetWidth/2);
          this.mouseY = oEvent.clientY - (this.cloudContent.offsetTop + this.cloudContent.offsetHeight/2);
          this.mouseX/= 5;
          this.mouseY/= 5;
        };
	      setInterval(this.update, this.timer);
      },
      positionAll () {
        let phi = 0;
        let theta = 0;
        let max = this.tagAttrList.length;
        let aTmp = [];
        let oFragment = document.createDocumentFragment();
        //随机排序
        for (let i=0; i < this.tagContent.length; i++) {
          aTmp.push(this.tagContent[i]);
        }
        aTmp.sort(() => {
          return Math.random() < 0.5 ? 1 : -1;
        });
        for (let i = 0; i < aTmp.length; i++) {
          oFragment.appendChild(aTmp[i]);
        }
        this.cloudContent.appendChild(oFragment);
        for(let i = 1; i < max + 1; i++){
          if (this.distr) {
            phi = Math.acos(-1 + (2 * i - 1) / max);
            theta = Math.sqrt(max * Math.PI) * phi;
          } else {
            phi = Math.random() * (Math.PI);
            theta = Math.random() * (2 * Math.PI);
          }
          //坐标变换
          this.tagAttrList[i-1].cx = this.radius * Math.cos(theta) * Math.sin(phi);
          this.tagAttrList[i-1].cy = this.radius * Math.sin(theta) * Math.sin(phi);
          this.tagAttrList[i-1].cz = this.radius * Math.cos(phi);
          this.tagContent[i-1].style.left = this.tagAttrList[i-1].cx + this.cloudContent.offsetWidth / 2 - this.tagAttrList[i-1].offsetWidth / 2 + 'px';
          this.tagContent[i-1].style.top = this.tagAttrList[i-1].cy + this.cloudContent.offsetHeight / 2 - this.tagAttrList[i-1].offsetHeight / 2 + 'px';
        }
      },
      update () {
        let angleBasicA;
        let angleBasicB;
 
        if (this.active) {
          angleBasicA = (-Math.min(Math.max(-this.mouseY, -200 ), 200) / this.radius) * this.tspeed;
          angleBasicB = (Math.min(Math.max(-this.mouseX, -200 ), 200) / this.radius) * this.tspeed;
        } else {
          angleBasicA = this.lasta * 0.98;
          angleBasicB = this.lastb * 0.98;
        }
 
        //默认转动是后是否需要停下
        // lasta=a;
        // lastb=b;
 
        // if(Math.abs(a)<=0.01 && Math.abs(b)<=0.01)
        // {
        // return;
        // }
        this.sineCosine(angleBasicA, angleBasicB, 0);
        for(let j = 0; j < this.tagAttrList.length; j++) {
          let rx1 = this.tagAttrList[j].cx;
          let ry1 = this.tagAttrList[j].cy * this.cosA + this.tagAttrList[j].cz * (-this.sinA);
          let rz1 = this.tagAttrList[j].cy * this.sinA + this.tagAttrList[j].cz * this.cosA;
 
          let rx2 = rx1 * this.cosB + rz1 * this.sinB;
          let ry2 = ry1;
          let rz2 = rx1 * (-this.sinB) + rz1 * this.cosB;
 
          let rx3 = rx2 * this.cosC + ry2 * (-this.sinC);
          let ry3 = rx2 * this.sinC + ry2 * this.cosC;
          let rz3 = rz2;
          this.tagAttrList[j].cx = rx3;
          this.tagAttrList[j].cy = ry3;
          this.tagAttrList[j].cz = rz3;
 
          let per = 350 / (350 + rz3);
 
          this.tagAttrList[j].x = rx3 * per - 2;
          this.tagAttrList[j].y = ry3 * per;
          this.tagAttrList[j].scale = per;
          this.tagAttrList[j].alpha = per;
 
          this.tagAttrList[j].alpha = (this.tagAttrList[j].alpha - 0.6) * (10/6);
        }
        this.doPosition();
        this.depthSort();
      },
      doPosition() {
        let len = this.cloudContent.offsetWidth/2;
        let height = this.cloudContent.offsetHeight/2;
        for (let i=0;i < this.tagAttrList.length;i++) {
          this.tagContent[i].style.left = this.tagAttrList[i].cx + len - this.tagAttrList[i].offsetWidth/2 + 'px';
          this.tagContent[i].style.top = this.tagAttrList[i].cy + height - this.tagAttrList[i].offsetHeight/2 + 'px';
          // this.tagContent[i].style.fontSize = Math.ceil(12 * this.tagAttrList[i].scale/2) + 8 + 'px';
          this.tagContent[i].style.fontSize = Math.ceil(12 * this.tagAttrList[i].scale/2) +2 + 'px';
          this.tagContent[i].style.filter = "alpha(opacity="+100 * this.tagAttrList[i].alpha+")";
          this.tagContent[i].style.opacity = this.tagAttrList[i].alpha;
        }
      },
      depthSort(){
        let aTmp = [];
        for (let i = 0; i < this.tagContent.length; i++) {
          aTmp.push(this.tagContent[i]);
        }
        aTmp.sort((item1, item2) => item2.cz - item1.cz);
        for (let i = 0; i < aTmp.length; i++) {
          aTmp[i].style.zIndex=i;
        }
      },
      sineCosine (a, b, c) {
        this.sinA = Math.sin(a * this.dtr);
        this.cosA = Math.cos(a * this.dtr);
        this.sinB = Math.sin(b * this.dtr);
        this.cosB = Math.cos(b * this.dtr);
        this.sinC = Math.sin(c * this.dtr);
        this.cosC = Math.cos(c * this.dtr);
      }
    }
  };
</script>
 
 
<style scoped>
.cloud-bed {
  width: 200px;
  height: 200px;
  margin: auto;
}
.cloud-box{
    position:relative;
    margin:20px auto 0px;
    width: 100%;
    height: 100%;
    background:	#00000000;
  }
 .cloud-box span{
      position: absolute;
      padding: 3px 6px;
      top: 0px;
      font-weight: bold;
      text-decoration:none;
      left:0px;
      background-image: linear-gradient(to bottom, red, #fff);
      background-clip: text;
      color: transparent;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      text-align: center;

      display: flex;
      align-items: center;
      justify-content: center;

      /* line-height: 50px;
      overflow:hidden;
      white-space: nowrap;
      text-overflow: ellipsis; */
    }
</style>

二、Vue实现词云

<template>
  <div id="app">
    <svg style="background-color: black" :width="width" :height="height">
      <a class="fontA" v-for="(tag, index) in tags" :key="`tag-${index}`">
        <text
          :id="tag.id"
          :x="tag.x"
          :y="tag.y"
          :font-size="20 * (600 / (600 - tag.z))"
          :fill-opacity="(400 + tag.z) / 600"
          @mousemove="listenerMove($event)"
          @mouseout="listenerOut($event)"
          @click="clickToPage"
        >
          {{ tag.text }}
        </text>
      </a>
    </svg> 


    <!-- <svg style="background-color: black" :width="width" :height="height">
      <a class="fontA" v-for="(tag, index) in tags" :key="`tag-${index}`">
        <text
          :id="tag.id"
          :x="tag.x"
          :y="tag.y"
          :font-size="20 * (600 / (600 - tag.z))"
          :fill-opacity="(400 + tag.z) / 600"
          @mousemove="listenerMove($event)"
          @mouseout="listenerOut($event)"
          @click="clickToPage"
        >
          {{ tag.text }}
        </text>
      </a>
    </svg> -->
  </div>
</template>

<script>
export default {
  name: "word-cloud",
  //数据,宽,高,半径,半径一般位宽高的一半。
  // props: ["data", "width", "height", "RADIUS"],
  data() {
    return {
      width: 600, //svg宽度
      height: 600, //svg高度
      tagsNum: 0, //标签数量
      RADIUS: 300, //球的半径
      speedX: Math.PI / 360 / 1.5, //球一帧绕x轴旋转的角度
      speedY: Math.PI / 360 / 1.5, //球-帧绕y轴旋转的角度
      tags: [],
      data: [
        "金晨",
        "昆凌",
        "李冰冰",
        "刘诗诗",
        "刘雯",
        "刘亦菲",
        "林心如",
        "林志玲",
        "李湘",
        "李亚男",
        "李若彤",
        "李沁",
        "李嘉欣",
        "林依晨",
        "刘嘉玲",
        "闰妮",
        "李宇春",
        "李晟",
        "罗震环",
        "刘雨欣",
        "李波儿",
        "黎姿",
        "张敏",
        "梁小冰",
        "黎美娴",
        "李彩桦",
        "林允儿",
        "米雪",
        "李菲儿",
        "娄艺潇",
        "李金铭",
        "李萌萌",
      ],
      timer: null,
    };
  },
  computed: {
    CX() {
      //球心x坐标
      return this.width / 2;
    },
    CY() {
      //球心y坐标
      return this.height / 2;
    },
  },
  created() {
    this.initData();
  },
  methods: {
    // 初始化数据
    initData() {
      //初始化标签位置
      let tags = [];
      this.tagsNum = this.data.length;
      for (let i = 0; i < this.data.length; i++) {
        let tag = {};
        let k = -1 + (2 * (i + 1) - 1) / this.tagsNum;
        let a = Math.acos(k);
        let b = a * Math.sqrt(this.tagsNum * Math.PI); //计算标签相对于球心的角度
        tag.text = this.data[i];
        tag.x = this.CX + this.RADIUS * Math.sin(a) * Math.cos(b); //根据标签角度求出标签的x,y,z坐标
        tag.y = this.CY + this.RADIUS * Math.sin(a) * Math.sin(b);
        tag.z = this.RADIUS * Math.cos(a);
        tag.id = i; // 给标签添加id
        tags.push(tag);
        console.log(tag);
      }
      this.tags = tags; //让vue替我们完成视图更新
    },
    // 纵向旋转
    rotateX(angleX) {
      var cos = Math.cos(angleX);
      var sin = Math.sin(angleX);
      for (let tag of this.tags) {
        var y1 = (tag.y - this.CY) * cos - tag.z * sin + this.CY;
        var z1 = tag.z * cos + (tag.y - this.CY) * sin;
        tag.y = y1;
        tag.z = z1;
      }
    },
    // 横向旋转
    rotateY(angleY) {
      var cos = Math.cos(angleY);
      var sin = Math.sin(angleY);
      for (let tag of this.tags) {
        var x1 = (tag.x - this.CX) * cos - tag.z * sin + this.CX;
        var z1 = tag.z * cos + (tag.x - this.CX) * sin;
        tag.x = x1;
        tag.z = z1;
      }
    },
    // 运动函数
    runTags() {
      if (typeof this.timer === "number") {
        clearInterval(this.timer);
        this.timer = null;
      }
      let timer = setInterval(() => {
        this.rotateX(this.speedX);
        this.rotateY(this.speedY);
      }, 17);
      this.timer = timer;
    },
    // 监听移入事件
    listenerMove(e) {
      if (e.target.id) {
        clearInterval(this.timer);
      }
    },
    // 监听移出事件
    listenerOut(e) {
      if (e.target.id) {
        this.runTags();
      }
    },
    // 点击事件
    clickToPage() {},
  },
  mounted() {
    this.runTags();
  },
};
</script>


<style scoped>
.fontA {
  fill: #60cae9;
  font-weight: bold;
}
.fontA:hover {
  fill: #ffffff;
  cursor: pointer;
}
</style>

三、jquery实现词云

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <title>3D词云</title>
  <style>
    .wordCloud__tagBall {
      margin: 50px auto;
      position: relative;
    }

    .wordCloud__tag {
      display: block;
      position: absolute;
      left: 0px;
      top: 0px;
      color: green;
      text-decoration: none;
      font-size: 15px;
      font-family: '微软雅黑';
      font-weight: bold;
      cursor: pointer;
    }

    .wordCloud__tag:hover {
      color: red !important;
    }

    .wordCloud__home {
      display: flex;
      justify-content: center;
    }
  </style>
</head>

<body>
  <div id="main">
    <div class="wordCloud__tagBall" style="width: 500px; height: 500px ">
    </div>
    <div class="wordCloud__home">
      <button class="btn0" type="button">降低速度</button>
      <button class="btn1" type="button">横向顺时针</button>
      <button class="btn2" type="button">横向逆时针</button>
      <button class="btn3" type="button">纵向顺时针</button>
      <button class="btn4" type="button">纵向逆时针</button>
      <button class="btn5" type="button">增加速度</button>
    </div>
  </div>
  <script src = "../node_modules/jquery/dist/jquery.js"></script>
  <script src = "../node_modules/jquery/dist/jquery-ui.min.js"></script>
  <script>
    $(function () {
      var myval
      var width = 500
      var height = 500
      var contentEle = []
      var data = ['云图', '是个啥', '他啥都不是', '他就是词云', '就是他呆子', '傻子和疯子', '营养快线', '哈哈哈到家', '瑞士军刀', 'DW情侣对表', '清风抽纸', '这一刻更清晰', '债券评级', '呵呵旧宫style', '云图', '是个啥', '他啥都不是', '他就是词云', '就是他呆子', '傻子和疯子', '营养快线', '哈哈哈到家', '瑞士军刀', 'DW情侣对表', '清风抽纸', '这一刻更清晰', '债券评级', '呵呵旧宫style']
      var direction = '-1'
      var speed = 3000
      var color = ['#2D4DB6', '#04B67C', '#D1AF07', '#E27914', '#CB4A4D', '#B02690']
      function innit() {
        const RADIUSX = (width - 50) / 2
        const RADIUSY = (height - 50) / 2
        contentEle = []
        for (let i = 0; i < data.length; i += 1) {
          const k = -1 + (2 * (i + 1) - 1) / data.length
          const a = Math.acos(k)
          const b = a * Math.sqrt(data.length * Math.PI)
          const x = RADIUSX * Math.sin(a) * Math.cos(b)
          const y = RADIUSY * Math.sin(a) * Math.sin(b)
          const z = RADIUSX * Math.cos(a)
          const singleEle = {
            x,
            y,
            z,
            style: {},
          }
          contentEle.push(singleEle)
        }
        animate()
      }
      function animate() {
        rotateX()
        rotateY()
        move()
        window.requestAnimationFrame(animate)
      }
      function rotateX() {
        const angleX = ['-1', '1'].includes(direction)
          ? Math.PI / Infinity
          : Math.PI / ((Number(direction) / 2) * Number(speed))
        const cos = Math.cos(angleX)
        const sin = Math.sin(angleX)
        contentEle = contentEle.map((t) => {
          const y1 = t.y * cos - t.z * sin
          const z1 = t.z * cos + t.y * sin
          return {
            ...t,
            y: y1,
            z: z1,
          }
        })
      }
      function rotateY() {
        const angleY = ['-2', '2'].includes(direction)
          ? Math.PI / Infinity
          : Math.PI / (Number(direction) * Number(speed))
        const cos = Math.cos(angleY)
        const sin = Math.sin(angleY)
        contentEle = contentEle.map((t) => {
          const x1 = t.x * cos - t.z * sin
          const z1 = t.z * cos + t.x * sin
          return {
            ...t,
            x: x1,
            z: z1,
          }
        })
      }
      function move() {
        const CX = width / 2
        const CY = height / 2
        contentEle = contentEle.map((singleEle) => {
          const { x, y, z } = singleEle
          const fallLength = 500
          const RADIUS = (width - 50) / 2
          const scale = fallLength / (fallLength - z)
          const alpha = (z + RADIUS) / (2 * RADIUS)
          const left = `${x + CX - 15}px`
          const top = `${y + CY - 15}px`
          const transform = `translate(${left}, ${top}) scale(${scale})`
          const style = {
            ...singleEle.style,
            opacity: alpha + 0.5,
            zIndex: parseInt(scale * 100, 10),
            transform,
          }
          return {
            x,
            y,
            z,
            style,
          }
        })
      }
      function handleRotate(value) {
        direction = value
      }
      function handleSpeed(value) {
        const speedObj = {
          fast: -50,
          slow: 50,
        }
        speed += speedObj[value]
        if (speed === 0) {
          speed = 50
        }
      }
      function init() {
        var html_ = ''
        for (var i = 0; i < data.length; i++) {
          let color_ = color[i % color.length]
          html_ += '<span class="wordCloud__tag" style="color:' + color_ + ';opacity:' + contentEle[i].style.opacity + ';transform:' + contentEle[i].style.transform + ';zIndex:' + contentEle[i].style.zIndex + '">' + data[i] + '</span>'
        }
        $('.wordCloud__tagBall').html(html_)
      }


      innit()
      myval = setInterval(() => {
        init()
      }, 10)

      //横向顺时针
      $('.btn1').on('click', function () {
        handleRotate('-1')
      })
      //横向逆时针
      $('.btn2').on('click', function () {
        handleRotate('1')
      })
      //纵向顺时针
      $('.btn3').on('click', function () {
        handleRotate('-2')
      })
      //纵向逆时针
      $('.btn4').on('click', function () {
        handleRotate('2')
      })
      //增加速度
      $('.btn5').on('click', function () {
        handleSpeed('fast')
      })
      //增加速度
      $('.btn0').on('click', function () {
        handleSpeed('slow')
      })

      $('.wordCloud__tagBall').on('mouseenter', function () {
        clearInterval(myval)
      })
      $('.wordCloud__tagBall').on('mouseleave', function () {
         myval = setInterval(() => {
          init()
        }, 10)
      })
      $('body').on('click', 'span', function () {
        console.log($(this)[0].innerHTML);
      })
    })
  </script>
</body>

</html>

若对您有帮助,请点击跳转到B站一键三连哦!感谢支持!!!文章来源地址https://www.toymoban.com/news/detail-505682.html

到了这里,关于Vue三种3D动态词云实现的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • vue深拷贝的三种实现方式

    vue深拷贝的三种实现方式:1、通过递归方式实现深拷贝;2、JSON.parse(JSON.stringify(obj));3、jQuery的extend方法实现深拷贝。 深拷贝: 拷贝的是对象或者数组内部数据的实体,重新开辟了内存空间存储数据; 浅拷贝: 拷贝的是引用类型的指针,副本和原数组或对象指向同一个内

    2024年01月25日
    浏览(39)
  • 使用Vue三种方法实现简单计算器

    代码实现了一个简单的计算器,用户可以在输入框中输入两个数字,选择一个操作符,并点击“等于”按钮,Vue.js会根据用户的输入进行计算,并将结果显示在另一个输入框中。 以下是效果图 第一种:使用methods方法实现 1:首先,引入Vue.js库。在代码中使用了script 标签引入

    2024年02月08日
    浏览(42)
  • 用Vue的三种方法实现加减乘除运算

    js插件:vue.js 教程: 首先在工具内引入vue.js 然后在body里面创建一个div并设置id,我这里给id命名为\\\"app\\\" 在id命名为\\\"app\\\"的div内使用input标签和select标签来设置运算框 然后用 methods方法 computed方法 watch(侦听器)方法 做出3种不同的加减乘除运算 第一种computed方法: 接下来我们在

    2024年02月09日
    浏览(87)
  • vue中js实现点击复制文本到剪贴板-三种方案

    因为在网上找了一些很杂乱 不适用 所以自己写一篇记录分享一下 vue中js实现点击复制文本到剪贴板-三种方案 效果: 首先,我们需要安装clipboard库,它是一个轻量级的JavaScript库,用于复制/粘贴文本到剪贴板。 命令行运行npm install clipboard --save进行安装。 使用该库实现代码如

    2024年02月14日
    浏览(28)
  • 三种方法实现tab栏切换(CSS方法、JS方法、Vue方法)

    给下图的静态页面添加tab栏切换效果  

    2024年02月13日
    浏览(37)
  • vue2+vue-3d-loader 实现3D模型展示

    1.安装 vue-3d-loader npm i vue-3d-loader@1.x.x -S  注意vue2只能用1.几的版本 npm i vue-3d-loader会安装最新版本会导致不显示 2.main.js文件配置,此为全局注册 import vue3dLoader from \\\"vue-3d-loader\\\"; Vue.use(vue3dLoader) 3.具体使用 template   vue3dLoader     backgroundColor=\\\"rgb(216,217,219)\\\"     :height=\\\"600\\\"    

    2024年02月02日
    浏览(34)
  • vue3 微信扫码登录及获取个人信息实现的三种方法

    一、流程: 微信提供的扫码方式有两种,分别是: 根据文档我们可以知道关于扫码授权的模式整体流程为: 二、前置条件: 微信开发官网 申请: appid: ‘’, // 后端提供 redirect_uri: ‘’, // 后端提供 AppSecret // 后端提供 三、具体登录实现 实现方式一: 使用vue插件: 使用: 结果

    2023年04月13日
    浏览(36)
  • vue2/3项目中使用Vue Carousel 3D实现 Carousel 3D 轮播

    项目需求大概是这个样子,这种并不能通过围成一周再旋转父级实现,因此图方便选择了组件 轮播    vue2,可以直接使用 Playground - Vue Carousel 3D - 3D Carousel for Vue.js  进行改造成自己需要的样子。文档为英文,中文可参考这位 Vue 3D轮播插件vue-carousel-3d_memory_zzz的博客-CSDN博客

    2024年02月08日
    浏览(45)
  • vue3+heightchart实现3D饼图,echarts3D饼图,3D饼图引导线实现

     附上 heightcharts 官网地址  Highcharts 演示 | Highcharts https://www.hcharts.cn/demo/highcharts 首先需要下载一下 heightcharts执行命令  然后初始化: 如此你就得到了一个3D饼图 

    2024年02月13日
    浏览(27)
  • Echarts 3d地球实现(Vue框架)

    最近迷上了echarts实现数据可视化了,也确实因为工作需要,目前公司需要我们来在自己的新厂房展厅把自己的产品展示出来,我所在研发部软件组,第一个想到的就是使用echarts来实现一个数据可视化的大屏了,下面就带着大家看看我这段时间使用Echarts来实现一个3D地球的过

    2024年04月25日
    浏览(21)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包