Commit dc09de1e052d6b104c5af3a426af6b0e7bb147c7

Authored by vben
1 parent e5f8ce3f

feat: multi-language component

Showing 40 changed files with 457 additions and 153 deletions
CHANGELOG.zh_CN.md
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
14 ### 🎫 Chores 14 ### 🎫 Chores
15 15
16 - 更新 antdv 到`2.0.0-rc.2` 16 - 更新 antdv 到`2.0.0-rc.2`
  17 +- 更新 vue 到`3.0.3`
  18 +- 更新 vite 到`1.0.0.rc10`
17 - 暂时删除 `@vueuse/core`.等稳定后在集成。目前不太稳定。 19 - 暂时删除 `@vueuse/core`.等稳定后在集成。目前不太稳定。
18 20
19 ## 2.0.0-rc.11 (2020-11-18) 21 ## 2.0.0-rc.11 (2020-11-18)
package.json
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 "qrcode": "^1.4.4", 35 "qrcode": "^1.4.4",
36 "sortablejs": "^1.12.0", 36 "sortablejs": "^1.12.0",
37 "vditor": "^3.6.6", 37 "vditor": "^3.6.6",
38 - "vue": "^3.0.2", 38 + "vue": "^3.0.3",
39 "vue-i18n": "^9.0.0-beta.8", 39 "vue-i18n": "^9.0.0-beta.8",
40 "vue-router": "^4.0.0-rc.5", 40 "vue-router": "^4.0.0-rc.5",
41 "vuex": "^4.0.0-rc.1", 41 "vuex": "^4.0.0-rc.1",
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 "@types/zxcvbn": "^4.4.0", 63 "@types/zxcvbn": "^4.4.0",
64 "@typescript-eslint/eslint-plugin": "^4.8.2", 64 "@typescript-eslint/eslint-plugin": "^4.8.2",
65 "@typescript-eslint/parser": "^4.8.2", 65 "@typescript-eslint/parser": "^4.8.2",
66 - "@vue/compiler-sfc": "^3.0.2", 66 + "@vue/compiler-sfc": "^3.0.3",
67 "@vuedx/typecheck": "^0.2.4-0", 67 "@vuedx/typecheck": "^0.2.4-0",
68 "@vuedx/typescript-plugin-vue": "^0.2.4-0", 68 "@vuedx/typescript-plugin-vue": "^0.2.4-0",
69 "autoprefixer": "^9.8.6", 69 "autoprefixer": "^9.8.6",
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@
96 "tasksfile": "^5.1.1", 96 "tasksfile": "^5.1.1",
97 "ts-node": "^9.0.0", 97 "ts-node": "^9.0.0",
98 "typescript": "^4.1.2", 98 "typescript": "^4.1.2",
99 - "vite": "^1.0.0-rc.9", 99 + "vite": "^1.0.0-rc.10",
100 "vite-plugin-html": "^1.0.0-beta.2", 100 "vite-plugin-html": "^1.0.0-beta.2",
101 "vite-plugin-mock": "^1.0.6", 101 "vite-plugin-mock": "^1.0.6",
102 "vite-plugin-purge-icons": "^0.4.5", 102 "vite-plugin-purge-icons": "^0.4.5",
src/components/Drawer/src/BasicDrawer.tsx
  1 +import './index.less';
  2 +
1 import type { DrawerInstance, DrawerProps } from './types'; 3 import type { DrawerInstance, DrawerProps } from './types';
2 4
3 import { defineComponent, ref, computed, watchEffect, watch, unref, nextTick, toRaw } from 'vue'; 5 import { defineComponent, ref, computed, watchEffect, watch, unref, nextTick, toRaw } from 'vue';
@@ -13,8 +15,7 @@ import { getSlot } from '/@/utils/helper/tsxHelper'; @@ -13,8 +15,7 @@ import { getSlot } from '/@/utils/helper/tsxHelper';
13 import { isFunction, isNumber } from '/@/utils/is'; 15 import { isFunction, isNumber } from '/@/utils/is';
14 import { buildUUID } from '/@/utils/uuid'; 16 import { buildUUID } from '/@/utils/uuid';
15 import { deepMerge } from '/@/utils'; 17 import { deepMerge } from '/@/utils';
16 -  
17 -import './index.less'; 18 +import { useI18n } from '/@/hooks/web/useI18n';
18 19
19 const prefixCls = 'basic-drawer'; 20 const prefixCls = 'basic-drawer';
20 export default defineComponent({ 21 export default defineComponent({
@@ -27,6 +28,8 @@ export default defineComponent({ @@ -27,6 +28,8 @@ export default defineComponent({
27 const visibleRef = ref(false); 28 const visibleRef = ref(false);
28 const propsRef = ref<Partial<DrawerProps> | null>(null); 29 const propsRef = ref<Partial<DrawerProps> | null>(null);
29 30
  31 + const { t } = useI18n('component.drawer');
  32 +
30 const getMergeProps = computed((): any => { 33 const getMergeProps = computed((): any => {
31 return deepMerge(toRaw(props), unref(propsRef)); 34 return deepMerge(toRaw(props), unref(propsRef));
32 }); 35 });
@@ -208,7 +211,7 @@ export default defineComponent({ @@ -208,7 +211,7 @@ export default defineComponent({
208 > 211 >
209 <FullLoading 212 <FullLoading
210 absolute 213 absolute
211 - tip="加载中..." 214 + tip={t('loadingText')}
212 class={[!unref(getProps).loading ? 'hidden' : '']} 215 class={[!unref(getProps).loading ? 'hidden' : '']}
213 /> 216 />
214 {getSlot(slots, 'default')} 217 {getSlot(slots, 'default')}
src/components/Drawer/src/props.ts
1 import type { PropType } from 'vue'; 1 import type { PropType } from 'vue';
  2 +
  3 +import { useI18n } from '/@/hooks/web/useI18n';
  4 +const { t } = useI18n('component.drawer');
  5 +
2 export const footerProps = { 6 export const footerProps = {
3 confirmLoading: Boolean as PropType<boolean>, 7 confirmLoading: Boolean as PropType<boolean>,
4 /** 8 /**
@@ -11,7 +15,7 @@ export const footerProps = { @@ -11,7 +15,7 @@ export const footerProps = {
11 cancelButtonProps: Object as PropType<any>, 15 cancelButtonProps: Object as PropType<any>,
12 cancelText: { 16 cancelText: {
13 type: String as PropType<string>, 17 type: String as PropType<string>,
14 - default: '关闭', 18 + default: t('cancelText'),
15 }, 19 },
16 /** 20 /**
17 * @description: Show confirmation button 21 * @description: Show confirmation button
@@ -23,7 +27,7 @@ export const footerProps = { @@ -23,7 +27,7 @@ export const footerProps = {
23 okButtonProps: Object as PropType<any>, 27 okButtonProps: Object as PropType<any>,
24 okText: { 28 okText: {
25 type: String as PropType<string>, 29 type: String as PropType<string>,
26 - default: '确认', 30 + default: t('okText'),
27 }, 31 },
28 okType: { 32 okType: {
29 type: String as PropType<string>, 33 type: String as PropType<string>,
src/components/Excel/src/ExportExcelModel.vue
1 <template> 1 <template>
2 - <BasicModal v-bind="$attrs" title="导出数据" @ok="handleOk" @register="registerModal"> 2 + <BasicModal
  3 + v-bind="$attrs"
  4 + :title="t('exportModalTitle')"
  5 + @ok="handleOk"
  6 + @register="registerModal"
  7 + >
3 <BasicForm 8 <BasicForm
4 :labelWidth="100" 9 :labelWidth="100"
5 :schemas="schemas" 10 :schemas="schemas"
@@ -9,22 +14,26 @@ @@ -9,22 +14,26 @@
9 </BasicModal> 14 </BasicModal>
10 </template> 15 </template>
11 <script lang="ts"> 16 <script lang="ts">
  17 + import type { ExportModalResult } from './types';
12 import { defineComponent } from 'vue'; 18 import { defineComponent } from 'vue';
13 import { BasicModal, useModalInner } from '/@/components/Modal'; 19 import { BasicModal, useModalInner } from '/@/components/Modal';
14 import { BasicForm, FormSchema, useForm } from '/@/components/Form/index'; 20 import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
15 - import { ExportModalResult } from './types'; 21 +
  22 + import { useI18n } from '/@/hooks/web/useI18n';
  23 +
  24 + const { t } = useI18n('component.excel');
16 25
17 const schemas: FormSchema[] = [ 26 const schemas: FormSchema[] = [
18 { 27 {
19 field: 'filename', 28 field: 'filename',
20 component: 'Input', 29 component: 'Input',
21 - label: '文件名', 30 + label: t('fileName'),
22 rules: [{ required: true }], 31 rules: [{ required: true }],
23 }, 32 },
24 { 33 {
25 field: 'bookType', 34 field: 'bookType',
26 component: 'Select', 35 component: 'Select',
27 - label: '文件类型', 36 + label: t('fileType'),
28 defaultValue: 'xlsx', 37 defaultValue: 'xlsx',
29 rules: [{ required: true }], 38 rules: [{ required: true }],
30 componentProps: { 39 componentProps: {
@@ -76,6 +85,7 @@ @@ -76,6 +85,7 @@
76 handleOk, 85 handleOk,
77 registerForm, 86 registerForm,
78 registerModal, 87 registerModal,
  88 + t,
79 }; 89 };
80 }, 90 },
81 }); 91 });
src/components/Excel/src/ImportExcel.vue
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
79 /* DO SOMETHING WITH workbook HERE */ 79 /* DO SOMETHING WITH workbook HERE */
80 const excelData = getExcelData(workbook); 80 const excelData = getExcelData(workbook);
81 emit('success', excelData); 81 emit('success', excelData);
82 - resolve(); 82 + resolve('');
83 } catch (error) { 83 } catch (error) {
84 reject(error); 84 reject(error);
85 } finally { 85 } finally {
src/components/Form/src/FormAction.tsx
@@ -6,6 +6,9 @@ import Button from &#39;/@/components/Button/index.vue&#39;; @@ -6,6 +6,9 @@ import Button from &#39;/@/components/Button/index.vue&#39;;
6 import { BasicArrow } from '/@/components/Basic/index'; 6 import { BasicArrow } from '/@/components/Basic/index';
7 7
8 import { getSlot } from '/@/utils/helper/tsxHelper'; 8 import { getSlot } from '/@/utils/helper/tsxHelper';
  9 +import { useI18n } from '/@/hooks/web/useI18n';
  10 +
  11 +const { t } = useI18n('component.form');
9 12
10 export default defineComponent({ 13 export default defineComponent({
11 name: 'BasicFormAction', 14 name: 'BasicFormAction',
@@ -55,14 +58,14 @@ export default defineComponent({ @@ -55,14 +58,14 @@ export default defineComponent({
55 setup(props, { slots, emit }) { 58 setup(props, { slots, emit }) {
56 const getResetBtnOptionsRef = computed(() => { 59 const getResetBtnOptionsRef = computed(() => {
57 return { 60 return {
58 - text: '重置', 61 + text: t('resetButton'),
59 ...props.resetButtonOptions, 62 ...props.resetButtonOptions,
60 }; 63 };
61 }); 64 });
62 65
63 const getSubmitBtnOptionsRef = computed(() => { 66 const getSubmitBtnOptionsRef = computed(() => {
64 return { 67 return {
65 - text: '查询', 68 + text: t('submitButton'),
66 // htmlType: 'submit', 69 // htmlType: 'submit',
67 ...props.submitButtonOptions, 70 ...props.submitButtonOptions,
68 }; 71 };
@@ -108,7 +111,7 @@ export default defineComponent({ @@ -108,7 +111,7 @@ export default defineComponent({
108 <Button type="default" class="mr-2" onClick={toggleAdvanced}> 111 <Button type="default" class="mr-2" onClick={toggleAdvanced}>
109 {() => ( 112 {() => (
110 <> 113 <>
111 - {isAdvanced ? '收起' : '展开'} 114 + {isAdvanced ? t('putAway') : t('unfold')}
112 <BasicArrow expand={!isAdvanced} /> 115 <BasicArrow expand={!isAdvanced} />
113 </> 116 </>
114 )} 117 )}
src/components/Form/src/helper.ts
1 import type { ComponentType } from './types/index'; 1 import type { ComponentType } from './types/index';
  2 +import { useI18n } from '/@/hooks/web/useI18n';
  3 +
  4 +const { t } = useI18n('component.form');
2 5
3 /** 6 /**
4 * @description: 生成placeholder 7 * @description: 生成placeholder
5 */ 8 */
6 export function createPlaceholderMessage(component: ComponentType) { 9 export function createPlaceholderMessage(component: ComponentType) {
7 if (component.includes('Input') || component.includes('Complete')) { 10 if (component.includes('Input') || component.includes('Complete')) {
8 - return '请输入'; 11 + return t('input');
9 } 12 }
10 if (component.includes('Picker')) { 13 if (component.includes('Picker')) {
11 - return '请选择'; 14 + return t('choose');
12 } 15 }
13 if ( 16 if (
14 component.includes('Select') || 17 component.includes('Select') ||
@@ -18,7 +21,7 @@ export function createPlaceholderMessage(component: ComponentType) { @@ -18,7 +21,7 @@ export function createPlaceholderMessage(component: ComponentType) {
18 component.includes('Switch') 21 component.includes('Switch')
19 ) { 22 ) {
20 // return `请选择${label}`; 23 // return `请选择${label}`;
21 - return '请选择'; 24 + return t('choose');
22 } 25 }
23 return ''; 26 return '';
24 } 27 }
src/components/Menu/src/SearchInput.vue
1 <template> 1 <template>
2 <section class="menu-search-input" @Click="handleClick" :class="searchClass"> 2 <section class="menu-search-input" @Click="handleClick" :class="searchClass">
3 <a-input-search 3 <a-input-search
4 - placeholder="菜单搜索" 4 + :placeholder="t('search')"
5 class="menu-search-input__search" 5 class="menu-search-input__search"
6 allowClear 6 allowClear
7 @change="handleChange" 7 @change="handleChange"
@@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
12 import type { PropType } from 'vue'; 12 import type { PropType } from 'vue';
13 import { defineComponent, computed } from 'vue'; 13 import { defineComponent, computed } from 'vue';
14 import { ThemeEnum } from '/@/enums/appEnum'; 14 import { ThemeEnum } from '/@/enums/appEnum';
15 -  
16 // hook 15 // hook
17 import { useDebounce } from '/@/hooks/core/useDebounce'; 16 import { useDebounce } from '/@/hooks/core/useDebounce';
  17 + import { useI18n } from '/@/hooks/web/useI18n';
18 // 18 //
19 export default defineComponent({ 19 export default defineComponent({
20 name: 'BasicMenuSearchInput', 20 name: 'BasicMenuSearchInput',
@@ -29,6 +29,8 @@ @@ -29,6 +29,8 @@
29 }, 29 },
30 }, 30 },
31 setup(props, { emit }) { 31 setup(props, { emit }) {
  32 + const { t } = useI18n('component.menu');
  33 +
32 const [debounceEmitChange] = useDebounce(emitChange, 200); 34 const [debounceEmitChange] = useDebounce(emitChange, 200);
33 35
34 function emitChange(value?: string): void { 36 function emitChange(value?: string): void {
@@ -52,7 +54,7 @@ @@ -52,7 +54,7 @@
52 return cls; 54 return cls;
53 }); 55 });
54 56
55 - return { handleClick, searchClass, handleChange }; 57 + return { handleClick, searchClass, handleChange, t };
56 }, 58 },
57 }); 59 });
58 </script> 60 </script>
src/components/Menu/src/types.ts
  1 +import { ComputedRef } from 'vue';
1 import { ThemeEnum } from '/@/enums/appEnum'; 2 import { ThemeEnum } from '/@/enums/appEnum';
  3 +import { MenuModeEnum } from '/@/enums/menuEnum';
2 export interface MenuState { 4 export interface MenuState {
3 // 默认选中的列表 5 // 默认选中的列表
4 defaultSelectedKeys: string[]; 6 defaultSelectedKeys: string[];
src/components/Modal/src/props.ts
1 import type { PropType } from 'vue'; 1 import type { PropType } from 'vue';
2 import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; 2 import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes';
  3 +
  4 +import { useI18n } from '/@/hooks/web/useI18n';
  5 +const { t } = useI18n('component.modal');
  6 +
3 export const modalProps = { 7 export const modalProps = {
4 visible: Boolean as PropType<boolean>, 8 visible: Boolean as PropType<boolean>,
5 // open drag 9 // open drag
@@ -13,11 +17,11 @@ export const modalProps = { @@ -13,11 +17,11 @@ export const modalProps = {
13 }, 17 },
14 cancelText: { 18 cancelText: {
15 type: String as PropType<string>, 19 type: String as PropType<string>,
16 - default: '关闭', 20 + default: t('cancelText'),
17 }, 21 },
18 okText: { 22 okText: {
19 type: String as PropType<string>, 23 type: String as PropType<string>,
20 - default: '确认', 24 + default: t('okText'),
21 }, 25 },
22 closeFunc: Function as PropType<() => Promise<boolean>>, 26 closeFunc: Function as PropType<() => Promise<boolean>>,
23 }; 27 };
src/components/Table/src/components/TableSetting.vue
@@ -4,27 +4,27 @@ @@ -4,27 +4,27 @@
4 4
5 <Tooltip placement="top" v-if="getSetting.redo"> 5 <Tooltip placement="top" v-if="getSetting.redo">
6 <template #title> 6 <template #title>
7 - <span>刷新</span> 7 + <span>{{ t('settingRedo') }}</span>
8 </template> 8 </template>
9 <RedoOutlined @click="redo" /> 9 <RedoOutlined @click="redo" />
10 </Tooltip> 10 </Tooltip>
11 11
12 <Tooltip placement="top" v-if="getSetting.size"> 12 <Tooltip placement="top" v-if="getSetting.size">
13 <template #title> 13 <template #title>
14 - <span>密度</span> 14 + <span>{{ t('settingDens') }}</span>
15 </template> 15 </template>
16 <Dropdown placement="bottomCenter" :trigger="['click']"> 16 <Dropdown placement="bottomCenter" :trigger="['click']">
17 <ColumnHeightOutlined /> 17 <ColumnHeightOutlined />
18 <template #overlay> 18 <template #overlay>
19 <Menu @click="handleTitleClick" selectable v-model:selectedKeys="selectedKeysRef"> 19 <Menu @click="handleTitleClick" selectable v-model:selectedKeys="selectedKeysRef">
20 <MenuItem key="default"> 20 <MenuItem key="default">
21 - <span>默认</span> 21 + <span>{{ t('settingDensDefault') }}</span>
22 </MenuItem> 22 </MenuItem>
23 <MenuItem key="middle"> 23 <MenuItem key="middle">
24 - <span>中等</span> 24 + <span>{{ t('settingDensMiddle') }}</span>
25 </MenuItem> 25 </MenuItem>
26 <MenuItem key="small"> 26 <MenuItem key="small">
27 - <span>紧凑</span> 27 + <span>{{ t('settingDensSmall') }}</span>
28 </MenuItem> 28 </MenuItem>
29 </Menu> 29 </Menu>
30 </template> 30 </template>
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 33
34 <Tooltip placement="top" v-if="getSetting.setting"> 34 <Tooltip placement="top" v-if="getSetting.setting">
35 <template #title> 35 <template #title>
36 - <span>列设置</span> 36 + <span>{{ t('settingColumn') }}</span>
37 </template> 37 </template>
38 <Popover 38 <Popover
39 placement="bottomLeft" 39 placement="bottomLeft"
@@ -58,9 +58,9 @@ @@ -58,9 +58,9 @@
58 v-model:checked="checkAll" 58 v-model:checked="checkAll"
59 @change="onCheckAllChange" 59 @change="onCheckAllChange"
60 > 60 >
61 - 列展示 61 + {{ t('settingColumnShow') }}
62 </Checkbox> 62 </Checkbox>
63 - <a-button size="small" type="link" @click="reset">重置</a-button> 63 + <a-button size="small" type="link" @click="reset"> {{ t('settingReset') }}</a-button>
64 </div> 64 </div>
65 </template> 65 </template>
66 <SettingOutlined /> 66 <SettingOutlined />
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 69
70 <Tooltip placement="top" v-if="getSetting.fullScreen"> 70 <Tooltip placement="top" v-if="getSetting.fullScreen">
71 <template #title> 71 <template #title>
72 - <span>全屏</span> 72 + <span>{{ t('settingFullScreen') }}</span>
73 </template> 73 </template>
74 <FullscreenOutlined @click="handleFullScreen" v-if="!isFullscreenRef" /> 74 <FullscreenOutlined @click="handleFullScreen" v-if="!isFullscreenRef" />
75 <FullscreenExitOutlined @click="handleFullScreen" v-else /> 75 <FullscreenExitOutlined @click="handleFullScreen" v-else />
@@ -90,6 +90,7 @@ @@ -90,6 +90,7 @@
90 import { useFullscreen } from '/@/hooks/web/useFullScreen'; 90 import { useFullscreen } from '/@/hooks/web/useFullScreen';
91 91
92 import type { SizeType, TableSetting } from '../types/table'; 92 import type { SizeType, TableSetting } from '../types/table';
  93 + import { useI18n } from '/@/hooks/web/useI18n';
93 94
94 interface Options { 95 interface Options {
95 label: string; 96 label: string;
@@ -139,6 +140,8 @@ @@ -139,6 +140,8 @@
139 defaultCheckList: [], 140 defaultCheckList: [],
140 }); 141 });
141 142
  143 + const { t } = useI18n('component.table');
  144 +
142 function init() { 145 function init() {
143 let ret: Options[] = []; 146 let ret: Options[] = [];
144 table.getColumns({ ignoreIndex: true, ignoreAction: true }).forEach((item) => { 147 table.getColumns({ ignoreIndex: true, ignoreAction: true }).forEach((item) => {
@@ -217,6 +220,7 @@ @@ -217,6 +220,7 @@
217 reset, 220 reset,
218 getSetting, 221 getSetting,
219 ...toRefs(state), 222 ...toRefs(state),
  223 + t,
220 }; 224 };
221 }, 225 },
222 }); 226 });
src/components/Table/src/hooks/useColumns.ts
@@ -4,7 +4,9 @@ import { unref, ComputedRef, Ref, computed, watchEffect, ref, toRaw } from &#39;vue&#39; @@ -4,7 +4,9 @@ import { unref, ComputedRef, Ref, computed, watchEffect, ref, toRaw } from &#39;vue&#39;
4 import { isBoolean, isArray, isObject } from '/@/utils/is'; 4 import { isBoolean, isArray, isObject } from '/@/utils/is';
5 import { PAGE_SIZE } from '../const'; 5 import { PAGE_SIZE } from '../const';
6 import { useProps } from './useProps'; 6 import { useProps } from './useProps';
  7 +import { useI18n } from '/@/hooks/web/useI18n';
7 8
  9 +const { t } = useI18n('component.table');
8 export function useColumns( 10 export function useColumns(
9 refProps: ComputedRef<BasicTableProps>, 11 refProps: ComputedRef<BasicTableProps>,
10 getPaginationRef: ComputedRef<false | PaginationProps> 12 getPaginationRef: ComputedRef<false | PaginationProps>
@@ -42,7 +44,7 @@ export function useColumns( @@ -42,7 +44,7 @@ export function useColumns(
42 columns.unshift({ 44 columns.unshift({
43 flag: 'INDEX', 45 flag: 'INDEX',
44 width: 50, 46 width: 50,
45 - title: '序号', 47 + title: t('index'),
46 align: 'center', 48 align: 'center',
47 customRender: ({ index }) => { 49 customRender: ({ index }) => {
48 const getPagination = unref(getPaginationRef); 50 const getPagination = unref(getPaginationRef);
src/components/Table/src/hooks/usePagination.tsx
@@ -8,6 +8,9 @@ import { isBoolean } from &#39;/@/utils/is&#39;; @@ -8,6 +8,9 @@ import { isBoolean } from &#39;/@/utils/is&#39;;
8 8
9 import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const'; 9 import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../const';
10 import { useProps } from './useProps'; 10 import { useProps } from './useProps';
  11 +import { useI18n } from '/@/hooks/web/useI18n';
  12 +
  13 +const { t } = useI18n('component.table');
11 export function usePagination(refProps: ComputedRef<BasicTableProps>) { 14 export function usePagination(refProps: ComputedRef<BasicTableProps>) {
12 const configRef = ref<PaginationProps>({}); 15 const configRef = ref<PaginationProps>({});
13 const { propsRef } = useProps(refProps); 16 const { propsRef } = useProps(refProps);
@@ -22,7 +25,7 @@ export function usePagination(refProps: ComputedRef&lt;BasicTableProps&gt;) { @@ -22,7 +25,7 @@ export function usePagination(refProps: ComputedRef&lt;BasicTableProps&gt;) {
22 pageSize: PAGE_SIZE, 25 pageSize: PAGE_SIZE,
23 size: 'small', 26 size: 'small',
24 defaultPageSize: PAGE_SIZE, 27 defaultPageSize: PAGE_SIZE,
25 - showTotal: (total) => `共 ${total} 条数据`, 28 + showTotal: (total) => t('total', { total }),
26 showSizeChanger: true, 29 showSizeChanger: true,
27 pageSizeOptions: PAGE_SIZE_OPTIONS, 30 pageSizeOptions: PAGE_SIZE_OPTIONS,
28 itemRender: ({ page, type, originalElement }) => { 31 itemRender: ({ page, type, originalElement }) => {
src/components/Tinymce/src/lineHeight.ts
@@ -13,7 +13,7 @@ const lineHeight = function (tinymce: any) { @@ -13,7 +13,7 @@ const lineHeight = function (tinymce: any) {
13 13
14 t.ui.registry.addMenuButton('lineheight', { 14 t.ui.registry.addMenuButton('lineheight', {
15 icon: 'lineheight', 15 icon: 'lineheight',
16 - tooltip: '设置行高', 16 + tooltip: 'Line Height',
17 // fetch: function (callback: Fn) { 17 // fetch: function (callback: Fn) {
18 // var dom = t.dom; 18 // var dom = t.dom;
19 // var blocks = t.selection.getSelectedBlocks(); 19 // var blocks = t.selection.getSelectedBlocks();
src/components/Upload/src/BasicUpload.vue
@@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
2 <div> 2 <div>
3 <a-button-group> 3 <a-button-group>
4 <a-button type="primary" @click="openUploadModal" preIcon="ant-design:cloud-upload-outlined"> 4 <a-button type="primary" @click="openUploadModal" preIcon="ant-design:cloud-upload-outlined">
5 - 上传 5 + {{ t('upload') }}
6 </a-button> 6 </a-button>
7 <Tooltip placement="bottom" v-if="showPreview"> 7 <Tooltip placement="bottom" v-if="showPreview">
8 <template #title> 8 <template #title>
9 - 已上传 9 + {{ t('uploaded') }}
10 <template v-if="fileListRef.length">{{ fileListRef.length }}</template> 10 <template v-if="fileListRef.length">{{ fileListRef.length }}</template>
11 </template> 11 </template>
12 <a-button @click="openPreviewModal"> 12 <a-button @click="openPreviewModal">
@@ -39,12 +39,14 @@ @@ -39,12 +39,14 @@
39 39
40 import { uploadContainerProps } from './props'; 40 import { uploadContainerProps } from './props';
41 import { omit } from 'lodash-es'; 41 import { omit } from 'lodash-es';
  42 + import { useI18n } from '/@/hooks/web/useI18n';
42 43
43 export default defineComponent({ 44 export default defineComponent({
44 name: 'BasicUpload', 45 name: 'BasicUpload',
45 components: { UploadModal, UploadPreviewModal, Icon, Tooltip }, 46 components: { UploadModal, UploadPreviewModal, Icon, Tooltip },
46 props: uploadContainerProps, 47 props: uploadContainerProps,
47 setup(props, { emit, attrs }) { 48 setup(props, { emit, attrs }) {
  49 + const { t } = useI18n('component.upload');
48 // 上传modal 50 // 上传modal
49 const [registerUploadModal, { openModal: openUploadModal }] = useModal(); 51 const [registerUploadModal, { openModal: openUploadModal }] = useModal();
50 52
@@ -94,6 +96,7 @@ @@ -94,6 +96,7 @@
94 fileListRef, 96 fileListRef,
95 showPreview, 97 showPreview,
96 bindValue, 98 bindValue,
  99 + t,
97 }; 100 };
98 }, 101 },
99 }); 102 });
src/components/Upload/src/UploadModal.vue
1 <template> 1 <template>
2 <BasicModal 2 <BasicModal
3 width="800px" 3 width="800px"
4 - title="上传"  
5 - okText="保存" 4 + :title="t('upload')"
  5 + :okText="t('save')"
6 v-bind="$attrs" 6 v-bind="$attrs"
7 @register="register" 7 @register="register"
8 @ok="handleOk" 8 @ok="handleOk"
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 :before-upload="beforeUpload" 31 :before-upload="beforeUpload"
32 class="upload-modal-toolbar__btn" 32 class="upload-modal-toolbar__btn"
33 > 33 >
34 - <a-button type="primary"> 选择文件 </a-button> 34 + <a-button type="primary"> {{ t('choose') }} </a-button>
35 </Upload> 35 </Upload>
36 </div> 36 </div>
37 <FileList :dataSource="fileListRef" :columns="columns" :actionColumn="actionColumn" /> 37 <FileList :dataSource="fileListRef" :columns="columns" :actionColumn="actionColumn" />
@@ -57,11 +57,15 @@ @@ -57,11 +57,15 @@
57 import { isFunction } from '/@/utils/is'; 57 import { isFunction } from '/@/utils/is';
58 import { warn } from '/@/utils/log'; 58 import { warn } from '/@/utils/log';
59 import FileList from './FileList'; 59 import FileList from './FileList';
  60 +
  61 + import { useI18n } from '/@/hooks/web/useI18n';
60 export default defineComponent({ 62 export default defineComponent({
61 components: { BasicModal, Upload, Alert, FileList }, 63 components: { BasicModal, Upload, Alert, FileList },
62 props: basicProps, 64 props: basicProps,
63 setup(props, { emit }) { 65 setup(props, { emit }) {
64 // 是否正在上传 66 // 是否正在上传
  67 + const { t } = useI18n('component.upload');
  68 +
65 const isUploadingRef = ref(false); 69 const isUploadingRef = ref(false);
66 const fileListRef = ref<FileItem[]>([]); 70 const fileListRef = ref<FileItem[]>([]);
67 const state = reactive<{ fileList: FileItem[] }>({ 71 const state = reactive<{ fileList: FileItem[] }>({
@@ -100,7 +104,11 @@ @@ -100,7 +104,11 @@
100 const someError = fileListRef.value.some( 104 const someError = fileListRef.value.some(
101 (item) => item.status === UploadResultStatus.ERROR 105 (item) => item.status === UploadResultStatus.ERROR
102 ); 106 );
103 - return isUploadingRef.value ? '上传中' : someError ? '重新上传失败文件' : '开始上传'; 107 + return isUploadingRef.value
  108 + ? t('uploading')
  109 + : someError
  110 + ? t('reUploadFailed')
  111 + : t('startUpload');
104 }); 112 });
105 113
106 // 上传前校验 114 // 上传前校验
@@ -111,13 +119,13 @@ @@ -111,13 +119,13 @@
111 119
112 // 设置最大值,则判断 120 // 设置最大值,则判断
113 if (maxSize && file.size / 1024 / 1024 >= maxSize) { 121 if (maxSize && file.size / 1024 / 1024 >= maxSize) {
114 - createMessage.error(`只能上传不超过${maxSize}MB的文件!`); 122 + createMessage.error(t('maxSizeMultiple', [maxSize]));
115 return false; 123 return false;
116 } 124 }
117 125
118 // 设置类型,则判断 126 // 设置类型,则判断
119 if (accept.length > 0 && !checkFileType(file, accept)) { 127 if (accept.length > 0 && !checkFileType(file, accept)) {
120 - createMessage.error!(`只能上传${accept.join(',')}格式文件`); 128 + createMessage.error!(t('acceptUpload', [accept.join(',')]));
121 return false; 129 return false;
122 } 130 }
123 const commonItem = { 131 const commonItem = {
@@ -198,7 +206,7 @@ @@ -198,7 +206,7 @@
198 async function handleStartUpload() { 206 async function handleStartUpload() {
199 const { maxNumber } = props; 207 const { maxNumber } = props;
200 if (fileListRef.value.length > maxNumber) { 208 if (fileListRef.value.length > maxNumber) {
201 - return createMessage.warning(`最多只能上传${maxNumber}个文件`); 209 + return createMessage.warning(t('maxNumber', [maxNumber]));
202 } 210 }
203 try { 211 try {
204 isUploadingRef.value = true; 212 isUploadingRef.value = true;
@@ -225,10 +233,10 @@ @@ -225,10 +233,10 @@
225 const { maxNumber } = props; 233 const { maxNumber } = props;
226 234
227 if (fileListRef.value.length > maxNumber) { 235 if (fileListRef.value.length > maxNumber) {
228 - return createMessage.warning(`最多只能上传${maxNumber}个文件`); 236 + return createMessage.warning(t('maxNumber', [maxNumber]));
229 } 237 }
230 if (isUploadingRef.value) { 238 if (isUploadingRef.value) {
231 - return createMessage.warning('请等待文件上传后,保存'); 239 + return createMessage.warning(t('saveWarn'));
232 } 240 }
233 const fileList: string[] = []; 241 const fileList: string[] = [];
234 242
@@ -240,7 +248,7 @@ @@ -240,7 +248,7 @@
240 } 248 }
241 // 存在一个上传成功的即可保存 249 // 存在一个上传成功的即可保存
242 if (fileList.length <= 0) { 250 if (fileList.length <= 0) {
243 - return createMessage.warning('没有上传成功的文件,无法保存'); 251 + return createMessage.warning(t('saveError'));
244 } 252 }
245 fileListRef.value = []; 253 fileListRef.value = [];
246 closeModal(); 254 closeModal();
@@ -253,7 +261,7 @@ @@ -253,7 +261,7 @@
253 fileListRef.value = []; 261 fileListRef.value = [];
254 return true; 262 return true;
255 } else { 263 } else {
256 - createMessage.warning('请等待文件上传结束后操作'); 264 + createMessage.warning(t('uploadWait'));
257 return false; 265 return false;
258 } 266 }
259 } 267 }
@@ -285,6 +293,7 @@ @@ -285,6 +293,7 @@
285 handleCloseFunc, 293 handleCloseFunc,
286 getIsSelectFile, 294 getIsSelectFile,
287 getUploadBtnText, 295 getUploadBtnText,
  296 + t,
288 }; 297 };
289 }, 298 },
290 }); 299 });
src/components/Upload/src/UploadPreviewModal.vue
1 <template> 1 <template>
2 <BasicModal 2 <BasicModal
3 width="800px" 3 width="800px"
4 - title="预览" 4 + :title="t('preview')"
5 wrapClassName="upload-preview-modal" 5 wrapClassName="upload-preview-modal"
6 v-bind="$attrs" 6 v-bind="$attrs"
7 @register="register" 7 @register="register"
@@ -23,11 +23,15 @@ @@ -23,11 +23,15 @@
23 import { downloadByUrl } from '/@/utils/file/download'; 23 import { downloadByUrl } from '/@/utils/file/download';
24 24
25 import { createPreviewColumns, createPreviewActionColumn } from './data'; 25 import { createPreviewColumns, createPreviewActionColumn } from './data';
  26 +
  27 + import { useI18n } from '/@/hooks/web/useI18n';
26 export default defineComponent({ 28 export default defineComponent({
27 components: { BasicModal, FileList }, 29 components: { BasicModal, FileList },
28 props: previewProps, 30 props: previewProps,
29 setup(props, { emit }) { 31 setup(props, { emit }) {
30 const [register, { closeModal }] = useModalInner(); 32 const [register, { closeModal }] = useModalInner();
  33 + const { t } = useI18n('component.upload');
  34 +
31 const fileListRef = ref<PreviewFileItem[]>([]); 35 const fileListRef = ref<PreviewFileItem[]>([]);
32 watch( 36 watch(
33 () => props.value, 37 () => props.value,
@@ -74,6 +78,7 @@ @@ -74,6 +78,7 @@
74 } 78 }
75 79
76 return { 80 return {
  81 + t,
77 register, 82 register,
78 closeModal, 83 closeModal,
79 fileListRef, 84 fileListRef,
src/components/Upload/src/data.tsx
@@ -6,12 +6,15 @@ import { Progress, Tag } from &#39;ant-design-vue&#39;; @@ -6,12 +6,15 @@ import { Progress, Tag } from &#39;ant-design-vue&#39;;
6 6
7 import TableAction from '/@/components/Table/src/components/TableAction'; 7 import TableAction from '/@/components/Table/src/components/TableAction';
8 8
  9 +import { useI18n } from '/@/hooks/web/useI18n';
  10 +const { t } = useI18n('component.upload');
  11 +
9 // 文件上传列表 12 // 文件上传列表
10 export function createTableColumns(): BasicColumn[] { 13 export function createTableColumns(): BasicColumn[] {
11 return [ 14 return [
12 { 15 {
13 dataIndex: 'thumbUrl', 16 dataIndex: 'thumbUrl',
14 - title: '图例', 17 + title: t('legend'),
15 width: 100, 18 width: 100,
16 customRender: ({ record }) => { 19 customRender: ({ record }) => {
17 const { thumbUrl, type } = (record as FileItem) || {}; 20 const { thumbUrl, type } = (record as FileItem) || {};
@@ -20,7 +23,7 @@ export function createTableColumns(): BasicColumn[] { @@ -20,7 +23,7 @@ export function createTableColumns(): BasicColumn[] {
20 }, 23 },
21 { 24 {
22 dataIndex: 'name', 25 dataIndex: 'name',
23 - title: '文件名', 26 + title: t('fileName'),
24 align: 'left', 27 align: 'left',
25 customRender: ({ text, record }) => { 28 customRender: ({ text, record }) => {
26 const { percent, status: uploadStatus } = (record as FileItem) || {}; 29 const { percent, status: uploadStatus } = (record as FileItem) || {};
@@ -44,7 +47,7 @@ export function createTableColumns(): BasicColumn[] { @@ -44,7 +47,7 @@ export function createTableColumns(): BasicColumn[] {
44 }, 47 },
45 { 48 {
46 dataIndex: 'size', 49 dataIndex: 'size',
47 - title: '文件大小', 50 + title: t('fileSize'),
48 width: 100, 51 width: 100,
49 customRender: ({ text = 0 }) => { 52 customRender: ({ text = 0 }) => {
50 return text && (text / 1024).toFixed(2) + 'KB'; 53 return text && (text / 1024).toFixed(2) + 'KB';
@@ -57,15 +60,15 @@ export function createTableColumns(): BasicColumn[] { @@ -57,15 +60,15 @@ export function createTableColumns(): BasicColumn[] {
57 // }, 60 // },
58 { 61 {
59 dataIndex: 'status', 62 dataIndex: 'status',
60 - title: '状态', 63 + title: t('fileStatue'),
61 width: 100, 64 width: 100,
62 customRender: ({ text }) => { 65 customRender: ({ text }) => {
63 if (text === UploadResultStatus.SUCCESS) { 66 if (text === UploadResultStatus.SUCCESS) {
64 - return <Tag color="green">{() => '上传成功'}</Tag>; 67 + return <Tag color="green">{() => t('uploadSuccess')}</Tag>;
65 } else if (text === UploadResultStatus.ERROR) { 68 } else if (text === UploadResultStatus.ERROR) {
66 - return <Tag color="red">{() => '上传失败'}</Tag>; 69 + return <Tag color="red">{() => t('uploadError')}</Tag>;
67 } else if (text === UploadResultStatus.UPLOADING) { 70 } else if (text === UploadResultStatus.UPLOADING) {
68 - return <Tag color="blue">{() => '上传中'}</Tag>; 71 + return <Tag color="blue">{() => t('uploading')}</Tag>;
69 } 72 }
70 73
71 return text; 74 return text;
@@ -76,20 +79,20 @@ export function createTableColumns(): BasicColumn[] { @@ -76,20 +79,20 @@ export function createTableColumns(): BasicColumn[] {
76 export function createActionColumn(handleRemove: Function, handlePreview: Function): BasicColumn { 79 export function createActionColumn(handleRemove: Function, handlePreview: Function): BasicColumn {
77 return { 80 return {
78 width: 120, 81 width: 120,
79 - title: '操作', 82 + title: t('operating'),
80 dataIndex: 'action', 83 dataIndex: 'action',
81 fixed: false, 84 fixed: false,
82 customRender: ({ record }) => { 85 customRender: ({ record }) => {
83 const actions: ActionItem[] = [ 86 const actions: ActionItem[] = [
84 { 87 {
85 - label: '删除', 88 + label: t('del'),
86 color: 'error', 89 color: 'error',
87 onClick: handleRemove.bind(null, record), 90 onClick: handleRemove.bind(null, record),
88 }, 91 },
89 ]; 92 ];
90 if (checkImgType(record)) { 93 if (checkImgType(record)) {
91 actions.unshift({ 94 actions.unshift({
92 - label: '预览', 95 + label: t('preview'),
93 onClick: handlePreview.bind(null, record), 96 onClick: handlePreview.bind(null, record),
94 }); 97 });
95 } 98 }
@@ -102,7 +105,7 @@ export function createPreviewColumns(): BasicColumn[] { @@ -102,7 +105,7 @@ export function createPreviewColumns(): BasicColumn[] {
102 return [ 105 return [
103 { 106 {
104 dataIndex: 'url', 107 dataIndex: 'url',
105 - title: '图例', 108 + title: t('legend'),
106 width: 100, 109 width: 100,
107 customRender: ({ record }) => { 110 customRender: ({ record }) => {
108 const { url, type } = (record as PreviewFileItem) || {}; 111 const { url, type } = (record as PreviewFileItem) || {};
@@ -113,7 +116,7 @@ export function createPreviewColumns(): BasicColumn[] { @@ -113,7 +116,7 @@ export function createPreviewColumns(): BasicColumn[] {
113 }, 116 },
114 { 117 {
115 dataIndex: 'name', 118 dataIndex: 'name',
116 - title: '文件名', 119 + title: t('fileName'),
117 align: 'left', 120 align: 'left',
118 }, 121 },
119 ]; 122 ];
@@ -130,7 +133,7 @@ export function createPreviewActionColumn({ @@ -130,7 +133,7 @@ export function createPreviewActionColumn({
130 }): BasicColumn { 133 }): BasicColumn {
131 return { 134 return {
132 width: 160, 135 width: 160,
133 - title: '操作', 136 + title: t('operating'),
134 dataIndex: 'action', 137 dataIndex: 'action',
135 fixed: false, 138 fixed: false,
136 customRender: ({ record }) => { 139 customRender: ({ record }) => {
@@ -138,18 +141,18 @@ export function createPreviewActionColumn({ @@ -138,18 +141,18 @@ export function createPreviewActionColumn({
138 141
139 const actions: ActionItem[] = [ 142 const actions: ActionItem[] = [
140 { 143 {
141 - label: '删除', 144 + label: t('del'),
142 color: 'error', 145 color: 'error',
143 onClick: handleRemove.bind(null, record), 146 onClick: handleRemove.bind(null, record),
144 }, 147 },
145 { 148 {
146 - label: '下载', 149 + label: t('download'),
147 onClick: handleDownload.bind(null, record), 150 onClick: handleDownload.bind(null, record),
148 }, 151 },
149 ]; 152 ];
150 if (isImgTypeByName(url)) { 153 if (isImgTypeByName(url)) {
151 actions.unshift({ 154 actions.unshift({
152 - label: '预览', 155 + label: t('preview'),
153 onClick: handlePreview.bind(null, record), 156 onClick: handlePreview.bind(null, record),
154 }); 157 });
155 } 158 }
src/components/Upload/src/useUpload.ts
1 import { Ref, unref, computed } from 'vue'; 1 import { Ref, unref, computed } from 'vue';
2 - 2 +import { useI18n } from '/@/hooks/web/useI18n';
  3 +const { t } = useI18n('component.upload');
3 export function useUploadType({ 4 export function useUploadType({
4 acceptRef, 5 acceptRef,
5 // uploadTypeRef, 6 // uploadTypeRef,
@@ -37,17 +38,17 @@ export function useUploadType({ @@ -37,17 +38,17 @@ export function useUploadType({
37 38
38 const accept = unref(acceptRef); 39 const accept = unref(acceptRef);
39 if (accept.length > 0) { 40 if (accept.length > 0) {
40 - helpTexts.push(`支持${accept.join(',')}格式`); 41 + helpTexts.push(t('accept', [accept.join(',')]));
41 } 42 }
42 43
43 const maxSize = unref(maxSizeRef); 44 const maxSize = unref(maxSizeRef);
44 if (maxSize) { 45 if (maxSize) {
45 - helpTexts.push(`单个文件不超过${maxSize}MB`); 46 + helpTexts.push(t('maxSize', [maxSize]));
46 } 47 }
47 48
48 const maxNumber = unref(maxNumberRef); 49 const maxNumber = unref(maxNumberRef);
49 if (maxNumber && maxNumber !== Infinity) { 50 if (maxNumber && maxNumber !== Infinity) {
50 - helpTexts.push(`最多只能上传${maxNumber}个文件`); 51 + helpTexts.push(t('maxNumber', [maxNumber]));
51 } 52 }
52 return helpTexts.join(','); 53 return helpTexts.join(',');
53 }); 54 });
src/components/Verify/src/ImgRotate.tsx
  1 +import './ImgRotate.less';
  2 +
1 import type { MoveData, DragVerifyActionType } from './types'; 3 import type { MoveData, DragVerifyActionType } from './types';
2 4
3 import { defineComponent, computed, unref, reactive, watch, ref, getCurrentInstance } from 'vue'; 5 import { defineComponent, computed, unref, reactive, watch, ref, getCurrentInstance } from 'vue';
@@ -8,7 +10,8 @@ import BasicDragVerify from &#39;./DragVerify&#39;; @@ -8,7 +10,8 @@ import BasicDragVerify from &#39;./DragVerify&#39;;
8 import { hackCss } from '/@/utils/domUtils'; 10 import { hackCss } from '/@/utils/domUtils';
9 11
10 import { rotateProps } from './props'; 12 import { rotateProps } from './props';
11 -import './ImgRotate.less'; 13 +import { useI18n } from '/@/hooks/web/useI18n';
  14 +
12 export default defineComponent({ 15 export default defineComponent({
13 name: 'ImgRotateDargVerify', 16 name: 'ImgRotateDargVerify',
14 inheritAttrs: false, 17 inheritAttrs: false,
@@ -27,6 +30,7 @@ export default defineComponent({ @@ -27,6 +30,7 @@ export default defineComponent({
27 endTime: 0, 30 endTime: 0,
28 draged: false, 31 draged: false,
29 }); 32 });
  33 + const { t } = useI18n('component.verify');
30 34
31 watch( 35 watch(
32 () => state.isPassing, 36 () => state.isPassing,
@@ -142,11 +146,11 @@ export default defineComponent({ @@ -142,11 +146,11 @@ export default defineComponent({
142 /> 146 />
143 {state.showTip && ( 147 {state.showTip && (
144 <span class={[`ir-dv-img__tip`, state.isPassing ? 'success' : 'error']}> 148 <span class={[`ir-dv-img__tip`, state.isPassing ? 'success' : 'error']}>
145 - {state.isPassing ? `校验成功,耗时${time.toFixed(1)}秒!` : '验证失败!'} 149 + {state.isPassing ? t('time', { time: time.toFixed(1) }) : t('error')}
146 </span> 150 </span>
147 )} 151 )}
148 {!state.showTip && !state.draged && ( 152 {!state.showTip && !state.draged && (
149 - <span class={[`ir-dv-img__tip`, 'normal']}>点击图片可刷新</span> 153 + <span class={[`ir-dv-img__tip`, 'normal']}>t('redoTip')</span>
150 )} 154 )}
151 </div> 155 </div>
152 <BasicDragVerify 156 <BasicDragVerify
src/components/Verify/src/VerifyModal.vue deleted 100644 → 0
1 -<script lang="tsx">  
2 - import { defineComponent, ref, unref } from 'vue';  
3 - import { BasicModal } from '/@/components/Modal/index';  
4 - import { useTimeoutFn } from '/@/hooks/core/useTimeout';  
5 -  
6 - import { RotateDragVerify, DragVerifyActionType } from '/@/components/Verify/index';  
7 - export default defineComponent({  
8 - name: 'VerifyModal',  
9 -  
10 - setup(_, { attrs, emit }) {  
11 - const dragRef = ref<DragVerifyActionType | null>(null);  
12 -  
13 - function handleSuccess() {  
14 - useTimeoutFn(() => {  
15 - emit('success');  
16 - const dragEl = unref(dragRef);  
17 - if (dragEl) {  
18 - dragEl.resume();  
19 - }  
20 - }, 500);  
21 - }  
22 - return () => (  
23 - <BasicModal  
24 - {...attrs}  
25 - title="安全校验"  
26 - keyboard={false}  
27 - maskClosable={false}  
28 - canFullscreen={false}  
29 - footer={null}  
30 - wrapperFooterOffset={60}  
31 - destroyOnClose={true}  
32 - >  
33 - <RotateDragVerify  
34 - imgWidth={210}  
35 - ref={dragRef}  
36 - text="请拖动滑块将图片摆正"  
37 - {...attrs}  
38 - onSuccess={handleSuccess}  
39 - />  
40 - </BasicModal>  
41 - );  
42 - },  
43 - });  
44 -</script>  
src/components/Verify/src/props.ts
1 import type { PropType } from 'vue'; 1 import type { PropType } from 'vue';
  2 +import { useI18n } from '/@/hooks/web/useI18n';
2 3
  4 +const { t } = useI18n('component.verify');
3 export const basicProps = { 5 export const basicProps = {
4 value: { 6 value: {
5 type: Boolean as PropType<boolean>, 7 type: Boolean as PropType<boolean>,
@@ -13,11 +15,11 @@ export const basicProps = { @@ -13,11 +15,11 @@ export const basicProps = {
13 15
14 text: { 16 text: {
15 type: [String] as PropType<string>, 17 type: [String] as PropType<string>,
16 - default: '请按住滑块拖动', 18 + default: t('dragText'),
17 }, 19 },
18 successText: { 20 successText: {
19 type: [String] as PropType<string>, 21 type: [String] as PropType<string>,
20 - default: '验证通过', 22 + default: t('successText'),
21 }, 23 },
22 height: { 24 height: {
23 type: [Number, String] as PropType<number | string>, 25 type: [Number, String] as PropType<number | string>,
src/locales/lang/en/component/drawer.ts 0 → 100644
  1 +export default {
  2 + loadingText: 'Loading...',
  3 + cancelText: 'Close',
  4 + okText: 'Confirm',
  5 +};
src/locales/lang/en/component/excel.ts 0 → 100644
  1 +export default {
  2 + exportModalTitle: 'Export data',
  3 + fileType: 'File type',
  4 + fileName: 'File name',
  5 +};
src/locales/lang/en/component/form.ts 0 → 100644
  1 +export default {
  2 + resetButton: 'Reset',
  3 + submitButton: 'Search',
  4 + putAway: 'Put away',
  5 + unfold: 'Unfold',
  6 +
  7 + input: 'Please Input',
  8 + choose: 'Please Choose',
  9 +};
src/locales/lang/en/component/menu.ts 0 → 100644
  1 +export default {
  2 + search: 'Menu search',
  3 +};
src/locales/lang/en/component/modal.ts 0 → 100644
  1 +export default {
  2 + cancelText: 'Close',
  3 + okText: 'Confirm',
  4 +};
src/locales/lang/en/component/table.ts 0 → 100644
  1 +export default {
  2 + settingRedo: 'Refresh',
  3 + settingDens: 'Density',
  4 + settingDensDefault: 'Default',
  5 + settingDensMiddle: 'Middle',
  6 + settingDensSmall: 'Compact',
  7 + settingColumn: 'Column settings',
  8 + settingColumnShow: 'Column display',
  9 + settingReset: 'Reset',
  10 + settingFullScreen: 'Full Screen',
  11 +
  12 + index: 'Index',
  13 +
  14 + total: 'total of {total}',
  15 +};
src/locales/lang/en/component/upload.ts 0 → 100644
  1 +export default {
  2 + save: 'Save',
  3 + upload: 'Upload',
  4 + uploaded: 'Uploaded',
  5 +
  6 + operating: 'Operating',
  7 + del: 'Delete',
  8 + download: 'download',
  9 + saveWarn: 'Please wait for the file to upload and save!',
  10 + saveError: 'There is no file successfully uploaded and cannot be saved!',
  11 +
  12 + preview: 'Preview',
  13 + choose: 'Select the file',
  14 +
  15 + accept: 'Support {0} format',
  16 + acceptUpload: 'Only upload files in {0} format',
  17 + maxSize: 'A single file does not exceed {0}MB ',
  18 + maxSizeMultiple: 'Only upload files up to {0}MB!',
  19 + maxNumber: 'Only upload up to {0} files',
  20 +
  21 + legend: 'Legend',
  22 + fileName: 'File name',
  23 + fileSize: 'File size',
  24 + fileStatue: 'File status',
  25 +
  26 + startUpload: 'Start upload',
  27 + uploadSuccess: 'Upload successfully',
  28 + uploadError: 'Upload failed',
  29 + uploading: 'Uploading',
  30 + uploadWait: 'Please wait for the file upload to finish',
  31 + reUploadFailed: 'Re-upload failed files',
  32 +};
src/locales/lang/en/component/verify.ts 0 → 100644
  1 +export default {
  2 + error: 'verification failed!',
  3 + time: 'The verification is successful and it takes {time} seconds!',
  4 +
  5 + redoTip: 'Click the picture to refresh',
  6 +
  7 + dragText: 'Hold down the slider and drag',
  8 + successText: 'Verified',
  9 +};
src/locales/lang/zh_CN/component/drawer.ts 0 → 100644
  1 +export default {
  2 + loadingText: '加载中...',
  3 + cancelText: '关闭',
  4 + okText: '确认',
  5 +};
src/locales/lang/zh_CN/component/excel.ts 0 → 100644
  1 +export default {
  2 + exportModalTitle: '导出数据',
  3 + fileType: '文件类型',
  4 + fileName: '文件名',
  5 +};
src/locales/lang/zh_CN/component/form.ts 0 → 100644
  1 +export default {
  2 + resetButton: '重置',
  3 + submitButton: '查询',
  4 + putAway: '收起',
  5 + unfold: '展开',
  6 +
  7 + input: '请输入',
  8 + choose: '请选择',
  9 +};
src/locales/lang/zh_CN/component/menu.ts 0 → 100644
  1 +export default {
  2 + search: '菜单搜索',
  3 +};
src/locales/lang/zh_CN/component/modal.ts 0 → 100644
  1 +export default {
  2 + loadingText: '加载中...',
  3 + cancelText: '关闭',
  4 + okText: '确认',
  5 +};
src/locales/lang/zh_CN/component/table.ts 0 → 100644
  1 +export default {
  2 + settingRedo: '刷新',
  3 + settingDens: '密度',
  4 + settingDensDefault: '默认',
  5 + settingDensMiddle: '中等',
  6 + settingDensSmall: '紧凑',
  7 + settingColumn: '列设置',
  8 + settingColumnShow: '列展示',
  9 + settingReset: '重置',
  10 + settingFullScreen: '全屏',
  11 +
  12 + index: '序号',
  13 +
  14 + total: '共 {total} 条数据',
  15 +};
src/locales/lang/zh_CN/component/upload.ts 0 → 100644
  1 +export default {
  2 + save: '保存',
  3 + upload: '上传',
  4 + uploaded: '已上传',
  5 +
  6 + operating: '操作',
  7 + del: '删除',
  8 + download: '下载',
  9 + saveWarn: '请等待文件上传后,保存!',
  10 + saveError: '没有上传成功的文件,无法保存!',
  11 +
  12 + preview: '预览',
  13 + choose: '选择文件',
  14 +
  15 + accept: '支持{0}格式',
  16 + acceptUpload: '只能上传{0}格式文件',
  17 + maxSize: '单个文件不超过{0}MB',
  18 + maxSizeMultiple: '只能上传不超过{0}MB的文件!',
  19 + maxNumber: '最多只能上传{0}个文件',
  20 +
  21 + legend: '图例',
  22 + fileName: '文件名',
  23 + fileSize: '文件大小',
  24 + fileStatue: '状态',
  25 +
  26 + startUpload: '开始上传',
  27 + uploadSuccess: '上传成功',
  28 + uploadError: '上传失败',
  29 + uploading: '上传中',
  30 + uploadWait: '请等待文件上传结束后操作',
  31 + reUploadFailed: '重新上传失败文件',
  32 +};
src/locales/lang/zh_CN/component/verify.ts 0 → 100644
  1 +export default {
  2 + error: '验证失败!',
  3 + time: '验证校验成功,耗时{time}秒!',
  4 +
  5 + redoTip: '点击图片可刷新',
  6 +
  7 + dragText: '请按住滑块拖动',
  8 + successText: '验证通过',
  9 +};
yarn.lock
@@ -292,6 +292,11 @@ @@ -292,6 +292,11 @@
292 resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz#b4af32ddd473c0bfa643bd7ff0728b8e71b81ea0" 292 resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz#b4af32ddd473c0bfa643bd7ff0728b8e71b81ea0"
293 integrity sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ== 293 integrity sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==
294 294
  295 +"@babel/parser@^7.12.7":
  296 + version "7.12.7"
  297 + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056"
  298 + integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==
  299 +
295 "@babel/plugin-proposal-async-generator-functions@^7.12.1": 300 "@babel/plugin-proposal-async-generator-functions@^7.12.1":
296 version "7.12.1" 301 version "7.12.1"
297 resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e" 302 resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e"
@@ -1136,10 +1141,10 @@ @@ -1136,10 +1141,10 @@
1136 dependencies: 1141 dependencies:
1137 "@iconify/iconify" ">=2.0.0-rc.1" 1142 "@iconify/iconify" ">=2.0.0-rc.1"
1138 1143
1139 -"@rollup/plugin-commonjs@^15.1.0":  
1140 - version "15.1.0"  
1141 - resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz#1e7d076c4f1b2abf7e65248570e555defc37c238"  
1142 - integrity sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ== 1144 +"@rollup/plugin-commonjs@^16.0.0":
  1145 + version "16.0.0"
  1146 + resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f"
  1147 + integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw==
1143 dependencies: 1148 dependencies:
1144 "@rollup/pluginutils" "^3.1.0" 1149 "@rollup/pluginutils" "^3.1.0"
1145 commondir "^1.0.1" 1150 commondir "^1.0.1"
@@ -1156,6 +1161,18 @@ @@ -1156,6 +1161,18 @@
1156 dependencies: 1161 dependencies:
1157 "@rollup/pluginutils" "^3.0.8" 1162 "@rollup/pluginutils" "^3.0.8"
1158 1163
  1164 +"@rollup/plugin-node-resolve@^10.0.0":
  1165 + version "10.0.0"
  1166 + resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-10.0.0.tgz#44064a2b98df7530e66acf8941ff262fc9b4ead8"
  1167 + integrity sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A==
  1168 + dependencies:
  1169 + "@rollup/pluginutils" "^3.1.0"
  1170 + "@types/resolve" "1.17.1"
  1171 + builtin-modules "^3.1.0"
  1172 + deepmerge "^4.2.2"
  1173 + is-module "^1.0.0"
  1174 + resolve "^1.17.0"
  1175 +
1159 "@rollup/plugin-node-resolve@^7.1.1": 1176 "@rollup/plugin-node-resolve@^7.1.1":
1160 version "7.1.3" 1177 version "7.1.3"
1161 resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca" 1178 resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca"
@@ -1209,7 +1226,7 @@ @@ -1209,7 +1226,7 @@
1209 estree-walker "^1.0.1" 1226 estree-walker "^1.0.1"
1210 picomatch "^2.2.2" 1227 picomatch "^2.2.2"
1211 1228
1212 -"@rollup/pluginutils@^4.0.0": 1229 +"@rollup/pluginutils@^4.0.0", "@rollup/pluginutils@^4.1.0":
1213 version "4.1.0" 1230 version "4.1.0"
1214 resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838" 1231 resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838"
1215 integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ== 1232 integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==
@@ -1608,7 +1625,18 @@ @@ -1608,7 +1625,18 @@
1608 estree-walker "^2.0.1" 1625 estree-walker "^2.0.1"
1609 source-map "^0.6.1" 1626 source-map "^0.6.1"
1610 1627
1611 -"@vue/compiler-dom@3.0.2", "@vue/compiler-dom@^3.0.2": 1628 +"@vue/compiler-core@3.0.3":
  1629 + version "3.0.3"
  1630 + resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.3.tgz#dbb4d5eb91f294038f0bed170a1c25f59f7dc74f"
  1631 + integrity sha512-iWlRT8RYLmz7zkg84pTOriNUzjH7XACWN++ImFkskWXWeev29IKi7p76T9jKDaMZoPiGcUZ0k9wayuASWVxOwg==
  1632 + dependencies:
  1633 + "@babel/parser" "^7.12.0"
  1634 + "@babel/types" "^7.12.0"
  1635 + "@vue/shared" "3.0.3"
  1636 + estree-walker "^2.0.1"
  1637 + source-map "^0.6.1"
  1638 +
  1639 +"@vue/compiler-dom@3.0.2":
1612 version "3.0.2" 1640 version "3.0.2"
1613 resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.2.tgz#1d40de04bcdf9aabb79fb6a802dd70a2f3c2992a" 1641 resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.2.tgz#1d40de04bcdf9aabb79fb6a802dd70a2f3c2992a"
1614 integrity sha512-jvaL4QF2yXBJVD+JLbM2YA3e5fNfflJnfQ+GtfYk46ENGsEetqbkZqcX7fO+RHdG8tZBo7LCNBvgD0QLr+V4sg== 1642 integrity sha512-jvaL4QF2yXBJVD+JLbM2YA3e5fNfflJnfQ+GtfYk46ENGsEetqbkZqcX7fO+RHdG8tZBo7LCNBvgD0QLr+V4sg==
@@ -1616,7 +1644,15 @@ @@ -1616,7 +1644,15 @@
1616 "@vue/compiler-core" "3.0.2" 1644 "@vue/compiler-core" "3.0.2"
1617 "@vue/shared" "3.0.2" 1645 "@vue/shared" "3.0.2"
1618 1646
1619 -"@vue/compiler-sfc@*", "@vue/compiler-sfc@^3.0.0-rc.5", "@vue/compiler-sfc@^3.0.2": 1647 +"@vue/compiler-dom@3.0.3", "@vue/compiler-dom@^3.0.3":
  1648 + version "3.0.3"
  1649 + resolved "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.3.tgz#582ba30bc82da8409868bc1153ff0e0e2be617e5"
  1650 + integrity sha512-6GdUbDPjsc0MDZGAgpi4lox+d+aW9/brscwBOLOFfy9wcI9b6yLPmBbjdIsJq3pYdJWbdvACdJ77avBBdHEP8A==
  1651 + dependencies:
  1652 + "@vue/compiler-core" "3.0.3"
  1653 + "@vue/shared" "3.0.3"
  1654 +
  1655 +"@vue/compiler-sfc@*", "@vue/compiler-sfc@^3.0.0-rc.5":
1620 version "3.0.2" 1656 version "3.0.2"
1621 resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.2.tgz#22c70fed72c347a4d5fa2db2e80594b3193dce57" 1657 resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.2.tgz#22c70fed72c347a4d5fa2db2e80594b3193dce57"
1622 integrity sha512-viYjT5ehDSLM3v0jQ9hbTs4I5e/7lSlYsDOp7TQ1qcwHRvzoTQMTkFpY/Iae+LFKM124Ld17tBfXgfrZl9dt+g== 1658 integrity sha512-viYjT5ehDSLM3v0jQ9hbTs4I5e/7lSlYsDOp7TQ1qcwHRvzoTQMTkFpY/Iae+LFKM124Ld17tBfXgfrZl9dt+g==
@@ -1638,6 +1674,28 @@ @@ -1638,6 +1674,28 @@
1638 postcss-selector-parser "^6.0.4" 1674 postcss-selector-parser "^6.0.4"
1639 source-map "^0.6.1" 1675 source-map "^0.6.1"
1640 1676
  1677 +"@vue/compiler-sfc@^3.0.3":
  1678 + version "3.0.3"
  1679 + resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.3.tgz#7fad9d40e139dd717713c0db701e1eb776f8349f"
  1680 + integrity sha512-YocHSirye85kRVC4lU0+SE6uhrwGJzbhwkrqG4g6kmsAUopZ0qUjbICMlej5bYx2+AUz9yBIM7hpK8nIKFVFjg==
  1681 + dependencies:
  1682 + "@babel/parser" "^7.12.0"
  1683 + "@babel/types" "^7.12.0"
  1684 + "@vue/compiler-core" "3.0.3"
  1685 + "@vue/compiler-dom" "3.0.3"
  1686 + "@vue/compiler-ssr" "3.0.3"
  1687 + "@vue/shared" "3.0.3"
  1688 + consolidate "^0.16.0"
  1689 + estree-walker "^2.0.1"
  1690 + hash-sum "^2.0.0"
  1691 + lru-cache "^5.1.1"
  1692 + magic-string "^0.25.7"
  1693 + merge-source-map "^1.1.0"
  1694 + postcss "^7.0.32"
  1695 + postcss-modules "^3.2.2"
  1696 + postcss-selector-parser "^6.0.4"
  1697 + source-map "^0.6.1"
  1698 +
1641 "@vue/compiler-ssr@3.0.2": 1699 "@vue/compiler-ssr@3.0.2":
1642 version "3.0.2" 1700 version "3.0.2"
1643 resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.2.tgz#73af4d274a79bfcc72a996a9b45f1072e7deaa26" 1701 resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.2.tgz#73af4d274a79bfcc72a996a9b45f1072e7deaa26"
@@ -1646,6 +1704,14 @@ @@ -1646,6 +1704,14 @@
1646 "@vue/compiler-dom" "3.0.2" 1704 "@vue/compiler-dom" "3.0.2"
1647 "@vue/shared" "3.0.2" 1705 "@vue/shared" "3.0.2"
1648 1706
  1707 +"@vue/compiler-ssr@3.0.3":
  1708 + version "3.0.3"
  1709 + resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.3.tgz#7d9e5c1b8c71d69865ac6c48d2e6eb2eecb68501"
  1710 + integrity sha512-IjJMoHCiDk939Ix7Q5wrex59TVJr6JFQ95gf36f4G4UrVau0GGY/3HudnWT/6eyWJ7267+odqQs1uCZgDfL/Ww==
  1711 + dependencies:
  1712 + "@vue/compiler-dom" "3.0.3"
  1713 + "@vue/shared" "3.0.3"
  1714 +
1649 "@vue/reactivity@3.0.2": 1715 "@vue/reactivity@3.0.2":
1650 version "3.0.2" 1716 version "3.0.2"
1651 resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.2.tgz#42ed5af6025b494a5e69b05169fcddf04eebfe77" 1717 resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.2.tgz#42ed5af6025b494a5e69b05169fcddf04eebfe77"
@@ -1653,6 +1719,13 @@ @@ -1653,6 +1719,13 @@
1653 dependencies: 1719 dependencies:
1654 "@vue/shared" "3.0.2" 1720 "@vue/shared" "3.0.2"
1655 1721
  1722 +"@vue/reactivity@3.0.3":
  1723 + version "3.0.3"
  1724 + resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.3.tgz#681ee01ceff9219bc4da6bbb7d9c97d452e44d1d"
  1725 + integrity sha512-t39Qmc42MX7wJtf8L6tHlu17eP9Rc5w4aRnxpLHNWoaRxddv/7FBhWqusJ2Bwkk8ixFHOQeejcLMt5G469WYJw==
  1726 + dependencies:
  1727 + "@vue/shared" "3.0.3"
  1728 +
1656 "@vue/runtime-core@3.0.2": 1729 "@vue/runtime-core@3.0.2":
1657 version "3.0.2" 1730 version "3.0.2"
1658 resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.2.tgz#d7ed462af1cb0bf9836668e4e6fab3f2f4b1bc00" 1731 resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.2.tgz#d7ed462af1cb0bf9836668e4e6fab3f2f4b1bc00"
@@ -1661,7 +1734,24 @@ @@ -1661,7 +1734,24 @@
1661 "@vue/reactivity" "3.0.2" 1734 "@vue/reactivity" "3.0.2"
1662 "@vue/shared" "3.0.2" 1735 "@vue/shared" "3.0.2"
1663 1736
1664 -"@vue/runtime-dom@3.0.2", "@vue/runtime-dom@^3.0.0": 1737 +"@vue/runtime-core@3.0.3":
  1738 + version "3.0.3"
  1739 + resolved "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.3.tgz#edab3c9ad122cf8afd034b174cd20c073fbf950a"
  1740 + integrity sha512-Fd1JVnYI6at0W/2ERwJuTSq4S22gNt8bKEbICcvCAac7hJUZ1rylThlrhsvrgA+DVkWU01r0niNZQ4UddlNw7g==
  1741 + dependencies:
  1742 + "@vue/reactivity" "3.0.3"
  1743 + "@vue/shared" "3.0.3"
  1744 +
  1745 +"@vue/runtime-dom@3.0.3":
  1746 + version "3.0.3"
  1747 + resolved "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.3.tgz#5e3e5e5418b9defcac988d2be0cf65596fa2cc03"
  1748 + integrity sha512-ytTvSlRaEYvLQUkkpruIBizWIwuIeHER0Ch/evO6kUaPLjZjX3NerVxA40cqJx8rRjb9keQso21U2Jcpk8GsTg==
  1749 + dependencies:
  1750 + "@vue/runtime-core" "3.0.3"
  1751 + "@vue/shared" "3.0.3"
  1752 + csstype "^2.6.8"
  1753 +
  1754 +"@vue/runtime-dom@^3.0.0":
1665 version "3.0.2" 1755 version "3.0.2"
1666 resolved "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.2.tgz#9d166d03225558025d3d80f5039b646e0051b71c" 1756 resolved "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.2.tgz#9d166d03225558025d3d80f5039b646e0051b71c"
1667 integrity sha512-vqC1KK1yWthTw1FKzajT0gYQaEqAq7bpeeXQC473nllGC5YHbJhNAJLSmrDun1tjXqGF0UNCWYljYm+++BJv6w== 1757 integrity sha512-vqC1KK1yWthTw1FKzajT0gYQaEqAq7bpeeXQC473nllGC5YHbJhNAJLSmrDun1tjXqGF0UNCWYljYm+++BJv6w==
@@ -1675,6 +1765,11 @@ @@ -1675,6 +1765,11 @@
1675 resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.2.tgz#419bd85a2ebdbd4f42963e98c5a1b103452176d9" 1765 resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.2.tgz#419bd85a2ebdbd4f42963e98c5a1b103452176d9"
1676 integrity sha512-Zx869zlNoujFOclKIoYmkh8ES2RcS/+Jn546yOiPyZ+3+Ejivnr+fb8l+DdXUEFjo+iVDNR3KyLzg03aBFfZ4Q== 1766 integrity sha512-Zx869zlNoujFOclKIoYmkh8ES2RcS/+Jn546yOiPyZ+3+Ejivnr+fb8l+DdXUEFjo+iVDNR3KyLzg03aBFfZ4Q==
1677 1767
  1768 +"@vue/shared@3.0.3":
  1769 + version "3.0.3"
  1770 + resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.3.tgz#ef12ebff93a446df281e8a0fd765b5aea8e7745b"
  1771 + integrity sha512-yGgkF7u4W0Dmwri9XdeY50kOowN4UIX7aBQ///jbxx37itpzVjK7QzvD3ltQtPfWaJDGBfssGL0wpAgwX9OJpQ==
  1772 +
1678 "@vuedx/analyze@0.2.4-0": 1773 "@vuedx/analyze@0.2.4-0":
1679 version "0.2.4-0" 1774 version "0.2.4-0"
1680 resolved "https://registry.npmjs.org/@vuedx/analyze/-/analyze-0.2.4-0.tgz#52766a6dcd2867320409fe517540fd0bf0394d48" 1775 resolved "https://registry.npmjs.org/@vuedx/analyze/-/analyze-0.2.4-0.tgz#52766a6dcd2867320409fe517540fd0bf0394d48"
@@ -2213,6 +2308,11 @@ bytes@3.1.0: @@ -2213,6 +2308,11 @@ bytes@3.1.0:
2213 resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" 2308 resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
2214 integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== 2309 integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
2215 2310
  2311 +cac@^6.6.1:
  2312 + version "6.6.1"
  2313 + resolved "https://registry.npmjs.org/cac/-/cac-6.6.1.tgz#3dde3f6943f45d42a56729ea3573c08b3e7b6a6d"
  2314 + integrity sha512-uhki4T3Ax68hw7Dufi0bATVAF8ayBSwOKUEJHjObPrUN4tlQ8Lf7oljpTje/mArLxYN0D743c2zJt4C1bVTCqg==
  2315 +
2216 cache-base@^1.0.1: 2316 cache-base@^1.0.1:
2217 version "1.0.1" 2317 version "1.0.1"
2218 resolved "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" 2318 resolved "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
@@ -3012,6 +3112,13 @@ debug@^4.3.0: @@ -3012,6 +3112,13 @@ debug@^4.3.0:
3012 dependencies: 3112 dependencies:
3013 ms "2.1.2" 3113 ms "2.1.2"
3014 3114
  3115 +debug@^4.3.1:
  3116 + version "4.3.1"
  3117 + resolved "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
  3118 + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
  3119 + dependencies:
  3120 + ms "2.1.2"
  3121 +
3015 debug@~3.1.0: 3122 debug@~3.1.0:
3016 version "3.1.0" 3123 version "3.1.0"
3017 resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 3124 resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
@@ -3344,11 +3451,16 @@ esbuild-register@^1.1.0: @@ -3344,11 +3451,16 @@ esbuild-register@^1.1.0:
3344 source-map-support "^0.5.19" 3451 source-map-support "^0.5.19"
3345 strip-json-comments "^3.1.1" 3452 strip-json-comments "^3.1.1"
3346 3453
3347 -esbuild@^0.7.17, esbuild@^0.7.19, esbuild@^0.7.21: 3454 +esbuild@^0.7.17, esbuild@^0.7.19:
3348 version "0.7.22" 3455 version "0.7.22"
3349 resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.7.22.tgz#9149b903f8128b7c45a754046c24199d76bbe08e" 3456 resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.7.22.tgz#9149b903f8128b7c45a754046c24199d76bbe08e"
3350 integrity sha512-B43SYg8LGWYTCv9Gs0RnuLNwjzpuWOoCaZHTWEDEf5AfrnuDMerPVMdCEu7xOdhFvQ+UqfP2MGU9lxEy0JzccA== 3457 integrity sha512-B43SYg8LGWYTCv9Gs0RnuLNwjzpuWOoCaZHTWEDEf5AfrnuDMerPVMdCEu7xOdhFvQ+UqfP2MGU9lxEy0JzccA==
3351 3458
  3459 +esbuild@^0.8.12:
  3460 + version "0.8.15"
  3461 + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.15.tgz#cbc4d82a7fc4571d455233456e6fba83fd0364f1"
  3462 + integrity sha512-mSaLo9t/oYtQE6FRUEdO47Pr8PisSPzHtgr+LcihIcjBEhbYwjT6WLCQ7noDoTBfIatBCw229rtmIwl9u9UQwg==
  3463 +
3352 escalade@^3.1.1: 3464 escalade@^3.1.1:
3353 version "3.1.1" 3465 version "3.1.1"
3354 resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" 3466 resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
@@ -6871,10 +6983,10 @@ rollup-plugin-visualizer@^4.1.2: @@ -6871,10 +6983,10 @@ rollup-plugin-visualizer@^4.1.2:
6871 source-map "^0.7.3" 6983 source-map "^0.7.3"
6872 yargs "^16.0.3" 6984 yargs "^16.0.3"
6873 6985
6874 -rollup-plugin-vue@^6.0.0-beta.10:  
6875 - version "6.0.0-beta.11"  
6876 - resolved "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0-beta.11.tgz#fdbc6b7484a361ef8c5e8009cef4a6bd45435013"  
6877 - integrity sha512-osqLkFc7N76TOI0CeW0BOujlMFsMIoytyTRVUivaeYSMponNfk1iSuqyoeciUB3EjFqyL/dTTFPi+7rhaAm73w== 6986 +rollup-plugin-vue@^6.0.0:
  6987 + version "6.0.0"
  6988 + resolved "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0.tgz#e379e93e5ae9a8648522f698be2e452e8672aaf2"
  6989 + integrity sha512-oVvUd84d5u73M2HYM3XsMDLtZRIA/tw2U0dmHlXU2UWP5JARYHzh/U9vcxaN/x/9MrepY7VH3pHFeOhrWpxs/Q==
6878 dependencies: 6990 dependencies:
6879 debug "^4.1.1" 6991 debug "^4.1.1"
6880 hash-sum "^2.0.0" 6992 hash-sum "^2.0.0"
@@ -8104,30 +8216,31 @@ vite-plugin-pwa@^0.1.5: @@ -8104,30 +8216,31 @@ vite-plugin-pwa@^0.1.5:
8104 fast-glob "^3.2.4" 8216 fast-glob "^3.2.4"
8105 rollup-plugin-workbox "^5.2.1" 8217 rollup-plugin-workbox "^5.2.1"
8106 8218
8107 -vite@^1.0.0-rc.9:  
8108 - version "1.0.0-rc.9"  
8109 - resolved "https://registry.npmjs.org/vite/-/vite-1.0.0-rc.9.tgz#63621a39cf36fe9a6dccafdb11360a5ebbdb2663"  
8110 - integrity sha512-u0PT2sKMes2RtE5rZsLY0nFm6kEmce7IhVRWKFXmrsjn0MBOCNEi+S6iNnJDmsj1nzvU2dMZ5MHhFyXIqTgjzA== 8219 +vite@^1.0.0-rc.10:
  8220 + version "1.0.0-rc.10"
  8221 + resolved "https://registry.npmjs.org/vite/-/vite-1.0.0-rc.10.tgz#d8d139dc640fa073e4a1b8abdb037a131fa364cc"
  8222 + integrity sha512-Kh2lq2zpsbyYRlI/uXHEyEMLzOSBXmza23k69LB6imIeH8HddvSoi+AqOTbSK/CQhfw3lvoPgb3h+tIbK5zymg==
8111 dependencies: 8223 dependencies:
8112 - "@babel/parser" "^7.12.3" 8224 + "@babel/parser" "^7.12.7"
8113 "@koa/cors" "^3.1.0" 8225 "@koa/cors" "^3.1.0"
8114 - "@rollup/plugin-commonjs" "^15.1.0" 8226 + "@rollup/plugin-commonjs" "^16.0.0"
8115 "@rollup/plugin-json" "^4.1.0" 8227 "@rollup/plugin-json" "^4.1.0"
8116 - "@rollup/plugin-node-resolve" "^9.0.0"  
8117 - "@rollup/pluginutils" "^4.0.0" 8228 + "@rollup/plugin-node-resolve" "^10.0.0"
  8229 + "@rollup/pluginutils" "^4.1.0"
8118 "@types/koa" "^2.11.4" 8230 "@types/koa" "^2.11.4"
8119 "@types/lru-cache" "^5.1.0" 8231 "@types/lru-cache" "^5.1.0"
8120 - "@vue/compiler-dom" "^3.0.2"  
8121 - "@vue/compiler-sfc" "^3.0.2" 8232 + "@vue/compiler-dom" "^3.0.3"
  8233 + "@vue/compiler-sfc" "^3.0.3"
8122 brotli-size "^4.0.0" 8234 brotli-size "^4.0.0"
  8235 + cac "^6.6.1"
8123 chalk "^4.1.0" 8236 chalk "^4.1.0"
8124 chokidar "^3.4.2" 8237 chokidar "^3.4.2"
8125 clean-css "^4.2.3" 8238 clean-css "^4.2.3"
8126 - debug "^4.1.1" 8239 + debug "^4.3.1"
8127 dotenv "^8.2.0" 8240 dotenv "^8.2.0"
8128 dotenv-expand "^5.1.0" 8241 dotenv-expand "^5.1.0"
8129 es-module-lexer "^0.3.25" 8242 es-module-lexer "^0.3.25"
8130 - esbuild "^0.7.21" 8243 + esbuild "^0.8.12"
8131 etag "^1.8.1" 8244 etag "^1.8.1"
8132 execa "^4.0.3" 8245 execa "^4.0.3"
8133 fs-extra "^9.0.1" 8246 fs-extra "^9.0.1"
@@ -8155,11 +8268,12 @@ vite@^1.0.0-rc.9: @@ -8155,11 +8268,12 @@ vite@^1.0.0-rc.9:
8155 rollup "^2.32.1" 8268 rollup "^2.32.1"
8156 rollup-plugin-dynamic-import-variables "^1.1.0" 8269 rollup-plugin-dynamic-import-variables "^1.1.0"
8157 rollup-plugin-terser "^7.0.2" 8270 rollup-plugin-terser "^7.0.2"
8158 - rollup-plugin-vue "^6.0.0-beta.10" 8271 + rollup-plugin-vue "^6.0.0"
8159 rollup-plugin-web-worker-loader "^1.3.1" 8272 rollup-plugin-web-worker-loader "^1.3.1"
8160 selfsigned "^1.10.8" 8273 selfsigned "^1.10.8"
8161 slash "^3.0.0" 8274 slash "^3.0.0"
8162 - vue "^3.0.2" 8275 + source-map "^0.7.3"
  8276 + vue "^3.0.3"
8163 ws "^7.3.1" 8277 ws "^7.3.1"
8164 8278
8165 vscode-languageserver-textdocument@^1.0.1: 8279 vscode-languageserver-textdocument@^1.0.1:
@@ -8203,14 +8317,14 @@ vue-types@^3.0.0: @@ -8203,14 +8317,14 @@ vue-types@^3.0.0:
8203 dependencies: 8317 dependencies:
8204 is-plain-object "3.0.1" 8318 is-plain-object "3.0.1"
8205 8319
8206 -vue@^3.0.2:  
8207 - version "3.0.2"  
8208 - resolved "https://registry.npmjs.org/vue/-/vue-3.0.2.tgz#9d5b7b2983f35e64a34d13c7c9d6831239feca3c"  
8209 - integrity sha512-ciKFjutKRs+2Vbvgrist1oDd5wZQqtOel/K//ku54zLbf8tcTV+XbyAfanTHcTkML9CUj09vnC+y+5uaOz2/9g== 8320 +vue@^3.0.3:
  8321 + version "3.0.3"
  8322 + resolved "https://registry.npmjs.org/vue/-/vue-3.0.3.tgz#ad94a475e6ebbf3904673b6a0ae46e47b957bd72"
  8323 + integrity sha512-BZG5meD5vLWdvfnRL5WqfDy+cnXO1X/SweModGUna78bdFPZW6+ZO1tU9p0acrskX3DKFcfSp2s4SZnMjABx6w==
8210 dependencies: 8324 dependencies:
8211 - "@vue/compiler-dom" "3.0.2"  
8212 - "@vue/runtime-dom" "3.0.2"  
8213 - "@vue/shared" "3.0.2" 8325 + "@vue/compiler-dom" "3.0.3"
  8326 + "@vue/runtime-dom" "3.0.3"
  8327 + "@vue/shared" "3.0.3"
8214 8328
8215 vuex-module-decorators@^1.0.1: 8329 vuex-module-decorators@^1.0.1:
8216 version "1.0.1" 8330 version "1.0.1"