Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit077413f

Browse files
committed
refactor: update exports
1 parent72f1a61 commit077413f

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

‎packages/coreui-vue/src/index.ts‎

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,22 @@
1-
//@ts-nocheck
21
import{App}from'vue'
32
import*asComponentsfrom'./components'
4-
import{vcplaceholder,vcpopover,vctooltip}from'./directives'
5-
6-
constremoveKeysFromObject=(object,keys)=>{
7-
returnObject.entries(object).reduce((obj,[key,value])=>{
8-
if(!keys.includes(key)&&!keys.includes(value.name)){
9-
obj[key]=value
10-
}
11-
returnobj
12-
},{})
13-
}
3+
import*asDirectivesfrom'./directives'
144

155
constCoreuiVue={
16-
install:(app:App,options:any):void=>{
17-
letpluginComponents=Components
18-
// let pluginDirectives = Directives
19-
20-
consttoRemove=options&&options.remove ?options.remove :null
21-
if(toRemove&&Array.isArray(toRemove)){
22-
pluginComponents=removeKeysFromObject(Components,toRemove)
23-
// pluginDirectives = removeKeysFromObject(Directives, toRemove)
6+
install:(app:App):void=>{
7+
for(constkeyinComponents){
8+
app.component(key,Components[key])
249
}
2510

26-
for(constplugininpluginComponents){
27-
app.component(plugin,Components[plugin])
11+
for(constkeyinDirectives){
12+
app.directive(key,Directives[key])
2813
}
29-
// for (const directive in pluginDirectives) {
30-
// app.directive(directive, Directives[directive])
31-
// }
32-
33-
app.directive('c-placeholder',vcplaceholder)
34-
app.directive('c-popover',vcpopover)
35-
app.directive('c-tooltip',vctooltip)
3614
},
3715
}
3816

3917
// Export library
4018
exportdefaultCoreuiVue
4119

42-
//Export components
20+
//Export components & directives
4321
export*from'./components'
4422
export*from'./directives'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp