File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed
Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -358,14 +358,41 @@ defineExpose({
358358 toggleAnimation,
359359 toggleAnnotator
360360});
361+
362+ const notSupported = computed (() => {
363+ let message = ` The provided component ${ props .component } does not exist.` ;
364+ if ([' VueUiIcon' , ' VueUiPattern' , ' Arrow' ].includes (props .component )) {
365+ message = ` ${ props .component } is not supported by the VueDataUi universal component. You must import it individually.` ;
366+ console .warn (message);
367+ return {
368+ status: ' notSupported' ,
369+ message
370+ }
371+ }
372+ console .warn (message);
373+ return {
374+ status: ' unknown' ,
375+ message
376+ }
377+ })
378+
361379 </script >
362380
363381<template >
364- <div v-if =" isError" style =" width :100% ; display : flex ; gap :6px ; align-items :center ; color :#FF0000 " >
382+ <div
383+ v-if =" isError"
384+ :style =" {
385+ width:'100%',
386+ display: 'flex',
387+ gap:'6px',
388+ alignItems: 'center',
389+ color: notSupported.status === 'notSupported' ? '#FF9000' : '#FF0000'
390+ }" >
365391 <div style =" width :36px " >
366- <BaseIcon name =" moodFlat" stroke =" #FF0000" />
392+ <BaseIcon name =" moodFlat" v-if =" notSupported.status === 'unknown'" stroke =" #FF0000" />
393+ <BaseIcon name =" circleExclamation" v-if =" notSupported.status === 'notSupported'" stroke =" #FF9000" />
367394 </div >
368- The provided component " {{ component }}" does not exist
395+ {{ notSupported.message}}
369396 </div >
370397
371398 <component
You can’t perform that action at this time.
0 commit comments