-
-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli): add pc component preview to generators
affects: @varlet/cli
- Loading branch information
Showing
12 changed files
with
3,753 additions
and
935 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
14 changes: 14 additions & 0 deletions
14
packages/varlet-cli/generators/sfc/src/button/example/BasicUse.vue
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,14 @@ | ||
<template> | ||
<b-button>组件库从我开始</b-button> | ||
</template> | ||
|
||
<script> | ||
import Button from '../Button' | ||
export default { | ||
name: 'BasicUse', | ||
components: { | ||
[Button.name]: Button | ||
} | ||
} | ||
</script> |
14 changes: 14 additions & 0 deletions
14
packages/varlet-cli/generators/sfc/src/button/example/ModifyColor.vue
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,14 @@ | ||
<template> | ||
<b-button color="#03A9F4">组件库从我开始</b-button> | ||
</template> | ||
|
||
<script> | ||
import Button from '../Button' | ||
export default { | ||
name: 'ModifyColor', | ||
components: { | ||
[Button.name]: Button | ||
} | ||
} | ||
</script> |
8 changes: 6 additions & 2 deletions
8
packages/varlet-cli/generators/sfc/src/button/example/index.vue
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,19 +1,23 @@ | ||
<template> | ||
<app-type>基本使用</app-type> | ||
<b-button>组件库从我开始</b-button> | ||
<basic-use/> | ||
|
||
<app-type>修改颜色</app-type> | ||
<b-button color="#03A9F4">组件库从我开始</b-button> | ||
<modify-color/> | ||
</template> | ||
|
||
<script> | ||
import Button from '../Button' | ||
import AppType from '@varlet/cli/site/mobile/components/AppType' | ||
import BasicUse from './BasicUse' | ||
import ModifyColor from './ModifyColor' | ||
export default { | ||
components: { | ||
[Button.name]: Button, | ||
AppType, | ||
BasicUse, | ||
ModifyColor | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.