Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Elementをさくっと拡張したい - @【ラクスル×KCF】FrontendNight
Search
Yoshiaki Itakura
February 20, 2019
Programming
590
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Elementをさくっと拡張したい - @【ラクスル×KCF】FrontendNight
Yoshiaki Itakura
February 20, 2019
Transcript
16 slides
Elementをさくっと拡張したい 板倉 義晃(@ita_3y) @【ラクスル×KCF】FrontendNight
本日のお品書き 1. Element とは(1分) 2. 基本的な拡張の仕方(1〜2分) 3. デモ(2〜3分) 4. 自己紹介(余った時間)
5. まとめ
Element とは A Vue.js 2.0 UI Toolkit for Web Vue.jsのコンポーネントライブラリ
GitHub スター数: 35,161(2019/2/20 時点) https://element.eleme.io/#/en-US
Element とは こういうの(button)とか こういうの(popover)とか いろいろ用意されていて簡単に使える便利なやつです https://element.eleme.io/#/en-US/component/button https://element.eleme.io/#/en-US/component/popover
が
Element とは こういうの(button)とか こういうの(popover)とか https://element.eleme.io/#/en-US/component/button https://element.eleme.io/#/en-US/component/popover もっと大きいボタンを 使いたい 違う色の吹き出しを 使いたい
なんて思ったことありませんか?
Elementをさくっと拡張したい
基本的な拡張の仕方 1. Element のコンポーネントをラップする 2. スタイルを上書き、もしくは追加する
e.g. )ボタンのサイズを追加する(抜粋) template直下の要素 el-button-- + size (props) element-ui/packages/button/src/button.vue
e.g. )ボタンのサイズを追加する(抜粋) コンポーネントを ラップ scoped でも大丈夫 el-button-- + 追加したいサイズ を定義する
e.g. )ポップオーバーの色を追加する(抜粋) この辺にスタイルを適 用したい element-ui/packages/popover/src/main.vue
e.g. )ポップオーバーの色を追加する(抜粋) コンポーネントを ラップ scoped だとダメ .el-popover を起点にスタイ ルを追加していく
デモ https://github.com/negibouze/element-easy-expansion
自己紹介 ・板倉 義晃(いたくら よしあき) ・(株)マーキュリー エンジニア ・Twitter: @ita_3y ・GitHub: negibouze
まとめ Element をちょっとだけ拡張したいときは... ・コンポーネントをラップしよう ・Element のクラス名を確認して、いい感じにスタイルを追加しよう ・スタイルがうまく当たらないときは scoped をはずしてみよう ・!important
は極力使わないようにしよう ご清聴ありがとうございました。
More Decks by Yoshiaki Itakura
See All by Yoshiaki Itakura
再帰関数を使ってみよう
negibouze
1
6.5k
Other Decks in Programming
See All in Programming
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
120
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
690
LLM 101
dalinaum
0
560
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
210
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
510
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.4k
はじめてのKubernetesコントリビューション
nasa9084
0
330
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
320
Apache Airflow Introduction
leew
1
100
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
200
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
300
HDC tutorial
michielstock
2
1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
480
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
61k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
650
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Why Our Code Smells
bkeepers
PRO
340
58k
Become a Pro
speakerdeck
PRO
31
6.4k
The Cost Of JavaScript in 2023
addyosmani
56
10k