-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
283 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule _common
updated
4 files
+1 −1 | docs/mobile/api_v2/icon.md | |
+9 −29 | docs/mobile/api_v2/swipe-cell.md | |
+6 −0 | style/web/components/popconfirm/_index.less | |
+0 −2 | style/web/components/popup/_mixin.less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
<template> | ||
<div class="t-demo-iconfont"> | ||
<div> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" size="medium" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" size="large" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" size="25px" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" size="2em" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" size="medium" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" size="large" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" size="25px" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" size="2em" /> | ||
</div> | ||
<br /> | ||
<div> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: red" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: green" /> | ||
<icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: orange" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: red" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: green" /> | ||
<t-icon name="cps-icon-home-sheep" :url="newSvgUrl" style="color: orange" /> | ||
<!-- 引入新 Icon 之后,内置 Icon 依旧有效。name 传入图标名称全称。 --> | ||
<icon name="t-icon-home" :url="newSvgUrl" /> | ||
<t-icon name="t-icon-home" :url="newSvgUrl" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from 'tdesign-icons-vue-next'; | ||
const newSvgUrl = 'https://tdesign.gtimg.com/icon/default-demo/index.js'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div class="tdesign-mobile-demo"> | ||
<h1 class="title">Icon 图标</h1> | ||
<p class="summary">Icon 作为UI构成中重要的元素,一定程度上影响UI界面整体呈现出的风格。</p> | ||
<tdesign-demo-block title="SVG 全量引入" :padding="true"> | ||
<baseDemo /> | ||
</tdesign-demo-block> | ||
<tdesign-demo-block title="SVG 按需引入" :padding="true"> | ||
<single /> | ||
</tdesign-demo-block> | ||
<tdesign-demo-block title="SVG 高级用法" :padding="true"> | ||
<enhanced /> | ||
</tdesign-demo-block> | ||
<tdesign-demo-block title="iconfont 图标" :padding="true"> | ||
<iconfont /> | ||
</tdesign-demo-block> | ||
<tdesign-demo-block title="iconfont 高级用法" :padding="true"> | ||
<iconfontEnhanced /> | ||
</tdesign-demo-block> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import baseDemo from './base.vue'; | ||
import enhanced from './enhanced.vue'; | ||
import iconfontEnhanced from './iconfont-enhanced.vue'; | ||
import iconfont from './iconfont.vue'; | ||
import single from './single.vue'; | ||
</script> | ||
|
||
<style lang="less"> | ||
.t-demo-iconfont { | ||
.t-icon, | ||
.cps-icon { | ||
margin-right: 24px; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdIconSVGProps } from '../icon/type'; | ||
import { PropType } from 'vue'; | ||
|
||
export default { | ||
/** 是否加载组件库内置图标 */ | ||
loadDefaultIcons: { | ||
type: Boolean, | ||
default: true, | ||
}, | ||
/** 图标名称 */ | ||
name: { | ||
type: String, | ||
default: '', | ||
required: true, | ||
}, | ||
/** 图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等 */ | ||
size: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
/** 图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.js) */ | ||
url: { | ||
type: [String, Array] as PropType<TdIconSVGProps['url']>, | ||
}, | ||
/** 点击时触发 */ | ||
onClick: Function as PropType<TdIconSVGProps['onClick']>, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
### IconSVG Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
loadDefaultIcons | Boolean | true | \- | N | ||
name | String | - | required | Y | ||
size | String | undefined | \- | N | ||
style | String | - | html attribute | N | ||
url | String / Array | - | Typescript:`string \| Array<string>` | N | ||
onClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N | ||
|
||
### IconSVG Events | ||
|
||
name | params | description | ||
-- | -- | -- | ||
click | `(context: { e: MouseEvent })` | \- | ||
|
||
### Iconfont Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
loadDefaultIcons | Boolean | true | \- | N | ||
name | String | - | required | Y | ||
size | String | undefined | \- | N | ||
style | String | - | html attribute | N | ||
tag | String | i | \- | N | ||
url | String / Array | - | Typescript:`string \| Array<string>` | N | ||
onClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N | ||
|
||
### Iconfont Events | ||
|
||
name | params | description | ||
-- | -- | -- | ||
click | `(context: { e: MouseEvent })` | \- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdIconfontProps } from '../icon/type'; | ||
import { PropType } from 'vue'; | ||
|
||
export default { | ||
/** 是否加载组件库内置图标 */ | ||
loadDefaultIcons: { | ||
type: Boolean, | ||
default: true, | ||
}, | ||
/** 图标名称 */ | ||
name: { | ||
type: String, | ||
default: '', | ||
required: true, | ||
}, | ||
/** 图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等 */ | ||
size: { | ||
type: String, | ||
default: undefined, | ||
}, | ||
/** 图标 DOM 元素,可选值:i/span/div/... */ | ||
tag: { | ||
type: String, | ||
default: 'i', | ||
}, | ||
/** 图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.css)。也可以在 index.html 中引入图标地址 */ | ||
url: { | ||
type: [String, Array] as PropType<TdIconfontProps['url']>, | ||
}, | ||
/** 点击时触发 */ | ||
onClick: Function as PropType<TdIconfontProps['onClick']>, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Icon as _Icon } from 'tdesign-icons-vue-next'; | ||
import { withInstall, WithInstallType } from '../shared'; | ||
|
||
export const Icon: WithInstallType<typeof _Icon> = withInstall(_Icon, 'TIcon'); | ||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
export interface TdIconfontProps { | ||
/** | ||
* 是否加载组件库内置图标 | ||
* @default true | ||
*/ | ||
loadDefaultIcons?: boolean; | ||
/** | ||
* 图标名称 | ||
* @default '' | ||
*/ | ||
name: string; | ||
/** | ||
* 图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等 | ||
*/ | ||
size?: string; | ||
/** | ||
* 图标 DOM 元素,可选值:i/span/div/... | ||
* @default i | ||
*/ | ||
tag?: string; | ||
/** | ||
* 图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.css)。也可以在 index.html 中引入图标地址 | ||
*/ | ||
url?: string | Array<string>; | ||
/** | ||
* 点击时触发 | ||
*/ | ||
onClick?: (context: { e: MouseEvent }) => void; | ||
} | ||
|
||
export interface TdIconSVGProps { | ||
/** | ||
* 是否加载组件库内置图标 | ||
* @default true | ||
*/ | ||
loadDefaultIcons?: boolean; | ||
/** | ||
* 图标名称 | ||
* @default '' | ||
*/ | ||
name: string; | ||
/** | ||
* 图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等 | ||
*/ | ||
size?: string; | ||
/** | ||
* 图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.js) | ||
*/ | ||
url?: string | Array<string>; | ||
/** | ||
* 点击时触发 | ||
*/ | ||
onClick?: (context: { e: MouseEvent }) => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters