一 我是在这3个js文件都加上了 解决的这个引入问题 找了 (裂开)
1:webpack.dev.conf.js
2:webpack.base.conf.js
3:webpack.base.conf.js
new webpack.ProvidePlugin({
'window.Quill': 'quill'
}),
二 这是网上的解决方法 vue.config.js 但是我加了上了还是报错
const webpack = require('webpack')
module.exports = {
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
'window.Quill': 'quill/dist/quill.js',
'Quill': 'quill/dist/quill.js'
})
]
}}
三 富文本代码
<template>
<div>
<el-upload
:action="uploadUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
ref="uploadImg"
accept=".png,.jpg,.gif"
v-if="this.type == 'url'"
>
</el-upload>
<el-upload
:action="uploadUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
ref="uploadVideo"
accept=".mp4,.avi"