docs(Select): remove qs dependencie (#7541)

pull/7548/head
extclp 2024-04-30 19:12:05 +08:00 committed by GitHub
parent e01f26c541
commit 54434b0931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -34,7 +34,6 @@ Search with remote data.
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
import jsonp from 'fetch-jsonp'; import jsonp from 'fetch-jsonp';
import qs from 'qs';
let timeout: any; let timeout: any;
let currentValue = ''; let currentValue = '';
@ -47,11 +46,11 @@ function fetch(value: string, callback: any) {
currentValue = value; currentValue = value;
function fake() { function fake() {
const str = qs.stringify({ const params = new URLSearchParams({
code: 'utf-8', code: 'utf-8',
q: value, q: value,
}); });
jsonp(`https://suggest.taobao.com/sug?${str}`) jsonp(`https://suggest.taobao.com/sug?${params}`)
.then(response => response.json()) .then(response => response.json())
.then(d => { .then(d => {
if (currentValue === value) { if (currentValue === value) {

View File

@ -222,7 +222,6 @@
"pretty-quick": "^3.0.0", "pretty-quick": "^3.0.0",
"prismjs": "^1.23.0", "prismjs": "^1.23.0",
"progress": "^2.0.3", "progress": "^2.0.3",
"qs": "^6.10.3",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"remark-frontmatter": "^2.0.0", "remark-frontmatter": "^2.0.0",
"remark-parse": "^8.0.0", "remark-parse": "^8.0.0",