af-mobile-client-vue3 1.2.57 → 1.3.1
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/.editorconfig +5 -34
- package/.env +1 -1
- package/.env.development +0 -3
- package/.env.production +1 -7
- package/build/vite/index.ts +2 -12
- package/build/vite/optimize.ts +2 -2
- package/compress.js +36 -0
- package/package.json +114 -114
- package/src/App.vue +3 -5
- package/src/assets/img/banner/appraise-banner-1.png +0 -0
- package/src/assets/img/banner/appraise-banner-2.png +0 -0
- package/src/components/core/BeautifulLoading/index.vue +1 -2
- package/src/components/core/ImageUploader/index.vue +3 -2
- package/src/components/core/NavBar/index.vue +23 -13
- package/src/components/core/Tabbar/index.vue +5 -3
- package/src/components/data/XBadge/index.vue +2 -2
- package/src/components/data/XCellList/index.vue +20 -66
- package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
- package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
- package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
- package/src/components/data/XFormGroup/index.vue +11 -1
- package/src/components/data/XFormItem/index.vue +2 -22
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +22 -22
- package/src/components/data/XReportForm/index.vue +23 -14
- package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +1 -2
- package/src/components/data/XReportGrid/XReport.vue +3 -3
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/XReportDesign.vue +13 -13
- package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +1 -1
- package/src/components/data/XReportGrid/XReportJsonRender.vue +11 -11
- package/src/components/data/XReportGrid/XReportTrGroup.vue +3 -3
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/components/layout/NormalDataLayout/index.vue +2 -3
- package/src/config/routes.ts +6 -2
- package/src/constants/index.ts +2 -0
- package/src/locales/en-US.json +52 -28
- package/src/locales/zh-CN.json +57 -33
- package/src/main.ts +0 -2
- package/src/router/types.ts +0 -2
- package/src/types/vue-router.d.ts +0 -2
- package/src/utils/mobileUtil.ts +2 -2
- package/src/utils/set-page-title.ts +3 -5
- package/src/views/common/LoadError.vue +1 -2
- package/src/views/common/NotFound.vue +2 -3
- package/src/views/component/XCellListView/index.vue +94 -133
- package/src/views/component/XFormGroupView/index.vue +7 -16
- package/src/views/component/XFormView/index.vue +15 -95
- package/src/views/user/login/LoginForm.vue +3 -3
- package/tsconfig.json +5 -8
- package/uno.config.ts +32 -1
- package/vite.config.ts +3 -3
- package/.env.envoiceShow +0 -7
- package/src/components/core/App/MicroAppView.vue +0 -59
- package/src/components/core/SvgIcon/index.vue +0 -61
- package/src/utils/local-storage.ts +0 -9
|
@@ -123,7 +123,7 @@ function determineCellStyle(labelFunctionReturn: any, color = '#000', borderWidt
|
|
|
123
123
|
padding: '8px',
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
let result
|
|
126
|
+
let result: any
|
|
127
127
|
// 判断表头是否有声明的样式
|
|
128
128
|
if (labelFunctionReturn.style !== undefined)
|
|
129
129
|
result = props.noTopBorder ? { ...NoTopBorder, ...labelFunctionReturn.style } : { ...withBorder, ...labelFunctionReturn.style }
|
|
@@ -157,10 +157,10 @@ onBeforeMount(() => {
|
|
|
157
157
|
// 遍历配置,将所有JSON传递的方法保存到一个数组中,并用index来一一对应
|
|
158
158
|
for (let i = 0; i < props.config.content.length; i++) {
|
|
159
159
|
receivedFunction.value.push({
|
|
160
|
-
// eslint-disable-next-line no-
|
|
161
|
-
labelFunction:
|
|
162
|
-
// eslint-disable-next-line no-
|
|
163
|
-
valueFunction:
|
|
160
|
+
// eslint-disable-next-line no-new-func
|
|
161
|
+
labelFunction: new Function(`return ${props.config.content[i].customFunctionForLabel}`)(),
|
|
162
|
+
// eslint-disable-next-line no-new-func
|
|
163
|
+
valueFunction: new Function(`return ${props.config.content[i].customFunctionForValue}`)(),
|
|
164
164
|
})
|
|
165
165
|
}
|
|
166
166
|
})
|
|
@@ -188,7 +188,7 @@ onBeforeMount(() => {
|
|
|
188
188
|
<!-- 表头 -->
|
|
189
189
|
<td
|
|
190
190
|
:class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'"
|
|
191
|
-
:style="determineCellStyle(receivedFunction[rowIndex].labelFunction(config,
|
|
191
|
+
:style="determineCellStyle(receivedFunction[rowIndex].labelFunction(config, row))"
|
|
192
192
|
colspan="6"
|
|
193
193
|
>
|
|
194
194
|
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'key'">
|
|
@@ -214,13 +214,13 @@ onBeforeMount(() => {
|
|
|
214
214
|
</template>
|
|
215
215
|
<template v-else>
|
|
216
216
|
<template v-if="receivedFunction[rowIndex].valueFunction(config).originalKey">
|
|
217
|
-
<van-
|
|
217
|
+
<van-field
|
|
218
218
|
:value="config.data[receivedFunction[rowIndex].valueFunction(config).originalKey]"
|
|
219
219
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).originalKey]: val } })"
|
|
220
220
|
/>
|
|
221
221
|
</template>
|
|
222
222
|
<template v-else>
|
|
223
|
-
<van-
|
|
223
|
+
<van-field
|
|
224
224
|
:value="config.data[receivedFunction[rowIndex].valueFunction(config).content]"
|
|
225
225
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).content]: val } })"
|
|
226
226
|
/>
|
|
@@ -304,14 +304,14 @@ onBeforeMount(() => {
|
|
|
304
304
|
/>
|
|
305
305
|
</template>
|
|
306
306
|
<template v-else>
|
|
307
|
-
<van-
|
|
307
|
+
<van-field
|
|
308
308
|
:value="item[receivedFunction[rowIndex].valueFunction(config, item).originalKey]"
|
|
309
309
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).originalKey]: val } })"
|
|
310
310
|
/>
|
|
311
311
|
</template>
|
|
312
312
|
</template>
|
|
313
313
|
<template v-else>
|
|
314
|
-
<van-
|
|
314
|
+
<van-field
|
|
315
315
|
:value="item[receivedFunction[rowIndex].valueFunction(config, item).content]"
|
|
316
316
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).content]: val } })"
|
|
317
317
|
/>
|
|
@@ -341,7 +341,7 @@ onBeforeMount(() => {
|
|
|
341
341
|
|
|
342
342
|
<style scoped lang="less">
|
|
343
343
|
.imgSrc {
|
|
344
|
-
color: rgb(
|
|
344
|
+
color: rgb(24, 144, 255);
|
|
345
345
|
font-size: 0.9em;
|
|
346
346
|
margin: auto;
|
|
347
347
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import XFormTable from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
2
3
|
// import { getRealKeyData } from '@af-mobile-client-vue3/utils/util'
|
|
3
4
|
import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
|
|
4
5
|
import {
|
|
@@ -7,7 +8,7 @@ import {
|
|
|
7
8
|
Row as VanRow,
|
|
8
9
|
} from 'vant'
|
|
9
10
|
|
|
10
|
-
import { computed,
|
|
11
|
+
import { computed, inject, nextTick, onBeforeMount, ref, watch } from 'vue'
|
|
11
12
|
|
|
12
13
|
const props = withDefaults(defineProps<Props>(), {
|
|
13
14
|
showImgInCell: false,
|
|
@@ -24,7 +25,7 @@ const emit = defineEmits<{
|
|
|
24
25
|
(e: 'update:configData', value: any): void
|
|
25
26
|
(e: 'change', value: any): void
|
|
26
27
|
(e: 'updateImg', value: any): void
|
|
27
|
-
(e: 'selectRow',
|
|
28
|
+
(e: 'selectRow', selectedRowKeys: any[], selectedRows: any[]): void
|
|
28
29
|
(e: 'slotRendered'): void
|
|
29
30
|
(e: 'listClick', value: any): void
|
|
30
31
|
}>()
|
|
@@ -36,7 +37,6 @@ const emit = defineEmits<{
|
|
|
36
37
|
const isInAModal = ref(false)
|
|
37
38
|
|
|
38
39
|
// 动态导入组件
|
|
39
|
-
const XFormTable = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/data/XCellList/index.vue'))
|
|
40
40
|
// const XAddNativeForm = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XAddNativeForm/XAddNativeForm.vue'))
|
|
41
41
|
// const XFormGroup = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XFormGroup/XFormGroup.vue'))
|
|
42
42
|
// const XTreePro = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XTree/XTreePro.vue'))
|
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
// print.js
|
|
2
|
-
|
|
3
|
-
export function printElement(elementToPrint) {
|
|
4
|
-
// 创建一个新的浏览器窗口
|
|
5
|
-
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
-
// 设置新窗口的文档内容
|
|
7
|
-
printWindow.document.write(`
|
|
8
|
-
<html>
|
|
9
|
-
<head>
|
|
10
|
-
<title>Print</title>
|
|
11
|
-
<style>
|
|
12
|
-
@page {
|
|
13
|
-
size: auto;
|
|
14
|
-
margin: 0mm;
|
|
15
|
-
}
|
|
16
|
-
html, body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
#print-container {
|
|
23
|
-
display: none
|
|
24
|
-
}
|
|
25
|
-
.img{
|
|
26
|
-
width: 95%;
|
|
27
|
-
height: 180px;
|
|
28
|
-
object-fit: cover;
|
|
29
|
-
}
|
|
30
|
-
.reportMain {
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin: 0 auto;
|
|
33
|
-
font-size: 16px;
|
|
34
|
-
color: #000;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
|
|
38
|
-
.reportTitle {
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.subTitle {
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: space-between;
|
|
45
|
-
margin-bottom: 1%;
|
|
46
|
-
|
|
47
|
-
.subTitleItems {
|
|
48
|
-
max-width: 30%;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.inputsDiv {
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: space-between;
|
|
55
|
-
.inputsDivItem {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
padding: 0 4px;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
.inputsDivItemLabel {
|
|
61
|
-
padding: 0 4px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.reportTable {
|
|
67
|
-
width: 100%;
|
|
68
|
-
border-collapse: collapse;
|
|
69
|
-
table-layout:fixed;
|
|
70
|
-
word-break:break-all;
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
.reportMainForDisplay {
|
|
75
|
-
text-align: center;
|
|
76
|
-
margin: 10% auto;
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
color: #000;
|
|
79
|
-
background-color: #fff;
|
|
80
|
-
border-radius: 8px;
|
|
81
|
-
|
|
82
|
-
.reportTitle {
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.subTitle {
|
|
87
|
-
display: flex;
|
|
88
|
-
justify-content: space-between;
|
|
89
|
-
|
|
90
|
-
.subTitleItems {
|
|
91
|
-
max-width: 30%;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.inputsDiv {
|
|
96
|
-
display: flex;
|
|
97
|
-
justify-content: space-around;
|
|
98
|
-
.inputsDivItem {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
padding: 0 4px;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
.inputsDivItemLabel {
|
|
104
|
-
padding: 0 4px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.reportTable {
|
|
110
|
-
width: 100%;
|
|
111
|
-
border-collapse: collapse;
|
|
112
|
-
table-layout:fixed;
|
|
113
|
-
word-break:break-all;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.reportMainNoPadding {
|
|
117
|
-
text-align: center;
|
|
118
|
-
margin: 0 auto;
|
|
119
|
-
font-size: 16px;
|
|
120
|
-
color: #000;
|
|
121
|
-
background-color: #fff;
|
|
122
|
-
border-radius: 8px;
|
|
123
|
-
|
|
124
|
-
.reportTitle {
|
|
125
|
-
font-weight: bold;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.subTitle {
|
|
129
|
-
display: flex;
|
|
130
|
-
justify-content: space-between;
|
|
131
|
-
|
|
132
|
-
.subTitleItems {
|
|
133
|
-
max-width: 30%;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.inputsDiv {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: space-between;
|
|
140
|
-
.inputsDivItem {
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
padding: 0 4px;
|
|
144
|
-
white-space: nowrap;
|
|
145
|
-
.inputsDivItemLabel {
|
|
146
|
-
padding: 0 4px;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.reportTable {
|
|
152
|
-
width: 100%;
|
|
153
|
-
border-collapse: collapse;
|
|
154
|
-
table-layout:fixed;
|
|
155
|
-
word-break:break-all;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
.tools{
|
|
159
|
-
position: fixed;
|
|
160
|
-
right: 2%;
|
|
161
|
-
text-align: right;
|
|
162
|
-
width: 60%;
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
.toolsItem{
|
|
165
|
-
width: 15%;
|
|
166
|
-
margin-right: 3%;
|
|
167
|
-
display: inline-block;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</style>
|
|
171
|
-
</head>
|
|
172
|
-
<body>
|
|
173
|
-
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
-
${elementToPrint.innerHTML}
|
|
175
|
-
</body>
|
|
176
|
-
</html>
|
|
177
|
-
`)
|
|
178
|
-
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
-
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
-
setTimeout(() => {
|
|
181
|
-
printWindow.print() // 调用打印方法
|
|
182
|
-
printWindow.close()
|
|
183
|
-
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
-
}
|
|
1
|
+
// print.js
|
|
2
|
+
|
|
3
|
+
export function printElement(elementToPrint) {
|
|
4
|
+
// 创建一个新的浏览器窗口
|
|
5
|
+
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
+
// 设置新窗口的文档内容
|
|
7
|
+
printWindow.document.write(`
|
|
8
|
+
<html>
|
|
9
|
+
<head>
|
|
10
|
+
<title>Print</title>
|
|
11
|
+
<style>
|
|
12
|
+
@page {
|
|
13
|
+
size: auto;
|
|
14
|
+
margin: 0mm;
|
|
15
|
+
}
|
|
16
|
+
html, body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
#print-container {
|
|
23
|
+
display: none
|
|
24
|
+
}
|
|
25
|
+
.img{
|
|
26
|
+
width: 95%;
|
|
27
|
+
height: 180px;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
}
|
|
30
|
+
.reportMain {
|
|
31
|
+
text-align: center;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
color: #000;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
|
|
38
|
+
.reportTitle {
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.subTitle {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
margin-bottom: 1%;
|
|
46
|
+
|
|
47
|
+
.subTitleItems {
|
|
48
|
+
max-width: 30%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.inputsDiv {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
.inputsDivItem {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
padding: 0 4px;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
.inputsDivItemLabel {
|
|
61
|
+
padding: 0 4px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.reportTable {
|
|
67
|
+
width: 100%;
|
|
68
|
+
border-collapse: collapse;
|
|
69
|
+
table-layout:fixed;
|
|
70
|
+
word-break:break-all;
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.reportMainForDisplay {
|
|
75
|
+
text-align: center;
|
|
76
|
+
margin: 10% auto;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
color: #000;
|
|
79
|
+
background-color: #fff;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
|
|
82
|
+
.reportTitle {
|
|
83
|
+
font-weight: bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.subTitle {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
|
|
90
|
+
.subTitleItems {
|
|
91
|
+
max-width: 30%;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.inputsDiv {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-around;
|
|
98
|
+
.inputsDivItem {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
padding: 0 4px;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
.inputsDivItemLabel {
|
|
104
|
+
padding: 0 4px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.reportTable {
|
|
110
|
+
width: 100%;
|
|
111
|
+
border-collapse: collapse;
|
|
112
|
+
table-layout:fixed;
|
|
113
|
+
word-break:break-all;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.reportMainNoPadding {
|
|
117
|
+
text-align: center;
|
|
118
|
+
margin: 0 auto;
|
|
119
|
+
font-size: 16px;
|
|
120
|
+
color: #000;
|
|
121
|
+
background-color: #fff;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
|
|
124
|
+
.reportTitle {
|
|
125
|
+
font-weight: bold;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.subTitle {
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: space-between;
|
|
131
|
+
|
|
132
|
+
.subTitleItems {
|
|
133
|
+
max-width: 30%;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.inputsDiv {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
.inputsDivItem {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
padding: 0 4px;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
.inputsDivItemLabel {
|
|
146
|
+
padding: 0 4px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.reportTable {
|
|
152
|
+
width: 100%;
|
|
153
|
+
border-collapse: collapse;
|
|
154
|
+
table-layout:fixed;
|
|
155
|
+
word-break:break-all;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.tools{
|
|
159
|
+
position: fixed;
|
|
160
|
+
right: 2%;
|
|
161
|
+
text-align: right;
|
|
162
|
+
width: 60%;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
.toolsItem{
|
|
165
|
+
width: 15%;
|
|
166
|
+
margin-right: 3%;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
171
|
+
</head>
|
|
172
|
+
<body>
|
|
173
|
+
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
+
${elementToPrint.innerHTML}
|
|
175
|
+
</body>
|
|
176
|
+
</html>
|
|
177
|
+
`)
|
|
178
|
+
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
+
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
printWindow.print() // 调用打印方法
|
|
182
|
+
printWindow.close()
|
|
183
|
+
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
+
}
|
package/src/config/routes.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* List of root-level route names.
|
|
3
|
+
* In the Navbar component, the left arrow is hidden for these routes.
|
|
4
|
+
* However, the Tabbar is shown on these routes.
|
|
5
|
+
*/
|
|
6
|
+
export const rootRouteList: readonly string[] = [
|
|
3
7
|
'ComponentView', // 首页
|
|
4
8
|
'userProfile', // 个人中心
|
|
5
9
|
]
|
package/src/locales/en-US.json
CHANGED
|
@@ -1,29 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
2
|
+
"navbar": {
|
|
3
|
+
"Home": "Home",
|
|
4
|
+
"Profile": "Profile",
|
|
5
|
+
"Mock": "🗂️ Mock",
|
|
6
|
+
"Charts": "📊 Charts",
|
|
7
|
+
"UnoCSS": "⚡ UnoCSS",
|
|
8
|
+
"Counter": "🍍 Persistent State",
|
|
9
|
+
"KeepAlive": "♻️ Page Cache",
|
|
10
|
+
"ScrollCache": "📍 Scroll Cache",
|
|
11
|
+
"Login": "🧑💻 Login",
|
|
12
|
+
"Register": "🧑💻 Register",
|
|
13
|
+
"ForgotPassword": "❓ Forgot Password",
|
|
14
|
+
"Settings": "⚙️ Settings",
|
|
15
|
+
"404": "⚠️ Page 404",
|
|
16
|
+
"Undefined": "🤷 Undefined title"
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
"tabbar": {
|
|
20
|
+
"home": "HOME",
|
|
21
|
+
"profile": "PROFILE"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"home": {
|
|
5
25
|
"darkMode": "🌗 Dark Mode",
|
|
6
|
-
"mockGuide": "💿 Mock Guide",
|
|
7
26
|
"language": "📚 Language",
|
|
8
|
-
"404Demo": "🙅 Page 404 Demo",
|
|
9
|
-
"echartsDemo": "📊 Echarts Demo",
|
|
10
|
-
"persistPiniaState": "🍍 Persistent Pinia state",
|
|
11
|
-
"unocssExample": "🎨 Unocss example",
|
|
12
|
-
"keepAlive": "🧡 KeepAlive Demo",
|
|
13
|
-
"scrollCache": "📜 Scroll Cache Demo",
|
|
14
|
-
"login": "🔒 Login",
|
|
15
|
-
"register": "Register",
|
|
16
27
|
"settings": "Settings",
|
|
17
|
-
"
|
|
18
|
-
"exampleComponents": "Example components",
|
|
19
|
-
"forgot-password": "Forgot Password"
|
|
28
|
+
"examples": "Examples"
|
|
20
29
|
},
|
|
30
|
+
|
|
31
|
+
"profile": {
|
|
32
|
+
"login": "Login",
|
|
33
|
+
"settings": "Settings",
|
|
34
|
+
"docs": "Docs"
|
|
35
|
+
},
|
|
36
|
+
|
|
21
37
|
"mock": {
|
|
22
38
|
"fromAsyncData": "Data from asynchronous requests",
|
|
23
39
|
"noData": "No data",
|
|
24
40
|
"pull": "Pull",
|
|
25
41
|
"reset": "Reset"
|
|
26
42
|
},
|
|
43
|
+
|
|
27
44
|
"charts": {
|
|
28
45
|
"January": "Jan",
|
|
29
46
|
"February": "Feb",
|
|
@@ -32,24 +49,28 @@
|
|
|
32
49
|
"May": "May",
|
|
33
50
|
"June": "Jun"
|
|
34
51
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
52
|
+
|
|
53
|
+
"counter": {
|
|
54
|
+
"description": "This counter's state is persisted via Pinia. Try refreshing the page to see it in action."
|
|
38
55
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
56
|
+
|
|
57
|
+
"unocss": {
|
|
58
|
+
"title": "Hello, Unocss!",
|
|
59
|
+
"description": "This is a simple example of Unocss in action.",
|
|
60
|
+
"button": "Button"
|
|
43
61
|
},
|
|
62
|
+
|
|
44
63
|
"keepAlive": {
|
|
45
64
|
"label": "The current component will be cached"
|
|
46
65
|
},
|
|
66
|
+
|
|
47
67
|
"scrollCache": {
|
|
48
68
|
"sectionTitle": "Section title",
|
|
49
69
|
"sectionText": "Section text text text text text text text text text text",
|
|
50
70
|
"finished": "Already at the bottom ~",
|
|
51
71
|
"loading": "Loading..."
|
|
52
72
|
},
|
|
73
|
+
|
|
53
74
|
"login": {
|
|
54
75
|
"login": "Sign In",
|
|
55
76
|
"logout": "Sign Out",
|
|
@@ -57,14 +78,15 @@
|
|
|
57
78
|
"password": "Password",
|
|
58
79
|
"pleaseEnterEmail": "Please enter email",
|
|
59
80
|
"pleaseEnterPassword": "Please enter password",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
81
|
+
"signUp": "Click to sign up",
|
|
82
|
+
"forgotPassword": "Forgot password?"
|
|
62
83
|
},
|
|
63
|
-
|
|
84
|
+
|
|
85
|
+
"forgotPassword": {
|
|
64
86
|
"email": "Email",
|
|
65
87
|
"code": "Code",
|
|
66
88
|
"password": "Password",
|
|
67
|
-
"
|
|
89
|
+
"confirmPassword": "Password again",
|
|
68
90
|
"pleaseEnterEmail": "Please enter email",
|
|
69
91
|
"pleaseEnterCode": "Please enter code",
|
|
70
92
|
"pleaseEnterPassword": "Please enter password",
|
|
@@ -77,12 +99,13 @@
|
|
|
77
99
|
"sendCodeSuccess": "Sent, the code is",
|
|
78
100
|
"passwordResetSuccess": "Password reset succeeded"
|
|
79
101
|
},
|
|
102
|
+
|
|
80
103
|
"register": {
|
|
81
104
|
"email": "Email",
|
|
82
105
|
"code": "Code",
|
|
83
106
|
"nickname": "Nickname",
|
|
84
107
|
"password": "Password",
|
|
85
|
-
"
|
|
108
|
+
"confirmPassword": "Password again",
|
|
86
109
|
"pleaseEnterEmail": "Please enter email",
|
|
87
110
|
"pleaseEnterCode": "Please enter code",
|
|
88
111
|
"pleaseEnterNickname": "Please enter nickname",
|
|
@@ -96,9 +119,10 @@
|
|
|
96
119
|
"sendCodeSuccess": "Sent, the code is",
|
|
97
120
|
"registerSuccess": "Register succeeded"
|
|
98
121
|
},
|
|
122
|
+
|
|
99
123
|
"settings": {
|
|
100
124
|
"logout": "Sign Out",
|
|
101
125
|
"currentVersion": "Current Version",
|
|
102
|
-
"
|
|
126
|
+
"confirmTitle": "Confirm Exit?"
|
|
103
127
|
}
|
|
104
128
|
}
|