vue3
晚星@
这个作者很懒,什么都没留下…
展开
-
antd-vue table合并单元格
<template> <a-table :columns="columns" :data-source="data" bordered> <template #name="{ text }"> <a>{{ text }}</a> </template> </a-table></template><script>imp原创 2022-02-11 10:22:37 · 1040 阅读 · 2 评论 -
pdf.js 适用于接口返回的是一个文件流展示
首先需要把pdf.JS下载下来放到自己的项目中我们可以在项目中直接掉viewer.html window.open(process.env.BASE_URL + 'static/pdf/web/viewer.html')如果从接口中获取加载pdf var pdfUrl = this.$API.EPE_GET_EECOPMTRACT_PREVIEWEECONTRACT + '?id=' + this.info.id window.open( process.env.BASE_URL + 'st.原创 2022-01-12 14:28:12 · 685 阅读 · 1 评论 -
vuecli2及vuecli3 element 骨架屏 vue-skeleton-webpack-plugin
优点加速或减少HTTP请求损耗延迟加载减少请求内容的体积优化用户等待体验components/Skeleton.vue<template> <div class="skeleton-wrapper"> <section class="skeleton-block"> <!-- eslint-disable vue/max-len --> 骨架内容 </section> </div原创 2021-12-31 10:22:18 · 1121 阅读 · 9 评论 -
vue3中如何用vue2中的this
两种方案分别如下:proxy = 》 this<script lang="ts">import { getCurrentInstance, ComponentInternalInstance } from "vue";export default function useCurrentInstance() { const { appContext } = getCurrentInstance() as ComponentInternalInstance; const原创 2021-12-27 10:09:49 · 1746 阅读 · 0 评论 -
第一次使用vue3
一.ref、reactive、toRef、toRefs四种定义值reactivereactive 用于为对象添加响应式状态。接收一个js对象作为参数,返回一个具有响应式状态的副本。获取数据值的时候直接获取,不需要加.value 参数只能传入对象类型import { reactive } from 'vue' // 响应式状态const state = reactive({ count: 0}) // 打印count的值console.log(state.count)ref原创 2021-12-13 14:59:50 · 112 阅读 · 0 评论