forked from jakever/canvas-spreadsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
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
栾华亮
committed
Dec 9, 2020
1 parent
12540e5
commit 1f012bf
Showing
35 changed files
with
1,952 additions
and
535 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
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,12 @@ | ||
import Vue from 'vue'; | ||
import Icon from './index.vue'; | ||
|
||
Vue.component('Icon', Icon); | ||
|
||
// 导入所有的svg(参照webpack文档: http://webpack.github.io/docs/context.html#dynamic-requires ) | ||
// ~function (requireContext) { | ||
// return requireContext.keys().map(requireContext) | ||
// }(require.context('./svg', false, /\.svg$/)) | ||
const requireAll = requireContext => requireContext.keys().map(requireContext); | ||
const req = require.context('./svg', false, /\.svg$/) | ||
requireAll(req); |
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,47 @@ | ||
<template> | ||
<svg :style="iconSty" | ||
aria-hidden="true"> | ||
<use :xlink:href="iconName"/> | ||
</svg> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'Icon', | ||
props: { | ||
type: { | ||
default: 'sad' | ||
}, | ||
size: { | ||
type: [Number, String], | ||
default: 16 | ||
}, | ||
color: { | ||
type: String | ||
} | ||
}, | ||
computed: { | ||
iconName() { | ||
return '#' + this.type | ||
}, | ||
iconSty() { | ||
return { | ||
'font-size': this.size + 'px', | ||
'color': this.color | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
svg { | ||
width: 1em; | ||
height: 1em; | ||
vertical-align: -0.15em; | ||
fill: currentColor; | ||
overflow: hidden; | ||
user-select: none; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.