-
Notifications
You must be signed in to change notification settings - Fork 959
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
1 parent
102f450
commit c6aa8db
Showing
8 changed files
with
26 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
'btn-lg': large, | ||
'btn-loading': loading | ||
}"> | ||
<slot></slot> | ||
<slot/> | ||
</button> | ||
</template> | ||
|
||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
</div> | ||
|
||
<div class="card-body"> | ||
<slot></slot> | ||
<slot/> | ||
</div> | ||
</div> | ||
</template> | ||
|
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
File renamed without changes.
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 |
---|---|---|
@@ -1,29 +1,17 @@ | ||
import Vue from 'vue' | ||
import Card from './Card' | ||
import Button from './Button' | ||
import Checkbox from './Checkbox' | ||
import { HasError, AlertError, AlertSuccess } from 'vform' | ||
|
||
Vue.component(HasError.name, HasError) | ||
Vue.component(AlertError.name, AlertError) | ||
Vue.component(AlertSuccess.name, AlertSuccess) | ||
|
||
/** | ||
* @param {Object} requireContext | ||
*/ | ||
const registerComponents = requireContext => { | ||
requireContext.keys().forEach(file => { | ||
let component = requireContext(file) | ||
|
||
if (component.default) { | ||
component = component.default | ||
} | ||
|
||
if (component.name !== undefined) { | ||
Vue.component(component.name, component) | ||
} | ||
}) | ||
} | ||
|
||
// Load global components dynamically | ||
registerComponents(require.context('./global', false, /.*\.(js|vue)$/)) | ||
|
||
// Load layout components dynamically | ||
registerComponents(require.context('./layouts', false, /.*\.(js|vue)$/)) | ||
// Components that are registered globaly. | ||
[ | ||
Card, | ||
Button, | ||
Checkbox, | ||
HasError, | ||
AlertError, | ||
AlertSuccess | ||
].forEach(Component => { | ||
Vue.component(Component.name, Component) | ||
}) |
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