更新:js容错算法改善,增加2份Ai报表
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<script type="text/javascript" src="lib/jquery.min.js?version=3.6.0"></script>
|
<script type="text/javascript" src="lib/jquery.min.js?version=3.6.0"></script>
|
||||||
<script type="text/javascript" src="/lib/echarts/5.4.2/echarts.js"></script>
|
<script type="text/javascript" src="/lib/echarts/5.4.2/echarts.js"></script>
|
||||||
<script type="text/javascript" src="/lib/DataTables-2/datatables.min.js"></script>
|
<script type="text/javascript" src="/lib/DataTables-2/datatables.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/pubfunc.js?version=0.10"></script>
|
<script type="text/javascript" src="/js/pubfunc.js?version=0.13"></script>
|
||||||
<link href="css/style.css?version=0.7" rel="stylesheet" type="text/css">
|
<link href="css/style.css?version=0.7" rel="stylesheet" type="text/css">
|
||||||
<link href="/lib/DataTables-2/datatables.min.css" rel="stylesheet" type="text/css">
|
<link href="/lib/DataTables-2/datatables.min.css" rel="stylesheet" type="text/css">
|
||||||
<title><?=$title?></title>
|
<title><?=$title?></title>
|
||||||
|
|||||||
+13
-9
@@ -92,7 +92,7 @@ function pickData(data, dateKey, valueKey,fixed=2) {
|
|||||||
return data.map(item => ({
|
return data.map(item => ({
|
||||||
value: [
|
value: [
|
||||||
item[dateKey].slice(0, 4) + '-' + item[dateKey].slice(4, 6) + '-' + item[dateKey].slice(6, 8), // 格式化日期 yyyymmdd 转为 yyyy-mm-dd
|
item[dateKey].slice(0, 4) + '-' + item[dateKey].slice(4, 6) + '-' + item[dateKey].slice(6, 8), // 格式化日期 yyyymmdd 转为 yyyy-mm-dd
|
||||||
item[valueKey].toFixed(fixed) // 保留两位小数
|
item[valueKey] === null || item[valueKey] === undefined || item[valueKey] === '' ? '' : item[valueKey].toFixed(fixed)
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -112,9 +112,13 @@ function calculateStats(data,fixed=2) {
|
|||||||
let min = Infinity;
|
let min = Infinity;
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
let last = null;
|
let last = null;
|
||||||
|
let count = 0;
|
||||||
|
|
||||||
for (const item of data) {
|
for (const item of data) {
|
||||||
const value = parseFloat(item.value[1]); // 提取 value 数组中的第二个元素(数值部分)
|
const valueStr = item.value[1];
|
||||||
|
if (valueStr === '' || valueStr === null || valueStr === undefined) continue;
|
||||||
|
const value = parseFloat(valueStr);
|
||||||
|
if (isNaN(value)) continue;
|
||||||
|
|
||||||
if (value > max) {
|
if (value > max) {
|
||||||
max = value;
|
max = value;
|
||||||
@@ -123,15 +127,15 @@ function calculateStats(data,fixed=2) {
|
|||||||
min = value;
|
min = value;
|
||||||
}
|
}
|
||||||
sum += value;
|
sum += value;
|
||||||
last = value; // 更新最后一个值
|
last = value;
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
const avg = sum / data.length;
|
const avg = count > 0 ? sum / count : null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
max: max.toFixed(fixed),
|
max: max !== -Infinity ? max.toFixed(fixed) : null,
|
||||||
min: min.toFixed(fixed),
|
min: min !== Infinity ? min.toFixed(fixed) : null,
|
||||||
avg: avg.toFixed(fixed),
|
avg: avg !== null ? avg.toFixed(fixed) : null,
|
||||||
last: last.toFixed(fixed)
|
last: last !== null ? last.toFixed(fixed) : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,928 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>晶盛机电(300316)投资价值深度研究报告</title>
|
||||||
|
<link rel="stylesheet" href="/research/js/all.min.css">
|
||||||
|
<script src="/research/js/chart.js"></script>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--primary-color: #2c3e50;
|
||||||
|
--secondary-color: #3498db;
|
||||||
|
--accent-color: #e67e22;
|
||||||
|
--light-gray: #ecf0f1;
|
||||||
|
--dark-gray: #34495e;
|
||||||
|
--light-blue: #e8f4fd;
|
||||||
|
--white: #ffffff;
|
||||||
|
--border-radius: 8px;
|
||||||
|
--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
--transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: var(--dark-gray);
|
||||||
|
background-color: var(--light-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
color: var(--white);
|
||||||
|
padding: 1.5rem 0;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
opacity: 0.9;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
background-color: var(--white);
|
||||||
|
box-shadow: var(--box-shadow);
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0.5rem 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--primary-color);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links {
|
||||||
|
display: flex;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links li {
|
||||||
|
margin-left: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--dark-gray);
|
||||||
|
font-weight: 500;
|
||||||
|
transition: var(--transition);
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a:hover {
|
||||||
|
color: var(--secondary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 2px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
transition: var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links a:hover::after {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 2rem auto;
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-bottom: 3rem;
|
||||||
|
background-color: var(--white);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: var(--box-shadow);
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
color: var(--primary-color);
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
border-bottom: 2px solid var(--light-gray);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
color: var(--dark-gray);
|
||||||
|
margin: 1.5rem 0 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: var(--light-blue);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding: 1.5rem;
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
border-left: 4px solid var(--secondary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight {
|
||||||
|
color: var(--accent-color);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 0.75rem;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid var(--light-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
color: var(--white);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background-color: var(--light-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-container {
|
||||||
|
position: relative;
|
||||||
|
height: 400px;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
gap: 1.5rem;
|
||||||
|
margin: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-item {
|
||||||
|
background-color: var(--white);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: var(--box-shadow);
|
||||||
|
padding: 1.5rem;
|
||||||
|
transition: var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-item:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-item i {
|
||||||
|
font-size: 2rem;
|
||||||
|
color: var(--secondary-color);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-value {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--primary-color);
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-label {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--dark-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-to-top {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 2rem;
|
||||||
|
right: 2rem;
|
||||||
|
background-color: var(--secondary-color);
|
||||||
|
color: var(--white);
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration: none;
|
||||||
|
box-shadow: var(--box-shadow);
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition: var(--transition);
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-to-top.visible {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-to-top:hover {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
transform: translateY(-3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-links li {
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-container {
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表格响应式处理 */
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
table {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="header-content">
|
||||||
|
<h1>晶盛机电(300316)投资价值深度研究报告</h1>
|
||||||
|
<p class="subtitle">光伏设备龙头转型,半导体业务打开新增长极</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<div class="nav-container">
|
||||||
|
<a href="#" class="logo">晶盛机电</a>
|
||||||
|
<ul class="nav-links">
|
||||||
|
<li><a href="#investment-points">投资要点</a></li>
|
||||||
|
<li><a href="#company-overview">公司概况</a></li>
|
||||||
|
<li><a href="#financial-analysis">财务表现</a></li>
|
||||||
|
<li><a href="#market-analysis">行业分析</a></li>
|
||||||
|
<li><a href="#future展望">未来展望</a></li>
|
||||||
|
<li><a href="#investment建议">投资建议</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<section id="investment-points">
|
||||||
|
<h2>投资要点</h2>
|
||||||
|
<p>晶盛机电作为国内光伏设备龙头企业,近年来积极布局半导体设备和材料领域,形成了"先进材料、先进装备"的双轮驱动发展战略。尽管2024年受光伏行业周期性调整影响,公司业绩出现近十年首次下滑,但公司在半导体设备国产化和碳化硅材料领域的突破为长期发展奠定了坚实基础。</p>
|
||||||
|
|
||||||
|
<div class="data-grid">
|
||||||
|
<div class="data-item">
|
||||||
|
<i class="fas fa-solar-panel"></i>
|
||||||
|
<div class="data-value">50%+</div>
|
||||||
|
<div class="data-label">单晶炉设备全球市场份额</div>
|
||||||
|
</div>
|
||||||
|
<div class="data-item">
|
||||||
|
<i class="fas fa-microchip"></i>
|
||||||
|
<div class="data-value">33亿+</div>
|
||||||
|
<div class="data-label">半导体设备在手订单(含税)</div>
|
||||||
|
</div>
|
||||||
|
<div class="data-item">
|
||||||
|
<i class="fas fa-cubes"></i>
|
||||||
|
<div class="data-value">10亿+</div>
|
||||||
|
<div class="data-label">美晶新材2023年贡献利润</div>
|
||||||
|
</div>
|
||||||
|
<div class="data-item">
|
||||||
|
<i class="fas fa-chart-line"></i>
|
||||||
|
<div class="data-value">28.88%</div>
|
||||||
|
<div class="data-label">机构目标价上行空间</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>核心投资逻辑</h3>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>1. 光伏设备龙头地位稳固</strong>:在单晶炉设备领域全球市场份额超过50%,随着2025年全球光伏装机需求回升至550GW(同比+22%),下游扩产有望重启,光伏设备收入预计恢复10%-15%增长。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>2. 半导体设备国产替代加速</strong>:2025年全球半导体设备市场规模预计达到1240亿美元,同比增长13.3%,中国市场规模将达2300亿元。公司半导体设备在手订单超过33亿元(含税),随着国产替代进程加快,半导体业务有望成为新的增长引擎。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>3. 材料业务多元化布局</strong>:蓝宝石材料业务受益于Mini LED应用市场拓展,碳化硅衬底材料加速向8英寸转型,美晶新材子公司2023年贡献超10亿元利润,成为公司重要的利润增长点。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>4. 机构普遍看好未来表现</strong>:近90天内共有9家机构给出评级,买入评级7家,增持评级2家;过去90天内机构目标均价为35.7元,较当前股价(2025年7月18日收盘价27.70元)有28.88%的上行空间。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="company-overview">
|
||||||
|
<h2>公司概况与业务结构</h2>
|
||||||
|
|
||||||
|
<h3>1.1 公司发展历程与战略定位</h3>
|
||||||
|
<p>浙江晶盛机电股份有限公司成立于2006年12月14日,于2012年5月11日在深交所创业板上市(股票代码:300316)。公司专注于"先进材料、先进装备"的双轮驱动发展战略,主营业务为半导体装备、半导体衬底材料、半导体耗材及零部件的研发、生产和销售。</p>
|
||||||
|
<p>公司以材料生产及加工装备链为主线,聚焦未来工厂的产业数字大脑及智能制造基地融合,推进"产业大脑+未来工厂"建设。通过各业务系统的互联互通,公司实现了各项业务端到端一体化精细管理,提升了制造业发展质量和效益,降低了经营管理成本。</p>
|
||||||
|
|
||||||
|
<h3>1.2 主营业务构成与收入结构</h3>
|
||||||
|
<p>2024年,晶盛机电的主营业务主要分为三大板块:设备及其服务、材料和其他。其中,设备及其服务收入为133.63亿元,占总收入的76.03%,毛利率为36.36%;材料收入为33.46亿元,占总收入的19.04%,毛利率为28.71%;其他收入为8.68亿元,占总收入的4.94%,毛利率为5.00%。</p>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="revenueStructureChart"></canvas>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="financial-analysis">
|
||||||
|
<h2>最近5年财务表现分析(2020-2024)</h2>
|
||||||
|
|
||||||
|
<h3>2.1 营收与净利润表现</h3>
|
||||||
|
<p>晶盛机电近五年(2020-2024年)的营收和净利润表现如下表所示:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>年份</th>
|
||||||
|
<th>营收(亿元)</th>
|
||||||
|
<th>同比增长</th>
|
||||||
|
<th>净利润(亿元)</th>
|
||||||
|
<th>同比增长</th>
|
||||||
|
<th>毛利率</th>
|
||||||
|
<th>净利率</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>2020</td>
|
||||||
|
<td>38.11</td>
|
||||||
|
<td>22.54%</td>
|
||||||
|
<td>8.58</td>
|
||||||
|
<td>34.64%</td>
|
||||||
|
<td>36.60%</td>
|
||||||
|
<td>22.35%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2021</td>
|
||||||
|
<td>59.61</td>
|
||||||
|
<td>56.40%</td>
|
||||||
|
<td>17.12</td>
|
||||||
|
<td>99.53%</td>
|
||||||
|
<td>38.60%</td>
|
||||||
|
<td>28.72%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2022</td>
|
||||||
|
<td>106.38</td>
|
||||||
|
<td>78.46%</td>
|
||||||
|
<td>29.24</td>
|
||||||
|
<td>70.79%</td>
|
||||||
|
<td>41.65%</td>
|
||||||
|
<td>27.49%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2023</td>
|
||||||
|
<td>179.83</td>
|
||||||
|
<td>69.04%</td>
|
||||||
|
<td>45.58</td>
|
||||||
|
<td>55.85%</td>
|
||||||
|
<td>41.65%</td>
|
||||||
|
<td>25.34%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2024</td>
|
||||||
|
<td>175.77</td>
|
||||||
|
<td>-2.26%</td>
|
||||||
|
<td>25.10</td>
|
||||||
|
<td>-44.93%</td>
|
||||||
|
<td>33.35%</td>
|
||||||
|
<td>14.28%</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="revenueAndProfitChart"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>2.2 盈利能力分析</h3>
|
||||||
|
<p>晶盛机电近五年的盈利能力指标变化如下:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>年份</th>
|
||||||
|
<th>毛利率</th>
|
||||||
|
<th>同比变化</th>
|
||||||
|
<th>净利率</th>
|
||||||
|
<th>同比变化</th>
|
||||||
|
<th>净资产收益率(ROE)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>2020</td>
|
||||||
|
<td>36.60%</td>
|
||||||
|
<td>+1.05%</td>
|
||||||
|
<td>22.35%</td>
|
||||||
|
<td>+2.28%</td>
|
||||||
|
<td>17.48%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2021</td>
|
||||||
|
<td>38.60%</td>
|
||||||
|
<td>+2.00%</td>
|
||||||
|
<td>28.72%</td>
|
||||||
|
<td>+6.37%</td>
|
||||||
|
<td>26.08%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2022</td>
|
||||||
|
<td>41.65%</td>
|
||||||
|
<td>+3.05%</td>
|
||||||
|
<td>27.49%</td>
|
||||||
|
<td>-1.23%</td>
|
||||||
|
<td>30.46%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2023</td>
|
||||||
|
<td>41.65%</td>
|
||||||
|
<td>0.00%</td>
|
||||||
|
<td>25.34%</td>
|
||||||
|
<td>-2.15%</td>
|
||||||
|
<td>35.56%</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>2024</td>
|
||||||
|
<td>33.35%</td>
|
||||||
|
<td>-8.30%</td>
|
||||||
|
<td>14.28%</td>
|
||||||
|
<td>-11.06%</td>
|
||||||
|
<td>15.16%</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="profitabilityChart"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>2.3 现金流与资产结构分析</h3>
|
||||||
|
<p>2024年公司经营活动现金流净额为17.73亿元,同比下降42.57%,主要系本期销售商品、提供劳务收到的现金减少29.18亿元,收到的税费返还减少3.36亿元。不过,经营现金流与净利润的比率为70.6%,仍保持在合理水平。</p>
|
||||||
|
|
||||||
|
<p>2024年末,公司总资产为315.50亿元,同比下降14.58%;总负债为116.86亿元,资产负债率为37.02%,同比下降19.10个百分点。公司货币资金为27.87亿元,同比下降30.42%。</p>
|
||||||
|
|
||||||
|
<p>值得注意的是,2024年末公司应收账款为32.23亿元,同比上升40.78%,应收账款占利润比例已达128.4%,需关注应收账款回收情况。同时,存货规模也较大,存货周转率为0.75次,同比上升0.06次。</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="market-analysis">
|
||||||
|
<h2>行业市场前景与竞争格局分析</h2>
|
||||||
|
|
||||||
|
<h3>3.1 光伏设备行业分析</h3>
|
||||||
|
<p>近年来,在全球能源转型和碳中和目标推动下,光伏行业保持快速发展态势。根据国家能源局数据,2024年国内新增光伏装机278GW,同比增长28%;同期,全球新增光伏装机有望达到535GW左右。中国光伏行业协会预测,2025年国内新增装机预计在215-255GW,仍将维持高位水平;全球光伏装机增速预期为15%左右,其中非欧美市场增速强劲。</p>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="solarInstallChart"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>3.2 半导体设备行业分析</h3>
|
||||||
|
<p>半导体设备是芯片制造的核心基础设施,涵盖光刻机、刻蚀机、薄膜沉积设备等8大类120余种细分设备。预计2025年全球半导体设备市场规模将达到1240-1280亿美元,同比增长13.3%-17.4%,中国市场规模将达2300亿元。</p>
|
||||||
|
|
||||||
|
<div class="chart-container">
|
||||||
|
<canvas id="semiconductorMarketChart"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>3.3 材料业务市场分析</h3>
|
||||||
|
<p>晶盛机电的材料业务主要包括蓝宝石材料、碳化硅材料和石英坩埚等。蓝宝石材料业务受益于Mini LED应用市场拓展,碳化硅衬底材料加速向8英寸转型,美晶新材子公司2023年贡献超10亿元利润,成为公司重要的利润增长点。</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="future展望">
|
||||||
|
<h2>未来展望与机构评级</h2>
|
||||||
|
|
||||||
|
<h3>4.1 行业发展前景预测</h3>
|
||||||
|
<p>尽管2024年光伏行业经历了阶段性调整,但长期来看,光伏作为清洁能源的代表,在全球能源转型和碳中和目标推动下,仍将保持良好的发展前景。预计2025年全球光伏装机增速预期为15%左右,到2030年,全球光伏累计装机容量有望达到4,500GW以上。</p>
|
||||||
|
|
||||||
|
<p>半导体设备行业受益于全球晶圆厂扩产和技术升级,未来几年将保持快速增长。预计2025年全球半导体设备市场规模将达到1240-1280亿美元,到2030年,市场规模有望达到2000亿美元。</p>
|
||||||
|
|
||||||
|
<h3>4.2 公司未来发展战略</h3>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>深化"先进材料、先进装备"双轮驱动战略</strong>:公司将继续聚焦半导体产业链,持续加强研发投入和技术创新,强化技术优势。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>加速半导体设备国产化</strong>:紧抓半导体装备国产化进程加快的发展大趋势,积极推进新产品客户验证和市场推广,提升市场份额。公司半导体设备未完成的集成电路及化合物半导体装备合同超过33亿元(含税),显示出公司在半导体领域的市场拓展潜力。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>推进材料业务多元化发展</strong>:在蓝宝石材料领域,积极拓展Mini LED等新应用市场;在碳化硅材料领域,快速推进8英寸碳化硅衬底产能爬坡,积极拓展国内外客户。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>数字化转型与管理创新</strong>:以数字化创新引领发展为根本路径,大力发展新质生产力,聚焦未来工厂的产业数字大脑及智能制造基地融合,推进"产业大脑+未来工厂"建设。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>4.3 机构评级与目标价</h3>
|
||||||
|
<p>截至2025年7月,多家机构对晶盛机电进行了评级,以下是主要机构的评级及预测:</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>机构名称</th>
|
||||||
|
<th>评级</th>
|
||||||
|
<th>目标价(元)</th>
|
||||||
|
<th>预测2025年净利润(亿元)</th>
|
||||||
|
<th>预测依据</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>华泰证券</td>
|
||||||
|
<td>买入</td>
|
||||||
|
<td>36.75</td>
|
||||||
|
<td>22.95</td>
|
||||||
|
<td>减值拖累利润,加速半导体布局</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>中信证券</td>
|
||||||
|
<td>买入</td>
|
||||||
|
<td>35.00</td>
|
||||||
|
<td>21.07</td>
|
||||||
|
<td>半导体设备国产化加速</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>东吴证券</td>
|
||||||
|
<td>买入</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>20.17</td>
|
||||||
|
<td>不同板块景气度差异影响业绩</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>西部证券</td>
|
||||||
|
<td>买入</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>24.19</td>
|
||||||
|
<td>半导体设备订单增长</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>东亚前海证券</td>
|
||||||
|
<td>买入</td>
|
||||||
|
<td>-</td>
|
||||||
|
<td>74.74</td>
|
||||||
|
<td>乐观预测,考虑半导体业务突破</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3>4.4 估值分析</h3>
|
||||||
|
<p>截至2025年7月18日收盘,晶盛机电股价为27.70元,总市值为362.74亿元。当前PE为15.83倍,远低于行业平均的48.77倍,处于历史较低水平,具备较好的安全边际。根据机构预测,2025年公司目标价均值为35.88元,较当前股价有28.88%的上行空间。</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="investment建议">
|
||||||
|
<h2>投资建议与综合判断</h2>
|
||||||
|
|
||||||
|
<h3>6.1 投资建议</h3>
|
||||||
|
<p>基于对晶盛机电的财务状况、行业前景和竞争格局的综合分析,我们给出以下投资建议:</p>
|
||||||
|
|
||||||
|
<div class="card" style="background-color: #e8f4fd; border-left-color: #3498db;">
|
||||||
|
<p><strong>核心观点</strong>:晶盛机电作为光伏设备龙头企业,虽然2024年业绩出现下滑,但公司在半导体设备国产化和碳化硅材料领域的突破为长期发展奠定了坚实基础。随着光伏行业回暖,公司业绩有望逐步修复,半导体业务有望成为新的增长引擎。</p>
|
||||||
|
<p><strong>投资建议</strong>:<span class="highlight">买入</span>,目标价35.88元,较当前股价(27.70元)有28.88%的上行空间。</p>
|
||||||
|
<p><strong>投资时机</strong>:建议在当前股价基础上分批建仓,可在27元以下加大配置,长期持有,分享公司在光伏和半导体双轮驱动下的成长红利。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>6.2 综合判断</h3>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>短期业绩承压,但长期增长潜力显著</strong>:2024年公司业绩受光伏行业调整影响出现下滑,但随着2025年全球光伏装机需求回升至550GW(同比+22%),公司光伏设备业务有望恢复增长。同时,半导体设备国产替代加速和材料业务多元化布局为公司长期发展提供了新的增长点。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>行业地位稳固,竞争优势明显</strong>:在单晶炉设备领域全球市场份额超过50%,半导体设备国产化进程加速,公司在半导体设备领域的布局将为未来业绩增长提供重要支撑。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>估值处于历史低位,具备安全边际</strong>:当前PE为15.83倍,远低于行业平均的48.77倍,处于历史较低水平,具备较好的安全边际。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<p><strong>机构普遍看好,目标价上行空间大</strong>:近90天内共有9家机构给出评级,买入评级7家,增持评级2家;过去90天内机构目标均价为35.7元,较当前股价有28.88%的上行空间。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>5.1 投资风险分析</h3>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>行业周期性风险</strong>:光伏行业具有较强的周期性,受政策、产能、价格等多种因素影响。未来如果光伏行业再次出现产能过剩或政策调整,可能对公司业绩产生不利影响。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>应收账款回收风险</strong>:截至2024年末,公司应收账款为32.23亿元,同比上升40.78%,应收账款占利润比例已达128.4%。如果下游客户经营状况恶化或付款能力下降,可能导致应收账款回收风险增加。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>半导体业务进展不及预期风险</strong>:尽管公司在半导体设备领域已取得一定进展,但半导体设备国产化进程面临技术壁垒高、认证周期长等挑战。如果半导体业务进展不及预期,可能影响公司长期发展战略的实施。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>存货跌价风险</strong>:2024年,公司基于谨慎性原则,对发出商品计提存货跌价准备3.41亿元,对石英坩埚原材料等计提存货跌价准备3.49亿元。如果未来产品价格继续下跌或市场需求不及预期,可能导致存货跌价风险进一步增加。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>技术迭代风险</strong>:光伏和半导体行业技术迭代速度快,新产品、新技术不断涌现。如果公司不能及时跟进技术发展趋势,可能面临产品竞争力下降的风险。</p>
|
||||||
|
</div>
|
||||||
|
<div class="card" style="background-color: #fdecea; border-left-color: #e74c3c;">
|
||||||
|
<p><strong>国际贸易环境风险</strong>:国际贸易环境变化,如贸易壁垒、关税调整等,可能影响公司产品的出口和海外市场拓展。特别是在半导体设备领域,美国对中国的技术限制可能影响公司的技术引进和市场拓展。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="#" class="back-to-top" id="backToTop">
|
||||||
|
<i class="fas fa-arrow-up"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<footer style="background-color: var(--primary-color); color: var(--white); padding: 2rem 0; text-align: center;">
|
||||||
|
<div class="container">
|
||||||
|
<p>晶盛机电(300316)投资价值深度研究报告</p>
|
||||||
|
<p>本报告仅供参考,不构成投资建议。投资有风险,入市需谨慎。</p>
|
||||||
|
<p>© 2025 专业投资分析平台</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 营收结构图表
|
||||||
|
const revenueCtx = document.getElementById('revenueStructureChart').getContext('2d');
|
||||||
|
new Chart(revenueCtx, {
|
||||||
|
type: 'pie',
|
||||||
|
data: {
|
||||||
|
labels: ['设备及其服务', '材料', '其他'],
|
||||||
|
datasets: [{
|
||||||
|
data: [76.03, 19.04, 4.94],
|
||||||
|
backgroundColor: [
|
||||||
|
'#3498db',
|
||||||
|
'#2ecc71',
|
||||||
|
'#e74c3c'
|
||||||
|
],
|
||||||
|
borderColor: '#ffffff',
|
||||||
|
borderWidth: 2
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
plugins: {
|
||||||
|
legend: {
|
||||||
|
position: 'right',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '2024年主营业务收入占比',
|
||||||
|
font: {
|
||||||
|
size: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 营收与净利润趋势图表
|
||||||
|
const revenueProfitCtx = document.getElementById('revenueAndProfitChart').getContext('2d');
|
||||||
|
new Chart(revenueProfitCtx, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
labels: ['2020', '2021', '2022', '2023', '2024'],
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: '营收(亿元)',
|
||||||
|
data: [38.11, 59.61, 106.38, 179.83, 175.77],
|
||||||
|
backgroundColor: 'rgba(52, 152, 219, 0.2)',
|
||||||
|
borderColor: '#3498db',
|
||||||
|
borderWidth: 2,
|
||||||
|
fill: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '净利润(亿元)',
|
||||||
|
data: [8.58, 17.12, 29.24, 45.58, 25.10],
|
||||||
|
backgroundColor: 'rgba(46, 204, 113, 0.2)',
|
||||||
|
borderColor: '#2ecc71',
|
||||||
|
borderWidth: 2,
|
||||||
|
fill: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
plugins: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '2020-2024年营收与净利润趋势',
|
||||||
|
font: {
|
||||||
|
size: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
y: {
|
||||||
|
beginAtZero: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 盈利能力图表
|
||||||
|
const profitabilityCtx = document.getElementById('profitabilityChart').getContext('2d');
|
||||||
|
new Chart(profitabilityCtx, {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: ['2020', '2021', '2022', '2023', '2024'],
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: '毛利率',
|
||||||
|
data: [36.60, 38.60, 41.65, 41.65, 33.35],
|
||||||
|
backgroundColor: '#3498db'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '净利率',
|
||||||
|
data: [22.35, 28.72, 27.49, 25.34, 14.28],
|
||||||
|
backgroundColor: '#2ecc71'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
plugins: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '2020-2024年盈利能力指标',
|
||||||
|
font: {
|
||||||
|
size: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
y: {
|
||||||
|
beginAtZero: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '百分比 (%)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 光伏装机量预测图表
|
||||||
|
const solarInstallCtx = document.getElementById('solarInstallChart').getContext('2d');
|
||||||
|
new Chart(solarInstallCtx, {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: ['2024年实际', '2025年预测'],
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: '全球光伏装机量 (GW)',
|
||||||
|
data: [535, 550],
|
||||||
|
backgroundColor: '#3498db'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '中国光伏装机量 (GW)',
|
||||||
|
data: [278, 235],
|
||||||
|
backgroundColor: '#2ecc71'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
plugins: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '全球及中国光伏装机量预测',
|
||||||
|
font: {
|
||||||
|
size: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
y: {
|
||||||
|
beginAtZero: true,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '装机量 (GW)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 半导体设备市场规模图表
|
||||||
|
const semiconductorCtx = document.getElementById('semiconductorMarketChart').getContext('2d');
|
||||||
|
new Chart(semiconductorCtx, {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
labels: ['2024年', '2025年', '2030年'],
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: '全球市场规模 (亿美元)',
|
||||||
|
data: [1090, 1260, 2000],
|
||||||
|
backgroundColor: 'rgba(52, 152, 219, 0.2)',
|
||||||
|
borderColor: '#3498db',
|
||||||
|
borderWidth: 2,
|
||||||
|
fill: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '中国市场规模 (亿元)',
|
||||||
|
data: [2230, 2300, 3500],
|
||||||
|
backgroundColor: 'rgba(46, 204, 113, 0.2)',
|
||||||
|
borderColor: '#2ecc71',
|
||||||
|
borderWidth: 2,
|
||||||
|
fill: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
responsive: true,
|
||||||
|
plugins: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '全球及中国半导体设备市场规模预测',
|
||||||
|
font: {
|
||||||
|
size: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
y: {
|
||||||
|
beginAtZero: false,
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: '市场规模'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 平滑滚动
|
||||||
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||||
|
anchor.addEventListener('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
document.querySelector(this.getAttribute('href')).scrollIntoView({
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 返回顶部按钮
|
||||||
|
const backToTopButton = document.getElementById('backToTop');
|
||||||
|
|
||||||
|
window.addEventListener('scroll', () => {
|
||||||
|
if (window.pageYOffset > 300) {
|
||||||
|
backToTopButton.classList.add('visible');
|
||||||
|
} else {
|
||||||
|
backToTopButton.classList.remove('visible');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
backToTopButton.addEventListener('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
window.scrollTo({
|
||||||
|
top: 0,
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Vendored
+9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user