docs(Select): remove qs dependencie (#7541)
parent
e01f26c541
commit
54434b0931
|
@ -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) {
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue