【chromeDownload】自定义组件:多用于登录框底部提供下载Chrome谷歌浏览器的链接

chromeDownload

html 复制代码
<template>
  <div :class="$options.name" :styleType="styleType">
    <el-divider />
    <div class="chrome-text">
      <div class="left">推荐使用先进的浏览器</div>
      <div class="right">
        <div class="left">
          <img src="~@/../static/img/login/chrome.svg" />
        </div>
        <div class="right">
          <p>谷歌浏览器</p>
          <p>Google Chrome</p>
        </div>
      </div>
    </div>
    <div class="chrome-download-link">
      <el-tag size="mini" @click="download(0)">官网下载</el-tag>
      <el-tag size="mini" @click="download(1)">下载在线安装包</el-tag>
      <el-tag size="mini" @click="download(2)">下载离线安装包</el-tag>
    </div>
  </div>
</template>
<script>
export default {
  name: `chromeDownload`,
  components: {},
  data() {
    return {
      visible: false,
      form: {},
      styleType: null,

      links: [
        `https://www.google.cn/chrome`,
        `https://www.wedoyun.cn/share/software/ChromeSetup.exe`,
        `https://www.wedoyun.cn/share/software/ChromeStandaloneSetup64.exe`,
      ],
    };
  },

  props: [`value`, `data`],

  watch: {
    data: {
      handler(newValue, oldValue) {
        //console.log(`深度监听${this.$options.name}:`, newValue, oldValue);
        if (Object.keys(newValue || {}).length) {
          this.form = this.$g.deepCopy(newValue);
          this.$g.cF2CP(`styleType`, this);
        }
      },
      deep: true,
      immediate: true,
    },
  },
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    download(type) {
      this.$g.go2RouterPath(
        {
          path: this.links[type],
          query: {},
          target: `_blank`,
        },
        this
      );
    },
  },
};
</script>
<style lang="scss" scoped>
.chromeDownload {
  box-sizing: border-box;
  padding: 10px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: #8896b3;
  line-height: normal;
  flex-direction: column;
  .el-divider {
    margin: 0;
  }
  .chrome-text {
    box-sizing: border-box;
    padding-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    & > .left {
      margin-right: 10px;
    }
    & > .right {
      display: flex;
      align-items: center;
      & > .left {
        margin-right: 5px;
        img {
          width: 30px;
          height: 30px;
          object-position: center;
          object-fit: contain;
        }
      }
      & > .right {
        text-align: left;
        p {
        }
      }
    }
  }
  .chrome-download-link {
    margin-top: 5px;
    display: flex;
    align-items: center;
    & > * + * {
      margin-left: 5px !important;
      margin-right: 0 !important;
    }
    & > * {
      cursor: pointer;
      transition: 0.2s;
      &:hover {
        border-color: #1f75d5;
        background-color: #1f75d5;
        color: white;
      }
      &:active {
        transform: translate(1px, 1px);
        opacity: 0.618;
      }
    }
  }
}
</style>
相关推荐
子兮曰3 天前
jev-ultrafast 深度解析:7 秒订机票的浏览器 Agent 是如何炼成的
前端·后端·agent
子兮曰3 天前
Jev 爆发一周:7 秒 Agent 背后的 System One 生态与三场争议
前端·后端·ai编程
前端小万3 天前
写公众号赚了 3000 块后,我做了一款叫 "一键成稿" 的软件
前端·微信小程序
爱勇宝3 天前
ZCode 开源 24 小时:一份没有历史的账本,回答不了"有没有偷代码"
前端·后端·chatglm (智谱)
A黄俊辉A3 天前
uniapp webview中实现 app和内嵌的H5双向通信
vue.js·json
三十而立洋3 天前
Cookie 详解:从产生到安全,一次讲透
前端·javascript
卡布鲁3 天前
把一个 Vite + Vue3 应用塞进 qiankun (React + Umi3) 主站:十个坑的复盘
前端·javascript·react.js
honkun63 天前
vue 表格组件 vxe-table 配置 ajax 请求自动加载数据与表单查询
vue.js·vxe-table
kybs19913 天前
全球灾害数据分析可视化 毕业设计-附源码66794
vue.js·spring boot·mysql·安全·django·c#·asp.net
汉堡大王95273 天前
Jev:不是聊天机器人, 而是一个智能 if 语句
前端·人工智能·后端