当前位置:网站首页>解决uniapp插件robin-editor设置字体颜色和背景颜色报错的问题
解决uniapp插件robin-editor设置字体颜色和背景颜色报错的问题
2022-06-26 03:07:00 【Lcwai】
今天在h5上使用uniapp开发时使用robin-editor(https://ext.dcloud.net.cn/plugin?id=1345),设置字体颜色和背景颜色报错
报错如下:
[system]TypeError: Cannot read property 'open' of undefined
at VueComponent.eval (webpack-internal:///vK4t:264:28)
at Array.<anonymous> (http://localhost:8080/static/js/chunk-vendors.js:7100:12)
at flushCallbacks (http://localhost:8080/static/js/chunk-vendors.js:7026:14)
at <anonymous>
明显是调用不到那个方法,评论中有人回复
照做没有效果,看了源码,发现116行
<uni-popup type="bottom"><robin-color-picker :color="color" @confirm="colorChanged" ref="color"></robin-color-picker></uni-popup>
由于先加载popup,再加载robin-color-picker,所以直接this.$refs.color是没有值的。
将其改成
<uni-popup type="bottom" ref="popup"><robin-color-picker :color="color" @confirm="colorChanged" ref="color"></robin-color-picker></uni-popup>
再将原261行删除
this.$refs.color.open(color);
修改为
this.$refs.popup.open('bottom');
this.$nextTick(()=>{
this.$refs.color.open(color);
})
完美解决。
边栏推荐
- Preparation for wechat applet development
- Is it safe for individuals to buy stocks with flush software? How to buy stocks
- 栖霞消防开展在建工地消防安全培训
- 虫子 拷贝构造 运算符重载
- UE5全局光照系统Lumen解析与优化
- Plug in installation and shortcut keys of jupyter notebook
- 请求对象,发送请求
- Wealth freedom skills: commercialize yourself
- Learn from Taiji makers - mqtt (V) publish, subscribe and unsubscribe
- Kotlin quick start
猜你喜欢
随机推荐
栖霞消防开展在建工地消防安全培训
Network PXE starts winpe and supports UEFI and legacy boot
[hash table] improved, zipper hash structure - directly use two indexes to search, instead of hashing and% every time
On virtual memory and oom in project development
解析社交机器人中的技术变革
MySQL开发环境
Insect structure and Deconstruction
《你不可不知的人性》經典語錄
Graphics card, GPU, CPU, CUDA, video memory, rtx/gtx and viewing mode
网络PXE启动WinPE,支持UEFI和LEGACY引导
[reading papers] fbnetv3: joint architecture recipe search using predictor training network structure and super parameters are all trained by training parameters
关于#sql#的问题:SQL问题--账号多地登录的SQL代码
文献阅读---优化RNA-seq研究以研究除草剂耐药性(综述)
Scratch returns 400
Analysis of the multiple evaluation system of children's programming
Is Guoxin golden sun reliable? Is it safe to open a securities account?
Kotlin quick start
Cloud Computing Foundation -0
Is it safe to open an account in flush online? How to open a brokerage account online
Gradient








