Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#639][3.0] Icon 컴포넌트 #640

Merged
merged 2 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
@import './style/lib/highlightjs.github';
}
.hljs {
* {
&, * {
font-size: 14px;
font-family: consolas, monospace;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/components/Example.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ export default {
position: relative;
width: 50%;
max-width: 700px;
overflow: hidden;
.code-wrapper {
height: 400px;
overflow-y: hidden;
height: 50px;
}
.btn-show-more {
position: absolute;
Expand Down
9 changes: 7 additions & 2 deletions docs/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export default {
content: '체크박스',
},
{
name: 'RadioButton',
name: 'Radio',
routerLink: '/radio',
content: '라디오버튼',
content: '라디오',
},
{
name: 'InputNumber',
Expand Down Expand Up @@ -124,6 +124,11 @@ export default {
routerLink: '/reactivityChart',
content: '실시간 차트',
},
{
name: 'Icon',
routerLink: '/icon',
content: '아이콘',
},
];

const clickMenu = (routerLink) => {
Expand Down
5 changes: 5 additions & 0 deletions docs/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ const routes = [
name: 'ReactivityChart',
component: () => import(/* webpackChunkName: "reactivityChart" */ '../views/reactivityChart'),
},
{
path: '/icon',
name: 'Icon',
component: () => import(/* webpackChunkName: "icon" */ '../views/icon'),
},
{
path: '/:catchAll(.*)',
name: 'PageNotFound',
Expand Down
2 changes: 0 additions & 2 deletions docs/views/checkbox/example/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
toggle to disable
</button>
</div>
<br>
<br>
</div>
</template>

Expand Down
21 changes: 21 additions & 0 deletions docs/views/icon/api/icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### Desc
- 태그는 &lt;EvIcon&gt;(이하 <아이콘>)으로 정의

```
<EvIcon icon="아이콘명" />
```

### Props

| 이름 | 디폴트 | 타입 | 설명 | 종류 |
|------------ |-----------|---------|-------------------------|---------------------------------------------------|
| icon | '' | String | EVUI에서 제공하는 아이콘 클래스명 | |
| size | '' | String | 아이콘 | s, m, l |

### Event

| 이름 | 파라미터 | 설명 |
| ---- | ------- | ---- |
| click | event | 클릭 이벤트 감지 |
| dblClick | event | 더블 클릭 이벤트 감지 |
| contextmenu | event | 컨텍스트메뉴(우클릭) 이벤트 감지 |
69 changes: 69 additions & 0 deletions docs/views/icon/example/Default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<div class="case">
<p class="case-title">Size</p>
<div style="font-size: 40px;">
<EvIcon icon="ev-icon-user" />
<EvIcon icon="ev-icon-topology" />
<i class="ev-icon-server"/>
</div>
<div class="description">
font-size 지정하여 크기 변경
</div>
<div>
<EvIcon
icon="ev-icon-user2"
size="s"
/>
<EvIcon
icon="ev-icon-user2"
size="m"
/>
<EvIcon
icon="ev-icon-user2"
size="l"
/>
</div>
<div class="description">
size 변수(s, m, l) 바인딩
</div>
</div>
<div class="case">
<p class="case-title">Event</p>
<div style="font-size: 40px;">
<EvIcon
icon="ev-icon-save"
@click="clickIcon"
@dblClick="dblClickIcon"
@contextmenu="contextMenuIcon"
/>
</div>
<div class="description">
<span class="badge">
Click Event Name
</span>
{{ eventText }}
</div>
</div>
</template>

<script>
import { ref } from 'vue';

export default {
setup() {
const eventText = ref('No event occurred');
const clickIcon = (e) => { eventText.value = e.type; };
const dblClickIcon = (e) => { eventText.value = e.type; };
const contextMenuIcon = (e) => { eventText.value = e.type; };
return {
eventText,
clickIcon,
dblClickIcon,
contextMenuIcon,
};
},
};
</script>

<style lang="scss">
</style>
Loading