We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f0217f commit f03ec30Copy full SHA for f03ec30
src/views/system/menu/index.vue
@@ -189,6 +189,7 @@ import IconSelect from "@/components/IconSelect";
189
190
import { SystemMenuTypeEnum, CommonStatusEnum } from '@/utils/constants'
191
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
192
+import {isExternal} from "@/utils/validate";
193
194
export default {
195
name: "Menu",
@@ -346,7 +347,7 @@ export default {
346
347
|| this.form.type === SystemMenuTypeEnum.MENU) {
348
// 如果是外链,则不进行校验
349
const path = this.form.path
- if (path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
350
+ if (!isExternal(path)) {
351
// 父权限为根节点,path 必须以 / 开头
352
if (this.form.parentId === 0 && path.charAt(0) !== '/') {
353
this.$modal.msgSuccess('前端必须以 / 开头')
0 commit comments