Compare commits
2 Commits
master
..
locallized
| Author | SHA1 | Date | |
|---|---|---|---|
| f73baeb226 | |||
| 097d210f89 |
Generated
+712
-640
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "1.8.2",
|
"axios": "^1.16.1",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "2.0.4",
|
||||||
"element-plus": "^2.8.2",
|
"element-plus": "^2.8.2",
|
||||||
"fast-sha256": "^1.3.0",
|
"fast-sha256": "^1.3.0",
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
"sass": "^1.43.4",
|
"sass": "^1.43.4",
|
||||||
"sass-loader": "^12.3.0",
|
"sass-loader": "^12.3.0",
|
||||||
"ts-proto": "^1.141.1",
|
"ts-proto": "^1.141.1",
|
||||||
"vite": "6.3.4"
|
"vite": "^6.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '省/市/区',
|
default: 'Province / City / District',
|
||||||
},
|
},
|
||||||
province: {
|
province: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-icon class="default-icon">
|
<el-icon class="default-icon">
|
||||||
<plus/>
|
<plus/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<div class="drag-tips">点击上传<span v-if="drag">或直接拖入文件</span></div>
|
<div class="drag-tips">Click to Upload<span v-if="drag">Or drag and drop files directly</span></div>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export function useOss (beforeUp, multiple) {
|
|||||||
let fileUploadData = reactive({
|
let fileUploadData = reactive({
|
||||||
policy: '',
|
policy: '',
|
||||||
OSSAccessKeyId: '',
|
OSSAccessKeyId: '',
|
||||||
success_action_status: '200', // 让服务端返回200,不然,默认会返回204
|
success_action_status: '200', // Have the server return 200; otherwise, it will return 204 by default.
|
||||||
callback: '',
|
callback: '',
|
||||||
signature: '',
|
signature: '',
|
||||||
'x:dir': '',
|
'x:dir': '',
|
||||||
@@ -32,7 +32,7 @@ export function useOss (beforeUp, multiple) {
|
|||||||
fileUploadData['x:dir'] = obj['dir']
|
fileUploadData['x:dir'] = obj['dir']
|
||||||
fileUploadHost.value = obj['host']
|
fileUploadHost.value = obj['host']
|
||||||
}
|
}
|
||||||
//多选文件时需要这个,不然每个文件上传的都是一样的data
|
// This is required when selecting multiple files; otherwise, the same data will be uploaded for every single file.
|
||||||
if (multiple) {
|
if (multiple) {
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
setTimeout(() => { resolve() }, 50)
|
setTimeout(() => { resolve() }, 50)
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { ref, reactive, watch } from 'vue'
|
import { ref, reactive, watch } from 'vue'
|
||||||
import { list as fetchUsers } from '@/api/user'
|
import { list as fetchUsers } from '@/api/user'
|
||||||
|
|
||||||
// todo Cache all user information.
|
// todo 缓存所有用户信息
|
||||||
export function loadAllUsers () {
|
export function loadAllUsers () {
|
||||||
const allUsers = ref([])
|
const allUsers = ref([])
|
||||||
const getAllUsers = async () => {
|
const getAllUsers = async () => {
|
||||||
|
|||||||
+2
-2
@@ -21,7 +21,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
|
|
||||||
const token = getToken()
|
const token = getToken()
|
||||||
if (!token) {
|
if (!token) {
|
||||||
//无token,跳转到登录
|
// No token found; redirecting to login.
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
@@ -29,7 +29,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//有token
|
// With Token
|
||||||
|
|
||||||
const userStore = useUserStore(pinia)
|
const userStore = useUserStore(pinia)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -36,13 +36,13 @@ export const asyncRoutes = [
|
|||||||
// path: '/',
|
// path: '/',
|
||||||
// name: 'Index',
|
// name: 'Index',
|
||||||
// redirect: '/Home',
|
// redirect: '/Home',
|
||||||
// meta: { title: '首页', icon: 'house' },
|
// meta: { title: 'front page', icon: 'house' },
|
||||||
// component: () => import('@/layout/index.vue'),
|
// component: () => import('@/layout/index.vue'),
|
||||||
// children: [
|
// children: [
|
||||||
// {
|
// {
|
||||||
// path: '/Home',
|
// path: '/Home',
|
||||||
// name: 'Home',
|
// name: 'Home',
|
||||||
// meta: { title: '首页', icon: 'house' },
|
// meta: { title: 'front page', icon: 'house' },
|
||||||
// component: () => import('@/views/index/index.vue'),
|
// component: () => import('@/views/index/index.vue'),
|
||||||
// },
|
// },
|
||||||
//
|
//
|
||||||
|
|||||||
+11
-11
@@ -15,29 +15,29 @@ export function removeToken () {
|
|||||||
return localStorage.removeItem(TokenKey)
|
return localStorage.removeItem(TokenKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置 code,并存储当前时间戳(单位:毫秒)
|
// Set the code and store the current timestamp (in milliseconds).
|
||||||
export function setCode(code) {
|
export function setCode(code) {
|
||||||
const now = Date.now(); // 当前时间戳(毫秒)
|
const now = Date.now(); //Current Timestamp (Milliseconds)
|
||||||
const expiry = now + 60 * 1000; // 60 秒后过期
|
const expiry = now + 60 * 1000; // Expires in ... seconds 60
|
||||||
|
|
||||||
localStorage.setItem(OidcCode, code); // 存储 code
|
localStorage.setItem(OidcCode, code); // Storage Code
|
||||||
localStorage.setItem(OidcCodeExpiry, expiry); // 存储过期时间戳
|
localStorage.setItem(OidcCodeExpiry, expiry); // Store Expiration Timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取 code,如果已过期则删除并返回 null
|
// Retrieve the code; if it has expired, delete it and return null.
|
||||||
export function getCode() {
|
export function getCode() {
|
||||||
const expiry = localStorage.getItem(OidcCodeExpiry); // 获取过期时间戳
|
const expiry = localStorage.getItem(OidcCodeExpiry); // Get Expiration Timestamp
|
||||||
const now = Date.now(); // 当前时间戳
|
const now = Date.now(); // Current Timestamp
|
||||||
|
|
||||||
if (expiry && now > parseInt(expiry)) {
|
if (expiry && now > parseInt(expiry)) {
|
||||||
// 如果已过期,删除 code 和过期时间
|
// If expired, delete the code and the expiration time.
|
||||||
removeCode();
|
removeCode();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return localStorage.getItem(OidcCode); // 返回 code(如果未过期)
|
return localStorage.getItem(OidcCode); // Return code (if not expired)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除 code 和过期时间
|
// Delete the code and expiration time.
|
||||||
export function removeCode() {
|
export function removeCode() {
|
||||||
localStorage.removeItem(OidcCode);
|
localStorage.removeItem(OidcCode);
|
||||||
localStorage.removeItem(OidcCodeExpiry);
|
localStorage.removeItem(OidcCodeExpiry);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function handleClipboard (text, event) {
|
|||||||
|
|
||||||
export function copyImage (targetNode) {
|
export function copyImage (targetNode) {
|
||||||
if (window.getSelection) {
|
if (window.getSelection) {
|
||||||
// chrome等主流浏览器
|
// Mainstream browsers such as Chrome
|
||||||
var selection = window.getSelection()
|
var selection = window.getSelection()
|
||||||
selection.removeAllRanges()
|
selection.removeAllRanges()
|
||||||
var range = document.createRange()
|
var range = document.createRange()
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="list-body" shadow="hover">
|
<el-card class="list-body" shadow="hover">
|
||||||
<!-- <el-tag type="danger" style="margin-bottom: 10px">不建议在此操作地址簿,可能会造成数据不同步</el-tag>-->
|
<!-- <el-tag type="danger" style="margin-bottom: 10px">It is not recommended to manage the address book here, as this may lead to data synchronization issues.</el-tag>-->
|
||||||
<el-table :data="listRes.list" v-loading="listRes.loading" border>
|
<el-table :data="listRes.list" v-loading="listRes.loading" border>
|
||||||
<el-table-column prop="id" label="ID" align="center" width="200">
|
<el-table-column prop="id" label="ID" align="center" width="200">
|
||||||
<template #default="{row}">
|
<template #default="{row}">
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
name: 'Home',
|
name: 'Home',
|
||||||
setup () {
|
setup () {
|
||||||
const todoList = ref([
|
const todoList = ref([
|
||||||
{title:'修复bug'},
|
{title:'repair bug'},
|
||||||
{title:'修复bug'},
|
{title:'repair bug'},
|
||||||
{title:'修复bug'},
|
{title:'repair bug'},
|
||||||
{title:'增加新功能'},
|
{title:'Add New Features'},
|
||||||
])
|
])
|
||||||
return {
|
return {
|
||||||
todoList
|
todoList
|
||||||
|
|||||||
Reference in New Issue
Block a user