easybill-ui 1.2.4 → 1.2.6
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.
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
</el-table>
|
|
70
70
|
</div>
|
|
71
|
-
<div v-if="$slots.pageLeft || !option.hidePage" class="table-pager">
|
|
71
|
+
<div v-if="$slots.pageLeft || $slots.pageRight || !option.hidePage" class="table-pager">
|
|
72
72
|
<div class="page-left"><slot name="pageLeft"></slot></div>
|
|
73
73
|
<el-pagination
|
|
74
|
-
v-if="
|
|
74
|
+
v-if="!option.hidePage"
|
|
75
75
|
v-model:current-page="listQuery.pageIndex"
|
|
76
76
|
v-model:page-size="listQuery.pageSize"
|
|
77
77
|
class="pagination"
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
@current-change="fetchData"
|
|
83
83
|
@size-change="fetchData"
|
|
84
84
|
></el-pagination>
|
|
85
|
+
<slot name="pageRight" :list-query="listQuery" :total="total"></slot>
|
|
85
86
|
</div>
|
|
86
87
|
|
|
87
88
|
<STableDetail ref="STableDetailRef" />
|
|
@@ -90,10 +91,9 @@
|
|
|
90
91
|
|
|
91
92
|
<script lang="ts" setup>
|
|
92
93
|
import { ArrowDown, Delete, Document, Edit, Plus } from "@element-plus/icons-vue"
|
|
93
|
-
import { useGlobalConfig } from "easybill-ui"
|
|
94
|
+
import { useGlobalConfig, useLocale } from "easybill-ui"
|
|
94
95
|
import { ElLoading, ElMessage, ElMessageBox, ElTable } from "element-plus"
|
|
95
96
|
import { computed, getCurrentInstance, onActivated, onMounted, type PropType, provide, reactive, ref, type Ref, watch } from "vue"
|
|
96
|
-
import { useLocale } from "easybill-ui"
|
|
97
97
|
import type { Fields, FormItem, FormSchema } from "../../CurdForm"
|
|
98
98
|
import FormDialog from "../../FormDialog"
|
|
99
99
|
import type { FilterItem, ListQuery } from "../../TableFilter"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easybill-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
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": "31f1b1b4217af4f83bf6b4aea72596395b4ec9b5"
|
|
18
18
|
}
|
package/utils/hooks/useLocal.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, isRef, ref, unref, type ComputedRef } from "vue"
|
|
2
|
-
import
|
|
2
|
+
import en from "../../locale/lang/en"
|
|
3
3
|
|
|
4
4
|
import type { MaybeRef } from "@vueuse/core"
|
|
5
5
|
import { useGlobalConfig } from "easybill-ui"
|
|
@@ -40,7 +40,7 @@ export const buildLocaleContext = (locale: ComputedRef<Language>): LocaleContext
|
|
|
40
40
|
export const useLocale = (localeOverrides?: Language | undefined) => {
|
|
41
41
|
const globalConfig = useGlobalConfig()
|
|
42
42
|
const locale = localeOverrides || globalConfig.value.locale!
|
|
43
|
-
return buildLocaleContext(computed(() => locale ||
|
|
43
|
+
return buildLocaleContext(computed(() => locale || en))
|
|
44
44
|
}
|
|
45
45
|
function get(object: Record<string, unknown>, path: string, defaultValue: unknown) {
|
|
46
46
|
// 将路径转换为数组形式
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type GlobalConfig, provideGlobalConfig } from "easybill-ui"
|
|
1
2
|
import type { App, Plugin } from "vue"
|
|
2
|
-
import { type GlobalConfig, provideGlobalConfig } from "../hooks/useGlobalConfig"
|
|
3
3
|
const INSTALLED_KEY = Symbol("INSTALLED_KEY")
|
|
4
4
|
|
|
5
5
|
export const makeInstaller = (components: Plugin[] = []) => {
|