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
More Decks by Yoshiaki Itakura
See All by Yoshiaki Itakura
再帰関数を使ってみよう
negibouze
1
6.5k
Other Decks in Programming
See All in Programming
Next.js: The final boss of Web Performance
guaca
0
330
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
GraphQL の onError と Nullability のこれから
quramy
0
180
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
190
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
190
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
300
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
510
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.5k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
400
ActionController meets Protocol Buffers
sorah
0
680
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
490
How GitHub (no longer) Works
holman
316
150k
Agile that works and the tools we love
rasmusluckow
331
22k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
880
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Mind Mapping
helmedeiros
1
400
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
The SEO Collaboration Effect
kristinabergwall1
1
600
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
59k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
Transcript
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
は極力使わないようにしよう ご清聴ありがとうございました。