devstar插件

This commit is contained in:
2025-07-26 16:40:29 +08:00
commit 30033daafe
4387 changed files with 1041101 additions and 0 deletions

28
node_modules/@vueuse/integrations/useChangeCase.mjs generated vendored Normal file
View File

@@ -0,0 +1,28 @@
import * as changeCase from 'change-case';
import { computed, toValue, ref } from 'vue';
const changeCaseTransforms = /* @__PURE__ */ Object.entries(changeCase).filter(([name, fn]) => typeof fn === "function" && name.endsWith("Case")).reduce((acc, [name, fn]) => {
acc[name] = fn;
return acc;
}, {});
function useChangeCase(input, type, options) {
const typeRef = computed(() => {
const t = toValue(type);
if (!changeCaseTransforms[t])
throw new Error(`Invalid change case type "${t}"`);
return t;
});
if (typeof input === "function")
return computed(() => changeCaseTransforms[typeRef.value](toValue(input), toValue(options)));
const text = ref(input);
return computed({
get() {
return changeCaseTransforms[typeRef.value](text.value, toValue(options));
},
set(value) {
text.value = value;
}
});
}
export { useChangeCase };