-
Notifications
You must be signed in to change notification settings - Fork 11
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
15 changed files
with
196 additions
and
118 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
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
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,16 +1,16 @@ | ||
{ | ||
"name": "effect", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.2.33" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^2.3.3", | ||
"vite": "^2.9.9" | ||
} | ||
"name": "effect", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.2.37" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^3.0.3", | ||
"vite": "^3.0.7" | ||
} | ||
} |
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,36 +1,36 @@ | ||
<template> | ||
<div> | ||
组件实例: | ||
<IButton @click="add"></IButton> | ||
{{ num }} | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { IButton } from '../../lib/index' | ||
import { useDeveloper } from '../../lib/hooks/useDeveloper' | ||
import { developFn } from '../../lib/utils/myDevelop' | ||
<script setup lang="ts"> | ||
import { IButton } from '@lib/index'; | ||
import { useDeveloper } from '@lib/hooks/useDeveloper'; | ||
import { developFn } from '@lib/utils/myDevelop'; | ||
const { num } = useDeveloper() | ||
const { num } = useDeveloper(); | ||
function add() { | ||
developFn() | ||
num.value = num.value + 1 | ||
} | ||
function add() { | ||
developFn(); | ||
num.value = num.value + 1; | ||
} | ||
// This starter template is using Vue 3 <script setup> SFCs | ||
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup | ||
// This starter template is using Vue 3 <script setup> SFCs | ||
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup | ||
</script> | ||
|
||
<template> | ||
<div> | ||
组件实例: | ||
<IButton @click="add"></IButton> | ||
{{ num }} | ||
</div> | ||
</template> | ||
|
||
<style> | ||
@import '../../lib/theme-default/button.css'; | ||
@import '../../lib/theme-default/button.css'; | ||
#app { | ||
margin-top: 60px; | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
color: #2c3e50; | ||
text-align: center; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
#app { | ||
margin-top: 60px; | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
color: #2c3e50; | ||
text-align: center; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
</style> |
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,4 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import { createApp } from 'vue'; | ||
import App from './App.vue'; | ||
|
||
createApp(App).mount('#app') | ||
createApp(App).mount('#app'); |
This file was deleted.
Oops, something went wrong.
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,13 +1,26 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
import { defineConfig } from 'vite'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import path from 'path'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
server: { | ||
// 服务器主机名,如果允许外部访问,可设置为"0.0.0.0" | ||
host: '0.0.0.0', | ||
// 服务器端口号 | ||
port: 3001, | ||
}, | ||
}) | ||
plugins: [vue()], | ||
server: { | ||
// 服务器主机名,如果允许外部访问,可设置为"0.0.0.0" | ||
host: '0.0.0.0', | ||
// 服务器端口号 | ||
port: 3001, | ||
}, | ||
resolve: { | ||
alias: [ | ||
{ | ||
find: '@lib', | ||
replacement: `${path.resolve(__dirname, '../lib')}/`, | ||
}, | ||
{ | ||
find: '@xsComponents', | ||
replacement: `${path.resolve(__dirname, '../packages')}/`, | ||
}, | ||
], | ||
}, | ||
}); |
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,26 @@ | ||
{ | ||
// https://www.tslang.cn/docs/handbook/compiler-options.html | ||
"compilerOptions": { | ||
"target": "es2018", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"removeComments": true, | ||
"noLib": false, | ||
"declaration": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strictFunctionTypes": false, | ||
"jsx": "preserve", | ||
"baseUrl": ".", | ||
"sourceMap": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"experimentalDecorators": true, | ||
"paths": { | ||
"@xsComponents/*": ["../packages/"] | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "./tsconfig.web.json", | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"baseUrl": "./effect", // 解析非相对模块的基础地址,默认是当前目录 | ||
"lib": ["ESNext", "DOM"], | ||
"paths": { | ||
"@xsComponents/*": ["../packages/*"], | ||
"@lib/*": ["../lib/*"] | ||
} | ||
}, | ||
"include": ["packages", "effect/", "typings/vue-shim.d.ts"], | ||
"exclude": ["build", "lib"] | ||
} |
Oops, something went wrong.