easybill-ui 1.2.20 → 1.2.22
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/components/CurdForm/src/components/schema-form-select-v2.vue +1 -1
- package/components/CurdForm/src/components/schema-form-select.vue +1 -1
- package/components/CurdTable/src/CurdTable.vue +2 -5
- package/components/CurdTable/src/STableItem.vue +9 -10
- package/components/CurdTable/src/STableMenu.vue +1 -2
- package/locale/lang/en.ts +2 -0
- package/locale/lang/zh-cn.ts +2 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-select-v2 v-model="model" style="width: 100%" :options="list" :loading="props.formItem.loading || loading" v-bind="selectProps" v-on="props.eventObject">
|
|
2
|
+
<el-select-v2 v-model="model" style="width: 100%" :options="list" :loading="props.formItem.loading || loading" :filterable="true" v-bind="selectProps" v-on="props.eventObject">
|
|
3
3
|
<template v-for="(item, key) in props.props?.slots" :key="key" #[key]>
|
|
4
4
|
<component :is="item" v-model="model" :form-item="props.formItem" :form-model="props.formModel" :props="props.props" :event-object="props.eventObject" />
|
|
5
5
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-select v-model="model" style="width: 100%" :loading="formItem.loading || loading" v-bind="selectProps" v-on="eventObject">
|
|
2
|
+
<el-select v-model="model" style="width: 100%" :loading="formItem.loading || loading" :filterable="true" v-bind="selectProps" v-on="eventObject">
|
|
3
3
|
<el-option v-if="props.all && !props.multiple" value="" :label="t('el.form.all')"></el-option>
|
|
4
4
|
<el-checkbox v-if="props.all && props.multiple" v-model="checked" :label="t('el.form.allSelect')" class="schema-form-select-check" />
|
|
5
5
|
<template v-for="option in list" :key="option.value">
|
|
@@ -20,11 +20,8 @@
|
|
|
20
20
|
<el-table-column v-if="item.type == 'index'" type="index" v-bind="item" />
|
|
21
21
|
<el-table-column v-else-if="item.type == 'selection'" type="selection" v-bind="item" />
|
|
22
22
|
<STableItem v-else :ref="getTableItemRef(item.prop)" :schema="item" :is-slot="!!$slots[item.prop]" :is-slot-header="!!$slots[item.prop + 'Header']" :option="option" @search="onItemChange">
|
|
23
|
-
<template #
|
|
24
|
-
<slot :name="
|
|
25
|
-
</template>
|
|
26
|
-
<template #header>
|
|
27
|
-
<slot :name="item.prop + 'Header'"></slot>
|
|
23
|
+
<template v-for="(_slot, key) in $slots" :key="key" #[key]="scopeChild">
|
|
24
|
+
<slot :name="key" v-bind="scopeChild"></slot>
|
|
28
25
|
</template>
|
|
29
26
|
</STableItem>
|
|
30
27
|
</template>
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
<el-table-column v-if="!props.schema.hidden" :fixed="props.schema.fixed" v-bind="getColumnAttrs">
|
|
3
3
|
<template #header="scope">
|
|
4
4
|
<div class="header-td" :class="[props.schema.align]">
|
|
5
|
-
<slot name="
|
|
5
|
+
<slot :name="props.schema.prop + 'Header'" v-bind="scope"></slot>
|
|
6
6
|
<component v-if="props.schema.headerComponent" :is="props.schema.headerComponent" v-bind="scope" />
|
|
7
7
|
<STableItemHeader v-else-if="!props.isSlotHeader" :schema-item="props.schema" />
|
|
8
8
|
<STableItemFilter v-if="props.schema.filter && props.schema.filter.inner" ref="tableItemFilterRef" :filter="filterSchema" @change="onChange" />
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
11
|
<template #default="scope">
|
|
12
|
-
<slot name="
|
|
12
|
+
<slot :name="props.schema.prop" v-bind="scope"></slot>
|
|
13
13
|
<template v-if="props.schema.children?.length">
|
|
14
14
|
<template v-for="item in props.schema.children" :key="item.label">
|
|
15
|
-
<STableItem :ref="(el) => (tableItemRefs[item.prop] = el)" :schema="item" :is-slot="
|
|
16
|
-
<template #
|
|
17
|
-
<slot :name="
|
|
18
|
-
</template>
|
|
19
|
-
<template #header>
|
|
20
|
-
<slot :name="item.prop + 'Header'"></slot>
|
|
15
|
+
<STableItem :ref="(el) => (tableItemRefs[item.prop] = el)" :schema="item" :is-slot="!!$slots[item.prop]" :is-slot-header="!!$slots[item.prop + 'Header']" :option="option" @search="onItemChange">
|
|
16
|
+
<template v-for="(_slot, key) in $slots" :key="key" #[key]="scopeChild">
|
|
17
|
+
<slot :name="key" v-bind="scopeChild"></slot>
|
|
21
18
|
</template>
|
|
22
19
|
</STableItem>
|
|
23
20
|
</template>
|
|
@@ -25,7 +22,7 @@
|
|
|
25
22
|
<template v-if="!props.isSlot">
|
|
26
23
|
<ConstantStatus v-if="props.schema.options" :value="scope.row[props.schema.prop]" :options="props.schema.options" />
|
|
27
24
|
<span v-else-if="props.schema.copy">
|
|
28
|
-
<el-icon class="copy" title="
|
|
25
|
+
<el-icon class="copy" :title="t('el.table.clickCopy')" @click.stop="copyValue(getValue(scope.row))"><CopyDocument /></el-icon>
|
|
29
26
|
<span v-if="props.schema.vHtml" v-html="getValue(scope.row)"></span>
|
|
30
27
|
<template v-else-if="props.schema.formatter"> <STableItemFormatter :row="scope.row" :index="scope.index" :schema="props.schema" /> </template>
|
|
31
28
|
<template v-else>{{ getValue(scope.row) }}</template>
|
|
@@ -43,6 +40,7 @@
|
|
|
43
40
|
</template>
|
|
44
41
|
<script lang="ts" setup>
|
|
45
42
|
import { CopyDocument } from "@element-plus/icons-vue"
|
|
43
|
+
import { useLocale } from "easybill-ui"
|
|
46
44
|
import { ElMessage } from "element-plus"
|
|
47
45
|
import { computed, inject, type PropType, ref, type Ref } from "vue"
|
|
48
46
|
import ConstantStatus from "../../ConstantStatus"
|
|
@@ -52,6 +50,7 @@ import STableItemFilter from "./STableItemFilter.vue"
|
|
|
52
50
|
import STableItemFormatter from "./STableItemFormatter.vue"
|
|
53
51
|
import STableItemHeader from "./STableItemHeader.vue"
|
|
54
52
|
import type { ColumnItem } from "./types"
|
|
53
|
+
const { t } = useLocale()
|
|
55
54
|
|
|
56
55
|
const props = defineProps({
|
|
57
56
|
schema: {
|
|
@@ -92,7 +91,7 @@ const getValue = (row: Record<string, unknown>) => {
|
|
|
92
91
|
// 复制值
|
|
93
92
|
const copyValue = async (value: unknown) => {
|
|
94
93
|
copy(String(value))
|
|
95
|
-
ElMessage.success(
|
|
94
|
+
ElMessage.success(t("el.table.clickCopySuccess"))
|
|
96
95
|
}
|
|
97
96
|
const emits = defineEmits(["search"])
|
|
98
97
|
const onChange = (prop: string, value: string) => {
|
|
@@ -22,9 +22,8 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
<script lang="ts" setup>
|
|
24
24
|
import { Download, Operation, Refresh, ScaleToOriginal, Search } from "@element-plus/icons-vue"
|
|
25
|
+
import { useGlobalConfig, useLocale } from "easybill-ui"
|
|
25
26
|
import { computed, ref } from "vue"
|
|
26
|
-
import { useGlobalConfig } from "easybill-ui"
|
|
27
|
-
import { useLocale } from "easybill-ui"
|
|
28
27
|
import STableColumnControl from "./STableColumnControl.vue"
|
|
29
28
|
const emits = defineEmits(["operation"])
|
|
30
29
|
const props = defineProps({
|
package/locale/lang/en.ts
CHANGED
package/locale/lang/zh-cn.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easybill-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22",
|
|
4
4
|
"description": "A component library for easybill",
|
|
5
5
|
"author": "tuchongyang <779311998@qq.com>",
|
|
6
6
|
"private": false,
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "14cc32cc8a9127c5087b43f911f6faefafd05f7b"
|
|
18
18
|
}
|