Merge branch 'dev' into release
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "log-lottery",
|
"name": "log-lottery",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -77,7 +77,7 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "app"
|
name = "app"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "app"
|
name = "app"
|
||||||
version = "0.5.2"
|
version = "0.5.3"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
license = ""
|
license = ""
|
||||||
@@ -21,5 +21,5 @@ tauri-build = { version = "2.5.3", features = [] }
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tauri = { version = "2.9.4", features = [] }
|
tauri = { version = "2.9.4", features = ["devtools"] }
|
||||||
tauri-plugin-log = "2"
|
tauri-plugin-log = "2"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
"productName": "log-lottery",
|
"productName": "log-lottery",
|
||||||
"version": "0.5.2",
|
"version": "0.5.3",
|
||||||
"identifier": "to2026.xyz",
|
"identifier": "to2026.xyz",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../dist",
|
"frontendDist": "../dist",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { IFileData } from './type'
|
import type { IFileData } from './type'
|
||||||
import { ListMusic, Upload, X } from 'lucide-vue-next'
|
import { ListMusic, Upload, X } from 'lucide-vue-next'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { getBlobObjectUrl, readFileAsJsonData, readFileData, readFileDataAsBlob } from '@/utils/file'
|
import { getBlobObjectUrl, readFileAsJsonData, readFileDataAsBlob } from '@/utils/file'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
limitType?: string
|
limitType?: string
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PrimitiveProps } from "reka-ui"
|
import type { PrimitiveProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import type { ButtonVariants } from "."
|
import type { ButtonVariants } from '.'
|
||||||
import { Primitive } from "reka-ui"
|
import { Primitive } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { buttonVariants } from "."
|
import { buttonVariants } from '.'
|
||||||
|
|
||||||
interface Props extends PrimitiveProps {
|
interface Props extends PrimitiveProps {
|
||||||
variant?: ButtonVariants["variant"]
|
variant?: ButtonVariants['variant']
|
||||||
size?: ButtonVariants["size"]
|
size?: ButtonVariants['size']
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
as: "button",
|
as: 'button',
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
import type { VariantProps } from "class-variance-authority"
|
import type { VariantProps } from 'class-variance-authority'
|
||||||
import { cva } from "class-variance-authority"
|
import { cva } from 'class-variance-authority'
|
||||||
|
|
||||||
export { default as Button } from "./Button.vue"
|
export { default as Button } from './Button.vue'
|
||||||
|
|
||||||
export const buttonVariants = cva(
|
export const buttonVariants = cva(
|
||||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default:
|
default:
|
||||||
"bg-primary text-primary-foreground hover:bg-primary/90",
|
'bg-primary text-primary-foreground hover:bg-primary/90',
|
||||||
destructive:
|
destructive:
|
||||||
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
||||||
outline:
|
outline:
|
||||||
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
||||||
secondary:
|
secondary:
|
||||||
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||||
ghost:
|
ghost:
|
||||||
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
||||||
link: "text-primary underline-offset-4 hover:underline",
|
link: 'text-primary underline-offset-4 hover:underline',
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
"default": "h-9 px-4 py-2 has-[>svg]:px-3",
|
'default': 'h-9 px-4 py-2 has-[>svg]:px-3',
|
||||||
"sm": "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
'sm': 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
||||||
"lg": "h-10 rounded-md px-6 has-[>svg]:px-4",
|
'lg': 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
||||||
"icon": "size-9",
|
'icon': 'size-9',
|
||||||
"icon-sm": "size-8",
|
'icon-sm': 'size-8',
|
||||||
"icon-lg": "size-10",
|
'icon-lg': 'size-10',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
size: "default",
|
size: 'default',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ListboxRootEmits, ListboxRootProps } from "reka-ui"
|
import type { ListboxRootEmits, ListboxRootProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { ListboxRoot, useFilter, useForwardPropsEmits } from "reka-ui"
|
import { ListboxRoot, useFilter, useForwardPropsEmits } from 'reka-ui'
|
||||||
import { reactive, ref, watch } from "vue"
|
import { reactive, ref, watch } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { provideCommandContext } from "."
|
import { provideCommandContext } from '.'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<ListboxRootProps & { class?: HTMLAttributes["class"] }>(), {
|
const props = withDefaults(defineProps<ListboxRootProps & { class?: HTMLAttributes['class'] }>(), {
|
||||||
modelValue: "",
|
modelValue: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const emits = defineEmits<ListboxRootEmits>()
|
const emits = defineEmits<ListboxRootEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
|
|
||||||
const allItems = ref<Map<string, string>>(new Map())
|
const allItems = ref<Map<string, string>>(new Map())
|
||||||
const allGroups = ref<Map<string, Set<string>>>(new Map())
|
const allGroups = ref<Map<string, Set<string>>>(new Map())
|
||||||
|
|
||||||
const { contains } = useFilter({ sensitivity: "base" })
|
const { contains } = useFilter({ sensitivity: 'base' })
|
||||||
const filterState = reactive({
|
const filterState = reactive({
|
||||||
search: "",
|
search: '',
|
||||||
filtered: {
|
filtered: {
|
||||||
/** The count of all visible items. */
|
/** The count of all visible items. */
|
||||||
count: 0,
|
count: 0,
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogRootEmits, DialogRootProps } from "reka-ui"
|
import type { DialogRootEmits, DialogRootProps } from 'reka-ui'
|
||||||
import { useForwardPropsEmits } from "reka-ui"
|
import { useForwardPropsEmits } from 'reka-ui'
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'
|
||||||
import Command from "./Command.vue"
|
import Command from './Command.vue'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<DialogRootProps & {
|
const props = withDefaults(defineProps<DialogRootProps & {
|
||||||
title?: string
|
title?: string
|
||||||
description?: string
|
description?: string
|
||||||
}>(), {
|
}>(), {
|
||||||
title: "Command Palette",
|
title: 'Command Palette',
|
||||||
description: "Search for a command to run...",
|
description: 'Search for a command to run...',
|
||||||
})
|
})
|
||||||
const emits = defineEmits<DialogRootEmits>()
|
const emits = defineEmits<DialogRootEmits>()
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PrimitiveProps } from "reka-ui"
|
import type { PrimitiveProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { Primitive } from "reka-ui"
|
import { Primitive } from 'reka-ui'
|
||||||
import { computed } from "vue"
|
import { computed } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { useCommand } from "."
|
import { useCommand } from '.'
|
||||||
|
|
||||||
const props = defineProps<PrimitiveProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const { filterState } = useCommand()
|
const { filterState } = useCommand()
|
||||||
const isRender = computed(() => !!filterState.search && filterState.filtered.count === 0,
|
const isRender = computed(() => !!filterState.search && filterState.filtered.count === 0,
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ListboxGroupProps } from "reka-ui"
|
import type { ListboxGroupProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { ListboxGroup, ListboxGroupLabel, useId } from "reka-ui"
|
import { ListboxGroup, ListboxGroupLabel, useId } from 'reka-ui'
|
||||||
import { computed, onMounted, onUnmounted } from "vue"
|
import { computed, onMounted, onUnmounted } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { provideCommandGroupContext, useCommand } from "."
|
import { provideCommandGroupContext, useCommand } from '.'
|
||||||
|
|
||||||
const props = defineProps<ListboxGroupProps & {
|
const props = defineProps<ListboxGroupProps & {
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
heading?: string
|
heading?: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const { allGroups, filterState } = useCommand()
|
const { allGroups, filterState } = useCommand()
|
||||||
const id = useId()
|
const id = useId()
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ListboxFilterProps } from "reka-ui"
|
import type { ListboxFilterProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { Search } from "lucide-vue-next"
|
import { Search } from 'lucide-vue-next'
|
||||||
import { ListboxFilter, useForwardProps } from "reka-ui"
|
import { ListboxFilter, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { useCommand } from "."
|
import { useCommand } from '.'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps<ListboxFilterProps & {
|
const props = defineProps<ListboxFilterProps & {
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ListboxItemEmits, ListboxItemProps } from "reka-ui"
|
import type { ListboxItemEmits, ListboxItemProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit, useCurrentElement } from "@vueuse/core"
|
import { reactiveOmit, useCurrentElement } from '@vueuse/core'
|
||||||
import { ListboxItem, useForwardPropsEmits, useId } from "reka-ui"
|
import { ListboxItem, useForwardPropsEmits, useId } from 'reka-ui'
|
||||||
import { computed, onMounted, onUnmounted, ref } from "vue"
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import { useCommand, useCommandGroup } from "."
|
import { useCommand, useCommandGroup } from '.'
|
||||||
|
|
||||||
const props = defineProps<ListboxItemProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<ListboxItemProps & { class?: HTMLAttributes['class'] }>()
|
||||||
const emits = defineEmits<ListboxItemEmits>()
|
const emits = defineEmits<ListboxItemEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ onMounted(() => {
|
|||||||
return
|
return
|
||||||
|
|
||||||
// textValue to perform filter
|
// textValue to perform filter
|
||||||
allItems.value.set(id, currentElement.value.textContent ?? (props.value?.toString() ?? ""))
|
allItems.value.set(id, currentElement.value.textContent ?? (props.value?.toString() ?? ''))
|
||||||
|
|
||||||
const groupId = groupContext?.id
|
const groupId = groupContext?.id
|
||||||
if (groupId) {
|
if (groupId) {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ListboxContentProps } from "reka-ui"
|
import type { ListboxContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { ListboxContent, useForwardProps } from "reka-ui"
|
import { ListboxContent, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<ListboxContentProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<ListboxContentProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardProps(delegatedProps)
|
const forwarded = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { SeparatorProps } from "reka-ui"
|
import type { SeparatorProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { Separator } from "reka-ui"
|
import { Separator } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<SeparatorProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<SeparatorProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import type { Ref } from "vue"
|
import type { Ref } from 'vue'
|
||||||
import { createContext } from "reka-ui"
|
import { createContext } from 'reka-ui'
|
||||||
|
|
||||||
export { default as Command } from "./Command.vue"
|
export { default as Command } from './Command.vue'
|
||||||
export { default as CommandDialog } from "./CommandDialog.vue"
|
export { default as CommandDialog } from './CommandDialog.vue'
|
||||||
export { default as CommandEmpty } from "./CommandEmpty.vue"
|
export { default as CommandEmpty } from './CommandEmpty.vue'
|
||||||
export { default as CommandGroup } from "./CommandGroup.vue"
|
export { default as CommandGroup } from './CommandGroup.vue'
|
||||||
export { default as CommandInput } from "./CommandInput.vue"
|
export { default as CommandInput } from './CommandInput.vue'
|
||||||
export { default as CommandItem } from "./CommandItem.vue"
|
export { default as CommandItem } from './CommandItem.vue'
|
||||||
export { default as CommandList } from "./CommandList.vue"
|
export { default as CommandList } from './CommandList.vue'
|
||||||
export { default as CommandSeparator } from "./CommandSeparator.vue"
|
export { default as CommandSeparator } from './CommandSeparator.vue'
|
||||||
export { default as CommandShortcut } from "./CommandShortcut.vue"
|
export { default as CommandShortcut } from './CommandShortcut.vue'
|
||||||
|
|
||||||
export const [useCommand, provideCommandContext] = createContext<{
|
export const [useCommand, provideCommandContext] = createContext<{
|
||||||
allItems: Ref<Map<string, string>>
|
allItems: Ref<Map<string, string>>
|
||||||
@@ -18,8 +18,8 @@ export const [useCommand, provideCommandContext] = createContext<{
|
|||||||
search: string
|
search: string
|
||||||
filtered: { count: number, items: Map<string, number>, groups: Set<string> }
|
filtered: { count: number, items: Map<string, number>, groups: Set<string> }
|
||||||
}
|
}
|
||||||
}>("Command")
|
}>('Command')
|
||||||
|
|
||||||
export const [useCommandGroup, provideCommandGroupContext] = createContext<{
|
export const [useCommandGroup, provideCommandGroupContext] = createContext<{
|
||||||
id?: string
|
id?: string
|
||||||
}>("CommandGroup")
|
}>('CommandGroup')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogRootEmits, DialogRootProps } from "reka-ui"
|
import type { DialogRootEmits, DialogRootProps } from 'reka-ui'
|
||||||
import { DialogRoot, useForwardPropsEmits } from "reka-ui"
|
import { DialogRoot, useForwardPropsEmits } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DialogRootProps>()
|
const props = defineProps<DialogRootProps>()
|
||||||
const emits = defineEmits<DialogRootEmits>()
|
const emits = defineEmits<DialogRootEmits>()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogCloseProps } from "reka-ui"
|
import type { DialogCloseProps } from 'reka-ui'
|
||||||
import { DialogClose } from "reka-ui"
|
import { DialogClose } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DialogCloseProps>()
|
const props = defineProps<DialogCloseProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogContentEmits, DialogContentProps } from "reka-ui"
|
import type { DialogContentEmits, DialogContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { X } from "lucide-vue-next"
|
import { X } from 'lucide-vue-next'
|
||||||
import {
|
import {
|
||||||
DialogClose,
|
DialogClose,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
DialogPortal,
|
DialogPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
import DialogOverlay from "./DialogOverlay.vue"
|
import DialogOverlay from './DialogOverlay.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = withDefaults(defineProps<DialogContentProps & { class?: HTMLAttributes["class"], showCloseButton?: boolean }>(), {
|
const props = withDefaults(defineProps<DialogContentProps & { class?: HTMLAttributes['class'], showCloseButton?: boolean }>(), {
|
||||||
showCloseButton: true,
|
showCloseButton: true,
|
||||||
})
|
})
|
||||||
const emits = defineEmits<DialogContentEmits>()
|
const emits = defineEmits<DialogContentEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogDescriptionProps } from "reka-ui"
|
import type { DialogDescriptionProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { DialogDescription, useForwardProps } from "reka-ui"
|
import { DialogDescription, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<{ class?: HTMLAttributes["class"] }>()
|
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogOverlayProps } from "reka-ui"
|
import type { DialogOverlayProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { DialogOverlay } from "reka-ui"
|
import { DialogOverlay } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogContentEmits, DialogContentProps } from "reka-ui"
|
import type { DialogContentEmits, DialogContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { X } from "lucide-vue-next"
|
import { X } from 'lucide-vue-next'
|
||||||
import {
|
import {
|
||||||
DialogClose,
|
DialogClose,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
DialogOverlay,
|
DialogOverlay,
|
||||||
DialogPortal,
|
DialogPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps<DialogContentProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
|
||||||
const emits = defineEmits<DialogContentEmits>()
|
const emits = defineEmits<DialogContentEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogTitleProps } from "reka-ui"
|
import type { DialogTitleProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { DialogTitle, useForwardProps } from "reka-ui"
|
import { DialogTitle, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DialogTitleProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DialogTriggerProps } from "reka-ui"
|
import type { DialogTriggerProps } from 'reka-ui'
|
||||||
import { DialogTrigger } from "reka-ui"
|
import { DialogTrigger } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DialogTriggerProps>()
|
const props = defineProps<DialogTriggerProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
export { default as Dialog } from "./Dialog.vue"
|
export { default as Dialog } from './Dialog.vue'
|
||||||
export { default as DialogClose } from "./DialogClose.vue"
|
export { default as DialogClose } from './DialogClose.vue'
|
||||||
export { default as DialogContent } from "./DialogContent.vue"
|
export { default as DialogContent } from './DialogContent.vue'
|
||||||
export { default as DialogDescription } from "./DialogDescription.vue"
|
export { default as DialogDescription } from './DialogDescription.vue'
|
||||||
export { default as DialogFooter } from "./DialogFooter.vue"
|
export { default as DialogFooter } from './DialogFooter.vue'
|
||||||
export { default as DialogHeader } from "./DialogHeader.vue"
|
export { default as DialogHeader } from './DialogHeader.vue'
|
||||||
export { default as DialogOverlay } from "./DialogOverlay.vue"
|
export { default as DialogOverlay } from './DialogOverlay.vue'
|
||||||
export { default as DialogScrollContent } from "./DialogScrollContent.vue"
|
export { default as DialogScrollContent } from './DialogScrollContent.vue'
|
||||||
export { default as DialogTitle } from "./DialogTitle.vue"
|
export { default as DialogTitle } from './DialogTitle.vue'
|
||||||
export { default as DialogTrigger } from "./DialogTrigger.vue"
|
export { default as DialogTrigger } from './DialogTrigger.vue'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuRootEmits, DropdownMenuRootProps } from "reka-ui"
|
import type { DropdownMenuRootEmits, DropdownMenuRootProps } from 'reka-ui'
|
||||||
import { DropdownMenuRoot, useForwardPropsEmits } from "reka-ui"
|
import { DropdownMenuRoot, useForwardPropsEmits } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuRootProps>()
|
const props = defineProps<DropdownMenuRootProps>()
|
||||||
const emits = defineEmits<DropdownMenuRootEmits>()
|
const emits = defineEmits<DropdownMenuRootEmits>()
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from "reka-ui"
|
import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { Check } from "lucide-vue-next"
|
import { Check } from 'lucide-vue-next'
|
||||||
import {
|
import {
|
||||||
DropdownMenuCheckboxItem,
|
DropdownMenuCheckboxItem,
|
||||||
DropdownMenuItemIndicator,
|
DropdownMenuItemIndicator,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
|
||||||
const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
|
const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuContentEmits, DropdownMenuContentProps } from "reka-ui"
|
import type { DropdownMenuContentEmits, DropdownMenuContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuPortal,
|
DropdownMenuPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes["class"] }>(),
|
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
|
||||||
{
|
{
|
||||||
sideOffset: 4,
|
sideOffset: 4,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
const emits = defineEmits<DropdownMenuContentEmits>()
|
const emits = defineEmits<DropdownMenuContentEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuGroupProps } from "reka-ui"
|
import type { DropdownMenuGroupProps } from 'reka-ui'
|
||||||
import { DropdownMenuGroup } from "reka-ui"
|
import { DropdownMenuGroup } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuGroupProps>()
|
const props = defineProps<DropdownMenuGroupProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuItemProps } from "reka-ui"
|
import type { DropdownMenuItemProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { DropdownMenuItem, useForwardProps } from "reka-ui"
|
import { DropdownMenuItem, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<DropdownMenuItemProps & {
|
const props = withDefaults(defineProps<DropdownMenuItemProps & {
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
inset?: boolean
|
inset?: boolean
|
||||||
variant?: "default" | "destructive"
|
variant?: 'default' | 'destructive'
|
||||||
}>(), {
|
}>(), {
|
||||||
variant: "default",
|
variant: 'default',
|
||||||
})
|
})
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "inset", "variant", "class")
|
const delegatedProps = reactiveOmit(props, 'inset', 'variant', 'class')
|
||||||
|
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuLabelProps } from "reka-ui"
|
import type { DropdownMenuLabelProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { DropdownMenuLabel, useForwardProps } from "reka-ui"
|
import { DropdownMenuLabel, useForwardProps } from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
|
const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class", "inset")
|
const delegatedProps = reactiveOmit(props, 'class', 'inset')
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from "reka-ui"
|
import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from 'reka-ui'
|
||||||
import {
|
import {
|
||||||
DropdownMenuRadioGroup,
|
DropdownMenuRadioGroup,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuRadioGroupProps>()
|
const props = defineProps<DropdownMenuRadioGroupProps>()
|
||||||
const emits = defineEmits<DropdownMenuRadioGroupEmits>()
|
const emits = defineEmits<DropdownMenuRadioGroupEmits>()
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from "reka-ui"
|
import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { Circle } from "lucide-vue-next"
|
import { Circle } from 'lucide-vue-next'
|
||||||
import {
|
import {
|
||||||
DropdownMenuItemIndicator,
|
DropdownMenuItemIndicator,
|
||||||
DropdownMenuRadioItem,
|
DropdownMenuRadioItem,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const emits = defineEmits<DropdownMenuRadioItemEmits>()
|
const emits = defineEmits<DropdownMenuRadioItemEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuSeparatorProps } from "reka-ui"
|
import type { DropdownMenuSeparatorProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSeparatorProps & {
|
const props = defineProps<DropdownMenuSeparatorProps & {
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
class?: HTMLAttributes["class"]
|
class?: HTMLAttributes['class']
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuSubEmits, DropdownMenuSubProps } from "reka-ui"
|
import type { DropdownMenuSubEmits, DropdownMenuSubProps } from 'reka-ui'
|
||||||
import {
|
import {
|
||||||
DropdownMenuSub,
|
DropdownMenuSub,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSubProps>()
|
const props = defineProps<DropdownMenuSubProps>()
|
||||||
const emits = defineEmits<DropdownMenuSubEmits>()
|
const emits = defineEmits<DropdownMenuSubEmits>()
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from "reka-ui"
|
import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
DropdownMenuSubContent,
|
DropdownMenuSubContent,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
|
||||||
const emits = defineEmits<DropdownMenuSubContentEmits>()
|
const emits = defineEmits<DropdownMenuSubContentEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuSubTriggerProps } from "reka-ui"
|
import type { DropdownMenuSubTriggerProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import { ChevronRight } from "lucide-vue-next"
|
import { ChevronRight } from 'lucide-vue-next'
|
||||||
import {
|
import {
|
||||||
DropdownMenuSubTrigger,
|
DropdownMenuSubTrigger,
|
||||||
useForwardProps,
|
useForwardProps,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
|
const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class", "inset")
|
const delegatedProps = reactiveOmit(props, 'class', 'inset')
|
||||||
const forwardedProps = useForwardProps(delegatedProps)
|
const forwardedProps = useForwardProps(delegatedProps)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DropdownMenuTriggerProps } from "reka-ui"
|
import type { DropdownMenuTriggerProps } from 'reka-ui'
|
||||||
import { DropdownMenuTrigger, useForwardProps } from "reka-ui"
|
import { DropdownMenuTrigger, useForwardProps } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<DropdownMenuTriggerProps>()
|
const props = defineProps<DropdownMenuTriggerProps>()
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
export { default as DropdownMenu } from "./DropdownMenu.vue"
|
export { default as DropdownMenu } from './DropdownMenu.vue'
|
||||||
|
|
||||||
export { default as DropdownMenuCheckboxItem } from "./DropdownMenuCheckboxItem.vue"
|
export { default as DropdownMenuCheckboxItem } from './DropdownMenuCheckboxItem.vue'
|
||||||
export { default as DropdownMenuContent } from "./DropdownMenuContent.vue"
|
export { default as DropdownMenuContent } from './DropdownMenuContent.vue'
|
||||||
export { default as DropdownMenuGroup } from "./DropdownMenuGroup.vue"
|
export { default as DropdownMenuGroup } from './DropdownMenuGroup.vue'
|
||||||
export { default as DropdownMenuItem } from "./DropdownMenuItem.vue"
|
export { default as DropdownMenuItem } from './DropdownMenuItem.vue'
|
||||||
export { default as DropdownMenuLabel } from "./DropdownMenuLabel.vue"
|
export { default as DropdownMenuLabel } from './DropdownMenuLabel.vue'
|
||||||
export { default as DropdownMenuRadioGroup } from "./DropdownMenuRadioGroup.vue"
|
export { default as DropdownMenuRadioGroup } from './DropdownMenuRadioGroup.vue'
|
||||||
export { default as DropdownMenuRadioItem } from "./DropdownMenuRadioItem.vue"
|
export { default as DropdownMenuRadioItem } from './DropdownMenuRadioItem.vue'
|
||||||
export { default as DropdownMenuSeparator } from "./DropdownMenuSeparator.vue"
|
export { default as DropdownMenuSeparator } from './DropdownMenuSeparator.vue'
|
||||||
export { default as DropdownMenuShortcut } from "./DropdownMenuShortcut.vue"
|
export { default as DropdownMenuShortcut } from './DropdownMenuShortcut.vue'
|
||||||
export { default as DropdownMenuSub } from "./DropdownMenuSub.vue"
|
export { default as DropdownMenuSub } from './DropdownMenuSub.vue'
|
||||||
export { default as DropdownMenuSubContent } from "./DropdownMenuSubContent.vue"
|
export { default as DropdownMenuSubContent } from './DropdownMenuSubContent.vue'
|
||||||
export { default as DropdownMenuSubTrigger } from "./DropdownMenuSubTrigger.vue"
|
export { default as DropdownMenuSubTrigger } from './DropdownMenuSubTrigger.vue'
|
||||||
export { default as DropdownMenuTrigger } from "./DropdownMenuTrigger.vue"
|
export { default as DropdownMenuTrigger } from './DropdownMenuTrigger.vue'
|
||||||
export { DropdownMenuPortal } from "reka-ui"
|
export { DropdownMenuPortal } from 'reka-ui'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PopoverRootEmits, PopoverRootProps } from "reka-ui"
|
import type { PopoverRootEmits, PopoverRootProps } from 'reka-ui'
|
||||||
import { PopoverRoot, useForwardPropsEmits } from "reka-ui"
|
import { PopoverRoot, useForwardPropsEmits } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<PopoverRootProps>()
|
const props = defineProps<PopoverRootProps>()
|
||||||
const emits = defineEmits<PopoverRootEmits>()
|
const emits = defineEmits<PopoverRootEmits>()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PopoverAnchorProps } from "reka-ui"
|
import type { PopoverAnchorProps } from 'reka-ui'
|
||||||
import { PopoverAnchor } from "reka-ui"
|
import { PopoverAnchor } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<PopoverAnchorProps>()
|
const props = defineProps<PopoverAnchorProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PopoverContentEmits, PopoverContentProps } from "reka-ui"
|
import type { PopoverContentEmits, PopoverContentProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
PopoverContent,
|
PopoverContent,
|
||||||
PopoverPortal,
|
PopoverPortal,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<PopoverContentProps & { class?: HTMLAttributes["class"] }>(),
|
defineProps<PopoverContentProps & { class?: HTMLAttributes['class'] }>(),
|
||||||
{
|
{
|
||||||
align: "center",
|
align: 'center',
|
||||||
sideOffset: 4,
|
sideOffset: 4,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
const emits = defineEmits<PopoverContentEmits>()
|
const emits = defineEmits<PopoverContentEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PopoverTriggerProps } from "reka-ui"
|
import type { PopoverTriggerProps } from 'reka-ui'
|
||||||
import { PopoverTrigger } from "reka-ui"
|
import { PopoverTrigger } from 'reka-ui'
|
||||||
|
|
||||||
const props = defineProps<PopoverTriggerProps>()
|
const props = defineProps<PopoverTriggerProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export { default as Popover } from "./Popover.vue"
|
export { default as Popover } from './Popover.vue'
|
||||||
export { default as PopoverAnchor } from "./PopoverAnchor.vue"
|
export { default as PopoverAnchor } from './PopoverAnchor.vue'
|
||||||
export { default as PopoverContent } from "./PopoverContent.vue"
|
export { default as PopoverContent } from './PopoverContent.vue'
|
||||||
export { default as PopoverTrigger } from "./PopoverTrigger.vue"
|
export { default as PopoverTrigger } from './PopoverTrigger.vue'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ToasterProps } from "vue-sonner"
|
import type { ToasterProps } from 'vue-sonner'
|
||||||
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-vue-next"
|
import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from 'lucide-vue-next'
|
||||||
import { Toaster as Sonner } from "vue-sonner"
|
import { Toaster as Sonner } from 'vue-sonner'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<ToasterProps>()
|
const props = defineProps<ToasterProps>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { default as Toaster } from "./Sonner.vue"
|
export { default as Toaster } from './Sonner.vue'
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { SwitchRootEmits, SwitchRootProps } from "reka-ui"
|
import type { SwitchRootEmits, SwitchRootProps } from 'reka-ui'
|
||||||
import type { HTMLAttributes } from "vue"
|
import type { HTMLAttributes } from 'vue'
|
||||||
import { reactiveOmit } from "@vueuse/core"
|
import { reactiveOmit } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
SwitchRoot,
|
SwitchRoot,
|
||||||
SwitchThumb,
|
SwitchThumb,
|
||||||
useForwardPropsEmits,
|
useForwardPropsEmits,
|
||||||
} from "reka-ui"
|
} from 'reka-ui'
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes["class"] }>()
|
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes['class'] }>()
|
||||||
|
|
||||||
const emits = defineEmits<SwitchRootEmits>()
|
const emits = defineEmits<SwitchRootEmits>()
|
||||||
|
|
||||||
const delegatedProps = reactiveOmit(props, "class")
|
const delegatedProps = reactiveOmit(props, 'class')
|
||||||
|
|
||||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { default as Switch } from "./Switch.vue"
|
export { default as Switch } from './Switch.vue'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { ClassValue } from "clsx"
|
import type { ClassValue } from 'clsx'
|
||||||
import { clsx } from "clsx"
|
import { clsx } from 'clsx'
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from 'tailwind-merge'
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs))
|
return twMerge(clsx(inputs))
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { success } from 'zod'
|
|
||||||
|
|
||||||
export const errorEn = {
|
export const errorEn = {
|
||||||
require: 'required field',
|
require: 'required field',
|
||||||
requireNumber: 'please enter a number',
|
requireNumber: 'please enter a number',
|
||||||
|
|||||||
@@ -42,32 +42,32 @@ export function rgba(color: string, opacity: number) {
|
|||||||
|
|
||||||
export function rgbToHex(color: string) {
|
export function rgbToHex(color: string) {
|
||||||
// 去掉字符串中的空格
|
// 去掉字符串中的空格
|
||||||
color = color.replace(/\s+/g, '');
|
color = color.replace(/\s+/g, '')
|
||||||
if (isHex(color)) {
|
if (isHex(color)) {
|
||||||
return color
|
return color
|
||||||
}
|
}
|
||||||
// 匹配rgba或rgb格式的字符串
|
// 匹配rgba或rgb格式的字符串
|
||||||
const rgbaMatch = color.match(/^rgba?\((\d+),(\d+),(\d+),?(\d*\.?\d+)?\)$/i);
|
const rgbaMatch = color.match(/^rgba?\((\d+),(\d+),(\d+),?(\d+(?:\.\d+)?|\.\d+)?\)$/i)
|
||||||
if (!rgbaMatch) {
|
if (!rgbaMatch) {
|
||||||
throw new Error('Invalid color format');
|
throw new Error('Invalid color format')
|
||||||
}
|
}
|
||||||
|
|
||||||
const r = parseInt(rgbaMatch[1], 10);
|
const r = Number.parseInt(rgbaMatch[1], 10)
|
||||||
const g = parseInt(rgbaMatch[2], 10);
|
const g = Number.parseInt(rgbaMatch[2], 10)
|
||||||
const b = parseInt(rgbaMatch[3], 10);
|
const b = Number.parseInt(rgbaMatch[3], 10)
|
||||||
const a = rgbaMatch[4] !== undefined ? parseFloat(rgbaMatch[4]) : undefined;
|
const a = rgbaMatch[4] !== undefined ? Number.parseFloat(rgbaMatch[4]) : undefined
|
||||||
|
|
||||||
// 将RGB值转换为十六进制
|
// 将RGB值转换为十六进制
|
||||||
let hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase();
|
let hex = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()}`
|
||||||
|
|
||||||
// 如果提供了alpha值,则将其转换为十六进制并附加到结果中
|
// 如果提供了alpha值,则将其转换为十六进制并附加到结果中
|
||||||
if (a !== undefined) {
|
if (a !== undefined) {
|
||||||
let alphaHex = Math.round(a * 255).toString(16).toUpperCase();
|
let alphaHex = Math.round(a * 255).toString(16).toUpperCase()
|
||||||
if (alphaHex.length === 1) {
|
if (alphaHex.length === 1) {
|
||||||
alphaHex = "0" + alphaHex; // 确保alpha值是两位数
|
alphaHex = `0${alphaHex}` // 确保alpha值是两位数
|
||||||
}
|
}
|
||||||
hex += alphaHex;
|
hex += alphaHex
|
||||||
}
|
}
|
||||||
|
|
||||||
return hex;
|
return hex
|
||||||
}
|
}
|
||||||
@@ -20,19 +20,19 @@ export function readFileData(file: File): Promise<{ data: string, fileName: stri
|
|||||||
|
|
||||||
export function readFileDataAsBlob(file: File): Promise<{ data: Blob, fileName: string }> {
|
export function readFileDataAsBlob(file: File): Promise<{ data: Blob, fileName: string }> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader()
|
||||||
|
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
// 直接使用原始文件作为 Blob
|
// 直接使用原始文件作为 Blob
|
||||||
resolve({ data: file, fileName: file.name });
|
resolve({ data: file, fileName: file.name })
|
||||||
};
|
}
|
||||||
|
|
||||||
reader.onerror = () => {
|
reader.onerror = () => {
|
||||||
reject(new Error('文件读取失败'));
|
reject(new Error('文件读取失败'))
|
||||||
};
|
}
|
||||||
|
|
||||||
reader.readAsArrayBuffer(file);
|
reader.readAsArrayBuffer(file)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function readLocalFileAsArraybuffer(path: string): Promise<ArrayBuffer> {
|
export async function readLocalFileAsArraybuffer(path: string): Promise<ArrayBuffer> {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { storeToRefs } from 'pinia'
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import PageHeader from '@/components/PageHeader/index.vue'
|
import PageHeader from '@/components/PageHeader/index.vue'
|
||||||
import { sidebar } from '@/locales/modules'
|
|
||||||
import useStore from '@/store'
|
import useStore from '@/store'
|
||||||
import UploadDialog from './components/UploadDialog.vue'
|
import UploadDialog from './components/UploadDialog.vue'
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ type IBasePersonConfig = Pick<IPersonConfig, 'uid' | 'name' | 'department' | 'id
|
|||||||
|
|
||||||
export function useViewModel({ exportInputFileRef }: { exportInputFileRef: Ref<HTMLInputElement> }) {
|
export function useViewModel({ exportInputFileRef }: { exportInputFileRef: Ref<HTMLInputElement> }) {
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const baseUrl = import.meta.env.BASE_URL
|
const baseUrl = import.meta.env.BASE_URL.replace('./', '/')
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const worker: Worker | null = new ImportExcelWorker()
|
const worker: Worker | null = new ImportExcelWorker()
|
||||||
const loading = inject(loadingKey)
|
const loading = inject(loadingKey)
|
||||||
@@ -36,11 +36,11 @@ export function useViewModel({ exportInputFileRef }: { exportInputFileRef: Ref<H
|
|||||||
async function getExcelTemplateContent() {
|
async function getExcelTemplateContent() {
|
||||||
const locale = i18n.global.locale.value
|
const locale = i18n.global.locale.value
|
||||||
if (locale === 'zhCn') {
|
if (locale === 'zhCn') {
|
||||||
const templateData = await readLocalFileAsArraybuffer(`${import.meta.env.BASE_URL}人口登记表-zhCn.xlsx`)
|
const templateData = await readLocalFileAsArraybuffer(`${baseUrl}人口登记表-zhCn.xlsx`)
|
||||||
return templateData
|
return templateData
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const templateData = await readLocalFileAsArraybuffer(`${import.meta.env.BASE_URL}personListTemplate-en.xlsx`)
|
const templateData = await readLocalFileAsArraybuffer(`${baseUrl}personListTemplate-en.xlsx`)
|
||||||
return templateData
|
return templateData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import type { IImage, IPrizeConfig } from '@/types/storeType'
|
import type { IImage, IPrizeConfig } from '@/types/storeType'
|
||||||
import { ref, watch } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
Reference in New Issue
Block a user