fix: 菜单图标字段 null 值守卫,补丁版本号 4.8.1
This commit is contained in:
10
package.json
10
package.json
@@ -1,12 +1,12 @@
|
||||
{
|
||||
{
|
||||
"name": "vue3-element-admin",
|
||||
"description": "Vue3 + Vite + TypeScript + Element-Plus 的后台管理模板,vue-element-admin 的 Vue3 版本",
|
||||
"version": "4.8.0",
|
||||
"version": "4.8.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"build": "vue-tsc --noEmit \u0026\u0026 vite build",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
@@ -14,7 +14,7 @@
|
||||
"lint:prettier": "prettier --write \"**/*.{js,cjs,ts,json,css,scss,vue,html,md}\"",
|
||||
"lint:stylelint": "stylelint --cache \"**/*.{css,scss,vue}\" --fix",
|
||||
"lint:lint-staged": "lint-staged",
|
||||
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:stylelint",
|
||||
"lint": "npm run lint:eslint \u0026\u0026 npm run lint:prettier \u0026\u0026 npm run lint:stylelint",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"prepare": "husky",
|
||||
"commit": "git-cz",
|
||||
@@ -121,7 +121,7 @@
|
||||
"vue-tsc": "^3.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
"node": "^20.19.0 || \u003e=22.12.0"
|
||||
},
|
||||
"repository": "https://gitee.com/youlaiorg/vue3-element-admin.git",
|
||||
"author": "有来开源组织",
|
||||
|
||||
@@ -15,7 +15,7 @@ const props = withDefaults(
|
||||
}
|
||||
);
|
||||
|
||||
const isElementIcon = computed(() => props.icon.startsWith("el-icon"));
|
||||
const elementIconName = computed(() => props.icon.replace("el-icon-", ""));
|
||||
const isElementIcon = computed(() => (props.icon || "").startsWith("el-icon"));
|
||||
const elementIconName = computed(() => (props.icon || "").replace("el-icon-", ""));
|
||||
const svgIconClass = computed(() => `i-svg:${props.icon || "menu"}`);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user