diff --git a/src/packages/skeleton/demos/taro/demo5.tsx b/src/packages/skeleton/demos/taro/demo5.tsx index 85be784261..95f67948cf 100644 --- a/src/packages/skeleton/demos/taro/demo5.tsx +++ b/src/packages/skeleton/demos/taro/demo5.tsx @@ -35,8 +35,8 @@ const Demo5 = () => { } /> - NutUI-React - + NutUI-React + 一套京东风格的轻量级移动端React组件库,提供丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。 diff --git a/src/packages/skeleton/skeleton.harmony.css b/src/packages/skeleton/skeleton.harmony.css index 34bf352a46..4e53472b40 100644 --- a/src/packages/skeleton/skeleton.harmony.css +++ b/src/packages/skeleton/skeleton.harmony.css @@ -1,29 +1,8 @@ -.nut-avatar-group { - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center center; - display: inline-block; - position: relative; - flex: 0 0 auto; -} -.nut-avatar-group .nut-avatar { - border: 1px solid #fff; -} -.nut-avatar-group .nut-avatar:not(:first-of-type) { - margin-left: -8px; -} - -[dir=rtl] .nut-avatar-group .nut-avatar:not(:first-of-type), -.nut-rtl .nut-avatar-group .nut-avatar:not(:first-of-type) { - margin-left: 0; - margin-right: -8px; -} - .nut-image { display: block; position: relative; } -.nut-image .nut-img { +.nut-image-default { display: block; width: 100%; height: 100%; @@ -32,7 +11,7 @@ border-radius: 50%; overflow: hidden; } -.nut-image .nut-img-loading { +.nut-image-loading { width: 100%; height: 100%; position: absolute; @@ -45,7 +24,7 @@ background: #f5f6fa; background-size: 100% 100%; } -.nut-image .nut-img-error { +.nut-image-error { width: 100%; height: 100%; position: absolute; @@ -70,81 +49,124 @@ right: 0; } +.nut-avatar-group { + display: flex; + flex-direction: row; + flex: 0 0 auto; +} +.nut-avatar-group-avatar, +.nut-avatar-group .nut-avatar { + border: 1px solid #fff; + margin-left: -8px; +} +.nut-avatar-group-avatar:not(:first-of-type), +.nut-avatar-group .nut-avatar:not(:first-of-type) { + margin-left: -8px; +} + +[dir=rtl] .nut-avatar-group .nut-avatar:not(:first-of-type), +.nut-rtl .nut-avatar-group .nut-avatar:not(:first-of-type) { + margin-left: 0; + margin-right: -8px; +} + .nut-avatar { - background-size: 100% 100%; - background-repeat: no-repeat; - background-position: center center; - display: inline-block; position: relative; flex: 0 0 auto; - text-align: center; } -.nut-avatar .avatar-img { - position: absolute; +.nut-avatar-round { + border-radius: 999px; + overflow: hidden; +} +.nut-avatar-square { + border-radius: 5px; +} +.nut-avatar-first-child { + margin-left: 0; + margin-right: 0; +} +.nut-avatar-img { width: 100%; height: 100%; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); flex-shrink: 0; + background-size: 100% 100%; + background-repeat: no-repeat; + background-position: center center; } -.nut-avatar .icon { +.nut-avatar-icon { background-size: 100% 100%; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); } .nut-avatar .nut-icon-img { width: 100%; height: 100%; } -.nut-avatar .text { - display: inline-block; +.nut-avatar-text { + display: flex; + justify-content: center; + align-items: center; width: 100%; height: 100%; - text-align: center; - overflow: hidden; } - -[dir=rtl] .nut-avatar .avatar-img, -.nut-rtl .nut-avatar .avatar-img { - left: auto; - right: 50%; - transform: translate(50%, -50%); +.nut-avatar-large { + display: flex; + justify-content: center; + align-items: center; + width: 60px; + height: 60px; } -[dir=rtl] .nut-avatar .icon, -.nut-rtl .nut-avatar .icon { - left: auto; - right: 50%; - transform: translate(50%, -50%); +.nut-avatar-large-img { + width: 60px; + height: 60px; } - -.nut-avatar-large { +.nut-avatar-large-img-image { + width: 60px; + height: 60px; +} +.nut-avatar-large-icon { + width: 60px; + height: 60px; +} +.nut-avatar-large .nut-icon-img { + width: 100%; + height: 100%; +} +.nut-avatar-large-text { width: 60px; height: 60px; - line-height: 60px; } - .nut-avatar-small { + display: flex; + justify-content: center; + align-items: center; + width: 32px; + height: 32px; +} +.nut-avatar-small-img-image { + width: 32px; + height: 32px; +} +.nut-avatar-small-text { width: 32px; height: 32px; - line-height: 32px; } - .nut-avatar-normal { + display: flex; + justify-content: center; + align-items: center; width: 40px; height: 40px; - line-height: 40px; } - -.nut-avatar-round { - border-radius: 50%; - overflow: hidden; +.nut-avatar-normal-img-image { + width: 40px; + height: 40px; } - -.nut-avatar-square { - border-radius: 5px; +.nut-avatar-normal .nut-icon-img { + width: 100%; + height: 100%; +} +.nut-avatar-normal-text { + width: 40px; + height: 40px; } .nut-skeleton { diff --git a/src/packages/textarea/demos/h5/demo4.tsx b/src/packages/textarea/demos/h5/demo4.tsx index e9b4998e93..10b429a2fe 100644 --- a/src/packages/textarea/demos/h5/demo4.tsx +++ b/src/packages/textarea/demos/h5/demo4.tsx @@ -2,6 +2,6 @@ import React from 'react' import { TextArea } from '@nutui/nutui-react' const Demo4 = () => { - return