File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
components/PreferenceForm Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 8585</template >
8686
8787<script setup>
88- import { i18n } from ' $/locales/index.js'
89-
9088import { usePreferenceStore } from ' $/store/index.js'
9189
9290import { omit } from ' lodash-es'
@@ -108,8 +106,6 @@ const props = defineProps({
108106 },
109107})
110108
111- const locale = computed (() => i18n .global .locale .value )
112-
113109const preferenceData = defineModel (' modelValue' , {
114110 type: Object ,
115111 default : () => ({}),
Original file line number Diff line number Diff line change @@ -103,10 +103,10 @@ export function mergeConfig(object, sources) {
103103 const customizer = ( objValue , srcValue , key ) => {
104104 let value
105105
106- if ( srcValue ) {
106+ if ( ! [ void 0 ] . includes ( srcValue ) ) {
107107 value = srcValue
108108 }
109- else if ( objValue ) {
109+ else {
110110 value = objValue
111111 }
112112
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export const usePreferenceStore = defineStore({
6060 setData ( data , scope = this . deviceScope ) {
6161 const pickData = pickBy (
6262 data ,
63- value => ! ! value || typeof value === 'number' ,
63+ value => ! [ '' , void 0 ] . includes ( value ) ,
6464 )
6565
6666 if ( data . adbPath === adbPath ) {
You can’t perform that action at this time.
0 commit comments