使用
1.安装依赖
npm install avue-plugin-ueditor --save
2.main.js 引入
import AvueUeditor from 'avue-plugin-ueditor'
Vue.use(AvueUeditor);
3.使用
<avue-ueditor v-model="text" :upload="upload" id="nr" prop="nr"></avue-ueditor>
export default {
data() {
text: '',
upload: {
//普通图片上传
action: "https://avueupload.91eic.com/upload/list",
props: {
res: "data.0",
url: "url"
},
//七牛云oss配置
qiniu: {
AK: "",
SK: "",
scope: "test",
url: "http://pm7cc17lu.bkt.clouddn.com/",
deadline: 1
},
//阿里云oss配置
ali: {
region: "oss-cn-beijing",
endpoint: "oss-cn-beijing.aliyuncs.com",
accessKeyId: "",
accessKeySecret: "",
bucket: "avue"
}
},
methods: {
}
},
VUE 项目引入Sass后启动报错 TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string 解决方法
起因 :我是用vue cli创建的项目,vue cli版本是4.4.6
vue文件里面使用lang="scss",各种报错,
解决方法是:肯定要安装sass-loader和node-sass
结果还是老是报错:TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string。
查老半天,各种试,结果就是版本问题
把package.json里面node-sass和sass-loader****版本改成:"node-sass": "^4.11.1","sass-loader": "^7.3.0"就可以了
删掉node_modules文件夹,重新执行npm install,完美解决