File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed
Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,5 @@ GetInterfaces().then((res) => {
3333 </script >
3434
3535<template >
36- <Select v-model =" model" @change =" onChange" :options =" options" :border =" border" />
36+ <Select v-model =" model" v-bind = " $attrs " @change =" onChange" :options =" options" :border =" border" />
3737</template >
38-
39- <style lang="less" scoped></style >
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ const handleSelectAll = () => {
8888 class =" item"
8989 >
9090 <div class =" label" >
91- <div >{{ o.label }}</div >
91+ <div >{{ t( o.label) }}</div >
9292 <Icon
9393 v-show =" isSelected(o.value)"
9494 :size =" 32"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ interface Props {
77 size? : ' default' | ' small'
88 placeholder? : string
99 autoSize? : boolean
10+ clearable? : boolean
1011}
1112
1213const model = defineModel <string >({ default: ' ' })
@@ -16,11 +17,16 @@ withDefaults(defineProps<Props>(), {
1617 border: true ,
1718 size: ' default' ,
1819 autoSize: false ,
20+ clearable: false ,
1921})
2022
2123const emits = defineEmits ([' change' ])
2224
2325const { t } = useI18n ()
26+
27+ const handleClear = () => {
28+ model .value = ' '
29+ }
2430 </script >
2531
2632<template >
@@ -31,13 +37,20 @@ const { t } = useI18n()
3137 {{ t(o.label) }}
3238 </option >
3339 </select >
40+ <Button
41+ v-show =" clearable && model"
42+ @click =" handleClear"
43+ icon =" close"
44+ type =" text"
45+ size =" small"
46+ />
3447 </div >
3548</template >
3649
3750<style lang="less" scoped>
3851.select {
52+ display : inline-flex ;
3953 min-width : 120px ;
40- display : inline-block ;
4154 border-radius : 4px ;
4255 font-size : 12px ;
4356 background : var (--select-bg );
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ export default {
249249 always : 'Always' ,
250250 strict : 'Strict' ,
251251 off : 'Off' ,
252- notFound : 'Kernel Not Found' ,
252+ notFound : 'Core Not Found' ,
253253 requestFailed : 'Request Failed' ,
254254 local : 'Local' ,
255255 remote : 'Remote' ,
Original file line number Diff line number Diff line change @@ -11,5 +11,3 @@ import SwitchBranch from './components/SwitchBranch.vue'
1111 <SwitchBranch />
1212 </div >
1313</template >
14-
15- <style lang="less" scoped></style >
You can’t perform that action at this time.
0 commit comments