Vue 复制excel数据,粘贴到web页面table中

Vue 复制excel数据,粘贴到web页面table中

1、现成插件或者自己写个插件,此处为现成插件(jquery实现的)

https://download.csdn.net/download/zcxbd/12589378

2、将插件集成到现有Vue项目中

2.1 vue项目引用jquery的步骤和使用方法

步骤一:安装jQuery:npm install jquery --save
步骤二: 在项目 build 里的webpack.base.conf.js 里加载webpack文件:const webpack = require('webpack')

在这里插入图片描述

步骤三:在webpack.base.conf.js中的module.exports的最后加入plugins:
// 添加代码
  plugins: [
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery",
      jquery: "jquery",
      "window.jQuery": "jquery"
    })
  ],

在这里插入图片描述

步骤四:导入jquery:import $ from 'jquery'

在这里插入图片描述

步骤五:使用jQuery

在这里插入图片描述

2.2 引入插件js、css文件

步骤一:index.js(或者main.js)中引入自定义js、css

在这里插入图片描述

温馨提示:该插件较为基础,可自行扩展

猜你喜欢

转载自blog.csdn.net/zcxbd/article/details/107207939