start
This commit is contained in:
58
miniprogram_npm/tdesign-miniprogram/link/README.en-US.md
Normal file
58
miniprogram_npm/tdesign-miniprogram/link/README.en-US.md
Normal file
@@ -0,0 +1,58 @@
|
||||
:: BASE_DOC ::
|
||||
|
||||
## API
|
||||
|
||||
### Link Props
|
||||
|
||||
name | type | default | description | required
|
||||
-- | -- | -- | -- | --
|
||||
style | Object | - | CSS(Cascading Style Sheets) | N
|
||||
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
|
||||
content | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
disabled | Boolean | false | make link to be disabled | N
|
||||
hover | Boolean | - | \- | N
|
||||
navigator-props | Object | - | \- | N
|
||||
prefix-icon | String / Object / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
status | String | normal | `deprecated`。options: normal/active/disabled | N
|
||||
suffix-icon | String / Object / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
theme | String | default | options: default/primary/danger/warning/success | N
|
||||
underline | Boolean | - | \- | N
|
||||
|
||||
### Link Events
|
||||
|
||||
name | params | description
|
||||
-- | -- | --
|
||||
complete | \- | \-
|
||||
fail | \- | \-
|
||||
success | \- | \-
|
||||
### Link External Classes
|
||||
|
||||
className | Description
|
||||
-- | --
|
||||
t-class | class name of root node
|
||||
t-class-content | \-
|
||||
t-class-hover | \-
|
||||
t-class-prefix-icon | \-
|
||||
t-class-suffix-icon | \-
|
||||
|
||||
### CSS Variables
|
||||
|
||||
The component provides the following CSS variables, which can be used to customize styles.
|
||||
Name | Default Value | Description
|
||||
-- | -- | --
|
||||
--td-link-danger-active-color | @error-color-active | -
|
||||
--td-link-danger-color | @error-color | -
|
||||
--td-link-danger-disabled-color | @error-color-disabled | -
|
||||
--td-link-default-active-color | @brand-color-active | -
|
||||
--td-link-default-color | @font-gray-1 | -
|
||||
--td-link-default-disabled-color | @text-color-disabled | -
|
||||
--td-link-primary-active-color | @brand-color-active | -
|
||||
--td-link-primary-color | @brand-color | -
|
||||
--td-link-primary-disabled-color | @brand-color-disabled | -
|
||||
--td-link-success-active-color | @success-color-active | -
|
||||
--td-link-success-color | @success-color | -
|
||||
--td-link-success-disabled-color | @success-color-disabled | -
|
||||
--td-link-warning-active-color | @warning-color-active | -
|
||||
--td-link-warning-color | @warning-color | -
|
||||
--td-link-warning-disabled-color | @warning-color-disabled | -
|
||||
122
miniprogram_npm/tdesign-miniprogram/link/README.md
Normal file
122
miniprogram_npm/tdesign-miniprogram/link/README.md
Normal file
@@ -0,0 +1,122 @@
|
||||
---
|
||||
title: Link 链接
|
||||
description: 文字超链接用于跳转一个新页面,如当前项目跳转,友情链接等。
|
||||
spline: navigation
|
||||
isComponent: true
|
||||
---
|
||||
|
||||
<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65">
|
||||
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
|
||||
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
|
||||
</svg>
|
||||
该组件于 0.32.0 版本上线,请留意版本。
|
||||
</div>
|
||||
|
||||
## 引入
|
||||
|
||||
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
|
||||
|
||||
```json
|
||||
"usingComponents": {
|
||||
"t-link": "tdesign-miniprogram/link/link",
|
||||
}
|
||||
```
|
||||
|
||||
## 代码演示
|
||||
|
||||
<a href="https://developers.weixin.qq.com/s/AtJrPbmK7mSK" title="在开发者工具中预览效果" target="_blank" rel="noopener noreferrer"> 在开发者工具中预览效果 </a>
|
||||
|
||||
<blockquote style="background-color: #d9e1ff; font-size: 15px; line-height: 26px;margin: 16px 0 0;padding: 16px; border-radius: 6px; color: #0052d9" >
|
||||
<p>Tips: 请确保开发者工具为打开状态。导入开发者工具后,依次执行:npm i > 构建npm包 > 勾选 "将JS编译成ES5"</p>
|
||||
</blockquote>
|
||||
|
||||
### 组件类型
|
||||
|
||||
基础文字链接
|
||||
|
||||
{{ content }}
|
||||
|
||||
下划线文字链接
|
||||
|
||||
{{ underline }}
|
||||
|
||||
前置图标文字链接
|
||||
|
||||
{{ prefix }}
|
||||
|
||||
后置图标文字链接
|
||||
|
||||
{{ suffix }}
|
||||
|
||||
### 组件状态
|
||||
|
||||
不同主题
|
||||
|
||||
{{ theme }}
|
||||
|
||||
禁用状态
|
||||
|
||||
{{ disabled }}
|
||||
|
||||
### 组件样式
|
||||
|
||||
链接尺寸
|
||||
|
||||
{{ size }}
|
||||
|
||||
## API
|
||||
|
||||
### Link Props
|
||||
|
||||
名称 | 类型 | 默认值 | 描述 | 必传
|
||||
-- | -- | -- | -- | --
|
||||
style | Object | - | 样式 | N
|
||||
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
|
||||
content | String / Slot | - | 链接内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
disabled | Boolean | false | 是否为禁用态 | N
|
||||
hover | Boolean | - | 是否开启点击反馈 | N
|
||||
navigator-props | Object | - | 与 navigator 原生组件属性保持一致,具体使用参考:[微信开放文档](https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html)。使用时请将形如 `open-type` 风格的属性名改为 `openType` 风格 | N
|
||||
prefix-icon | String / Object / Slot | - | 前置图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
size | String | medium | 尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
status | String | normal | 已废弃。组件状态。可选项:normal/active/disabled | N
|
||||
suffix-icon | String / Object / Slot | - | 后置图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
|
||||
theme | String | default | 组件风格,依次为默认色、品牌色、危险色、警告色、成功色。可选项:default/primary/danger/warning/success | N
|
||||
underline | Boolean | - | 是否显示链接下划线 | N
|
||||
|
||||
### Link Events
|
||||
|
||||
名称 | 参数 | 描述
|
||||
-- | -- | --
|
||||
complete | \- | 页面链接执行完成后触发(失败或成功均会触发)
|
||||
fail | \- | 页面链接跳转失败后触发
|
||||
success | \- | 页面链接跳转成功后触发
|
||||
### Link External Classes
|
||||
|
||||
类名 | 描述
|
||||
-- | --
|
||||
t-class | 根节点样式类
|
||||
t-class-content | 内容样式类
|
||||
t-class-hover | 悬停样式类
|
||||
t-class-prefix-icon | 前置图标样式类
|
||||
t-class-suffix-icon | 后置图标样式类
|
||||
|
||||
### CSS Variables
|
||||
|
||||
组件提供了下列 CSS 变量,可用于自定义样式。
|
||||
名称 | 默认值 | 描述
|
||||
-- | -- | --
|
||||
--td-link-danger-active-color | @error-color-active | -
|
||||
--td-link-danger-color | @error-color | -
|
||||
--td-link-danger-disabled-color | @error-color-disabled | -
|
||||
--td-link-default-active-color | @brand-color-active | -
|
||||
--td-link-default-color | @font-gray-1 | -
|
||||
--td-link-default-disabled-color | @text-color-disabled | -
|
||||
--td-link-primary-active-color | @brand-color-active | -
|
||||
--td-link-primary-color | @brand-color | -
|
||||
--td-link-primary-disabled-color | @brand-color-disabled | -
|
||||
--td-link-success-active-color | @success-color-active | -
|
||||
--td-link-success-color | @success-color | -
|
||||
--td-link-success-disabled-color | @success-color-disabled | -
|
||||
--td-link-warning-active-color | @warning-color-active | -
|
||||
--td-link-warning-color | @warning-color | -
|
||||
--td-link-warning-disabled-color | @warning-color-disabled | -
|
||||
26
miniprogram_npm/tdesign-miniprogram/link/link.d.ts
vendored
Normal file
26
miniprogram_npm/tdesign-miniprogram/link/link.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
export default class Link extends SuperComponent {
|
||||
externalClasses: string[];
|
||||
properties: import("./type").TdLinkProps;
|
||||
options: {
|
||||
multipleSlots: boolean;
|
||||
};
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
};
|
||||
observers: {
|
||||
'theme, status, size, underline, navigatorProps'(): void;
|
||||
prefixIcon(v: any): void;
|
||||
suffixIcon(v: any): void;
|
||||
};
|
||||
lifetimes: {
|
||||
attached(): void;
|
||||
};
|
||||
methods: {
|
||||
setClass(): void;
|
||||
onSuccess(e: any): void;
|
||||
onFail(e: any): void;
|
||||
onComplete(e: any): void;
|
||||
};
|
||||
}
|
||||
81
miniprogram_npm/tdesign-miniprogram/link/link.js
Normal file
81
miniprogram_npm/tdesign-miniprogram/link/link.js
Normal file
@@ -0,0 +1,81 @@
|
||||
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';
|
||||
import { calcIcon } from '../common/utils';
|
||||
const { prefix } = config;
|
||||
const name = `${prefix}-link`;
|
||||
let Link = class Link extends SuperComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.externalClasses = [
|
||||
`${prefix}-class`,
|
||||
`${prefix}-class-hover`,
|
||||
`${prefix}-class-prefix-icon`,
|
||||
`${prefix}-class-content`,
|
||||
`${prefix}-class-suffix-icon`,
|
||||
];
|
||||
this.properties = props;
|
||||
this.options = {
|
||||
multipleSlots: true,
|
||||
};
|
||||
this.data = {
|
||||
prefix,
|
||||
classPrefix: name,
|
||||
};
|
||||
this.observers = {
|
||||
'theme, status, size, underline, navigatorProps'() {
|
||||
this.setClass();
|
||||
},
|
||||
prefixIcon(v) {
|
||||
this.setData({
|
||||
_prefixIcon: calcIcon(v),
|
||||
});
|
||||
},
|
||||
suffixIcon(v) {
|
||||
this.setData({
|
||||
_suffixIcon: calcIcon(v),
|
||||
});
|
||||
},
|
||||
};
|
||||
this.lifetimes = {
|
||||
attached() {
|
||||
this.setClass();
|
||||
},
|
||||
};
|
||||
this.methods = {
|
||||
setClass() {
|
||||
const { theme, size, underline, navigatorProps, disabled } = this.properties;
|
||||
const classList = [name, `${name}--${theme}`, `${name}--${size}`];
|
||||
if (underline) {
|
||||
classList.push(`${name}--underline`);
|
||||
}
|
||||
if ((navigatorProps && !navigatorProps.url && !['navigateBack', 'exit'].includes(navigatorProps.openType)) ||
|
||||
disabled) {
|
||||
classList.push(`${name}--disabled`);
|
||||
}
|
||||
this.setData({
|
||||
className: classList.join(' '),
|
||||
});
|
||||
},
|
||||
onSuccess(e) {
|
||||
this.triggerEvent('success', e);
|
||||
},
|
||||
onFail(e) {
|
||||
this.triggerEvent('fail', e);
|
||||
},
|
||||
onComplete(e) {
|
||||
this.triggerEvent('complete', e);
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
Link = __decorate([
|
||||
wxComponent()
|
||||
], Link);
|
||||
export default Link;
|
||||
7
miniprogram_npm/tdesign-miniprogram/link/link.json
Normal file
7
miniprogram_npm/tdesign-miniprogram/link/link.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {
|
||||
"t-icon": "../icon/icon"
|
||||
}
|
||||
}
|
||||
46
miniprogram_npm/tdesign-miniprogram/link/link.wxml
Normal file
46
miniprogram_npm/tdesign-miniprogram/link/link.wxml
Normal file
@@ -0,0 +1,46 @@
|
||||
<import src="../common/template/icon.wxml" />
|
||||
<wxs src="../common/utils.wxs" module="_" />
|
||||
|
||||
<navigator
|
||||
class="{{className}} class {{prefix}}-class"
|
||||
style="{{_._style([style, customStyle])}}"
|
||||
target="{{navigatorProps.target}}"
|
||||
url="{{ !disabled && navigatorProps.url}}"
|
||||
open-type="{{navigatorProps.openType || 'navigate'}}"
|
||||
delta="{{navigatorProps.delta}}"
|
||||
app-id="{{navigatorProps.appId}}"
|
||||
path="{{navigatorProps.path}}"
|
||||
extra-data="{{navigatorProps.extraData}}"
|
||||
version="{{navigatorProps.version}}"
|
||||
short-link="{{navigatorProps.shortLink}}"
|
||||
hover-class="{{ hover && !disabled && classPrefix + '--hover' }} {{prefix}}-class-hover {{navigatorProps.hoverClass}}"
|
||||
hover-stop-propagation="navigatorProps.hoverStopPropagation"
|
||||
hover-start-time="{{navigatorProps.hoverStartTime}}"
|
||||
hover-stay-time="{{navigatorProps.hoverStayTime}}"
|
||||
bindsuccess="onSuccess"
|
||||
bindfail="onFail"
|
||||
bindcomplete="onComplete"
|
||||
aria-disabled="{{status === 'disabled'}}"
|
||||
>
|
||||
<view class="{{classPrefix}}__prefix-icon {{prefix}}-class-prefix-icon">
|
||||
<slot name="prefix-icon" />
|
||||
<template
|
||||
wx:if="{{_prefixIcon}}"
|
||||
is="icon"
|
||||
data="{{tClass: prefix + '-class-prefix-icon', ariaHidden: true, ..._prefixIcon }}"
|
||||
/>
|
||||
</view>
|
||||
<view class="{{classPrefix}}__content {{prefix}}-class-content">
|
||||
<block wx:if="{{content}}">{{content}}</block>
|
||||
<slot name="content" />
|
||||
<slot />
|
||||
</view>
|
||||
<view class="{{classPrefix}}__suffix-icon {{prefix}}-class-suffix-icon">
|
||||
<slot name="suffix-icon" />
|
||||
<template
|
||||
wx:if="{{_suffixIcon}}"
|
||||
is="icon"
|
||||
data="{{tClass: prefix + '-class-suffix-icon', ariaHidden: true, ..._suffixIcon }}"
|
||||
/>
|
||||
</view>
|
||||
</navigator>
|
||||
148
miniprogram_npm/tdesign-miniprogram/link/link.wxss
Normal file
148
miniprogram_npm/tdesign-miniprogram/link/link.wxss
Normal file
@@ -0,0 +1,148 @@
|
||||
.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-link--small .t-link__content {
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.t-link--small .t-link__prefix-icon,
|
||||
.t-link--small .t-link__suffix-icon {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.t-link--medium .t-link__content {
|
||||
font-size: 28rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
.t-link--medium .t-link__prefix-icon,
|
||||
.t-link--medium .t-link__suffix-icon {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.t-link--large .t-link__content {
|
||||
font-size: 32rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
.t-link--large .t-link__prefix-icon,
|
||||
.t-link--large .t-link__suffix-icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.t-link--primary {
|
||||
color: var(--td-link-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
|
||||
}
|
||||
.t-link--primary.t-link--underline::after {
|
||||
border-color: var(--td-link-primary-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9)));
|
||||
}
|
||||
.t-link--primary.t-link--disabled {
|
||||
color: var(--td-link-primary-disabled-color, var(--td-brand-color-disabled, var(--td-primary-color-3, #b5c7ff)));
|
||||
}
|
||||
.t-link--primary.t-link--hover {
|
||||
color: var(--td-link-primary-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
|
||||
}
|
||||
.t-link--primary.t-link--hover.t-link--underline::after {
|
||||
border-color: var(--td-link-primary-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
|
||||
}
|
||||
.t-link--success {
|
||||
color: var(--td-link-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
|
||||
}
|
||||
.t-link--success.t-link--underline::after {
|
||||
border-color: var(--td-link-success-color, var(--td-success-color, var(--td-success-color-5, #2ba471)));
|
||||
}
|
||||
.t-link--success.t-link--disabled {
|
||||
color: var(--td-link-success-disabled-color, var(--td-success-color-disabled, var(--td-success-color-3, #92dab2)));
|
||||
}
|
||||
.t-link--success.t-link--hover {
|
||||
color: var(--td-link-success-active-color, var(--td-success-color-active, var(--td-success-color-6, #008858)));
|
||||
}
|
||||
.t-link--success.t-link--hover.t-link--underline::after {
|
||||
border-color: var(--td-link-success-active-color, var(--td-success-color-active, var(--td-success-color-6, #008858)));
|
||||
}
|
||||
.t-link--warning {
|
||||
color: var(--td-link-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
|
||||
}
|
||||
.t-link--warning.t-link--underline::after {
|
||||
border-color: var(--td-link-warning-color, var(--td-warning-color, var(--td-warning-color-5, #e37318)));
|
||||
}
|
||||
.t-link--warning.t-link--disabled {
|
||||
color: var(--td-link-warning-disabled-color, var(--td-warning-color-disabled, var(--td-warning-color-3, #ffb98c)));
|
||||
}
|
||||
.t-link--warning.t-link--hover {
|
||||
color: var(--td-link-warning-active-color, var(--td-warning-color-active, var(--td-warning-color-6, #be5a00)));
|
||||
}
|
||||
.t-link--warning.t-link--hover.t-link--underline::after {
|
||||
border-color: var(--td-link-warning-active-color, var(--td-warning-color-active, var(--td-warning-color-6, #be5a00)));
|
||||
}
|
||||
.t-link--default {
|
||||
color: var(--td-link-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
|
||||
}
|
||||
.t-link--default.t-link--underline::after {
|
||||
border-color: var(--td-link-default-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
|
||||
}
|
||||
.t-link--default.t-link--disabled {
|
||||
color: var(--td-link-default-disabled-color, var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26))));
|
||||
}
|
||||
.t-link--default.t-link--hover {
|
||||
color: var(--td-link-default-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
|
||||
}
|
||||
.t-link--default.t-link--hover.t-link--underline::after {
|
||||
border-color: var(--td-link-default-active-color, var(--td-brand-color-active, var(--td-primary-color-8, #003cab)));
|
||||
}
|
||||
.t-link--danger {
|
||||
color: var(--td-link-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
|
||||
}
|
||||
.t-link--danger.t-link--underline::after {
|
||||
border-color: var(--td-link-danger-color, var(--td-error-color, var(--td-error-color-6, #d54941)));
|
||||
}
|
||||
.t-link--danger.t-link--disabled {
|
||||
color: var(--td-link-danger-disabled-color, var(--td-error-color-disabled, var(--td-error-color-3, #ffb9b0)));
|
||||
}
|
||||
.t-link--danger.t-link--hover {
|
||||
color: var(--td-link-danger-active-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
|
||||
}
|
||||
.t-link--danger.t-link--hover.t-link--underline::after {
|
||||
border-color: var(--td-link-danger-active-color, var(--td-error-color-active, var(--td-error-color-7, #ad352f)));
|
||||
}
|
||||
.t-link {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.t-link--underline::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 0;
|
||||
bottom: 0;
|
||||
opacity: 1;
|
||||
border-bottom: 2rpx solid #cd0be7;
|
||||
}
|
||||
.t-link__prefix-icon:not(:empty) + .t-link__content:not(:empty) {
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
.t-link__content:not(:empty) + .t-link__suffix-icon:not(:empty) {
|
||||
padding-left: 8rpx;
|
||||
}
|
||||
3
miniprogram_npm/tdesign-miniprogram/link/props.d.ts
vendored
Normal file
3
miniprogram_npm/tdesign-miniprogram/link/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdLinkProps } from './type';
|
||||
declare const props: TdLinkProps;
|
||||
export default props;
|
||||
33
miniprogram_npm/tdesign-miniprogram/link/props.js
Normal file
33
miniprogram_npm/tdesign-miniprogram/link/props.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const props = {
|
||||
content: {
|
||||
type: String,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
hover: {
|
||||
type: Boolean,
|
||||
},
|
||||
navigatorProps: {
|
||||
type: Object,
|
||||
},
|
||||
prefixIcon: {
|
||||
type: null,
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
value: 'medium',
|
||||
},
|
||||
suffixIcon: {
|
||||
type: null,
|
||||
},
|
||||
theme: {
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
underline: {
|
||||
type: Boolean,
|
||||
},
|
||||
};
|
||||
export default props;
|
||||
39
miniprogram_npm/tdesign-miniprogram/link/type.d.ts
vendored
Normal file
39
miniprogram_npm/tdesign-miniprogram/link/type.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { SizeEnum } from '../common/common';
|
||||
export interface TdLinkProps {
|
||||
content?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
disabled?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
hover?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
navigatorProps?: {
|
||||
type: ObjectConstructor;
|
||||
value?: object;
|
||||
};
|
||||
prefixIcon?: {
|
||||
type: null;
|
||||
value?: string | object;
|
||||
};
|
||||
size?: {
|
||||
type: StringConstructor;
|
||||
value?: SizeEnum;
|
||||
};
|
||||
suffixIcon?: {
|
||||
type: null;
|
||||
value?: string | object;
|
||||
};
|
||||
theme?: {
|
||||
type: StringConstructor;
|
||||
value?: 'default' | 'primary' | 'danger' | 'warning' | 'success';
|
||||
};
|
||||
underline?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
}
|
||||
1
miniprogram_npm/tdesign-miniprogram/link/type.js
Normal file
1
miniprogram_npm/tdesign-miniprogram/link/type.js
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user