rayyy-vue-table-components 2.0.21 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +550 -135
- package/dist/index.es.js +4971 -5030
- package/dist/index.umd.js +11 -11
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/index.d.ts +0 -2
- package/dist/src/index.d.ts +9 -1
- package/dist/src/router/constants.d.ts +0 -2
- package/dist/src/types/components.d.ts +0 -45
- package/dist/src/utils/i18n.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +0 -2
- package/src/components/items/BaseBtn.vue +135 -3
- package/src/components/layout/SearchableListPanel.vue +4 -21
- package/src/types/components.d.ts +0 -45
- package/src/utils/i18n.ts +4 -42
- package/dist/src/components/form/BaseMultipleInput.vue.d.ts +0 -549
- package/dist/src/views/demo/BaseMultipleInputDemo.vue.d.ts +0 -2
- package/src/components/form/BaseMultipleInput.vue +0 -112
- package/src/components/form/BaseSelector.vue +0 -65
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-select
|
|
3
|
-
v-bind="attrs"
|
|
4
|
-
:model-value="modelValue"
|
|
5
|
-
:class="props.class"
|
|
6
|
-
:placeholder="props.placeholder || t('common.select')"
|
|
7
|
-
:clearable="props.clearable"
|
|
8
|
-
:collapse-tags="props.collapseTags"
|
|
9
|
-
:collapse-tags-tooltip="props.collapseTagsTooltip"
|
|
10
|
-
:multiple="props.multiple"
|
|
11
|
-
:disabled="props.disabled"
|
|
12
|
-
:reserve-keyword="false"
|
|
13
|
-
filterable
|
|
14
|
-
@update:model-value="updateValue"
|
|
15
|
-
>
|
|
16
|
-
<el-option v-for="it in options" :key="it.label" :label="it.label" :value="it.value" />
|
|
17
|
-
</el-select>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script lang="ts" setup>
|
|
21
|
-
import { useAttrs } from 'vue'
|
|
22
|
-
import { useI18n } from 'vue-i18n'
|
|
23
|
-
import type { ElOptions } from '@/types/OptionDto.ts'
|
|
24
|
-
|
|
25
|
-
const { t } = useI18n()
|
|
26
|
-
|
|
27
|
-
export type Selection = string | string[]
|
|
28
|
-
|
|
29
|
-
const props = withDefaults(
|
|
30
|
-
defineProps<{
|
|
31
|
-
modelValue?: Selection
|
|
32
|
-
options?: ElOptions[]
|
|
33
|
-
placeholder?: string
|
|
34
|
-
clearable?: boolean
|
|
35
|
-
collapseTags?: boolean
|
|
36
|
-
collapseTagsTooltip?: boolean
|
|
37
|
-
multiple?: boolean
|
|
38
|
-
disabled?: boolean
|
|
39
|
-
class?: string
|
|
40
|
-
}>(),
|
|
41
|
-
{
|
|
42
|
-
modelValue: () => '',
|
|
43
|
-
options: () => [{ value: '', label: '' }],
|
|
44
|
-
placeholder: '',
|
|
45
|
-
class: 'w-full',
|
|
46
|
-
},
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
// 獲取所有非 props 屬性
|
|
50
|
-
const attrs = useAttrs()
|
|
51
|
-
|
|
52
|
-
const emits = defineEmits<{
|
|
53
|
-
(e: 'update:modelValue', data?: Selection): void
|
|
54
|
-
}>()
|
|
55
|
-
|
|
56
|
-
function updateValue(val: Selection) {
|
|
57
|
-
let value: Selection | undefined = val
|
|
58
|
-
|
|
59
|
-
if (typeof value === 'string' && !value) {
|
|
60
|
-
value = undefined
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
emits('update:modelValue', value)
|
|
64
|
-
}
|
|
65
|
-
</script>
|