mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-06 03:57:54 +08:00
build: remove vue-qr
This commit is contained in:
parent
792fa106ac
commit
1bb05bf4c3
26
package.json
26
package.json
@ -58,40 +58,34 @@
|
|||||||
"md-editor-v3": "^4.11.3",
|
"md-editor-v3": "^4.11.3",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"pinia-plugin-persist": "^1.0.0",
|
"pinia-plugin-persist": "^1.0.0",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.12.0",
|
||||||
"vue": "^3.4.21",
|
"vue": "^3.4.21",
|
||||||
"vue-qr": "^4.0.9",
|
|
||||||
"vue-router": "^4.3.0"
|
"vue-router": "^4.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^2.6.4",
|
"@antfu/eslint-config": "^2.8.3",
|
||||||
"@iconify-json/icon-park-outline": "^1.1.15",
|
"@iconify-json/icon-park-outline": "^1.1.15",
|
||||||
"@iconify/vue": "^4.1.1",
|
"@iconify/vue": "^4.1.1",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
"@types/node": "^20.11.22",
|
"@types/node": "^20.11.28",
|
||||||
"@types/qs": "^6.9.12",
|
"@types/qs": "^6.9.12",
|
||||||
"@vitejs/plugin-vue": "^5.0.4",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^15.2.2",
|
||||||
"naive-ui": "^2.38.1",
|
"naive-ui": "^2.38.1",
|
||||||
"sass": "^1.71.1",
|
"sass": "^1.72.0",
|
||||||
"simple-git-hooks": "^2.9.0",
|
"simple-git-hooks": "^2.10.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.4.2",
|
||||||
"unocss": "^0.58.5",
|
"unocss": "^0.58.6",
|
||||||
"unplugin-auto-import": "^0.17.5",
|
"unplugin-auto-import": "^0.17.5",
|
||||||
"unplugin-icons": "^0.18.5",
|
"unplugin-icons": "^0.18.5",
|
||||||
"unplugin-vue-components": "^0.26.0",
|
"unplugin-vue-components": "^0.26.0",
|
||||||
"vite": "^5.1.4",
|
"vite": "^5.1.6",
|
||||||
"vite-bundle-visualizer": "^1.0.1",
|
"vite-bundle-visualizer": "^1.1.0",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
"vue-tsc": "^1.8.27"
|
"vue-tsc": "^2.0.6"
|
||||||
},
|
|
||||||
"workspaces": {
|
|
||||||
"packages": [
|
|
||||||
"packages/*"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"pre-commit": "pnpm lint-staged"
|
"pre-commit": "pnpm lint-staged"
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
|
|
||||||
|
|
||||||
// https://www.npmjs.com/package/vue-qr
|
|
||||||
const props = withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
text?: string
|
|
||||||
size?: number
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
text: '',
|
|
||||||
size: 300,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<vue-qr v-if="props.text" :text="props.text" qid="testid" :size="props.size" :correct-level="1" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
@ -1,4 +1,3 @@
|
|||||||
import qs from 'qs'
|
|
||||||
import { alovaInstance, blankInstance } from '../http'
|
import { alovaInstance, blankInstance } from '../http'
|
||||||
|
|
||||||
/* get方法测试 */
|
/* get方法测试 */
|
||||||
@ -12,11 +11,11 @@ export function fetchPost(data: any) {
|
|||||||
}
|
}
|
||||||
/* formPost方法测试 */
|
/* formPost方法测试 */
|
||||||
export function fetchFormPost(data: any) {
|
export function fetchFormPost(data: any) {
|
||||||
return alovaInstance.Post('/postAPI', qs.stringify(data), {
|
const methodInstance = alovaInstance.Post('/postAPI', data)
|
||||||
headers: {
|
methodInstance.meta = {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
isFormPost: true,
|
||||||
},
|
}
|
||||||
})
|
return methodInstance
|
||||||
}
|
}
|
||||||
/* delete方法测试 */
|
/* delete方法测试 */
|
||||||
export function fetchDelete() {
|
export function fetchDelete() {
|
||||||
|
@ -2,6 +2,7 @@ import { createAlova } from 'alova'
|
|||||||
import VueHook from 'alova/vue'
|
import VueHook from 'alova/vue'
|
||||||
import GlobalFetch from 'alova/GlobalFetch'
|
import GlobalFetch from 'alova/GlobalFetch'
|
||||||
import { createServerTokenAuthentication } from '@alova/scene-vue'
|
import { createServerTokenAuthentication } from '@alova/scene-vue'
|
||||||
|
import qs from 'qs'
|
||||||
import {
|
import {
|
||||||
handleBusinessError,
|
handleBusinessError,
|
||||||
handleRefreshToken,
|
handleRefreshToken,
|
||||||
@ -49,6 +50,10 @@ export function createAlovaInstance(
|
|||||||
timeout: _alovaConfig.timeout,
|
timeout: _alovaConfig.timeout,
|
||||||
|
|
||||||
beforeRequest: onAuthRequired((method) => {
|
beforeRequest: onAuthRequired((method) => {
|
||||||
|
if (method.meta?.isFormPost) {
|
||||||
|
method.config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
||||||
|
method.data = qs.stringify(method.data)
|
||||||
|
}
|
||||||
alovaConfig.beforeRequest?.(method)
|
alovaConfig.beforeRequest?.(method)
|
||||||
}),
|
}),
|
||||||
responded: onResponseRefreshToken({
|
responded: onResponseRefreshToken({
|
||||||
|
@ -1,21 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const input = ref('')
|
const text = ref('nova-admin')
|
||||||
const text = ref('')
|
|
||||||
|
|
||||||
function createCode() {
|
|
||||||
text.value = input.value
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-card>
|
<n-card>
|
||||||
<n-input-group>
|
<n-qr-code :value="text" />
|
||||||
<n-input v-model:value="input" />
|
<n-input v-model:value="text" :maxlength="60" type="text" />
|
||||||
<n-button type="primary" @click="createCode">
|
|
||||||
生成
|
|
||||||
</n-button>
|
|
||||||
</n-input-group>
|
|
||||||
<QR-code :text="text" />
|
|
||||||
</n-card>
|
</n-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user