mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-05 19:41:59 +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",
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persist": "^1.0.0",
|
||||
"qs": "^6.11.2",
|
||||
"qs": "^6.12.0",
|
||||
"vue": "^3.4.21",
|
||||
"vue-qr": "^4.0.9",
|
||||
"vue-router": "^4.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^2.6.4",
|
||||
"@antfu/eslint-config": "^2.8.3",
|
||||
"@iconify-json/icon-park-outline": "^1.1.15",
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/node": "^20.11.22",
|
||||
"@types/node": "^20.11.28",
|
||||
"@types/qs": "^6.9.12",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"eslint": "^8.57.0",
|
||||
"lint-staged": "^15.2.2",
|
||||
"naive-ui": "^2.38.1",
|
||||
"sass": "^1.71.1",
|
||||
"simple-git-hooks": "^2.9.0",
|
||||
"typescript": "^5.3.3",
|
||||
"unocss": "^0.58.5",
|
||||
"sass": "^1.72.0",
|
||||
"simple-git-hooks": "^2.10.0",
|
||||
"typescript": "^5.4.2",
|
||||
"unocss": "^0.58.6",
|
||||
"unplugin-auto-import": "^0.17.5",
|
||||
"unplugin-icons": "^0.18.5",
|
||||
"unplugin-vue-components": "^0.26.0",
|
||||
"vite": "^5.1.4",
|
||||
"vite-bundle-visualizer": "^1.0.1",
|
||||
"vite": "^5.1.6",
|
||||
"vite-bundle-visualizer": "^1.1.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vue-tsc": "^1.8.27"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
"packages/*"
|
||||
]
|
||||
"vue-tsc": "^2.0.6"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"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'
|
||||
|
||||
/* get方法测试 */
|
||||
@ -12,11 +11,11 @@ export function fetchPost(data: any) {
|
||||
}
|
||||
/* formPost方法测试 */
|
||||
export function fetchFormPost(data: any) {
|
||||
return alovaInstance.Post('/postAPI', qs.stringify(data), {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
})
|
||||
const methodInstance = alovaInstance.Post('/postAPI', data)
|
||||
methodInstance.meta = {
|
||||
isFormPost: true,
|
||||
}
|
||||
return methodInstance
|
||||
}
|
||||
/* delete方法测试 */
|
||||
export function fetchDelete() {
|
||||
|
@ -2,6 +2,7 @@ import { createAlova } from 'alova'
|
||||
import VueHook from 'alova/vue'
|
||||
import GlobalFetch from 'alova/GlobalFetch'
|
||||
import { createServerTokenAuthentication } from '@alova/scene-vue'
|
||||
import qs from 'qs'
|
||||
import {
|
||||
handleBusinessError,
|
||||
handleRefreshToken,
|
||||
@ -49,6 +50,10 @@ export function createAlovaInstance(
|
||||
timeout: _alovaConfig.timeout,
|
||||
|
||||
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)
|
||||
}),
|
||||
responded: onResponseRefreshToken({
|
||||
|
@ -1,21 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
const input = ref('')
|
||||
const text = ref('')
|
||||
|
||||
function createCode() {
|
||||
text.value = input.value
|
||||
}
|
||||
const text = ref('nova-admin')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card>
|
||||
<n-input-group>
|
||||
<n-input v-model:value="input" />
|
||||
<n-button type="primary" @click="createCode">
|
||||
生成
|
||||
</n-button>
|
||||
</n-input-group>
|
||||
<QR-code :text="text" />
|
||||
<n-qr-code :value="text" />
|
||||
<n-input v-model:value="text" :maxlength="60" type="text" />
|
||||
</n-card>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user