{{ 'components.card.mediaDemo.title' | translate }}
{{ 'components.card.mediaDemo.description' | translate }}
diff --git a/devui/card/demo/card-demo.component.ts b/devui/card/demo/card-demo.component.ts
index 3531ad1e..86b1bea0 100644
--- a/devui/card/demo/card-demo.component.ts
+++ b/devui/card/demo/card-demo.component.ts
@@ -8,6 +8,12 @@ import { Subscription } from 'rxjs';
templateUrl: './card-demo.component.html',
})
export class CardDemoComponent implements OnInit, OnDestroy {
+ cardInteractiveSourceData: Array
= [
+ { title: 'HTML', language: 'xml', code: require('./card-interactive/card-interactive.component.html?raw') },
+ { title: 'TS', language: 'typescript', code: require('./card-interactive/card-interactive.component.ts?raw') },
+ { title: 'SCSS', language: 'scss', code: require('./card-interactive/card-interactive.component.scss?raw') },
+ ];
+
CardDemoBasic: Array = [
{ title: 'HTML', language: 'xml', code: require('./basic/basic.component.html?raw') },
{ title: 'TS', language: 'typescript', code: require('./basic/basic.component.ts?raw') },
@@ -46,6 +52,7 @@ export class CardDemoComponent implements OnInit, OnDestroy {
setNavValues(values) {
this.navItems = [
{ dAnchorLink: 'card-basic', value: values['card-basic'] },
+ { dAnchorLink: 'card-interactive-usage', value: values['card-interactive-usage'] },
{ dAnchorLink: 'card-with-media', value: values['card-with-media'] },
{ dAnchorLink: 'card-custom', value: values['card-custom'] },
];
diff --git a/devui/card/demo/card-demo.module.ts b/devui/card/demo/card-demo.module.ts
index 6e83e42b..bbf5ae6d 100644
--- a/devui/card/demo/card-demo.module.ts
+++ b/devui/card/demo/card-demo.module.ts
@@ -13,9 +13,10 @@ import { BasicComponent } from './basic/basic.component';
import { CardDemoComponent } from './card-demo.component';
import { CustomComponent } from './custom/custom.component';
import { WithMediaComponent } from './with-media/with-media.component';
+import { CardInteractiveComponent } from './card-interactive/card-interactive.component';
@NgModule({
- declarations: [CardDemoComponent, BasicComponent, CustomComponent, WithMediaComponent],
+ declarations: [CardDemoComponent, BasicComponent, CustomComponent, WithMediaComponent, CardInteractiveComponent],
imports: [
TranslateModule,
CommonModule,
@@ -26,7 +27,7 @@ import { WithMediaComponent } from './with-media/with-media.component';
AvatarModule,
ButtonModule,
RouterModule.forChild([
- { path: '', redirectTo: 'demo' },
+ { path: '', redirectTo: 'demo', pathMatch: 'full' },
{ path: 'demo', component: CardDemoComponent },
{ path: 'api', component: DevUIApiComponent, data: {
'zh-cn': require('!html-loader!markdown-loader!../doc/api-cn.md'),
diff --git a/devui/card/demo/card-interactive/card-interactive.component.html b/devui/card/demo/card-interactive/card-interactive.component.html
new file mode 100644
index 00000000..5934c0a6
--- /dev/null
+++ b/devui/card/demo/card-interactive/card-interactive.component.html
@@ -0,0 +1,16 @@
+
+
+
+ DEVUI Course
+ DevUI
+
+
+ DEVUI is a free open-source and common solution for the front end of enterprise mid- and back-end products. Its design values are based
+ on...
+
+
+ 12
+ 8
+ 8
+
+
diff --git a/devui/card/demo/card-interactive/card-interactive.component.scss b/devui/card/demo/card-interactive/card-interactive.component.scss
new file mode 100644
index 00000000..a5e8dd86
--- /dev/null
+++ b/devui/card/demo/card-interactive/card-interactive.component.scss
@@ -0,0 +1,20 @@
+@import '~ng-devui/styles-var/devui-var.scss';
+
+.card-icon {
+ cursor: pointer;
+ font-size: $devui-font-size-icon;
+ margin-right: 8px;
+ vertical-align: middle;
+}
+
+.card-icon + span {
+ vertical-align: middle;
+}
+
+.card-block {
+ margin-right: 16px;
+}
+
+.card-container {
+ width: 350px;
+}
diff --git a/devui/card/demo/card-interactive/card-interactive.component.ts b/devui/card/demo/card-interactive/card-interactive.component.ts
new file mode 100644
index 00000000..6603dbe3
--- /dev/null
+++ b/devui/card/demo/card-interactive/card-interactive.component.ts
@@ -0,0 +1,12 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'd-card-card-interactive',
+ templateUrl: './card-interactive.component.html',
+ styleUrls: ['./card-interactive.component.scss'],
+})
+export class CardInteractiveComponent implements OnInit {
+ constructor(){}
+
+ ngOnInit(): void {}
+}
diff --git a/devui/card/demo/custom/custom.component.scss b/devui/card/demo/custom/custom.component.scss
index eb16fcc6..4298a0c8 100644
--- a/devui/card/demo/custom/custom.component.scss
+++ b/devui/card/demo/custom/custom.component.scss
@@ -14,18 +14,6 @@
}
}
-d-card {
- cursor: pointer;
- transition:
- box-shadow $devui-animation-duration-slow $devui-animation-ease-in-out-smooth,
- transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
-
- &:hover {
- box-shadow: $devui-shadow-length-hover $devui-light-shadow;
- transform: translateY(-5px);
- }
-}
-
.custom-avatar {
display: flex;
justify-content: space-between;
diff --git a/devui/card/demo/with-media/with-media.component.scss b/devui/card/demo/with-media/with-media.component.scss
index 246f6047..4ff09511 100644
--- a/devui/card/demo/with-media/with-media.component.scss
+++ b/devui/card/demo/with-media/with-media.component.scss
@@ -20,15 +20,3 @@
.card-block {
margin-right: 16px;
}
-
-d-card {
- cursor: pointer;
- transition:
- box-shadow $devui-animation-duration-slow $devui-animation-ease-in-out-smooth,
- transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
-
- &:hover {
- box-shadow: $devui-shadow-length-hover $devui-light-shadow;
- transform: translateY(-5px);
- }
-}
diff --git a/devui/card/doc/api-cn.md b/devui/card/doc/api-cn.md
index 110e3adf..e787d5d7 100644
--- a/devui/card/doc/api-cn.md
+++ b/devui/card/doc/api-cn.md
@@ -1,6 +1,6 @@
# 如何使用
-在module中引入:
+在 module 中引入:
```ts
import { CardModule } from 'ng-devui/card';
@@ -18,8 +18,10 @@ import { CardModule } from 'ng-devui/card';
```
-# d-card
-## d-card 区块划分
+
+## d-card
+
+### d-card 区块划分
| 标签 | 描述 |
| :------------: | :--------------------------------------------------------------------------------------------: |
@@ -28,7 +30,13 @@ import { CardModule } from 'ng-devui/card';
| d-card-content | 辅助信息区,分析和支撑标题作用,可以包含摘要或者说明。 |
| d-card-actions | 决策作用,可以包含操作文本或者操作图标。 |
-## d-card-header 区块划分
+### d-card 参数
+
+| 参数 | 类型 | 默认值 | 描述 | 跳转 Demo | 全局配置项 |
+| :---------: | :-------: | :----: | :------------------: | :---------------------------------------- | ---------- |
+| interactive | `boolean` | -- | 可选,卡片是否可交互 | [可交互卡片](demo#card-interactive-usage) | |
+
+### d-card-header 区块划分
| 标签 | 描述 |
| :-------------: | :------------------------------------: |
@@ -36,8 +44,8 @@ import { CardModule } from 'ng-devui/card';
| [dCardAvatar] | 头像区域,用作头像等图片展示 |
| d-card-subtitle | 对标题的补充,可包含标签等信息 |
-## d-card-actions 参数
+### d-card-actions 参数
-| 参数 | 类型 | 默认值 | 描述 | 跳转 Demo |全局配置项|
-| :----------------: | :---: | :------: | :---: | :-------------: | --------- |
-| align | `'start' \| 'end' \|'spaceBetween'` | 'start' | 可选,操作区域对齐方式,分别对应起始对齐,尾部对齐,拉伸对齐 | [基本用法](demo#card-basic) |
+| 参数 | 类型 | 默认值 | 描述 | 跳转 Demo | 全局配置项 |
+| :---: | :---------------------------------: | :-----: | :----------------------------------------------------------: | :-------------------------: | ---------- |
+| align | `'start' \| 'end' \|'spaceBetween'` | 'start' | 可选,操作区域对齐方式,分别对应起始对齐,尾部对齐,拉伸对齐 | [基本用法](demo#card-basic) |
diff --git a/devui/card/doc/api-en.md b/devui/card/doc/api-en.md
index 4f74b6cc..da3ceb9f 100644
--- a/devui/card/doc/api-en.md
+++ b/devui/card/doc/api-en.md
@@ -18,26 +18,34 @@ In the page:
```
-# d-card
-## d-card Block Division
-| Tag | Description |
-| :------------: | :--------------------------------------------------------------------------------------------: |
-| d-card-header | Title area, which is used as an overview. It usually contains elements such as title `d-card-title`, subtitle `d-card-subtitle`, and avatar `dAvatar` |
-| [dCardMeta] | Media information area, which can store multiple media, including pictures, graphics, and videos |
-| d-card-content | Auxiliary information area, which analyzes and supports the title function. It can contain abstracts or descriptions |
-| d-card-actions | Decision-making function, which can contain operation text or operation icons |
+## d-card
-## d-card-header Block Division
+### d-card Block Division
-| Tag | Description |
-| :-------------: | :------------------------------------: |
-| d-card-title | Card content description, which is generally defined as the card name |
-| [dCardAvatar] | Avatar area, which is used to display images such as avatars |
-| d-card-subtitle | Supplement to the title, including tag information |
+| Tag | Description |
+| :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: |
+| d-card-header | Title area, which is used as an overview. It usually contains elements such as title `d-card-title`, subtitle `d-card-subtitle`, and avatar `dAvatar` |
+| [dCardMeta] | Media information area, which can store multiple media, including pictures, graphics, and videos |
+| d-card-content | Auxiliary information area, which analyzes and supports the title function. It can contain abstracts or descriptions |
+| d-card-actions | Decision-making function, which can contain operation text or operation icons |
-## d-card-actions Parameter
+### d-card 参数
-| Parameter | Type | Default | Description | Jump to Demo |Global Config|
-| :----------------: | :---: | :------: | :---: | :-------------: | --------- |
-| align | `'start'\|'end'\|'spaceBetween'` | 'start' | Optional. Operation area alignment mode, which corresponds to start alignment, tail alignment, and stretch alignment | [Basic usage](demo#card-basic) |
+| 参数 | 类型 | 默认值 | 描述 | 跳转 Demo | 全局配置项 |
+| :---------: | :-------: | :----: | :---------------------------------------: | :---------------------------------------------- | ---------- |
+| interactive | `boolean` | -- | Optional, whether the card is interactive | [Interactive Card](demo#card-interactive-usage) | |
+
+### d-card-header Block Division
+
+| Tag | Description |
+| :-------------: | :-------------------------------------------------------------------: |
+| d-card-title | Card content description, which is generally defined as the card name |
+| [dCardAvatar] | Avatar area, which is used to display images such as avatars |
+| d-card-subtitle | Supplement to the title, including tag information |
+
+### d-card-actions Parameter
+
+| Parameter | Type | Default | Description | Jump to Demo | Global Config |
+| :-------: | :------------------------------: | :-----: | :------------------------------------------------------------------------------------------------------------------: | :----------------------------: | ------------- |
+| align | `'start'\|'end'\|'spaceBetween'` | 'start' | Optional. Operation area alignment mode, which corresponds to start alignment, tail alignment, and stretch alignment | [Basic usage](demo#card-basic) |
diff --git a/devui/card/ng-package.json b/devui/card/ng-package.json
new file mode 100644
index 00000000..98773f3e
--- /dev/null
+++ b/devui/card/ng-package.json
@@ -0,0 +1,5 @@
+{
+ "lib": {
+ "entryFile": "public-api.ts"
+ }
+}
\ No newline at end of file
diff --git a/devui/card/package.json b/devui/card/package.json
deleted file mode 100644
index ded1e7a9..00000000
--- a/devui/card/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "ngPackage": {
- "lib": {
- "entryFile": "public-api.ts"
- }
- }
-}
diff --git a/devui/carousel/carousel.component.html b/devui/carousel/carousel.component.html
index 18d41418..637e519b 100644
--- a/devui/carousel/carousel.component.html
+++ b/devui/carousel/carousel.component.html
@@ -44,6 +44,8 @@
(mouseenter)="switchStep(index, 'hover')"
[ngClass]="{ active: activeIndex === index }"
*ngFor="let item of items; let index = index"
- >
+ >
+
+
diff --git a/devui/carousel/carousel.component.scss b/devui/carousel/carousel.component.scss
index acfbfec9..a9119497 100644
--- a/devui/carousel/carousel.component.scss
+++ b/devui/carousel/carousel.component.scss
@@ -1,6 +1,7 @@
@import '../style/theme/color';
@import '../style/theme/shadow';
@import '../style/core/animation';
+@import '../style/theme/corner';
@mixin fixed-arrow-button() {
position: absolute;
@@ -82,19 +83,34 @@
.dot-item {
width: 6px;
height: 6px;
- border-radius: 3px;
+ border-radius: $devui-border-radius-feedback;
margin-right: 8px;
background: $devui-icon-fill;
+ cursor: pointer;
+
+ .dot-item-active-progress {
+ width: 0;
+ display: inline-block;
+ position: absolute;
+ }
&:hover {
- cursor: pointer;
background: $devui-icon-fill-hover;
}
&.active {
width: 24px;
- background: $devui-icon-fill-active;
- transition: all $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;
+ background-color: $devui-icon-fill;
+ transition: all $devui-animation-duration-fast $devui-animation-ease-in-out-smooth;
+
+ .dot-item-active-progress {
+ width: 24px;
+ height: 6px;
+ background-color: $devui-icon-fill-active;
+ border-radius: $devui-border-radius-feedback;
+ transition-property: width;
+ transition-timing-function: $devui-animation-ease-out;
+ }
}
}
}
diff --git a/devui/carousel/carousel.component.ts b/devui/carousel/carousel.component.ts
index a4a5222c..30aa573c 100644
--- a/devui/carousel/carousel.component.ts
+++ b/devui/carousel/carousel.component.ts
@@ -13,7 +13,7 @@ import {
Output,
QueryList,
Renderer2,
- SimpleChanges
+ SimpleChanges,
} from '@angular/core';
import { CarouselItemComponent } from './carousel-item.component';
diff --git a/devui/carousel/demo/carousel-demo.component.html b/devui/carousel/demo/carousel-demo.component.html
index 525f44d7..9d6ed64e 100644
--- a/devui/carousel/demo/carousel-demo.component.html
+++ b/devui/carousel/demo/carousel-demo.component.html
@@ -28,5 +28,11 @@