(() => {
+ // 正则判断是否为链接
+ if (/^https?:\/\/[^\s/$.?#].\S*$/i.test(props.data.path)) {
+ return { color: 'pink', text: '外链' };
+ }
+ const type = props.data.menuType;
+ if (type === 'M') return { color: 'green', text: '目录' };
+ if (type === 'C') return { color: 'blue', text: '菜单' };
+ if (type === 'F') return { color: '', text: '按钮' };
+ return { color: 'error', text: '未知' };
+ });
+
+ return () => (
+
+ {props.data.menuName}
+ {menuTagProp.value.text}
+
+ );
+ },
+});