You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
692 lines
17 KiB
HTML
692 lines
17 KiB
HTML
1 day ago
|
<!DOCTYPE html>
|
||
|
<html lang="zh-CN">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>JSON数据解析器 - DeepSeek风格</title>
|
||
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
|
||
|
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||
|
<style>
|
||
|
* {
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
box-sizing: border-box;
|
||
|
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
||
|
}
|
||
|
|
||
|
body {
|
||
|
background: linear-gradient(135deg, #0a192f, #0f2a4a, #0a192f);
|
||
|
color: #e6f1ff;
|
||
|
min-height: 100vh;
|
||
|
padding: 20px;
|
||
|
overflow-x: hidden;
|
||
|
}
|
||
|
|
||
|
.container {
|
||
|
max-width: 1400px;
|
||
|
margin: 0 auto;
|
||
|
}
|
||
|
|
||
|
header {
|
||
|
text-align: center;
|
||
|
padding: 30px 0;
|
||
|
margin-bottom: 20px;
|
||
|
position: relative;
|
||
|
z-index: 2;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
color: #64ffda;
|
||
|
font-size: 3rem;
|
||
|
margin-bottom: 15px;
|
||
|
text-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
|
||
|
font-weight: 600;
|
||
|
letter-spacing: -0.5px;
|
||
|
}
|
||
|
|
||
|
.subtitle {
|
||
|
color: #a8b2d1;
|
||
|
font-size: 1.2rem;
|
||
|
max-width: 800px;
|
||
|
margin: 0 auto;
|
||
|
line-height: 1.6;
|
||
|
}
|
||
|
|
||
|
.main-content {
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
|
||
|
gap: 25px;
|
||
|
margin-bottom: 40px;
|
||
|
}
|
||
|
|
||
|
.card {
|
||
|
background: rgba(17, 34, 64, 0.7);
|
||
|
border-radius: 12px;
|
||
|
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
|
||
|
overflow: hidden;
|
||
|
transition: transform 0.3s, box-shadow 0.3s;
|
||
|
border: 1px solid rgba(100, 255, 218, 0.1);
|
||
|
backdrop-filter: blur(10px);
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.card::after {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
right: 0;
|
||
|
height: 4px;
|
||
|
background: linear-gradient(to right, #64ffda, #0a192f);
|
||
|
}
|
||
|
|
||
|
.card:hover {
|
||
|
transform: translateY(-5px);
|
||
|
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
|
||
|
border-color: rgba(100, 255, 218, 0.3);
|
||
|
}
|
||
|
|
||
|
.card-header {
|
||
|
padding: 22px 30px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
position: relative;
|
||
|
border-bottom: 1px solid rgba(100, 255, 218, 0.1);
|
||
|
}
|
||
|
|
||
|
.card-header i {
|
||
|
margin-right: 15px;
|
||
|
font-size: 1.5rem;
|
||
|
color: #64ffda;
|
||
|
}
|
||
|
|
||
|
.card-header h2 {
|
||
|
font-size: 1.6rem;
|
||
|
font-weight: 500;
|
||
|
color: #ccd6f6;
|
||
|
}
|
||
|
|
||
|
.card-body {
|
||
|
padding: 30px;
|
||
|
}
|
||
|
|
||
|
.input-group {
|
||
|
margin-bottom: 25px;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.input-group label {
|
||
|
display: block;
|
||
|
margin-bottom: 12px;
|
||
|
font-weight: 500;
|
||
|
color: #a8b2d1;
|
||
|
font-size: 1.1rem;
|
||
|
}
|
||
|
|
||
|
.json-input {
|
||
|
display: flex;
|
||
|
gap: 10px;
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
|
||
|
.json-input input {
|
||
|
flex: 1;
|
||
|
padding: 14px 20px;
|
||
|
background: rgba(10, 25, 47, 0.7);
|
||
|
border: 1px solid rgba(100, 255, 218, 0.2);
|
||
|
border-radius: 8px;
|
||
|
font-size: 1rem;
|
||
|
color: #e6f1ff;
|
||
|
transition: all 0.3s;
|
||
|
}
|
||
|
|
||
|
.json-input input:focus {
|
||
|
outline: none;
|
||
|
border-color: #64ffda;
|
||
|
box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
|
||
|
}
|
||
|
|
||
|
.json-input button {
|
||
|
padding: 14px 24px;
|
||
|
background: linear-gradient(to right, #0a192f, #112240);
|
||
|
color: #64ffda;
|
||
|
border: 1px solid rgba(100, 255, 218, 0.3);
|
||
|
border-radius: 8px;
|
||
|
font-size: 1rem;
|
||
|
font-weight: 500;
|
||
|
cursor: pointer;
|
||
|
transition: all 0.3s;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 8px;
|
||
|
}
|
||
|
|
||
|
.json-input button:hover {
|
||
|
background: linear-gradient(to right, #112240, #0a192f);
|
||
|
border-color: #64ffda;
|
||
|
transform: translateY(-2px);
|
||
|
}
|
||
|
|
||
|
.json-input button:disabled {
|
||
|
opacity: 0.5;
|
||
|
cursor: not-allowed;
|
||
|
transform: none;
|
||
|
}
|
||
|
|
||
|
.preview-container {
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.json-preview {
|
||
|
min-height: 300px;
|
||
|
max-height: 400px;
|
||
|
padding: 20px;
|
||
|
border-radius: 10px;
|
||
|
background: rgba(10, 25, 47, 0.5);
|
||
|
border: 1px solid rgba(100, 255, 218, 0.1);
|
||
|
font-family: 'Fira Code', monospace;
|
||
|
font-size: 14px;
|
||
|
line-height: 1.5;
|
||
|
color: #a8b2d1;
|
||
|
overflow: auto;
|
||
|
white-space: pre-wrap;
|
||
|
word-break: break-all;
|
||
|
position: relative;
|
||
|
transition: all 0.3s;
|
||
|
}
|
||
|
|
||
|
.json-preview.error {
|
||
|
color: #ff6b6b;
|
||
|
}
|
||
|
|
||
|
.json-preview.loading::before {
|
||
|
content: "加载中...";
|
||
|
position: absolute;
|
||
|
top: 50%;
|
||
|
left: 50%;
|
||
|
transform: translate(-50%, -50%);
|
||
|
color: #64ffda;
|
||
|
font-size: 16px;
|
||
|
}
|
||
|
|
||
|
.results-container {
|
||
|
min-height: 300px;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
.results-header {
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
|
||
|
.stats {
|
||
|
color: #a8b2d1;
|
||
|
font-size: 1.1rem;
|
||
|
}
|
||
|
|
||
|
.stats span {
|
||
|
color: #64ffda;
|
||
|
font-weight: 500;
|
||
|
}
|
||
|
|
||
|
.copy-btn {
|
||
|
padding: 10px 18px;
|
||
|
background: rgba(10, 25, 47, 0.7);
|
||
|
color: #64ffda;
|
||
|
border: 1px solid rgba(100, 255, 218, 0.3);
|
||
|
border-radius: 8px;
|
||
|
font-size: 0.9rem;
|
||
|
cursor: pointer;
|
||
|
transition: all 0.3s;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 8px;
|
||
|
}
|
||
|
|
||
|
.copy-btn:hover {
|
||
|
background: rgba(100, 255, 218, 0.1);
|
||
|
border-color: #64ffda;
|
||
|
}
|
||
|
|
||
|
.results-list {
|
||
|
flex: 1;
|
||
|
background: rgba(10, 25, 47, 0.5);
|
||
|
border-radius: 10px;
|
||
|
padding: 20px;
|
||
|
border: 1px solid rgba(100, 255, 218, 0.1);
|
||
|
overflow-y: auto;
|
||
|
max-height: 350px;
|
||
|
}
|
||
|
|
||
|
ul {
|
||
|
list-style: none;
|
||
|
}
|
||
|
|
||
|
li {
|
||
|
padding: 14px 20px;
|
||
|
margin-bottom: 12px;
|
||
|
background: rgba(17, 34, 64, 0.7);
|
||
|
border-radius: 8px;
|
||
|
border-left: 3px solid #64ffda;
|
||
|
transition: all 0.3s;
|
||
|
font-family: 'Fira Code', monospace;
|
||
|
color: #ccd6f6;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
|
}
|
||
|
|
||
|
li:last-child {
|
||
|
margin-bottom: 0;
|
||
|
}
|
||
|
|
||
|
li:hover {
|
||
|
background: rgba(17, 34, 64, 0.9);
|
||
|
transform: translateX(5px);
|
||
|
}
|
||
|
|
||
|
.item-id {
|
||
|
font-weight: 500;
|
||
|
}
|
||
|
|
||
|
.item-actions {
|
||
|
opacity: 0;
|
||
|
transition: opacity 0.3s;
|
||
|
}
|
||
|
|
||
|
li:hover .item-actions {
|
||
|
opacity: 1;
|
||
|
}
|
||
|
|
||
|
.item-actions button {
|
||
|
background: none;
|
||
|
border: none;
|
||
|
color: #64ffda;
|
||
|
cursor: pointer;
|
||
|
padding: 5px;
|
||
|
border-radius: 4px;
|
||
|
transition: all 0.2s;
|
||
|
}
|
||
|
|
||
|
.item-actions button:hover {
|
||
|
background: rgba(100, 255, 218, 0.1);
|
||
|
}
|
||
|
|
||
|
.empty-state {
|
||
|
text-align: center;
|
||
|
padding: 40px 20px;
|
||
|
color: #8892b0;
|
||
|
}
|
||
|
|
||
|
.empty-state i {
|
||
|
font-size: 3rem;
|
||
|
margin-bottom: 20px;
|
||
|
color: #64ffda;
|
||
|
opacity: 0.5;
|
||
|
}
|
||
|
|
||
|
.progress-container {
|
||
|
height: 6px;
|
||
|
background: rgba(100, 255, 218, 0.1);
|
||
|
border-radius: 3px;
|
||
|
margin: 15px 0;
|
||
|
overflow: hidden;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.progress-bar {
|
||
|
height: 100%;
|
||
|
background: linear-gradient(to right, #64ffda, #0a192f);
|
||
|
border-radius: 3px;
|
||
|
width: 0%;
|
||
|
transition: width 0.5s;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.progress-bar::after {
|
||
|
content: '';
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
right: 0;
|
||
|
bottom: 0;
|
||
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||
|
animation: progressShimmer 1.5s infinite;
|
||
|
}
|
||
|
|
||
|
@keyframes progressShimmer {
|
||
|
0% { transform: translateX(-100%); }
|
||
|
100% { transform: translateX(100%); }
|
||
|
}
|
||
|
|
||
|
footer {
|
||
|
text-align: center;
|
||
|
color: rgba(168, 178, 209, 0.7);
|
||
|
padding: 30px 0;
|
||
|
margin-top: 50px;
|
||
|
font-size: 0.9rem;
|
||
|
border-top: 1px solid rgba(100, 255, 218, 0.1);
|
||
|
}
|
||
|
|
||
|
.logo {
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
gap: 12px;
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
|
||
|
.logo-circle {
|
||
|
width: 24px;
|
||
|
height: 24px;
|
||
|
background: linear-gradient(135deg, #64ffda, #0a192f);
|
||
|
border-radius: 50%;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
}
|
||
|
|
||
|
.logo-circle i {
|
||
|
font-size: 12px;
|
||
|
color: #0a192f;
|
||
|
}
|
||
|
|
||
|
.logo-text {
|
||
|
font-size: 1.5rem;
|
||
|
font-weight: 600;
|
||
|
background: linear-gradient(to right, #64ffda, #a8b2d1);
|
||
|
-webkit-background-clip: text;
|
||
|
background-clip: text;
|
||
|
color: transparent;
|
||
|
}
|
||
|
|
||
|
@media (max-width: 768px) {
|
||
|
.main-content {
|
||
|
grid-template-columns: 1fr;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
font-size: 2.2rem;
|
||
|
}
|
||
|
|
||
|
.json-input {
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
.results-header {
|
||
|
flex-direction: column;
|
||
|
align-items: flex-start;
|
||
|
gap: 15px;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.status-indicator {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 8px;
|
||
|
position: absolute;
|
||
|
right: 30px;
|
||
|
top: 50%;
|
||
|
transform: translateY(-50%);
|
||
|
}
|
||
|
|
||
|
.status-dot {
|
||
|
width: 10px;
|
||
|
height: 10px;
|
||
|
border-radius: 50%;
|
||
|
background: #8892b0;
|
||
|
}
|
||
|
|
||
|
.status-dot.connected {
|
||
|
background: #64ffda;
|
||
|
box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
|
||
|
}
|
||
|
|
||
|
.status-text {
|
||
|
color: #8892b0;
|
||
|
font-size: 0.9rem;
|
||
|
}
|
||
|
|
||
|
.notification {
|
||
|
position: fixed;
|
||
|
top: 30px;
|
||
|
right: 30px;
|
||
|
background: rgba(17, 34, 64, 0.95);
|
||
|
color: #64ffda;
|
||
|
padding: 15px 25px;
|
||
|
border-radius: 8px;
|
||
|
border-left: 4px solid #64ffda;
|
||
|
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
|
||
|
transform: translateX(200%);
|
||
|
transition: transform 0.3s ease-out;
|
||
|
z-index: 1000;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 10px;
|
||
|
}
|
||
|
|
||
|
.notification.show {
|
||
|
transform: translateX(0);
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="app">
|
||
|
<div class="container">
|
||
|
<header>
|
||
|
<div class="logo">
|
||
|
<div class="logo-circle">
|
||
|
<i class="fas fa-code"></i>
|
||
|
</div>
|
||
|
<div class="logo-text">JSON解析器</div>
|
||
|
</div>
|
||
|
<h1>JSON数据分析工具</h1>
|
||
|
<p class="subtitle">从指定URL加载JSON数据并提取is_check为true的frame_id值</p>
|
||
|
</header>
|
||
|
|
||
|
<div class="main-content">
|
||
|
<!-- JSON数据展示 -->
|
||
|
<div class="card">
|
||
|
<div class="card-header">
|
||
|
<i class="fas fa-database"></i>
|
||
|
<h2>JSON数据源</h2>
|
||
|
<div class="status-indicator">
|
||
|
<div class="status-dot" :class="{'connected': jsonData && !error}"></div>
|
||
|
<div class="status-text">{{ jsonData && !error ? '已连接' : '未连接' }}</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<div class="input-group">
|
||
|
<label for="jsonUrl">JSON数据URL:</label>
|
||
|
<div class="json-input">
|
||
|
<input type="text" v-model="jsonUrl" placeholder="输入JSON数据URL..." id="jsonUrl">
|
||
|
<button @click="fetchData" :disabled="loading">
|
||
|
<i class="fas fa-sync-alt" :class="{'fa-spin': loading}"></i>
|
||
|
{{ loading ? '加载中...' : '加载数据' }}
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="progress-container" v-if="loading">
|
||
|
<div class="progress-bar" :style="{ width: progress + '%' }"></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="preview-container">
|
||
|
<div class="json-preview" :class="{ 'loading': loading, 'error': error }">
|
||
|
<template v-if="error">
|
||
|
{{ error }}
|
||
|
</template>
|
||
|
<template v-else-if="jsonData">
|
||
|
{{ formattedJson }}
|
||
|
</template>
|
||
|
<template v-else-if="loading">
|
||
|
<!-- 加载中状态由CSS处理 -->
|
||
|
</template>
|
||
|
<template v-else>
|
||
|
等待加载JSON数据...
|
||
|
</template>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- 解析结果展示 -->
|
||
|
<div class="card">
|
||
|
<div class="card-header">
|
||
|
<i class="fas fa-check-circle"></i>
|
||
|
<h2>解析结果</h2>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<div class="results-container">
|
||
|
<div class="results-header">
|
||
|
<div class="stats">
|
||
|
共找到 <span>{{ checkedIds.length }}</span> 个符合条件的 frame_id
|
||
|
<span v-if="jsonData">(共解析 {{ jsonData.length }} 个对象)</span>
|
||
|
</div>
|
||
|
<button class="copy-btn" @click="copyResults">
|
||
|
<i class="fas fa-copy"></i> 复制结果
|
||
|
</button>
|
||
|
</div>
|
||
|
|
||
|
<div class="results-list">
|
||
|
<ul v-if="checkedIds.length">
|
||
|
<li v-for="(id, index) in checkedIds" :key="id">
|
||
|
<div class="item-id">frame_id: {{ id }}</div>
|
||
|
<div class="item-actions">
|
||
|
<button :title="'复制 ' + id" @click="copySingleItem(id)">
|
||
|
<i class="fas fa-copy"></i>
|
||
|
</button>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<div v-else class="empty-state">
|
||
|
<i class="fas fa-file-alt"></i>
|
||
|
<h3>未找到匹配的数据</h3>
|
||
|
<p>请加载JSON数据并确保其中包含is_check为true的对象</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<footer>
|
||
|
<p>JSON数据分析工具 © {{ currentYear }} - 基于DeepSeek风格设计</p>
|
||
|
</footer>
|
||
|
|
||
|
<div class="notification" :class="{ show: showNotification }">
|
||
|
<i class="fas fa-check-circle"></i>
|
||
|
<div>{{ notificationMessage }}</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
new Vue({
|
||
|
el: '#app',
|
||
|
data: {
|
||
|
jsonData: null,
|
||
|
checkedIds: [],
|
||
|
jsonUrl: 'http://192.168.10.14:8123/sftp/detect_log/waiguan/yolo_log.json',
|
||
|
loading: false,
|
||
|
error: null,
|
||
|
progress: 0,
|
||
|
showNotification: false,
|
||
|
notificationMessage: ''
|
||
|
},
|
||
|
computed: {
|
||
|
currentYear() {
|
||
|
return new Date().getFullYear();
|
||
|
},
|
||
|
formattedJson() {
|
||
|
if (!this.jsonData) return '';
|
||
|
return JSON.stringify(this.jsonData, null, 2);
|
||
|
}
|
||
|
},
|
||
|
mounted() {
|
||
|
// 初始加载数据
|
||
|
this.fetchData();
|
||
|
|
||
|
// 每30秒自动刷新数据
|
||
|
setInterval(() => {
|
||
|
if (this.jsonUrl) {
|
||
|
this.fetchData();
|
||
|
}
|
||
|
}, 30000);
|
||
|
},
|
||
|
methods: {
|
||
|
fetchData() {
|
||
|
this.loading = true;
|
||
|
this.error = null;
|
||
|
this.progress = 0;
|
||
|
|
||
|
// 模拟进度条
|
||
|
const progressInterval = setInterval(() => {
|
||
|
if (this.progress < 90) {
|
||
|
this.progress += 10;
|
||
|
}
|
||
|
}, 200);
|
||
|
|
||
|
axios.get(this.jsonUrl)
|
||
|
.then(response => {
|
||
|
this.jsonData = response.data;
|
||
|
this.parseData();
|
||
|
this.progress = 100;
|
||
|
this.showNotificationFunc('数据加载成功!');
|
||
|
})
|
||
|
.catch(error => {
|
||
|
console.error('Error fetching JSON:', error);
|
||
|
this.error = '无法加载数据:' + (error.message || '网络错误或URL无效');
|
||
|
this.showNotificationFunc(this.error);
|
||
|
})
|
||
|
.finally(() => {
|
||
|
this.loading = false;
|
||
|
clearInterval(progressInterval);
|
||
|
setTimeout(() => this.progress = 0, 500);
|
||
|
});
|
||
|
},
|
||
|
parseData() {
|
||
|
this.checkedIds = [];
|
||
|
if (this.jsonData && Array.isArray(this.jsonData)) {
|
||
|
this.jsonData.forEach(item => {
|
||
|
if (item.is_check === true && item.frame_id) {
|
||
|
this.checkedIds.push(item.frame_id);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
copyResults() {
|
||
|
if (this.checkedIds.length === 0) return;
|
||
|
|
||
|
const text = this.checkedIds.join(', ');
|
||
|
this.copyToClipboard(text);
|
||
|
this.showNotificationFunc('已复制所有frame_id到剪贴板');
|
||
|
},
|
||
|
copySingleItem(id) {
|
||
|
this.copyToClipboard(id);
|
||
|
this.showNotificationFunc(`已复制 frame_id: ${id}`);
|
||
|
},
|
||
|
copyToClipboard(text) {
|
||
|
const textarea = document.createElement('textarea');
|
||
|
textarea.value = text;
|
||
|
document.body.appendChild(textarea);
|
||
|
textarea.select();
|
||
|
document.execCommand('copy');
|
||
|
document.body.removeChild(textarea);
|
||
|
},
|
||
|
showNotificationFunc(message) {
|
||
|
this.notificationMessage = message;
|
||
|
this.showNotification = true;
|
||
|
setTimeout(() => {
|
||
|
this.showNotification = false;
|
||
|
}, 3000);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|