Skip to content

Commit 5bed37e

Browse files
committed
chore: update deps & perf playground
1 parent 7ae96b5 commit 5bed37e

File tree

3 files changed

+5529
-4517
lines changed

3 files changed

+5529
-4517
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"simple-git-hooks": "^2.8.1",
9191
"stylus": "^0.59.0",
9292
"transform-to-unocss": "workspace:^",
93-
"transform-to-unocss-core": "^0.0.30",
93+
"transform-to-unocss-core": "^0.0.31",
9494
"tsup": "^6.5.0",
9595
"tsx": "^3.12.1",
9696
"typescript": "^4.7.4",

playground/src/App.vue

+11-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ monaco.languages.registerCompletionItemProvider('html', {
117117
return cssCompletionProvider.provideCompletionItems(model, position)
118118
},
119119
})
120-
120+
const autoComplete = ref<any>(null)
121121
onMounted(() => {
122122
document.addEventListener('keydown', (e) => {
123123
if ((e.metaKey || e.ctrlKey) && e.key === 'c') {
@@ -247,6 +247,13 @@ onUnmounted(() => {
247247
}
248248
})
249249
})
250+
251+
function onSelect(value: string) {
252+
input.value = `${value}: `
253+
nextTick(() => {
254+
autoComplete.value.focus()
255+
})
256+
}
250257
</script>
251258

252259
<template>
@@ -292,6 +299,7 @@ onUnmounted(() => {
292299
<!-- <input v-model="input" class="!outline-none" w="40%" text-4 :placeholder="t('placeholder')" type="text"
293300
autocomplete="off" p="x6 y4" hover:border-pink border-1> -->
294301
<AutoComplete
302+
ref="autoComplete"
295303
v-model:value="input"
296304
w="60%"
297305
:options="options"
@@ -301,6 +309,7 @@ onUnmounted(() => {
301309
border-1
302310
allow-clear
303311
@search="onSearch"
312+
@select="onSelect"
304313
/>
305314
<div flex items-center my3>
306315
<input v-model="isChecked" type="checkbox" w4 h4 mr1> isRem
@@ -401,6 +410,7 @@ onUnmounted(() => {
401410
height: 100% !important;
402411
font-size: 16px;
403412
}
413+
404414
.ant-select-selector .ant-select-selection-placeholder {
405415
line-height: 50px !important;
406416
}

0 commit comments

Comments
 (0)