提交 c369b347 编写于 作者: richard_1015's avatar richard_1015

feat: icon

上级 a44ba341
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"] presets: ['@vue/cli-plugin-babel/preset']
}; };
...@@ -12,4 +12,4 @@ module.exports = { ...@@ -12,4 +12,4 @@ module.exports = {
'type-empty': [2, 'never'], 'type-empty': [2, 'never'],
'type-enum': [2, 'always', ['upd', 'chore', 'docs', 'feat', 'fix', 'test', 'refactor', 'revert', 'style']] 'type-enum': [2, 'always', ['upd', 'chore', 'docs', 'feat', 'fix', 'test', 'refactor', 'revert', 'style']]
} }
} };
export default {}; import { App } from 'vue';
export default {
install(app: App<Element>): void {
const files = require.context('@/packages', true, /index\.vue$/);
files.keys().forEach(component => {
const componentEntity = files(component).default;
app.component(componentEntity.name, componentEntity);
});
}
};
...@@ -45,14 +45,12 @@ ...@@ -45,14 +45,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Button from '@/packages/button/index.vue';
import { createComponent } from '@/utils/create'; import { createComponent } from '@/utils/create';
const { createDemo } = createComponent('button'); const { createDemo } = createComponent('button');
export default createDemo({ export default createDemo({
props: { props: {
text: String text: String
}, },
components: { [Button.name]: Button },
emits: ['click'] emits: ['click']
}); });
</script> </script>
......
...@@ -11,12 +11,10 @@ ...@@ -11,12 +11,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Cell from '@/packages/cell/index.vue';
import { createComponent } from '@/utils/create'; import { createComponent } from '@/utils/create';
const { createDemo } = createComponent('cell'); const { createDemo } = createComponent('cell');
export default createDemo({ export default createDemo({
props: {}, props: {},
components: { [Cell.name]: Cell },
emits: ['click'] emits: ['click']
}); });
</script> </script>
......
<template> <template>
<div class="demo"> <div class="demo">
icon <h2>基础用法</h2>
<nut-cell>
<nut-icon name="wifi"></nut-icon>
<nut-icon name="mail"></nut-icon>
</nut-cell>
<h2>图标颜色</h2>
<nut-cell>
<nut-icon name="mail" color="#fa2c19"></nut-icon>
<nut-icon name="mail" color="#64b578"></nut-icon>
</nut-cell>
<h2>图标大小</h2>
<nut-cell>
<nut-icon name="mail"></nut-icon>
<nut-icon name="mail" size="24px"></nut-icon>
<nut-icon name="mail" size="16px"></nut-icon>
</nut-cell>
<h2>基础图标</h2>
<nut-cell>
<ul>
<li v-for="item in icons.glyphs" :key="item.font_class">
<nut-icon :name="item.font_class"></nut-icon>
<span>{{ item.name }}</span>
</li>
</ul>
</nut-cell>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Icon from '@/packages/icon/index.vue'; import icons from '@/styles/font/iconfont.json';
import { createComponent } from '@/utils/create'; import { createComponent } from '@/utils/create';
const { createDemo } = createComponent('icon'); const { createDemo } = createComponent('icon');
export default createDemo({ export default createDemo({
props: {}, props: {},
components: { [Icon.name]: Icon }, setup() {
emits: ['click'] return { icons };
}
}); });
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.nut-cell {
> .nutui-iconfont {
margin-right: 10px;
}
}
ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
li {
flex: 0 0 25%;
max-width: 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
span {
height: 40px;
}
.nutui-iconfont {
margin: 16px 0 16px;
}
}
}
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
### 介绍 ### 介绍
图标组件 基于 IconFont 字体的图标集,可以通过 Icon 组件使用。
### 安装 ### 安装
...@@ -14,3 +14,77 @@ const app = createApp(); ...@@ -14,3 +14,77 @@ const app = createApp();
app.use(Icon); app.use(Icon);
``` ```
## 代码演示
### 基础用法
`Icon``name` 属性支持传入图标名称或图片链接。
```html
<nut-icon name="wifi"></nut-icon>
<nut-icon name="mail"></nut-icon>
```
### 图标颜色
`Icon``color` 属性用来设置图标的颜色。
```html
<nut-icon name="mail" color="#fa2c19"></nut-icon>
<nut-icon name="mail" color="#64b578"></nut-icon>
```
### 图标大小
`Icon``size` 属性用来设置图标的尺寸大小,默认单位为 `px`
```html
<nut-icon name="mail"></nut-icon>
<nut-icon name="mail" size="24px"></nut-icon>
<nut-icon name="mail" size="16px"></nut-icon>
```
### 自定义图标
如果需要在现有 Icon 的基础上使用更多图标,可以引入第三方 iconfont 对应的字体文件和 CSS 文件,之后就可以在 Icon 组件中直接使用。
```css
/* 引入第三方或自定义的字体图标样式 */
@font-face {
font-family: 'my-icon';
src: url('./my-icon.ttf') format('truetype');
}
.my-icon {
font-family: 'my-icon';
}
.my-icon-extra::before {
content: '\e626';
}
```
```html
<!-- 通过 class-prefix 指定类名为 my-icon -->
<nut-icon class-prefix="my-icon" name="extra" />
```
## API
### Props
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| name | 图标名称或图片链接 | _string_ | - |
| color | 图标颜色 | _string_ | - |
| size | 图标大小,如 `20px` `2em`,默认单位为`px` | _number \| string_ | - |
| class-prefix | 类名前缀,用于使用自定义图标 | _string_ | `nutui-icon` |
| tag | HTML 标签 | _string_ | `i` |
### Events
| 事件名 | 说明 | 回调参数 |
| ------ | -------------- | -------------- |
| click | 点击图标时触发 | _event: Event_ |
@import '../../styles/font/iconfont.css';
.nut-icon { .nut-icon {
width: 20px; width: 20px;
height: 20px; height: 20px;
......
<template>
<view :class="classes" @click="handleClick">
>
</view>
</template>
<script lang="ts"> <script lang="ts">
import { toRefs, computed } from 'vue'; import { toRefs, h, PropType } from 'vue';
import { createComponent } from '@/utils/create'; import { createComponent } from '@/utils/create';
const { componentName, create } = createComponent('icon'); const { componentName, create } = createComponent('icon');
export default create({ export default create({
props: { props: {
name: { type: String, default: '' } name: {
type: String,
default: 'right'
},
size: [Number, String],
color: String,
tag: {
type: String as PropType<keyof HTMLElementTagNameMap>,
default: 'i'
}
}, },
components: {}, components: {},
emits: ['click'], emits: ['click'],
setup(props, { emit }) {
const { name } = toRefs(props); setup(props, { emit, slots }) {
const classes = computed(() => { const { name, tag, color, size } = toRefs(props);
const prefixCls = componentName;
return {
[prefixCls]: true
};
});
const handleClick = (event: Event) => { const handleClick = (event: Event) => {
emit('click', event); emit('click', event);
}; };
return { return () =>
handleClick, h(
name, tag.value,
classes {
}; class: `nutui-iconfont ${componentName}-${name.value}`,
style: { color: color?.value, fontSize: size?.value },
onClick: handleClick
},
slots.default?.()
);
} }
}); });
</script> </script>
......
...@@ -16,17 +16,11 @@ ...@@ -16,17 +16,11 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Price from '@/packages/price/index.vue';
import Cell from '@/packages/cell/index.vue';
import { createComponent } from '@/utils/create'; import { createComponent } from '@/utils/create';
const { createDemo } = createComponent('price'); const { createDemo } = createComponent('price');
export default createDemo({ export default createDemo({
props: { props: {
text: String text: String
},
components: {
[Price.name]: Price,
[Cell.name]: Cell
} }
}); });
</script> </script>
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, watch } from 'vue'; import { defineComponent, ref, watch } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { isMobile } from '@/sites/assets/util'; import { isMobile } from '@/sites/assets/util';
export default defineComponent({ export default defineComponent({
name: 'app', name: 'app',
...@@ -18,7 +17,8 @@ export default defineComponent({ ...@@ -18,7 +17,8 @@ export default defineComponent({
watch( watch(
() => route, () => route,
() => { () => {
const { origin, hash, pathname } = window.top.location; // const { origin, hash, pathname } = window.top.location;
const { hash } = window.top.location;
if (!isMobile && route.hash != hash) { if (!isMobile && route.hash != hash) {
// window.top.location.replace(`${origin}${pathname}#/${route.hash}`); // window.top.location.replace(`${origin}${pathname}#/${route.hash}`);
title.value = route.name as string; title.value = route.name as string;
...@@ -52,6 +52,7 @@ export default defineComponent({ ...@@ -52,6 +52,7 @@ export default defineComponent({
#nav { #nav {
position: fixed; position: fixed;
z-index: 10;
left: 0; left: 0;
right: 0; right: 0;
height: 57px; height: 57px;
......
import { createApp } from 'vue'; import { createApp } from 'vue';
import App from './App.vue'; import App from './App.vue';
import router from './router'; import router from './router';
import NutUI from '@/nutui';
import '@/sites/assets/styles/reset.scss'; import '@/sites/assets/styles/reset.scss';
createApp(App) createApp(App)
.use(router) .use(router)
.use(NutUI)
.mount('#app'); .mount('#app');
此差异已折叠。
@font-face {font-family: "iconfont"; @font-face {font-family: "nutui-iconfont";
src: url('iconfont.eot?t=1603963115614'); /* IE9 */ src: url('iconfont.eot?t=1604561728793'); /* IE9 */
src: url('iconfont.eot?t=1603963115614#iefix') format('embedded-opentype'), /* IE6-IE8 */ src: url('iconfont.eot?t=1604561728793#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAosAAsAAAAAFMgAAAnfAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEegqZKJNSATYCJANUCywABCAFhG0HgV8b/RBRlHBSNtmXkJMNL9LUxIZbZrTUyU2fy+08Y1aOzkkDAIAvAAAAUHAQPPV7f569e1/tClSpisG1LlEIj8cYFEKVZjzjsTgcJFmhIpM/9T9n+2IORDokiMiDYuGRABWPggdLMEk1Jy+tJ61Ha4Z7XSN3nvbEGf5O7N65tx/ZDjIGxaDQZ+mlTfldrx/c0Iip+U16EnpMQN7+tt1gNIWJV14U1AVdgCHWBRpgFhHe7jctoya5E6JYZJtOx4YlV1J6Oi+i2FrH8PP+by21OwGF4HCCPyxMXoyLcBFy7nh2j2jCvLkAQomErqsLAKq2rnUVElBW6CpV4WuwnHKkJkBUIKq/rZdDQGpeLKjtnZxrWR7jBe1GZXAtGzLzEj8R68KUQxNygheHW/cMuLO/vfxsJgYniLBdL8eurm2c13MVnaHKTA55fQy4rAUKNgD8RbulGm5AkFcAVpqXdCHnPbrZn32MTVlvpRA7ygved4nEEqlMrlCq1Lx488Em/3kZ9kiOBTDRz6Ncl7zzMQHAwRSgMAN4WAEEsAoIYQBEsAaIYR2QwAYghU1ABluAHLYBBcwBJewAKlgAasAuoAHsAVrA0kS3Y+Qw02uuw9ZrANuA3uA/4v7GVMjzArqvkGOO16TUXTi/Xk3T2r81jRZApmGJms1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50RWuPzgCB4w2lZJLaNR6XythEWJvcvWaJS9C0zCapQLVnS34Xf5m2jUrfxsMiQU0uWoKmvMz2wtp4KybeMp199twZLV+/nUVzu8X3ZluG6Hbe0SdzCarDg//foPuQC7DM4oqRdRahndhm+ZVd5W4twQGdGBjlGBErjtRyh6HV5PWbBH0KI6BBpzkz4Hc6phZ9gLxj+PZsGfwEr7DKpkfmwUV1W3jT41f+Wy8kdt+NxDTvnDYX+92bf9zfvYKTkf1oO9eX0wUmk3BX/SZQpx8VdTa2buP47QlFDyMadTlUFDFkBsCMFS3/tyNuofVnBOioBVWQhqGGJ5sMxA3XQFaMulhI0FOPzziN83xooRgC2fhCCSP0iGMsvCCH1zxFcChMRiUoUIcU55iEaTXm9T7rwcnAqGEHQqO1RkfbO8l4ycFEizX6PcoNJLIAjBrl8jQfkirxTq/kysv4MHXLZN6h2yVrEKsu+VKeOJ8Oi8Cqwz1DLPBUJm8XCxt1wrn1ZG1BgCIiKbChbx6RE8xzrIQYkmoMjMiNVN1ByOHwBcKphQ+QHiFXy+8krK3PL1PwZdTkGbXvHyk5iTRizFCF8rCspp/kYKgjxhIb4qgzSt5y5NEdVsLFgk1lM5/Xry+1ELeIh6Se3KbAkK6qmG6ZlO67n4+LhExAShdYzUNEho4FNN0WQEkJrT5ZaaEiaOR5bBbm8WYIbBGSNTiDBbohVGsi1rOe88yGc/Oh9YIZ9BYWMd8hCGgqmJJW2+nOtAq00YmgZv3cDG4ui0ozoprjpDA8ktRoAAAA=') format('woff2'),
url('iconfont.woff?t=1603963115614') format('woff'), url('iconfont.woff?t=1604561728793') format('woff'),
url('iconfont.ttf?t=1603963115614') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('iconfont.ttf?t=1604561728793') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1603963115614#iconfont') format('svg'); /* iOS 4.1- */ url('iconfont.svg?t=1604561728793#nutui-iconfont') format('svg'); /* iOS 4.1- */
} }
.iconfont { .nutui-iconfont {
font-family: "iconfont" !important; font-family: "nutui-iconfont" !important;
font-size: 16px; font-size: 32px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-mail:before { .nut-icon-mail:before {
content: "\e7de"; content: "\e7de";
} }
.icon-idcard:before { .nut-icon-idcard:before {
content: "\e7df"; content: "\e7df";
} }
.icon-heatmap:before { .nut-icon-heatmap:before {
content: "\e7e0"; content: "\e7e0";
} }
.icon-wifi:before { .nut-icon-wifi:before {
content: "\e7e1"; content: "\e7e1";
} }
.icon-edit:before { .nut-icon-edit:before {
content: "\e7e2"; content: "\e7e2";
} }
.icon-key:before { .nut-icon-key:before {
content: "\e7e3"; content: "\e7e3";
} }
.icon-link:before { .nut-icon-link:before {
content: "\e7e4"; content: "\e7e4";
} }
.icon-man:before { .nut-icon-man:before {
content: "\e7e5"; content: "\e7e5";
} }
.icon-percentage:before { .nut-icon-percentage:before {
content: "\e7e6"; content: "\e7e6";
} }
.icon-pushpin:before { .nut-icon-pushpin:before {
content: "\e7e7"; content: "\e7e7";
} }
.icon-fork:before { .nut-icon-fork:before {
content: "\e7e8"; content: "\e7e8";
} }
.icon-shrink:before { .nut-icon-shrink:before {
content: "\e7e9"; content: "\e7e9";
} }
.icon-arrawsalt:before { .nut-icon-arrawsalt:before {
content: "\e7ea"; content: "\e7ea";
} }
.icon-verticalright:before { .nut-icon-verticalright:before {
content: "\e7eb"; content: "\e7eb";
} }
.icon-right:before { .nut-icon-right:before {
content: "\e7ec"; content: "\e7ec";
} }
.icon-left:before { .nut-icon-left:before {
content: "\e7ed"; content: "\e7ed";
} }
.icon-up:before { .nut-icon-up:before {
content: "\e7ee"; content: "\e7ee";
} }
.icon-down:before { .nut-icon-down:before {
content: "\e7ef"; content: "\e7ef";
} }
.icon-fullscreen:before { .nut-icon-fullscreen:before {
content: "\e7f0"; content: "\e7f0";
} }
.icon-fullscreen-exit:before { .nut-icon-fullscreen-exit:before {
content: "\e7f1"; content: "\e7f1";
} }
此差异已折叠。
{ {
"id": "2166874", "id": "2166874",
"name": "nutui", "name": "nutui",
"font_family": "iconfont", "font_family": "nutui-iconfont",
"css_prefix_text": "icon-", "css_prefix_text": "nut-icon-",
"description": "", "description": "nutui 3.0字体管理",
"glyphs": [ "glyphs": [
{ {
"icon_id": "4766918", "icon_id": "4766918",
......
...@@ -9,9 +9,9 @@ Created by iconfont ...@@ -9,9 +9,9 @@ Created by iconfont
</metadata> </metadata>
<defs> <defs>
<font id="iconfont" horiz-adv-x="1024" > <font id="nutui-iconfont" horiz-adv-x="1024" >
<font-face <font-face
font-family="iconfont" font-family="nutui-iconfont"
font-weight="500" font-weight="500"
font-stretch="normal" font-stretch="normal"
units-per-em="1024" units-per-em="1024"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"skipLibCheck": true, "skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"sourceMap": true, "sourceMap": true,
"baseUrl": ".", "baseUrl": ".",
"types": [ "types": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册