diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b8b24d0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.js text eol=lf +*.json text eol=lf +*.ts text eol=lf \ No newline at end of file diff --git a/package.json b/package.json index 2ccdc04..135c41d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "0.5.1", + "version": "0.5.2", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit --skipLibCheck && vite build", @@ -11,7 +11,7 @@ "dependencies": { "array.prototype.flat": "^1.2.4", "axios": "^0.21.1", - "cl-admin-crud-vue3": "^0.3.0", + "cl-admin-crud-vue3": "^0.3.12", "clipboard": "^2.0.8", "clone-deep": "^4.0.1", "codemirror": "^5.60.0", diff --git a/src/cool/modules/base/components/menu/slider/index.scss b/src/cool/modules/base/components/menu/slider/index.scss index fb46bc4..6051619 100644 --- a/src/cool/modules/base/components/menu/slider/index.scss +++ b/src/cool/modules/base/components/menu/slider/index.scss @@ -50,6 +50,12 @@ } } } + + &__popup { + .icon-svg { + margin-right: 10px; + } + } } .cl-slider-menu__submenu { diff --git a/src/cool/modules/base/components/menu/slider/index.tsx b/src/cool/modules/base/components/menu/slider/index.tsx index 7d3ade7..0c79b92 100644 --- a/src/cool/modules/base/components/menu/slider/index.tsx +++ b/src/cool/modules/base/components/menu/slider/index.tsx @@ -51,7 +51,7 @@ export default defineComponent({ }, render(ctx: any) { - function deepMenu(list: any) { + function deepMenu(list: any, index: number) { return list .filter((e: any) => e.isShow) .map((e: any) => { @@ -62,21 +62,22 @@ export default defineComponent({ , { index: String(e.id), - key: e.id + key: e.id, + "popper-class": "cl-slider-menu__popup" }, { title: () => { - return !ctx.menuCollapse ? ( + return ctx.menuCollapse && index == 1 ? ( + + ) : ( {e.name} - ) : ( - ); }, default() { - return deepMenu(e.children); + return deepMenu(e.children, index + 1); } } ); @@ -102,7 +103,7 @@ export default defineComponent({ }); } - const children = deepMenu(ctx.menuList); + const children = deepMenu(ctx.menuList, 1); return ( ctx.visible && ( diff --git a/yarn.lock b/yarn.lock index 39c6eb0..07c3c15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -930,10 +930,10 @@ change-case@^4.1.2: optionalDependencies: fsevents "~2.3.1" -cl-admin-crud-vue3@^0.3.0: - version "0.3.0" - resolved "https://registry.nlark.com/cl-admin-crud-vue3/download/cl-admin-crud-vue3-0.3.0.tgz?cache=0&sync_timestamp=1624438098113&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcl-admin-crud-vue3%2Fdownload%2Fcl-admin-crud-vue3-0.3.0.tgz#393c314bb7c20f84f2d4d460fe62b3c538f3e1b3" - integrity sha1-OTwxS7fCD4Ty1NRg/mKzxTjz4bM= +cl-admin-crud-vue3@^0.3.12: + version "0.3.12" + resolved "https://registry.nlark.com/cl-admin-crud-vue3/download/cl-admin-crud-vue3-0.3.12.tgz#afbbb52711f8f6e032dcacbd22977c9fa58d8662" + integrity sha1-r7u1JxH49uAy3Ky9Ipd8n6WNhmI= dependencies: array.prototype.flat "^1.2.4" core-js "^3.6.5"