纪念日调整
This commit is contained in:
41
components/countdown/countdown.js
Normal file
41
components/countdown/countdown.js
Normal file
@@ -0,0 +1,41 @@
|
||||
function setTwo(num){ return num<10 ? ('0'+num) : (''+num); };
|
||||
export default class CountDown{
|
||||
constructor(t){
|
||||
if(t instanceof Array){
|
||||
this.time =new Date().getTime()+ (new Date(t[1]).getTime() - new Date(t[0]).getTime());
|
||||
}else{
|
||||
this.time =/\//gi.test(t.toString()) ? (new Date(t).getTime()) : ( new Date().getTime()+parseInt(t));
|
||||
}
|
||||
}
|
||||
timeOut (fn,t) {
|
||||
let _now = new Date().getTime(),
|
||||
json={},
|
||||
count = Math.round((this.time - _now)/1000);
|
||||
if(count <= 0) {
|
||||
json = {day :'00',hour :'00',min :'00',sec :'00',ms :'00'}
|
||||
fn.call(this, json)
|
||||
this.endFn && this.endFn.call(this, json)
|
||||
return;
|
||||
};
|
||||
json = {
|
||||
day : setTwo(Math.floor(count/86400)), //天数
|
||||
hour : setTwo(Math.floor(count/ (60 * 60) % 24 )), //小时
|
||||
min : setTwo(Math.floor(count/60 % 60)), //分钟
|
||||
sec : setTwo(Math.floor(count%60)), //秒
|
||||
ms : setTwo((this.time - _now)%1000).substr(0,2) //豪秒
|
||||
};
|
||||
let _end = new Date().getTime();
|
||||
let _diff = _now - _end; //误差
|
||||
fn.call(this, json);
|
||||
setTimeout(function(that){
|
||||
that.timeOut(fn,t)
|
||||
}, t ? (t) : 1000 - _diff,this)
|
||||
}
|
||||
end(fn){
|
||||
this.endFn = fn;
|
||||
}
|
||||
run(fn,t){
|
||||
this.timeOut(fn,t);
|
||||
return this
|
||||
}
|
||||
};
|
||||
69
components/countdown/index.js
Normal file
69
components/countdown/index.js
Normal file
@@ -0,0 +1,69 @@
|
||||
import CountDown from './countdown.js';
|
||||
Component({
|
||||
properties: {
|
||||
showDay : {
|
||||
type: null,
|
||||
value: 0 ,
|
||||
observer(val) {
|
||||
this.setData({
|
||||
dayOff : typeof val === 'string' ? JSON.parse(val) : val
|
||||
});
|
||||
}
|
||||
},
|
||||
format : {
|
||||
type: null,
|
||||
value: ''
|
||||
},
|
||||
showHour : {
|
||||
type: null,
|
||||
value: 1 ,
|
||||
observer(val) {
|
||||
this.setData({
|
||||
hourOff :typeof val === 'string' ? JSON.parse(val) : val
|
||||
});
|
||||
}
|
||||
},
|
||||
showMin : {
|
||||
type: null,
|
||||
value: 1 ,
|
||||
observer(val) {
|
||||
this.setData({
|
||||
minOff :typeof val === 'string' ? JSON.parse(val) : val
|
||||
});
|
||||
}
|
||||
},
|
||||
showSec : {
|
||||
type: null,
|
||||
value: 1 ,
|
||||
observer(val) {
|
||||
this.setData({
|
||||
secOff :typeof val === 'string' ? JSON.parse(val) : val
|
||||
});
|
||||
}
|
||||
},
|
||||
index : {
|
||||
type: null,
|
||||
value: 0
|
||||
},
|
||||
time: {
|
||||
type: null,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
data: {
|
||||
dayOff : 0,
|
||||
hourOff :1,
|
||||
minOff :1,
|
||||
secOff :1,
|
||||
countTime: ''
|
||||
},
|
||||
attached(){
|
||||
new CountDown(this.data.time).run(t=>{
|
||||
this.setData({
|
||||
countTime : t
|
||||
});
|
||||
}).end(()=>{
|
||||
this.triggerEvent('end',{index : this.data.index})
|
||||
});
|
||||
}
|
||||
})
|
||||
5
components/countdown/index.json
Normal file
5
components/countdown/index.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
7
components/countdown/index.wxml
Normal file
7
components/countdown/index.wxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<!--index.wxml-->
|
||||
<view class="countDownView">
|
||||
<view wx:if="{{dayOff}}"><text>{{countTime.day}}</text>{{format ? format : '天'}}</view>
|
||||
<view wx:if="{{hourOff}}"><text>{{countTime.hour}}</text>{{format ? format : '时'}}</view>
|
||||
<view wx:if="{{minOff}}"><text>{{countTime.min}}</text>{{format ? format : '分'}}</view>
|
||||
<view wx:if="{{secOff}}"><text>{{countTime.sec}}</text>{{format ? '' : '秒'}}</view>
|
||||
</view>
|
||||
13
components/countdown/index.wxss
Normal file
13
components/countdown/index.wxss
Normal file
@@ -0,0 +1,13 @@
|
||||
.countDownView {
|
||||
display: inline-block;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.countDownView text {
|
||||
padding: 0 3px;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.countDownView view {
|
||||
display: inline-block;
|
||||
}
|
||||
57
components/divider/README.md
Normal file
57
components/divider/README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Divider 分割符
|
||||
description: 用于分割、组织、细化有一定逻辑的组织元素内容和页面结构。
|
||||
spline: message
|
||||
isComponent: true
|
||||
---
|
||||
|
||||
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-100%25-blue" /></span>
|
||||
## 引入
|
||||
|
||||
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"t-divider": "tdesign-miniprogram/divider/divider"
|
||||
}
|
||||
```
|
||||
|
||||
### 主题定制
|
||||
|
||||
CSS 变量名|说明
|
||||
--|--
|
||||
--td-divider-color | 分割线颜色
|
||||
--td-divider-content-color | 分割线文本颜色
|
||||
|
||||
|
||||
## 代码演示
|
||||
|
||||
### 基础分割符
|
||||
|
||||
分割符主要是由直线和文字组成,通过`slot`传入分割线文案或者其他自定义内容,通过`layout`控制分隔符是垂直还是横向,`line-color`属性可定义线条颜色
|
||||
|
||||
<img src="https://tdesign.gtimg.com/miniprogram/readme/divider.png" width="375px" height="50%">
|
||||
|
||||
{{ base }}
|
||||
|
||||
### 文字 + 直线
|
||||
|
||||
{{ text-line }}
|
||||
|
||||
### 纯文字 + 分割
|
||||
|
||||
{{ text-only }}
|
||||
|
||||
## API
|
||||
|
||||
### Divider Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 | 必传 |
|
||||
| ---------------- | ------------- | ---------- | ---------------------------------------------------------------------------------------------------- | ---- |
|
||||
| align | String | center | 文本位置(仅在水平分割线有效)。可选项:left/right/center | N |
|
||||
| content | String / Slot | - | 子元素 | N |
|
||||
| dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N |
|
||||
| external-classes | Array | - | 组件类名,分别用于设置 组件外层类名、分隔线类名 等。`['t-class', 't-class-line', 't-class-content']` | N |
|
||||
| layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N |
|
||||
| line-color | String | - | 分隔线颜色 | N |
|
||||
| theme | String | horizontal | 已废弃。请更为使用 `layout`。分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N |
|
||||
13
components/divider/divider.d.ts
vendored
Normal file
13
components/divider/divider.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
export default class Divider extends SuperComponent {
|
||||
externalClasses: string[];
|
||||
options: {
|
||||
addGlobalClass: boolean;
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
properties: import("./type").TdDividerProps;
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
};
|
||||
}
|
||||
30
components/divider/divider.js
Normal file
30
components/divider/divider.js
Normal file
@@ -0,0 +1,30 @@
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
import { SuperComponent, wxComponent } from '../common/src/index';
|
||||
import config from '../common/config';
|
||||
import props from './props';
|
||||
const { prefix } = config;
|
||||
const name = `${prefix}-divider`;
|
||||
let Divider = class Divider extends SuperComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.externalClasses = ['t-class', 't-class-content'];
|
||||
this.options = {
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true,
|
||||
};
|
||||
this.properties = props;
|
||||
this.data = {
|
||||
prefix,
|
||||
classPrefix: name,
|
||||
};
|
||||
}
|
||||
};
|
||||
Divider = __decorate([
|
||||
wxComponent()
|
||||
], Divider);
|
||||
export default Divider;
|
||||
3
components/divider/divider.json
Normal file
3
components/divider/divider.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
11
components/divider/divider.wxml
Normal file
11
components/divider/divider.wxml
Normal file
@@ -0,0 +1,11 @@
|
||||
<view class="{{layout==='vertical'? classPrefix + '--vertical-center' : ''}}">
|
||||
<view
|
||||
class="{{prefix}}-class {{classPrefix}} {{classPrefix}}--{{layout}} {{classPrefix}}--{{align}} {{dashed? classPrefix + '--dashed' : ''}} "
|
||||
style="{{ lineColor ? 'border-color: ' + lineColor + ';' : '' }}"
|
||||
>
|
||||
<view class="{{prefix}}-class-content {{classPrefix}}__content">
|
||||
<view wx:if="{{content}}"> {{content}} </view>
|
||||
<slot wx:else name="content" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
100
components/divider/divider.wxss
Normal file
100
components/divider/divider.wxss
Normal file
@@ -0,0 +1,100 @@
|
||||
.t-float-left {
|
||||
float: left;
|
||||
}
|
||||
.t-float-right {
|
||||
float: right;
|
||||
}
|
||||
@keyframes tdesign-fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.hotspot-expanded.relative {
|
||||
position: relative;
|
||||
}
|
||||
.hotspot-expanded::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
transform: scale(1.5);
|
||||
}
|
||||
page {
|
||||
--td-divider-color: #e7e7e7;
|
||||
--td-divider-content-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.t-divider--horizontal {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--td-divider-color);
|
||||
border-color: var(--td-divider-color);
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.t-divider--horizontal::before,
|
||||
.t-divider--horizontal::after {
|
||||
display: block;
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
border-color: inherit;
|
||||
border-style: inherit;
|
||||
border-width: 1rpx 0 0;
|
||||
}
|
||||
.t-divider--horizontal::before {
|
||||
content: '';
|
||||
}
|
||||
.t-divider--horizontal .t-divider__content:not(:empty) {
|
||||
margin: 0 24rpx;
|
||||
}
|
||||
.t-divider--vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 1em;
|
||||
margin: 0 16rpx;
|
||||
color: var(--td-divider-color);
|
||||
border-color: var(--td-divider-color);
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
.t-divider--vertical::before,
|
||||
.t-divider--vertical::after {
|
||||
content: '';
|
||||
display: block;
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
border-color: inherit;
|
||||
border-style: inherit;
|
||||
border-width: 0 1rpx 0 0;
|
||||
}
|
||||
.t-divider--vertical-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.t-divider--dashed {
|
||||
border-style: dashed;
|
||||
}
|
||||
.t-divider__content {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: var(--td-divider-content-color);
|
||||
}
|
||||
.t-divider--center::after,
|
||||
.t-divider--left::after,
|
||||
.t-divider--right::after {
|
||||
content: '';
|
||||
}
|
||||
.t-divider--left::before {
|
||||
max-width: 60rpx;
|
||||
}
|
||||
.t-divider--right::after {
|
||||
max-width: 60rpx;
|
||||
}
|
||||
3
components/divider/props.d.ts
vendored
Normal file
3
components/divider/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdDividerProps } from './type';
|
||||
declare const props: TdDividerProps;
|
||||
export default props;
|
||||
29
components/divider/props.js
Normal file
29
components/divider/props.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const props = {
|
||||
align: {
|
||||
type: String,
|
||||
value: 'center',
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
},
|
||||
dashed: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
externalClasses: {
|
||||
type: Array,
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
value: 'horizontal',
|
||||
},
|
||||
lineColor: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
theme: {
|
||||
type: String,
|
||||
value: 'horizontal',
|
||||
},
|
||||
};
|
||||
export default props;
|
||||
37
components/divider/type.d.ts
vendored
Normal file
37
components/divider/type.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
export interface TdDividerProps {
|
||||
align?: {
|
||||
type: StringConstructor;
|
||||
value?: 'left' | 'right' | 'center';
|
||||
required?: boolean;
|
||||
};
|
||||
content?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
required?: boolean;
|
||||
};
|
||||
dashed?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
required?: boolean;
|
||||
};
|
||||
externalClasses?: {
|
||||
type: ArrayConstructor;
|
||||
value?: ['t-class', 't-class-line', 't-class-content'];
|
||||
required?: boolean;
|
||||
};
|
||||
layout?: {
|
||||
type: StringConstructor;
|
||||
value?: 'horizontal' | 'vertical';
|
||||
required?: boolean;
|
||||
};
|
||||
lineColor?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
required?: boolean;
|
||||
};
|
||||
theme?: {
|
||||
type: StringConstructor;
|
||||
value?: 'horizontal' | 'vertical';
|
||||
required?: boolean;
|
||||
};
|
||||
}
|
||||
2
components/divider/type.js
Normal file
2
components/divider/type.js
Normal file
@@ -0,0 +1,2 @@
|
||||
;
|
||||
export {};
|
||||
47
components/empty/README.md
Normal file
47
components/empty/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Empty 空内容
|
||||
description: 用于空状态时的占位提示。
|
||||
spline: data
|
||||
isComponent: true
|
||||
---
|
||||
|
||||
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-100%25-blue" /></span>
|
||||
## 引入
|
||||
|
||||
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"t-empty": "tdesign-miniprogram/empty/empty"
|
||||
}
|
||||
```
|
||||
|
||||
## 代码演示
|
||||
|
||||
### 图标空状态
|
||||
|
||||
{{ base }}
|
||||
|
||||
### 自定义图片空状态
|
||||
|
||||
{{ imageEmpty }}
|
||||
|
||||
### 带操作空状态
|
||||
|
||||
{{ buttonEmpty }}
|
||||
|
||||
### 空页面
|
||||
|
||||
{{ pageEmpty }}
|
||||
|
||||
## API
|
||||
|
||||
### Empty Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 | 必传 |
|
||||
| ---------------- | ------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
|
||||
| action | Slot | - | 操作按钮 | N |
|
||||
| description | String / Slot | - | 描述文字 | N |
|
||||
| external-classes | Array | - | 组件类名,分别用于设置 组件外层类名、文本描述类名、图片类名、操作按钮类名。`['t-class', 't-class-description', 't-class-image', 't-class-actions']` | N |
|
||||
| icon | String | - | 图标名称 | N |
|
||||
| image | String / Slot | - | 图片地址 | N |
|
||||
11
components/empty/empty.d.ts
vendored
Normal file
11
components/empty/empty.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
export default class extends SuperComponent {
|
||||
options: {
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
externalClasses: string[];
|
||||
properties: import("./type").TdEmptyProps;
|
||||
data: {
|
||||
classPrefix: string;
|
||||
};
|
||||
}
|
||||
28
components/empty/empty.js
Normal file
28
components/empty/empty.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
import { SuperComponent, wxComponent } from '../common/src/index';
|
||||
import props from './props';
|
||||
import config from '../common/config';
|
||||
const { prefix } = config;
|
||||
const name = `${prefix}-empty`;
|
||||
let default_1 = class extends SuperComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.options = {
|
||||
multipleSlots: true,
|
||||
};
|
||||
this.externalClasses = ['t-class', 't-class-description', 't-class-image'];
|
||||
this.properties = props;
|
||||
this.data = {
|
||||
classPrefix: name,
|
||||
};
|
||||
}
|
||||
};
|
||||
default_1 = __decorate([
|
||||
wxComponent()
|
||||
], default_1);
|
||||
export default default_1;
|
||||
6
components/empty/empty.json
Normal file
6
components/empty/empty.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-icon": "../icon/icon"
|
||||
}
|
||||
}
|
||||
21
components/empty/empty.wxml
Normal file
21
components/empty/empty.wxml
Normal file
@@ -0,0 +1,21 @@
|
||||
<wxs src="./empty.wxs" module="utils" />
|
||||
|
||||
<view class="t-class {{classPrefix}}">
|
||||
<view class="{{classPrefix}}__content">
|
||||
<image
|
||||
wx:if="{{image}}"
|
||||
class="{{classPrefix}}__img t-class-image"
|
||||
src="{{image}}"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<t-icon wx:elif="{{icon}}" size="192rpx" name="{{icon}}" color="rgba(0, 0, 0, .26)" />
|
||||
<slot wx:else name="image" class="{{classPrefix}}__img t-class-image" />
|
||||
<view wx:if="{{description}}" class="{{classPrefix}}__description t-class-description"
|
||||
>{{description}}</view
|
||||
>
|
||||
<slot wx:else name="description" class="{{classPrefix}}__description t-class-description}" />
|
||||
<view class="{{classPrefix}}__actions t-class-actions">
|
||||
<slot name="action" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
12
components/empty/empty.wxs
Normal file
12
components/empty/empty.wxs
Normal file
@@ -0,0 +1,12 @@
|
||||
var REGEXP = getRegExp('^\d+(\.\d+)?$');
|
||||
|
||||
function addUnit(value) {
|
||||
if (value == null) {
|
||||
return undefined;
|
||||
}
|
||||
return REGEXP.test('' + value) ? value + 'px' : value;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addUnit: addUnit,
|
||||
};
|
||||
48
components/empty/empty.wxss
Normal file
48
components/empty/empty.wxss
Normal file
@@ -0,0 +1,48 @@
|
||||
.t-float-left {
|
||||
float: left;
|
||||
}
|
||||
.t-float-right {
|
||||
float: right;
|
||||
}
|
||||
@keyframes tdesign-fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.hotspot-expanded.relative {
|
||||
position: relative;
|
||||
}
|
||||
.hotspot-expanded::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
transform: scale(1.5);
|
||||
}
|
||||
.t-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.t-empty__content {
|
||||
text-align: center;
|
||||
}
|
||||
.t-empty__img {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.t-empty__description {
|
||||
margin-top: 48rpx;
|
||||
text-align: center;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
font-size: 28rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.t-empty__description + .t-empty__actions:not(:empty) {
|
||||
margin-top: 48rpx;
|
||||
}
|
||||
3
components/empty/props.d.ts
vendored
Normal file
3
components/empty/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdEmptyProps } from './type';
|
||||
declare const props: TdEmptyProps;
|
||||
export default props;
|
||||
16
components/empty/props.js
Normal file
16
components/empty/props.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const props = {
|
||||
description: {
|
||||
type: String,
|
||||
},
|
||||
externalClasses: {
|
||||
type: Array,
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
image: {
|
||||
type: String,
|
||||
},
|
||||
};
|
||||
export default props;
|
||||
22
components/empty/type.d.ts
vendored
Normal file
22
components/empty/type.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export interface TdEmptyProps {
|
||||
description?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
required?: boolean;
|
||||
};
|
||||
externalClasses?: {
|
||||
type: ArrayConstructor;
|
||||
value?: ['t-class', 't-class-description', 't-class-image', 't-class-actions'];
|
||||
required?: boolean;
|
||||
};
|
||||
icon?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
required?: boolean;
|
||||
};
|
||||
image?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
required?: boolean;
|
||||
};
|
||||
}
|
||||
2
components/empty/type.js
Normal file
2
components/empty/type.js
Normal file
@@ -0,0 +1,2 @@
|
||||
;
|
||||
export {};
|
||||
Reference in New Issue
Block a user