-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Showing
9 changed files
with
613 additions
and
80 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// generated by vite-plugin-components | ||
// read more https://github.com/vuejs/vue-next/pull/3399 | ||
|
||
declare module 'vue' { | ||
export interface GlobalComponents { | ||
|
||
} | ||
} | ||
|
||
export { } |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app" style="padding: 20px"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
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,24 @@ | ||
{ | ||
"name": "fixture", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "cross-env DEBUG=vite-plugin-components:* vite", | ||
"build": "cross-env DEBUG=vite-plugin-components:* vite build" | ||
}, | ||
"dependencies": { | ||
"naive-ui": "^2.11.5", | ||
"vant": "^3.0.13", | ||
"vue": "^3.0.11" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^1.2.1", | ||
"@vue/compiler-sfc": "^3.0.11", | ||
"cross-env": "^7.0.3", | ||
"typescript": "^4.2.4", | ||
"vite": "^2.1.5", | ||
"vite-plugin-components": "workspace:*", | ||
"vite-plugin-md": "^0.6.3", | ||
"vite-plugin-vue-svg": "^0.1.0" | ||
} | ||
} |
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 @@ | ||
<script setup lang="ts"> | ||
import { zhCN, dateZhCN } from 'naive-ui' | ||
</script> | ||
|
||
<template> | ||
<n-config-provider :locale="zhCN" :date-locale="dateZhCN"> | ||
<n-space vertical> | ||
<n-input /> | ||
<n-date-picker /> | ||
</n-space> | ||
</n-config-provider> | ||
</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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
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,25 @@ | ||
import path from 'path' | ||
import { UserConfig } from 'vite' | ||
import Vue from '@vitejs/plugin-vue' | ||
import ViteComponents, { NaiveUiResolver } from 'vite-plugin-components' | ||
|
||
const config: UserConfig = { | ||
resolve: { | ||
alias: { | ||
'/~/': `${path.resolve(__dirname, 'src')}/`, | ||
}, | ||
}, | ||
plugins: [ | ||
Vue({ | ||
include: [/\.vue$/, /\.md$/], | ||
}), | ||
ViteComponents({ | ||
customComponentResolvers: [ | ||
NaiveUiResolver(), | ||
], | ||
globalComponentsDeclaration: true, | ||
}), | ||
], | ||
} | ||
|
||
export default config |
Oops, something went wrong.