本WIKI编辑权限开放,正由 恋与深空Evol攻略组搭建基础框架ing,期待更多猎人加入WIKI建设!
反馈留言收藏方法加入我们

全站通知:

Widget:属性计算器

来自恋与深空WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

<script type="text/javascript"

   src="https://wiki.biligame.com/ys/MediaWiki:vue3-global.js?action=raw&ctype=text/javascript"></script>

<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <style>

   #attrCalcation {
       position: relative;
       padding: 0 10px 10px 10px;
       font-size: 20px;
       color: #322d32;
   }
   /* Safari 7.1+ */
   @media not all and (min-resolution: .001dpcm) {
       .text-center-safari {
           text-align: center;
       }
       .card-color {
           position: absolute;
           left: 2.8px;
           top: -30px;
       }
       .card-pos {
           position: absolute;
           left: 2px;
           bottom: -30px;
       }
       select {
           padding-left: 30px;
       }
       .select-custom-table {
           padding-left: 0;
       }
   }


   /* 媒体查询:在小屏幕设备上缩放 */
   @media (max-width: 768px) {
       #attrCalcation {
           transform: scale(0.6);
           background-size: cover;
           transform-origin: top left;
           width: 185%;
           margin-left: auto;
       }
       .core-box,
       .memory-box {
           width: 100%;
       }
       .tab-container {
           transform: scale(0.6);
           transform-origin: center;
           margin-bottom: -24px;
       }
       .divider-main {
           transform: scale(0.8);
       }
       .row-col {
           margin-left: -20px;
       }
   }
   .gradient-line {
       width: calc(100% - 20px);
       /* 自动匹配宽度 */
       height: 3px;
       background: linear-gradient(to right, transparent, #A8A9B0, transparent);
       /* 两端渐变效果 */
       margin: 0;
   }
   .tab-container {
       position: relative;
   }
   .memory-box {
       background: linear-gradient(150deg, rgba(255, 247, 245, 0.8) 0%, rgba(245, 245, 245, 0.4) 22%, rgba(255, 247, 245, 0.7) 100%);
       box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), -3px -3px 10px rgba(255, 255, 255, 0.1);
       /* 添加凸起效果的阴影 */
       border-radius: 5px;
       position: relative;
       margin-bottom: 10px;
       margin-top: 10px;
       width: 100%;
       padding: 10px;
   }
   .memory-box img {
       width: 100%;
       height: 100%;
   }
   .core-box {
       /* background-image: url('https://patchwiki.biligame.com/images/lysk/b/b9/c0jiev3641quav9mhmhmpum5kyoxnid.png');*/
       background-position-x: 10%;
       background-position-y: 10%;
       background-repeat: no-repeat;
       background-size: cover;
       background: linear-gradient(150deg, rgba(250, 247, 245, 0.8) 0%, rgba(245, 245, 245, 0.4) 80%, rgba(251, 247, 245, 0.8) 100%);
       box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), -3px -3px 10px rgba(255, 255, 255, 0.1);
       /* 添加凸起效果的阴影 */
       border-radius: 5px;
       position: relative;
       margin-bottom: 10px;
       padding: 10px 20px 10px 20px;
       width: 100%;
   }
   .black-care .flex-row-c {
       white-space: nowrap;
   }
   .memory-input {
       display: flex;
       margin-left: 10px;
   }
   .button-box {
       position: relative;
       width: 60px;
       cursor: pointer;
   }
   .button-box img {
       width: 100%;
       display: block;
       margin-bottom: -10px;
   }
   .button-box .overlay-text {
       position: absolute;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%);
       color: #6f6e74;
       pointer-events: none;
   }
   td {
       margin-left: 10px;
       vertical-align: top;
       /* 垂直方向顶头 */
   }
   input {
       border: 0;
       border-radius: 5px;
       max-width: 100px;
   }
   .level-input {
       text-align: center;
       width: 60px;
       height: 25px;
       padding-top: 0;
       padding-bottom: 0;
       font-size: 18px;
       color: white;
       background: url('https://patchwiki.biligame.com/images/lysk/9/9f/4iicl3uii5shqgbplombryaw02r1w4f.png');
       background-position: center;
       background-size: contain;
       background-repeat: no-repeat;
       border: none;
   }
   select {
       margin: 0;
       height: 100%;
       position: relative;
       /*background-color: #00000033;*/
       background-color: transparent;
       border-radius: 20px;
       border: 1.5px solid #322d32;
       font-size: 18px;
       color: #322d32;
       text-align: center;
       vertical-align: middle;
   }
   .flex-container {
       display: flex;
       align-items: center;
       gap: 5px;
   }
   .core-box td span {
       display: block;
       /* 使每个span占据一整行 */
       white-space: nowrap;
   }
   .core-header {
       background-image: url('https://patchwiki.biligame.com/images/lysk/3/39/hv3uusv633k4cjyxufi125jzmp7pfmu.png');
       background-size: cover;
       background-repeat: no-repeat;
       border: none;
       color: #322d32;
       /* 文本颜色 */
       padding: 0 20px;
       text-align: center;
       text-decoration: none;
       display: inline-block;
       font-size: 20;
       /* 字体大小 */
       margin: 4px 2px;
       transition: all 0.3s;
       /* 平滑过渡效果 */
   }
   .level-input-container {
       position: relative;
       display: inline-block;
       /* 保持元素在行内显示,避免换行 */
       width: 60px;
       margin-bottom: -15px;
   }
   .level-input-container img {
       width: 100%;
       height: auto;
       /* 保持图片的原始宽高比 */
       display: block;
       /* 避免底部出现空白 */
   }
   .overlay-core {
       position: absolute;
       top: -15%;
       left: 0;
       width: 100%;
       height: 100%;
       display: flex;
       align-items: center;
       justify-content: center;
       color: #6f6e74;
       /* 文字颜色 */
       pointer-events: none;
   }
   .core-input {
       margin-top: 10px;
       width: 100px;


   }
   .left-align {
       text-align: left;
       margin-left: 10px;
   }
   .memory-image {
       width: 100px;
       height: 100px;
       object-fit: cover;
       display: block;
       margin: auto;
   }
   .image-button-cell {
       width: 100px;
       height: 100px;
       vertical-align: middle;
   }
   .memory-box td {
       padding: 5px;
       text-align: left;
       vertical-align: middle;
       white-space: nowrap;
   }
   .filter-box {
       background-color: rgb(217, 216, 221);
       max-height: 600px;
       overflow-y: auto;
       border-radius: 10px;
       text-align: center;
       overflow-x: auto;
       width: 100%;
       padding: 5px 20px 20px 20px;
       margin-top: 10px;
   }
   .filter-box table {
       margin: 10px;
       width: calc(100% - 20px);
   }
   /* 确保每行最多显示五个图片 */
   .filter-box tr {
       display: flex;
       /*flex-wrap: wrap;*/
       justify-content: start;
   }
   .divider {
       height: 2px;
       background-color: #8D8F9B;
       width: 100%;
       margin-left: 20px;
       margin-top: 0;
   }
   .content-container {
       display: flex;
       flex-direction: column;
       /* 垂直堆叠 */
   }
   .header-container {
       display: flex;
       align-items: center;
       /* 垂直居中对齐 */
       width: 100%;
       font-size: 22px;
       white-space: nowrap;
       color: #322d32;
   }
   .header-container img {
       height: 20px;
       width: 20px;
       background-size: cover;
       margin-top: -4px;
       margin-left: 4px;
       margin-right: 10px;
   }
   .select-wrapper {
       position: relative;
       /* 设置相对定位 */
       display: inline-block;
   }
   .select-custom {
       -webkit-appearance: none;
       -moz-appearance: none;
       appearance: none;
       padding-right: 20px;
       width: 80%;
       cursor: pointer;
       font-size: 20px;
   }
   .select-custom-table {
       -webkit-appearance: none;
       /* 移除默认下拉箭头 */
       -moz-appearance: none;
       appearance: none;
       padding-right: 18px;
       width: 100%;
       /* 保证`select`填充整个容器 */
       cursor: pointer;
       font-size: 18px;
       border: none;
       height: 100%;
       box-sizing: border-box;
       border: none;
   }
   .select-arrow {
       position: absolute;
       top: 0;
       left: 95px;
       ;
       width: 20px;
       height: 100%;
       background: url('https://patchwiki.biligame.com/images/lysk/7/70/6xkyttrb1tculuaxrcf5h4v9k6id9dh.png') no-repeat center center;
       /* 设置背景图像 */
       pointer-events: none;
   }
   .select-arrow-table {
       position: absolute;
       top: 2px;
       /* 定位到容器顶部 */
       left: 70px;
       ;
       /* 定位到容器右边 */
       width: 20px;
       /* 箭头宽度 */
       height: 100%;
       /* 和`select`一样高 */
       background: url('https://patchwiki.biligame.com/images/lysk/f/f8/eoe3ucajuzdm371hdx9zot7fgpynzav.png') no-repeat center center;
       /* 设置背景图像 */
       pointer-events: none;
   }
   .select-arrow-long {
       position: absolute;
       top: 5px;
       left: 120px;
       ;
       width: 20px;
       height: 100%;
       background: url('https://patchwiki.biligame.com/images/lysk/7/70/6xkyttrb1tculuaxrcf5h4v9k6id9dh.png') no-repeat center center;
       /* 设置背景图像 */
       pointer-events: none;
   }
   .select-arrow-short {
       position: absolute;
       top: 1px;
       left: 50px;
       ;
       width: 20px;
       height: 100%;
       background: url('https://patchwiki.biligame.com/images/lysk/7/70/6xkyttrb1tculuaxrcf5h4v9k6id9dh.png') no-repeat center center;
       /* 设置背景图像 */
       pointer-events: none;
   }
   /* 用于定位和大小控制 */
   .checkbox-container {
       position: relative;
       display: inline-block;
       width: 20px;
       /* 图片大小 */
       height: 20px;
   }
   /* checkbox,透明度设置为0 */
   .custom-checkbox {
       opacity: 0;
       position: absolute;
       z-index: -1;
       /* 确保标签在前面 */
   }
   .checkbox-label {
       background-image: url('https://patchwiki.biligame.com/images/lysk/4/48/hnop2x6b0ea3491iw4mw74vquvhtw6f.png');
       /* 默认未选中的图片 */
       display: inline-block;
       width: 100%;
       height: 100%;
       cursor: pointer;
       /* 模仿原生控件的光标效果 */
       background-size: cover;
       /* 确保图片覆盖整个容器 */
       margin-bottom: -2px;
   }
   /* 当 checkbox 被选中时,改变背景图 */
   .custom-checkbox:checked+.checkbox-label {
       background-image: url('https://patchwiki.biligame.com/images/lysk/e/ea/b5u53pd974g2vwcotl63tnrb570pszb.png');
       /* 选中的图片 */
   }
   .underline {
       content: ;
       background-color: #ACADB4;
       height: 2px;
       margin-top: -12px;
   }
   .underline td {
       text-align: center;
   }
   .filter-box table {
       border-collapse: separate;
       /* 用于在td之间添加间隔 */
       border-spacing: 0;
       /* 移除默认的间距 */
       min-width: 600px;
   }
   .rightline {
       position: relative;
       /* 确保 td 内部可以绝对定位元素 */
   }
   .rightline td {
       margin-left: 0;
   }
   .image-cell {
       position: relative;
   }
   .image-container {
       position: relative;
       width: 100px;
       height: 100px;
   }
   .image-mask {
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       background-image: url('https://patchwiki.biligame.com/images/lysk/a/af/1y385o0ewqa50kfvwaavo5k252zte6x.png');
       background-size: cover;
       background-repeat: no-repeat;
       pointer-events: none;
       width: 100px;
       height: 100px;
   }
   .filter-box .selected {
       background-image: url('https://patchwiki.biligame.com/images/lysk/4/43/3o2qqv407gi0m1y3b8hg8ev4sia9ovf.png');
       color: white;
       /* 选中状态的文本颜色 */
       background-repeat: no-repeat;
       background-position: center 5px;
   }
   .selected-chart {
       background-image: url('https://patchwiki.biligame.com/images/lysk/6/64/2utgdc9ducahv2dzpa89tzawbij9xpw.png');
       background-size: contain;
       background-position: center;
       background-repeat: no-repeat;
       color: white;
   }
   .selected-chart::after {
       position: absolute;
       border-right: transparent;
   }
   .filter-overlay {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background-color: rgba(0, 0, 0, 0.5);
       /* 半透明黑色背景 */
       z-index: 100;
       /* 确保覆盖层在表格之上 */
   }
   .filter-box {
       position: relative;
       z-index: 101;
       /* 确保表格在覆盖层之上 */
   }
   .chart-icon {
       vertical-align: middle;
       height: 50%;
       width: auto;
   }


   .no-border {
       border: none;
   }


   table input {
       background-color: transparent;
   }
   /* 移除select元素的默认聚焦轮廓 */
   select:focus {
       outline: none;
   }
   select:focus {
       box-shadow: none;
   }
   /* 隐藏 Chrome, Safari, Edge, IE 的箭头 */
   input[type="number"]::-webkit-inner-spin-button,
   input[type="number"]::-webkit-outer-spin-button {
       -webkit-appearance: none;
       margin: 0;
   }
   input[type="number"] {
       -moz-appearance: textfield;
   }
   .number-input {
       display: flex;
       align-items: center;
   }
   .number-input input[type="number"] {
       /* 输入框样式 */
       border: 1px solid #ccc;
       padding: 8px;
       text-align: center;
       width: 80px;
   }
   input:focus {
       outline: none;
       box-shadow: none;
   }
   .content-container {
       /*background-image: url('https://patchwiki.biligame.com/images/lysk/b/b9/c0jiev3641quav9mhmhmpum5kyoxnid.png');*/
       background-position-x: 10%;
       background-repeat: no-repeat;
       background-size: cover;
       border-radius: 5px;
       background: linear-gradient(150deg, rgba(255, 247, 245, 0.7) 0%, rgba(250, 245, 245, 0.5) 60%, rgba(253, 247, 245, 0.8) 100%);
       box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), -3px -3px 10px rgba(255, 255, 255, 0.1);
       /* 添加凸起效果的阴影 */
       position: relative;
       margin-bottom: 10px;
       margin-top: 10px;
       padding: 10px 20px 10px 20px;
       width: 100%;
   }
   .team-container {
       padding: 0;
       margin: 10px 20px 10px 20px;
   }
   .last-container {
       background-position-x: 10%;
       background-repeat: no-repeat;
       background-size: cover;
       border-radius: 5px;
       background: linear-gradient(150deg, rgba(255, 247, 245, 0.6) 20%, rgba(250, 245, 245, 0.4) 80%, rgba(250, 247, 245, 0.7) 100%);
       box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), -3px -3px 10px rgba(255, 255, 255, 0.1);
       /* 添加凸起效果的阴影 */
       position: relative;
       margin-bottom: 10px;
       margin-top: 10px;
       padding: 10px 0 10px 0;
       width: 100%;
   }
   .team-Ties {
       background-image: url('https://patchwiki.biligame.com/images/lysk/6/6f/4m9m4ec0yfjvgs5s8jc38xishpwkhlq.png');
       background-repeat: no-repeat;
       background-size: fill;
   }
   .divider-main {
       background: linear-gradient(to right, transparent, #737684, transparent);
       /* 两端渐变效果 */
       width: 100%;
       height: 3px;
       margin-top: 8px;
   }


   .border-box {
       display: inline-block;
       position: relative;
   }
   .tab {
       display: flex;
       flex-wrap: nowrap;
       justify-content: center;
       margin-right: 50px;
   }
   .image-wrapper {
       width: 100px;
       height: 100px;
       display: flex;
       justify-content: center;
       align-items: center;
       position: relative;
   }
   .image-wrapper::after {
       content: "";
       position: absolute;
       left: 0;
       right: 0;
       bottom: -11px;
       height: 2px;
       background-color: transparent;
       display: block;
   }
   img {
       max-width: 100%;
       max-height: 100%;
       object-fit: contain;
       object-position: center;
       flex-shrink: 0;
   }
   /* 激活状态下的分割线颜色改变 */
   .active-tab::after {
       height: 3.5px;
       background-color: #EFD9BF;
       box-shadow: 0 2px 5px rgba(100, 101, 118, 0.8);
   }
   .mask-tab {
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background-size: cover;
       background-repeat: no-repeat;
   }
   .image-button-cell {
       vertical-align: middle;
       text-align: center;
   }
   .image-container {
       align-items: center;
       height: 90px;
       width: 90px;
       position: relative;
       justify-content: center;
   }
   .text-container {
       margin: 0 40px 0 20px;
   }
   .no-interaction .select-custom {
       pointer-events: none;
       /* 禁用用户交互 */
       cursor: not-allowed;
       /* 光标变为禁止符号 */
       background-color: inherit;
       color: inherit;
       width: 130px;
       height: 35px;
   }
   .select-custom-disable {
       width: 130px;
       height: 35px;
   }
   .no-interaction {
       cursor: not-allowed;
   }
   .filter-box {
       text-align: center;
   }
   .filter-row {
       display: flex;
       justify-content: space-between;
       flex-wrap: nowrap;
       margin-bottom: 10px;
       font-size: 20px;
       color: #322d32;
   }
   .filter-item {
       position: relative;
       flex: 1;
       cursor: pointer;
       padding: 5px;
       text-align: center;
       white-space: nowrap;
       /* 禁止换行 */
       margin-top: 8px;
   }
   .chart-item {
       display: flex;
       align-items: center;
       justify-content: center;
   }
   .chart-icon {
       margin-right: 3px;
       width: 18px;
       height: 18px;
   }
   .image-grid {
       display: grid;
       grid-template-columns: repeat(5, 1fr);
       /* 每行五个图片 */
       gap: 10px;
       /* 图片之间的间隔 */
       justify-items: center;
       /* 水平居中 */
   }
   .filter-container {
       position: relative;
       width: 100px;
       height: fit-content;
   }
   .memory-image {
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       object-fit: cover;
       /* 确保图片覆盖整个容器 */
   }
   .rightline::after {
       content: ;
       position: absolute;
       right: 0;
       top: 50%;
       transform: translateY(-50%);
       width: 1px;
       height: 55%;
       background-color: #AEAFB6;
   }
   .rightline.selected-chart::after {
       background-color: transparent;
   }
   .text-container {
       display: flex;
       justify-content: space-between;
   }
   .panel-table-left {
       flex: 1;
       line-height: 1.8;
   }
   .panel-table-right {
       flex: 1;
       margin: 0 10px 0 10px;
       line-height: 1.8;
   }
   .slide-fade-enter-active,
   .slide-fade-leave-active {
       transition: all 0.5s ease;
   }
   .slide-fade-enter,
   .slide-fade-leave-to
   /* .slide-fade-leave-active in <2.1.8 */
       {
       transform: translateY(-10px);
       opacity: 0;
   }
   .chart-content {
       display: flex;
       align-items: center;
       /* 垂直居中 */
       justify-content: center;
       /* 水平居中 */
   }
   .fade-slide-enter-active,
   .fade-slide-leave-active {
       transition: opacity 0.5s, transform 0.8s;
   }
   .fade-slide-enter,
   .fade-slide-leave-to {
       opacity: 0;
       transform: translateY(20px);
   }


   .chart-icon {
       margin-right: 5px;
       /* 根据需要调整间距 */
   }
   .chart-text {
       display: inline-block;
   }


   .value-cell td span {
       display: inline-block;
       align-items: center;
       white-space: nowrap;
   }
   .value-cell td {
       text-align: center;
   }
   .value-cell input[type="number"] {
       text-align: center;
   }
   .value-cell input {
       text-align: center;
       max-width: 90px;
   }
   .core-box {
       position: relative;
   }
   .modal-overlay {
       position: absolute;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background-color: rgba(0, 0, 0, 0.5);
       display: flex;
       justify-content: center;
       align-items: center;
       z-index: 1000;
   }
   .modal-core {
       background: whitesmoke;
       /* 模态框背景色 */
       padding: 20px;
       border-radius: 8px;
       text-align: center;
       box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
       transition: all 0.3s ease-in-out;
   }
   .modal-core button {
       margin-top: 20px;
       border-radius: 8px;
       /* 圆角 */
       border: none;
       /* 无边框 */
       background-color: rgb(228, 228, 232);
       /* 背景色 */
       padding: 5px 20px;
       box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
       /* 阴影 */
       transition: background-color 0.3s;
       /* 背景色过渡 */
       cursor: pointer;
       font-size: 18px;
   }
   .modal-core button:hover,
   .modal-core button:focus {
       background-color: rgb(152, 154, 159);
       /* 鼠标聚焦变深 */
       outline: none;
       /* 去除默认的聚焦边框 */
   }
   .memory-name {
       position: absolute;
       bottom: 0;
       left: 50%;
       transform: translateX(-50%);
       background-color: rgba(0, 0, 0, 0.5);
       /* Optional background for better readability */
       color: white;
       font-size: 18px;
       padding: 5px;
       text-align: center;
       width: 100%;
       /* Ensure text does not overflow the container */
       box-sizing: border-box;
       /* Ensure padding is included in the width */
   }
   .core-container {
       display: flex;
       align-items: flex-start;
   }
   .column {
       margin-left: 5px;
   }
   .column:last-child {
       margin-right: 0;
   }
   /* 模态框动画 */
   .modal-fade-zoom-enter-active,
   .modal-fade-zoom-leave-active {
       transition: opacity 0.3s, transform 0.3s;
   }
   .modal-fade-zoom-enter,
   .modal-fade-zoom-leave-to {
       opacity: 0;
       transform: scale(0.9);
   }
   .tooltip {
       position: absolute;
       background-color: #333;
       color: #fff;
       padding: 5px;
       border-radius: 3px;
       font-size: 14px;
       visibility: hidden;
       opacity: 0;
       white-space: nowrap;
       transition: opacity 0.3s;
       top: -40px;
       left: 50%;
       transform: translateX(-50%);
       z-index: 1000;
   }
   .tooltip.visible {
       visibility: visible;
       opacity: 1;
   }
   .tooltip::after {
       content: ;
       position: absolute;
       bottom: -10px;
       left: 50%;
       transform: translateX(-50%);
       border-width: 5px;
       border-style: solid;
       border-color: #333 transparent transparent transparent;
   }
   .divsort {
       position: relative;
       width: 100px;
       height: fit-content;
   }
   .card-color {
       position: absolute;
       left: 2.8px;
       top: 2.8px;
   }
   .card-pos {
       position: absolute;
       left: 2px;
       bottom: 5px;
   }
   .stars {
       position: absolute;
       right: 0;
       bottom: 5px;
   }
   .card-stars5 img {
       width: 47px;
       height: auto;
   }
   .card-stars4 img {
       width: 39px;
       height: auto;
   }
   .card-stars3 img {
       width: 28px;
       height: auto;
   }
   .card-name {
       text-align: center;
   }
   .card-name:hover {
       font-weight: bold;
   }
   .card-fg {
       position: absolute;
       top: -2px;
       left: 0px;
   }
   .card-img img {
       border-radius: 0px !important;
   }
   .card-fg img {
       border-radius: 0px !important;
       border-top: 2px solid white;
       border-bottom: 2px solid white;
       width: 100px;
       height: auto;
   }
   .card-fg img:hover {
       border-top: 2px solid #e0bb8f;
       border-bottom: 2px solid #e0bb8f;
   }
   .tool-btn-box {
       position: absolute;
       display: flex;
       gap: 20px;
       right: 30px;
       bottom: 20px;
   }
   .tool-btn-box>.btn {
       width: 36px;
       height: 36px;
       background: #eeeeee;
       border-radius: 50%;
       box-shadow: 0 0 7px #8a7e86;
   }
   .tool-btn-box>.btn:hover {
       box-shadow: 0 0 7px #acadb4;
   }
   .tool-btn-box>.btn>img {
       width: 20px;
       height: 20px;
       margin-top: 6px;
       margin-left: 8px;
   }
   .tool-btn-box>.btn:first-child>img {
       width: 22px;
       height: 23px;
   }
   .table-container {
       position: relative;
       width: 100%;
   }
   .table-wrapper {
       display: flex;
   }
   .fixed-table {
       width: 100%;
       border-collapse: collapse;
   }
   .fixed-table th,
   .fixed-table td {
       padding: 8px;
       white-space: nowrap;
   }
   .fixed-column {
       position: sticky;
       left: 0;
       z-index: 1;
   }
   .table-wrapper::-webkit-scrollbar {
       height: 8px;
   }
   .table-wrapper::-webkit-scrollbar-thumb {
       background-color: #c1c1c1;
       border-radius: 10px;
   }
   .table-wrapper::-webkit-scrollbar-thumb:hover {
       background-color: #a8a8a8;
   }
   .column {
       white-space: nowrap;
   }
   .message-box {
       position: absolute;
       /* 设置绝对定位 */
       top: 30%;
       left: 45%;
       transform: translateX(-50%);
       background-image: url('https://assets.papegames.com/nikkiweb/deepspace/deepspacecn/_next/static/media/upload-bg.ea0d2646.png');
       background-repeat: no-repeat;
       padding: 10px;
       background-size: cover;
       color: white;
       font-size: 22px;
       line-height: 2;
       letter-spacing: .3rem;
       padding: 10px 20px;
       z-index: 1000;
       font-weight: bold;
       /* 添加字体加粗 */
   }


   @supports (-webkit-backdrop-filter: none) {
       /* Safari 特定样式 */
       .image-container .card-color {
           position: absolute;
           left: 2.8px;
           top: -30px;
       }
       .image-container .card-pos {
           position: absolute;
           left: 2px;
           bottom: -30px;
       }
       select {
           padding-left: 30px;
       }
       .select-custom-table {
           padding: 0px;
       }
   }

</style>

               <img :src="tab.backgroundImage" alt="Tab Image"
                   :style="{ width: tab.imageSize + 'px', height: tab.imageSize + 'px', cursor: 'pointer' }">
                                       <img :src="currentTabData.selectedMemoryImage" alt="Selected Memory Image"
                                           class="image-button" @click="toggleFilterTable"
                                           style="width:90px; height: 90px; vertical-align: middle;" />
                                       模板:CurrentTabData.memoryModule.name
                                       
                                           <input id="customCheckbox" class="custom-checkbox"
                                               v-model="currentTabData.memoryModule.awakend" type="checkbox"
                                               :disabled="!isLevelMultipleOfTen"
                                               @change="roleSet(currentTabData.memoryModule)" />
                                           <label for="customCheckbox" class="checkbox-label"></label>
                                            觉醒 
                                            突破 
                                       
                                   
                                       Lv
                                       <input class="level-input" v-model="currentTabData.memoryModule.level"
                                           type="number" @change="roleSet(currentTabData.memoryModule)"
                                           @blur="checkMemoryLevel" min="1" max="80" />
                                           <img @click="setMaxMem(currentTabData.memoryModule)"
                                               src="https://patchwiki.biligame.com/images/lysk/c/c1/bwmlywfwfzqerfpbd4yw7kvlpj2e3rr.png"
                                               alt="Set Max" style="width: 60px; cursor: pointer" />
Max
                                       进阶
                                       
                                           <select style="width: 80px;height: 30px;line-height: 20px;"
                                               class="role-input select-custom"
                                               v-model="currentTabData.memoryModule.advancement"
                                               @change="roleSet(currentTabData.memoryModule)">
                                               <option v-for="step in steps" :value="step">模板:Step</option>
                                           </select>
                                       
                                   
                   <transition name="slide-fade">
                                   全部
                                   
                                           <img :src="chartIcons[index]" alt="Chart Icon" class="chart-icon">
                                           模板:Chart
                                   
                   </transition>
                       <transition name="modal-fade-zoom">
                       </transition>
                                   <select class="select-custom select-custom-disable role-input"
                                       :style="{ backgroundImage: 'url(' + currentTabData.coreIconUrl + ')', backgroundRepeat: 'no-repeat', backgroundPosition: 'left 5px center', paddingLeft: '35px', backgroundSize: '30px 30px' }"
                                       v-model="currentTabData.coreModule.selected"
                                       @change="coreSet(currentTabData.coreModule)">
                                       <option style="font-size: 20px; color: #545257;" v-for="select in selects"
:value="select">
  • {{{3}}}
  • </option> </select>
                                       Lv
                                       <input class="level-input" v-model="currentTabData.coreModule.level" type="number"
                                           @blur="checkCoreLevel(currentTabData.coreModule)" max="15" min="0" />
    
                                           <img @click="setMaxCore(currentTabData.coreModule)"
                                               src="https://patchwiki.biligame.com/images/lysk/c/c1/bwmlywfwfzqerfpbd4yw7kvlpj2e3rr.png"
                                               alt="Set Max" style="width: 60px; cursor: pointer" />
    
    Max
                                       
    

    副属性取值类型:

                                       
                                           <select class="core-input select-custom" style="width: 150px;"
                                               v-model="currentTabData.coreModule.coreoption"
                                               @change="coreSet(currentTabData.coreModule)">
                                               <option v-for="coreoption in coreoptions" :value="coreoption">模板:Coreoption</option>
                                           </select>
    
                                   <transition name="fade-slide">
    
    <thead> </thead> <tbody> <template v-if="currentTabData.coreModule.attributes.primary && Object.keys(currentTabData.coreModule.attributes.primary).length"> </template> <template v-if="currentTabData.coreModule.attributes.secondary && Object.keys(currentTabData.coreModule.attributes.secondary).length"> </template> </tbody>
    属性类型 属性词条 初始值 提升值/次 成长次数 汇总
    主属性 模板:Key 模板:Value.初始值 模板:Value.每次提升值 模板:CurrentTabData.coreModule.level
                                                           
                                                               {{ calculateAndFormat(key,value.初始值, value.每次提升值,
                                                               currentTabData.coreModule.level) }}
                                                           
    
    副属性模板:Index
                                                           
                                                               <select class="select-custom-table"
                                                                   v-model="currentTabData.selectedSecondaryOptions[index]"
                                                                   @change="validateSelections(index)"
                                                                   :ref="'select'+ this.currentTabIndex + '-' + index"
                                                                   class="no-border">
                                                                   <option
                                                                       v-for="(value, key) in currentTabData.coreModule.attributes.secondary"
                                                                       :key="key" :value="key">
                                                                       模板:Key
                                                                   </option>
                                                                   <option v-if="index > 2" value=""></option>
                                                               </select>
    
    不能选择重复的副属性,请选择其他选项。
                                                           
    
                                                           
                                                               <input
                                                                   v-model="currentTabData.coreModule.attributes.secondary[currentTabData.selectedSecondaryOptions[index]].初始值"
                                                                   :placeholder="getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'initial').min + 
                                                                       getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'initial').suffix + 
                                                                       ' - ' + getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'initial').max +
                                                                       getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'initial').suffix"
                                                                   @change="validateAndSetCustom(currentTabData.coreModule, currentTabData.selectedSecondaryOptions[index], 'initial', $event)">
                                                               %
                                                           
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule.attributes.secondary[currentTabData.selectedSecondaryOptions[index]].初始值,currentTabData.selectedSecondaryOptions[index])}}
    
                                                           
    
                                                           0
    
                                                           
                                                               <input
                                                                   v-model="currentTabData.coreModule.attributes.secondary[currentTabData.selectedSecondaryOptions[index]].每次提升值"
                                                                   :placeholder="getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'growth').min + 
                                                                       getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'growth').suffix + 
                                                                       ' - ' + getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'growth').max +
                                                                       getAttributeRange(currentTabData.coreModule.selected, currentTabData.selectedSecondaryOptions[index],'growth').suffix "
                                                                   @change="validateAndSetCustom(currentTabData.coreModule, currentTabData.selectedSecondaryOptions[index], 'growth', $event)">
                                                               %
                                                           
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule.attributes.secondary[currentTabData.selectedSecondaryOptions[index]].每次提升值,currentTabData.selectedSecondaryOptions[index])
                                                               }}
    
                                                           
    
                                                           0
    
                                                           <input v-if="currentTabData.selectedSecondaryOptions[index]"
                                                               type="number" :value="currentTabData.growthCount[index]"
                                                               min="0"
                                                               @blur="updateGrowthCount(index, $event.target.value)">
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{ totalValues(currentTabData.coreModule,
                                                               currentTabData.selectedSecondaryOptions,
                                                               currentTabData.growthCount)[index] }}
    
                                                           
    
                                   </transition>
    
                           <transition name="modal-fade-zoom">
    
                           </transition>
    
                                       <select class="select-custom select-custom-disable role-input"
                                           :style="{ backgroundImage: 'url(' + currentTabData.coreIconUrl1 + ')', backgroundRepeat: 'no-repeat', backgroundPosition: 'left 5px center', paddingLeft: '35px', backgroundSize: '30px 30px' }"
                                           v-model="currentTabData.coreModule1.selected"
                                           @change="coreSet(currentTabData.coreModule1)">
                                           <option style="font-size: 20px; color: #545257;" v-for="select in selects"
    
    :value="select">
  • {{{3}}}
  • </option> </select>
                                       Lv
                                       <input class="level-input" v-model="currentTabData.coreModule1.level" type="number"
                                           @blur="checkCoreLevel(currentTabData.coreModule1)" max="15" min="0" />
    
                                           <img @click="setMaxCore(currentTabData.coreModule1)"
                                               src="https://patchwiki.biligame.com/images/lysk/c/c1/bwmlywfwfzqerfpbd4yw7kvlpj2e3rr.png"
                                               alt="Set Max" style="width: 60px; cursor: pointer" />
    
    Max
                                       
    

    副属性取值类型:

                                       
                                           <select class="core-input select-custom" style="width: 150px;"
                                               v-model="currentTabData.coreModule1.coreoption"
                                               @change="coreSet(currentTabData.coreModule1)">
                                               <option v-for="coreoption in coreoptions" :value="coreoption">模板:Coreoption</option>
                                           </select>
    
                                   <transition name="fade-slide">
    
    <thead> </thead> <tbody> <template v-if="currentTabData.coreModule1.attributes.primary && Object.keys(currentTabData.coreModule1.attributes.primary).length"> </template> <template v-if="currentTabData.coreModule1.attributes.secondary && Object.keys(currentTabData.coreModule1.attributes.secondary).length"> </template> </tbody>
    属性类型 属性词条 初始值 提升值/次 成长次数 汇总
    主属性
                                                           
                                                               <select class="select-custom-table"
                                                                   v-model="currentTabData.selectedPrimaryAttribute">
                                                                   <option
                                                                       v-for="(value, key) in currentTabData.coreModule1.attributes.primary"
                                                                       :key="key" :value="key">
                                                                       模板:Key
                                                                   </option>
                                                               </select>
    
                                                           
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule1.attributes.primary[currentTabData.selectedPrimaryAttribute].初始值,currentTabData.selectedPrimaryAttribute)}}
    
                                                           
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule1.attributes.primary[currentTabData.selectedPrimaryAttribute].每次提升值,currentTabData.selectedPrimaryAttribute)}}
    
                                                           
    
    模板:CurrentTabData.coreModule1.level
                                                           
                                                               {{
                                                               calculateAndFormat(currentTabData.selectedPrimaryAttribute,currentTabData.coreModule1.attributes.primary[currentTabData.selectedPrimaryAttribute].初始值,
                                                               currentTabData.coreModule1.attributes.primary[currentTabData.selectedPrimaryAttribute].每次提升值,
                                                               currentTabData.coreModule1.level) }}
    
                                                           
    
    副属性模板:Index
                                                           
                                                               <select class="select-custom-table"
                                                                   @change="validateSelections1(index)"
                                                                   :ref="'select'+ this.currentTabIndex + '-' + index"
                                                                   v-model="currentTabData.selectedSecondaryOptions1[index]">
                                                                   <option
                                                                       v-for="(value, key) in currentTabData.coreModule1.attributes.secondary"
                                                                       :key="key" :value="key">
                                                                       模板:Key
                                                                   </option>
                                                                   <option v-if="index > 2" value=""></option>
                                                               </select>
    
    不能选择重复的副属性,请选择其他选项。
                                                           
    
                                                           
                                                               <input
                                                                   v-model="currentTabData.coreModule1.attributes.secondary[currentTabData.selectedSecondaryOptions1[index]].初始值"
                                                                   :placeholder="getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'initial').min + 
                                                                       getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'initial').suffix + 
                                                                       ' - ' + getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'initial').max +
                                                                       getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'initial').suffix"
                                                                   @change="validateAndSetCustom(currentTabData.coreModule1, currentTabData.selectedSecondaryOptions1[index], 'initial', $event)">
                                                               %
                                                           
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule1.attributes.secondary[currentTabData.selectedSecondaryOptions1[index]].初始值,currentTabData.selectedSecondaryOptions1[index])
                                                               }}
    
                                                           
    
                                                           0
    
                                                           
                                                               <input
                                                                   v-model="currentTabData.coreModule1.attributes.secondary[currentTabData.selectedSecondaryOptions1[index]].每次提升值"
                                                                   :placeholder="getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'growth').min + 
                                                                       getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'growth').suffix + 
                                                                       ' - ' + getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'growth').max +
                                                                       getAttributeRange(currentTabData.coreModule1.selected, currentTabData.selectedSecondaryOptions1[index],'growth').suffix"
                                                                   @change="validateAndSetCustom(currentTabData.coreModule1, currentTabData.selectedSecondaryOptions1[index], 'growth', $event)">
                                                               %
                                                           
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{
                                                               formatTableValue(currentTabData.coreModule1.attributes.secondary[currentTabData.selectedSecondaryOptions1[index]].每次提升值
                                                               ,currentTabData.selectedSecondaryOptions1[index])}}
                                                           
    
                                                           0
    
                                                           <input v-if="currentTabData.selectedSecondaryOptions1[index]"
                                                               @blur="updateGrowthCount1(index, $event.target.value)"
                                                               :value="currentTabData.growthCount1[index]" type="number"
                                                               min="0">
                                                           <input v-else disabled placeholder="无可用选项">
    
                                                           
                                                               {{ totalValues(currentTabData.coreModule1,
                                                               currentTabData.selectedSecondaryOptions1,
                                                               currentTabData.growthCount1)[index] }}
                                                           
    
                                   </transition>
    


    生命 {{ formatValue(currentTabData.cores['生命'], '生命') }}
    防御 {{ formatValue(currentTabData.cores['防御'], '防御') }}
    模板:Key {{ formatValue(currentTabData.cores[key], key) }}
    攻击 {{ formatValue(currentTabData.cores['攻击'], '攻击') }}
       
    模板:Key {{ formatValue(currentTabData.cores[key], key) }}
                   
                       <label for="tiesValue" style="font-size: 20px;color: #322d32;margin-top: -3px;">搭档牵绊等级
                           <img src="https://patchwiki.biligame.com/images/lysk/8/8b/0hbrc8019r52t10ze2odu8slg16e0g2.png"
                               style="margin-left: 3px;margin-top: -2.5px;" alt="">
                       </label>
                       <input @blur="checkTieLevel" type="number" class="level-input" min="0" max="130" v-model="tieLevel"
                           @change="updateAttributes" style="margin-left: 5px;margin-right: 5px;">
    
                           <img @click="setMaxTie"
                               src="https://patchwiki.biligame.com/images/lysk/c/c1/bwmlywfwfzqerfpbd4yw7kvlpj2e3rr.png"
                               alt="Set Max" style="width: 60px; cursor: pointer;margin-top: -1px;" />
    
    Max
                   
    


    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <style scoped>

       .print-only {
           display: none;
       }
    
       @media print {
           .print-only {
               display: block;
           }
    
           .no-print {
               display: none;
           }
       }
    

    </style>

    <script>

       new Vue({
           el: '#attrCalcation',
           data() {
               return {
                   memoryMessage: ,
                   selectedRole: null,
                   showModal1: false,
                   showModal: false,
                   modalMessage1: ,
                   modalMessage: ,
                   message: ,
                   message1: ,
                   watchers: [],
                   charts: ['红漪', '蓝弧', '绿珥', '黄璃', '紫辉', '粉珀'],
                   attributeLeft: ['暴击', '暴伤', '加速回能'],
                   attributeRight: ['虚弱增伤', '誓约增伤', '誓约回能'],
                   tieLevel: 0,
                   chartIcons: [
                       'https://patchwiki.biligame.com/images/lysk/f/fa/1jm4by52ta5hb9xylp7f5hl6oh60t5x.png',  // 红漪
                       'https://patchwiki.biligame.com/images/lysk/2/28/mxam1nbmm2ufjll12n4d5r0f9u4wdak.png',  //蓝弧
                       'https://patchwiki.biligame.com/images/lysk/6/6f/4bfah2jqyajgqit4h327gcygs2ywtf0.png',  //绿珥
                       'https://patchwiki.biligame.com/images/lysk/8/85/434m6pm6zzyy878lwya08gyiz6025xc.png',  //黄璃
                       'https://patchwiki.biligame.com/images/lysk/a/a8/g8eci96z2yz0y0deehnfppg2g3hmnkj.png',//紫辉
                       'https://patchwiki.biligame.com/images/lysk/c/cb/ngcwf6hvnzll8hpc257xdfdk3z6av6o.png'//粉珀
                   ],
                   currentTabIndex: 0,  // 使用索引来标识当前Tab
                   activeSegmentIndex: 0,
                   defaltTab: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                   defaltImg: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',
                   tabs: [
                       {
                           title: 'Tab 1',
                           mergedResults: [],
                           maskImage: ,
                           selectedMemoryContent: , // 初始化为空
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/8/8c/lw1747xiuaqgpade1n22no796xn70cg.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/4/41/btgdpehm5eaqlpx1d9fy60uhudcoftn.png',
                           selectedMemory: false,  //用于禁用select
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           tieLevel: 0, // 搭档牵绊等级
                           imageSize: 80,
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'alpha',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               },
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               custom: { 初始值: 0, 每次提升值: 0 },
                               selectedCore: 'beta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    
                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '加速回能',
    
                       },
                       {
                           title: 'Tab 2',
    
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           mergedResults: [],
                           imageSize: 80,
                           maskImage: ,
                           backgroundContent: ,
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/8/8c/lw1747xiuaqgpade1n22no796xn70cg.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/4/41/btgdpehm5eaqlpx1d9fy60uhudcoftn.png',
    
                           selectedMemory: false,
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
    
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'alpha',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               selectedCore: 'beta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    


                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '加速回能',
    
                       },
                       {
                           title: 'Tab 3',
                           tieLevel: 0,
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           imageSize: 80,
                           maskImage: ,
                           backgroundContent: ,
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/5/51/pdxkj4nl9d0ssi1g7qxuimhcb4nlts1.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/a/ab/l5f2pxayexc79coqls5tiaf4ercnfmq.png',
    
                           selectedMemory: false,
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           mergedResults: [],
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'gamma',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               selectedCore: 'delta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    
                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '暴击',
    
                       },
                       {
                           title: 'Tab 4',
                           tieLevel: 0,
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           imageSize: 80,
                           maskImage: ,
                           backgroundContent: ,
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/5/51/pdxkj4nl9d0ssi1g7qxuimhcb4nlts1.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/a/ab/l5f2pxayexc79coqls5tiaf4ercnfmq.png',
    
                           selectedMemory: false,
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           mergedResults: [],
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'gamma',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               selectedCore: 'delta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    
                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '暴击',
    
                       },
                       {
                           title: 'Tab 5',
                           tieLevel: 0,
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           imageSize: 80,
                           maskImage: ,
                           backgroundContent: ,
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/5/51/pdxkj4nl9d0ssi1g7qxuimhcb4nlts1.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/a/ab/l5f2pxayexc79coqls5tiaf4ercnfmq.png',
    
                           selectedMemory: false,
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           mergedResults: [],
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'gamma',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               selectedCore: 'delta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    
                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '暴击',
    
                       },
                       {
                           title: 'Tab 6',
                           tieLevel: 0,
                           growthCount: [0, 0, 0, 0, 0], // 初始化成长次数
                           imageSize: 80,
                           maskImage: ,
                           backgroundContent: ,
                           coreIconUrl: 'https://patchwiki.biligame.com/images/lysk/5/51/pdxkj4nl9d0ssi1g7qxuimhcb4nlts1.png',
                           coreIconUrl1: 'https://patchwiki.biligame.com/images/lysk/a/ab/l5f2pxayexc79coqls5tiaf4ercnfmq.png',
    
                           selectedMemory: false,
                           backgroundImage: 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           selections1: Array.from({ length: 6 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           selections: Array.from({ length: 4 }, () => ({ attribute: , initialValue: 0, growthValue: 0, growthCount: 0 })),
                           mergedResults: [],
                           growthCount1: [0, 0, 0, 0, 0],
    
                           selectedMemoryImage: 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片        
                           isFilterTableVisible: false,
                           memoryModule: {
                               name: "思念名字",
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
                               awakend: false,
                               level: 1,
                               advancement: 0,
                               position: "日冕",
                               talent: "攻击",
                               star: "5"
                           },
                           coreModule: {
                               selectedCore: 'gamma',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           coreModule1: {
                               selectedCore: 'delta',
                               selectedType: ,
                               selected: '无芯核',  // 选中的芯核类型
                               level: 0,      // 芯核等级
                               coreoption: '平均值',// 副属性取值类型
                               attributes: {
                                   primary: {},
                                   secondary: {
                                   }
                               }, // 副属性的具体值
                               attack: 0,
                               defense: 0,
                               hp: 0,
                               crit: 0,
                               critDamage: 0,
                               weak_increase: 0,
    
                           },
                           cores: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           tabValues: {
                               '攻击': 0,
                               '生命': 0,
                               '防御': 0,
                               '暴击': 0,
                               '暴伤': 0,
                               '虚弱增伤': 0,
                               '加速回能': 0,
                               '誓约回能': 0,
                               '誓约增伤': 0,
                           },
                           subAttributesOptions: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成'],
    
                           activeRole: null,
                           activeStarchart: null,
                           selectedSecondaryOptions: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedSecondaryOptions1: [, '攻击加成', '暴击', , ], // 初始化默认选项
                           selectedPrimaryAttribute: '暴击',
    
                       }
                   ],
                   panelKeys: ['攻击', '防御', '生命', '暴击', '暴伤', '虚弱增伤', '誓约增伤', '攻击加成', '生命加成', '防御加成', '誓约回能', '加速回能'],
                   steps: [0, 1, 2, 3],
                   selects: ["无芯核", "璀璨", "珍贵", "稀有"],
                   coreoptions: ["平均值", "自定义", "最小值", "最大值"],
                   coreSelections: [, '攻击加成', '暴击', , ],
                   percentageKeys: ['暴击', '暴伤', '虚弱增伤', '加速回能', '誓约增伤', '誓约回能', '攻击加成', '生命加成', '防御加成'],
                   originalGrowthCount1: [],
                   originalGrowthCount: [],
                   coreData: {
                       日冕: {
                           alpha: {
                               稀有: { 生命: { 初始值: 500, 每次提升值: 100 } },
                               珍贵: { 生命: { 初始值: 750, 每次提升值: 150 } },
                               璀璨: { 生命: { 初始值: 1000, 每次提升值: 200 } }
                           },
                           beta: {
                               稀有: { 誓约增伤: { 初始值: 0.025, 每次提升值: 0.003 }, 誓约回能: { 初始值: 0.025, 每次提升值: 0.005 }, 加速回能: { 初始值: 0.03, 每次提升值: 0.006 }, 生命加成: { 初始值: 0.011, 每次提升值: 0.003 }, 攻击加成: { 初始值: 0.011, 每次提升值: 0.003 }, 防御加成: { 初始值: 0.011, 每次提升值: 0.003 } },
                               珍贵: { 誓约增伤: { 初始值: 0.03, 每次提升值: 0.005 }, 誓约回能: { 初始值: 0.04, 每次提升值: 0.007 }, 加速回能: { 初始值: 0.045, 每次提升值: 0.009 }, 生命加成: { 初始值: 0.02, 每次提升值: 0.004 }, 攻击加成: { 初始值: 0.02, 每次提升值: 0.004 }, 防御加成: { 初始值: 0.02, 每次提升值: 0.004 } },
                               璀璨: { 誓约增伤: { 初始值: 0.035, 每次提升值: 0.007 }, 誓约回能: { 初始值: 0.05, 每次提升值: 0.01 }, 加速回能: { 初始值: 0.06, 每次提升值: 0.012 }, 生命加成: { 初始值: 0.03, 每次提升值: 0.005 }, 攻击加成: { 初始值: 0.03, 每次提升值: 0.005 }, 防御加成: { 初始值: 0.03, 每次提升值: 0.005 } }
                           }
                       },
                       月晖: {
                           gamma: {
                               稀有: { 攻击: { 初始值: 25, 每次提升值: 5 } },
                               珍贵: { 攻击: { 初始值: 30, 每次提升值: 8 } },
                               璀璨: { 攻击: { 初始值: 50, 每次提升值: 10 } }
                           },
                           delta: {
                               稀有: { 暴击: { 初始值: 0.011, 每次提升值: 0.003 }, 暴伤: { 初始值: 0.022, 每次提升值: 0.006 }, 虚弱增伤: { 初始值: 0.015, 每次提升值: 0.005 }, 生命加成: { 初始值: 0.011, 每次提升值: 0.003 }, 攻击加成: { 初始值: 0.011, 每次提升值: 0.003 }, 防御加成: { 初始值: 0.011, 每次提升值: 0.003 } },
                               珍贵: { 暴击: { 初始值: 0.024, 每次提升值: 0.004 }, 暴伤: { 初始值: 0.048, 每次提升值: 0.008 }, 虚弱增伤: { 初始值: 0.031, 每次提升值: 0.007 }, 生命加成: { 初始值: 0.02, 每次提升值: 0.004 }, 攻击加成: { 初始值: 0.02, 每次提升值: 0.004 }, 防御加成: { 初始值: 0.02, 每次提升值: 0.004 } },
                               璀璨: { 暴击: { 初始值: 0.037, 每次提升值: 0.005 }, 暴伤: { 初始值: 0.074, 每次提升值: 0.01 }, 虚弱增伤: { 初始值: 0.047, 每次提升值: 0.009 }, 生命加成: { 初始值: 0.03, 每次提升值: 0.005 }, 攻击加成: { 初始值: 0.03, 每次提升值: 0.005 }, 防御加成: { 初始值: 0.03, 每次提升值: 0.005 } }
                           }
                       }
                   },
    
                   subAttributeData: {
                       稀有: {
                           最大值: {
                               生命: { 初始值: 594, 每次提升值: 297 },
                               攻击: { 初始值: 30, 每次提升值: 15 },
                               防御: { 初始值: 15, 每次提升值: 8 },
                               暴击: { 初始值: 0.008, 每次提升值: 0.004 },
                               暴伤: { 初始值: 0.016, 每次提升值: 0.008 },
                               誓约增伤: { 初始值: 0.006, 每次提升值: 0.003 },
                               虚弱增伤: { 初始值: 0.013, 每次提升值: 0.007 },
                               生命加成: { 初始值: 0.05, 每次提升值: 0.025 },
                               攻击加成: { 初始值: 0.05, 每次提升值: 0.025 },
                               防御加成: { 初始值: 0.05, 每次提升值: 0.025 }
                           },
                           最小值: {
                               生命: { 初始值: 416, 每次提升值: 208 },
                               攻击: { 初始值: 21, 每次提升值: 11 },
                               防御: { 初始值: 11, 每次提升值: 6 },
                               暴击: { 初始值: 0.006, 每次提升值: 0.003 },
                               暴伤: { 初始值: 0.011, 每次提升值: 0.006 },
                               誓约增伤: { 初始值: 0.004, 每次提升值: 0.002 },
                               虚弱增伤: { 初始值: 0.009, 每次提升值: 0.005 },
                               生命加成: { 初始值: 0.035, 每次提升值: 0.018 },
                               攻击加成: { 初始值: 0.035, 每次提升值: 0.018 },
                               防御加成: { 初始值: 0.035, 每次提升值: 0.018 }
                           },
                           平均值: {
                               生命: { 初始值: 505, 每次提升值: 252.5 },
                               攻击: { 初始值: 25.5, 每次提升值: 13 },
                               防御: { 初始值: 13, 每次提升值: 7 },
                               暴击: { 初始值: 0.007, 每次提升值: 0.0035 },
                               暴伤: { 初始值: 0.0135, 每次提升值: 0.007 },
                               誓约增伤: { 初始值: 0.005, 每次提升值: 0.0025 },
                               虚弱增伤: { 初始值: 0.011, 每次提升值: 0.006 },
                               生命加成: { 初始值: 0.0425, 每次提升值: 0.0215 },
                               攻击加成: { 初始值: 0.0425, 每次提升值: 0.0215 },
                               防御加成: { 初始值: 0.0425, 每次提升值: 0.0215 }
                           },
                           自定义: {
                               生命: { 初始值: "", 每次提升值: "" },
                               攻击: { 初始值: "", 每次提升值: "" },
                               防御: { 初始值: "", 每次提升值: "" },
                               暴击: { 初始值: "", 每次提升值: "" },
                               暴伤: { 初始值: "", 每次提升值: "" },
                               誓约增伤: { 初始值: "", 每次提升值: "" },
                               虚弱增伤: { 初始值: "", 每次提升值: "" },
                               生命加成: { 初始值: "", 每次提升值: "" },
                               攻击加成: { 初始值: "", 每次提升值: "" },
                               防御加成: { 初始值: "", 每次提升值: "" }
                           }
                       },
                       珍贵: {
                           最大值: {
                               生命: { 初始值: 891, 每次提升值: 446 },
                               攻击: { 初始值: 45, 每次提升值: 23 },
                               防御: { 初始值: 23, 每次提升值: 11 },
                               暴击: { 初始值: 0.012, 每次提升值: 0.006 },
                               暴伤: { 初始值: 0.024, 每次提升值: 0.012 },
                               誓约增伤: { 初始值: 0.009, 每次提升值: 0.005 },
                               虚弱增伤: { 初始值: 0.02, 每次提升值: 0.01 },
                               生命加成: { 初始值: 0.075, 每次提升值: 0.038 },
                               攻击加成: { 初始值: 0.075, 每次提升值: 0.038 },
                               防御加成: { 初始值: 0.075, 每次提升值: 0.038 }
                           },
                           最小值: {
                               生命: { 初始值: 624, 每次提升值: 312 },
                               攻击: { 初始值: 32, 每次提升值: 16 },
                               防御: { 初始值: 16, 每次提升值: 8 },
                               暴击: { 初始值: 0.008, 每次提升值: 0.005 },
                               暴伤: { 初始值: 0.017, 每次提升值: 0.008 },
                               誓约增伤: { 初始值: 0.006, 每次提升值: 0.003 },
                               虚弱增伤: { 初始值: 0.014, 每次提升值: 0.007 },
                               生命加成: { 初始值: 0.053, 每次提升值: 0.026 },
                               攻击加成: { 初始值: 0.053, 每次提升值: 0.026 },
                               防御加成: { 初始值: 0.053, 每次提升值: 0.026 }
                           },
                           平均值: {
                               生命: { 初始值: 757.5, 每次提升值: 379 },
                               攻击: { 初始值: 38.5, 每次提升值: 19.5 },
                               防御: { 初始值: 19.5, 每次提升值: 9.5 },
                               暴击: { 初始值: 0.01, 每次提升值: 0.0055 },
                               暴伤: { 初始值: 0.0205, 每次提升值: 0.01 },
                               誓约增伤: { 初始值: 0.0075, 每次提升值: 0.004 },
                               虚弱增伤: { 初始值: 0.017, 每次提升值: 0.0085 },
                               生命加成: { 初始值: 0.064, 每次提升值: 0.032 },
                               攻击加成: { 初始值: 0.064, 每次提升值: 0.032 },
                               防御加成: { 初始值: 0.064, 每次提升值: 0.032 }
                           },
                           自定义: {
                               生命: { 初始值: "", 每次提升值: "" },
                               攻击: { 初始值: "", 每次提升值: "" },
                               防御: { 初始值: "", 每次提升值: "" },
                               暴击: { 初始值: "", 每次提升值: "" },
                               暴伤: { 初始值: "", 每次提升值: "" },
                               誓约增伤: { 初始值: "", 每次提升值: "" },
                               虚弱增伤: { 初始值: "", 每次提升值: "" },
                               生命加成: { 初始值: "", 每次提升值: "" },
                               攻击加成: { 初始值: "", 每次提升值: "" },
                               防御加成: { 初始值: "", 每次提升值: "" }
                           }
                       },
                       璀璨: {
                           最大值: {
                               生命: { 初始值: 1188, 每次提升值: 594 },
                               攻击: { 初始值: 60, 每次提升值: 30 },
                               防御: { 初始值: 30, 每次提升值: 15 },
                               暴击: { 初始值: 0.016, 每次提升值: 0.008 },
                               暴伤: { 初始值: 0.032, 每次提升值: 0.016 },
                               誓约增伤: { 初始值: 0.012, 每次提升值: 0.006 },
                               虚弱增伤: { 初始值: 0.026, 每次提升值: 0.013 },
                               生命加成: { 初始值: 0.1, 每次提升值: 0.05 },
                               攻击加成: { 初始值: 0.1, 每次提升值: 0.05 },
                               防御加成: { 初始值: 0.1, 每次提升值: 0.05 }
                           },
                           最小值: {
                               生命: { 初始值: 832, 每次提升值: 416 },
                               攻击: { 初始值: 42, 每次提升值: 21 },
                               防御: { 初始值: 21, 每次提升值: 11 },
                               暴击: { 初始值: 0.011, 每次提升值: 0.006 },
                               暴伤: { 初始值: 0.022, 每次提升值: 0.011 },
                               誓约增伤: { 初始值: 0.008, 每次提升值: 0.004 },
                               虚弱增伤: { 初始值: 0.018, 每次提升值: 0.009 },
                               生命加成: { 初始值: 0.07, 每次提升值: 0.035 },
                               攻击加成: { 初始值: 0.07, 每次提升值: 0.035 },
                               防御加成: { 初始值: 0.07, 每次提升值: 0.035 }
                           },
                           平均值: {
                               生命: { 初始值: 1010, 每次提升值: 505 },
                               攻击: { 初始值: 51, 每次提升值: 25.5 },
                               防御: { 初始值: 25.5, 每次提升值: 13 },
                               暴击: { 初始值: 0.0135, 每次提升值: 0.007 },
                               暴伤: { 初始值: 0.027, 每次提升值: 0.0135 },
                               誓约增伤: { 初始值: 0.01, 每次提升值: 0.005 },
                               虚弱增伤: { 初始值: 0.022, 每次提升值: 0.011 },
                               生命加成: { 初始值: 0.085, 每次提升值: 0.0425 },
                               攻击加成: { 初始值: 0.085, 每次提升值: 0.0425 },
                               防御加成: { 初始值: 0.085, 每次提升值: 0.0425 }
                           },
                           自定义: {
                               生命: { 初始值: "", 每次提升值: "" },
                               攻击: { 初始值: "", 每次提升值: "" },
                               防御: { 初始值: "", 每次提升值: "" },
                               暴击: { 初始值: "", 每次提升值: "" },
                               暴伤: { 初始值: "", 每次提升值: "" },
                               誓约增伤: { 初始值: "", 每次提升值: "" },
                               虚弱增伤: { 初始值: "", 每次提升值: "" },
                               生命加成: { 初始值: "", 每次提升值: "" },
                               攻击加成: { 初始值: "", 每次提升值: "" },
                               防御加成: { 初始值: "", 每次提升值: "" }
                           }
                       }
                   },
                   memories: [],
               };
           },
           computed: {
    
               currentTabData() {
                   return this.tabs[this.currentTabIndex];
               },
               isLevelMultipleOfTen() {
                   return this.tabs[this.currentTabIndex].memoryModule.level % 10 === 0;
               },
               uniqueRoles() {
                   return ['全部', '沈星回', '黎深', '祁煜', '夏以昼', '秦彻'];
               },
               uniqueCharts() {
                   const uniqueCharts = [...new Set(this.memories.map(memory => memory.starchart))];
                   return ['全部', ...uniqueCharts];
               },
               filteredMemories() {
                   const currentTab = this.tabs[this.currentTabIndex];
                   const keySet = new Set(); // 用于存储已存在的 key
                   const memories = this.memories.filter(memory => memory.role && memory.starchart);
    
                   return memories.filter(memory => {
                       // 根据 id 进行的过滤逻辑
                       if ((this.currentTabIndex === 0 || this.currentTabIndex === 1) && memory.position === '月晖') {
                           return false;
                       } else if (this.currentTabIndex !== 0 && this.currentTabIndex !== 1 && memory.position === '日冕') {
                           return false;
                       }
    
                       // 处理 activeRole 和 activeStarchart 的 "全部" 选项
                       const roleMatches = !currentTab.activeRole || currentTab.activeRole === '全部' || memory.role === currentTab.activeRole;
                       const starchartMatches = !currentTab.activeStarchart || currentTab.activeStarchart === '全部' || memory.starchart === currentTab.activeStarchart;
    
                       return roleMatches && starchartMatches;
                   });
               },
    
               groupedMemories() {
                   const groupSize = 5;
                   return this.filteredMemories.reduce((accumulator, current, index) => {
                       const groupIndex = Math.floor(index / groupSize);
                       if (!accumulator[groupIndex]) {
                           accumulator[groupIndex] = [];
                       }
                       accumulator[groupIndex].push(current);
                       return accumulator;
                   }, []);
               },
               totalValues() {
                   return (module, selectedOptions, growthCounts) => {
                       return selectedOptions.map((option, index) => {
                           if (module.coreoption == '自定义') {
                               if (module.attributes.secondary[option]) {
                                   const initial = Number(module.attributes.secondary[option].初始值);
                                   const perLevel = Number(module.attributes.secondary[option].每次提升值);
                                   const growthCount = growthCounts[index];
                                   return this.calculateTotalValue(option, initial, perLevel, growthCount);
                               }
                               return 0; // 如果数据不完整,返回0
                           }
                           else {
                               if (module.attributes.secondary[option]) {
                                   const initial = Number(module.attributes.secondary[option].初始值);
                                   const perLevel = Number(module.attributes.secondary[option].每次提升值);
                                   const growthCount = growthCounts[index];
                                   return this.calculateAndFormat(option, initial, perLevel, growthCount);
                               }
                               return 0; // 如果数据不完整,返回0
                           }
                       });
                   };
               },
    
               nonEmptyCount() {
                   // 使用Array.prototype.filter()方法过滤非空选项
                   const nonEmpty1 = this.currentTabData.selectedSecondaryOptions1.filter(option => option !== "").length;
                   const nonEmpty = this.currentTabData.selectedSecondaryOptions.filter(option => option !== "").length;
                   return {
                       count1: nonEmpty1,
                       count: nonEmpty
                   }
               },
               // 计算总提升次数和已使用的提升次数
               totalPromotions() {
                   const levelPromotions1 = Math.floor(this.currentTabData.coreModule1.level / 3);  // 每3级提供1次提升机会
                   const compensationPromotions1 = Math.max(0, 4 - this.nonEmptyCount.count1); // 补偿提升
                   const totalAvailablePromotions1 = levelPromotions1 + compensationPromotions1; // 总可用提升次数
                   const levelPromotions = Math.floor(this.currentTabData.coreModule.level / 3);  // 每3级提供1次提升机会
                   const compensationPromotions = Math.max(0, 4 - this.nonEmptyCount.count); // 补偿提升
                   const totalAvailablePromotions = levelPromotions + compensationPromotions; // 总可用提升次数
    
                   // 计算已经分配的提升次数总和
                   const usedPromotions1 = this.currentTabData.growthCount1.reduce((total, count) => total + count, 0);
                   const usedPromotions = this.currentTabData.growthCount.reduce((total, count) => total + count, 0);
    
                   // 返回总次数和已使用的次数
                   return {
                       total1: totalAvailablePromotions1,
                       used1: usedPromotions1,
                       remaining1: usedPromotions1,
                       compensation1: compensationPromotions1,
                       total: totalAvailablePromotions,
                       used: usedPromotions,
                       remaining: usedPromotions,
                       compensation: compensationPromotions
                   };
               },
               memoryTotal() {
                   return this.tabs.reduce((totals, tab) => {
                       totals.attack += Number(tab.memoryModule.attack);
                       totals.defense += Number(tab.memoryModule.defense);
                       totals.hp += Number(tab.memoryModule.hp);
                       totals.crit += Number(tab.memoryModule.crit);
                       totals.critDamage += Number(tab.memoryModule.critDamage);
                       totals.weak_increase += Number(tab.memoryModule.weak_increase);
                       return totals;
                   }, {
                       attack: 0,
                       defense: 0,
                       hp: 0,
                       crit: 0,
                       critDamage: 0,
                       weak_increase: 0
                   });
               },
               coresTotal() {
                   return this.tabs.reduce((totals, tab) => {
                       totals['攻击'] += Number(tab.cores['攻击']);
                       totals['生命'] += Number(tab.cores['生命']);
                       totals['防御'] += Number(tab.cores['防御']);
                       totals['暴击'] += Number(tab.cores['暴击']);
                       totals['暴伤'] += Number(tab.cores['暴伤']);
                       totals['虚弱增伤'] += Number(tab.cores['虚弱增伤']);
                       totals['加速回能'] += Number(tab.cores['加速回能']);
                       totals['誓约回能'] += Number(tab.cores['誓约回能']);
                       totals['誓约增伤'] += Number(tab.cores['誓约增伤']);
                       return totals;
                   }, {
                       '攻击': 0,
                       '生命': 0,
                       '防御': 0,
                       '暴击': 0,
                       '暴伤': 0,
                       '虚弱增伤': 0,
                       '加速回能': 0,
                       '誓约回能': 0,
                       '誓约增伤': 0
                   });
               },
    
           },
           created() {
               this.fetchMemoriesData();
               this.tabs.forEach((tab, index) => {
                   this.$watch(
                       () => tab.selectedMemoryImage,
                       (newValue, oldValue) => {
                           if (newValue !== oldValue) {
                               this.resetMemoryModuleData(index);
                           }
                       }
                   );
               });
               this.tabs.forEach((tab, index) => {
                   this.$watch(() => tab.coreModule.selected, (newVal, oldVal) => {
                       if (newVal !== oldVal) {
                           this.checkCoreLevel(tab.coreModule);
    
                           //this.setGrowthCount(tab);
                       }
                   }, {
                       immediate: true
                   });
               });
    
               this.tabs.forEach((tab, index) => {
                   this.$watch(() => tab.coreModule1.selected, (newVal, oldVal) => {
                       if (newVal !== oldVal) {
                           this.checkCoreLevel(tab.coreModule1);
    
                           //this.setGrowthCount1(tab);
                       }
                   }, {
                       immediate: true
                   });
               });
    
           },
    
           methods: {
               resetTabs() {
                   const initialCores = {
                       '攻击': 0,
                       '生命': 0,
                       '防御': 0,
                       '暴击': 0,
                       '暴伤': 0,
                       '虚弱增伤': 0,
                       '加速回能': 0,
                       '誓约回能': 0,
                       '誓约增伤': 0,
                   };
    
                   const initialTabValues = {
                       '攻击': 0,
                       '生命': 0,
                       '防御': 0,
                       '暴击': 0,
                       '暴伤': 0,
                       '虚弱增伤': 0,
                       '加速回能': 0,
                       '誓约回能': 0,
                       '誓约增伤': 0,
                   };
                   this.tieLevel = 0;
                   this.selectedRole = null;
                   this.tabs.forEach((tab, index) => {
                       tab.backgroundImage = 'https://patchwiki.biligame.com/images/lysk/8/8e/519bi4fpcyn65047wk81zbo25g90nty.png',
                           tab.selectedMemoryImage = 'https://patchwiki.biligame.com/images/lysk/c/cf/gr1swq1t50edoyt297bdofygxzonsaq.png',  // 默认图片     
                           tab.coreModule.selected = '无芯核';
                       tab.coreModule1.selected = '无芯核';
                       tab.selectedMemory = false;
                       tab.memoryModule.name = '思念名字';
                       tab.imageSize = 80;
                       this.reSetCore(tab.coreModule);
                       this.reSetCore(tab.coreModule1);
                       this.resetMemoryModuleData(index);
                       tab.cores = { ...initialCores };
                       tab.tabValues = { ...initialTabValues };
                       tab.selectedMemoryContent = ;
                   });
    
               },
               async saveAsImage() {
                   const capture1 = document.getElementById('capture1');
                   const capture2 = document.getElementById('capture2');
                   // 显示 capture2
                   capture2.style.display = 'block';
    
                   // 确保所有图片都已加载完成
                   await this.waitForImagesToLoad(capture1);
                   await this.waitForImagesToLoad(capture2);
                   // 确保元素有正确的宽度和高度
                   const ensureElementSize = (element) => {
                       const style = window.getComputedStyle(element);
                       return element.clientWidth > 0 && element.clientHeight > 0 && style.visibility !== 'hidden' && style.display !== 'none';
                   };
    
                   if (!ensureElementSize(capture1) || !ensureElementSize(capture2)) {
                       console.error('One or both of the capture elements have a width or height of 0');
                       // 隐藏 capture2
                       capture2.style.display = 'none';
    
                       return;
                   }
    
                   // 使用 html2canvas 渲染
                   Promise.all([html2canvas(capture1, { useCORS: true }), html2canvas(capture2, { useCORS: true })])
                       .then(canvases => {
                           let canvas1 = canvases[0];
                           let canvas2 = canvases[1];
                           // 给 capture2 添加边距
                           const padding = 30;
                           const paddedCanvas2 = document.createElement('canvas');
                           paddedCanvas2.width = canvas2.width + padding * 2;
                           paddedCanvas2.height = canvas2.height + padding * 2;
                           const paddedCtx2 = paddedCanvas2.getContext('2d');
                           paddedCtx2.fillStyle = "white"; // 填充背景为白色
                           paddedCtx2.fillRect(0, 0, paddedCanvas2.width, paddedCanvas2.height);
                           paddedCtx2.drawImage(canvas2, padding, padding);
                           canvas2 = paddedCanvas2;
    
                           // 获取中间宽度
                           const midWidth = (canvas1.width + canvas2.width) / 2;
    
                           // 调整canvas1和canvas2宽度,并将内容居中
                           const scale1 = midWidth / canvas1.width;
                           const tempCanvas1 = document.createElement('canvas');
                           tempCanvas1.width = midWidth;
                           tempCanvas1.height = canvas1.height * scale1;
                           const tempCtx1 = tempCanvas1.getContext('2d');
                           tempCtx1.fillStyle = "white";
                           tempCtx1.fillRect(0, 0, tempCanvas1.width, tempCanvas1.height);
                           tempCtx1.drawImage(canvas1, (midWidth - canvas1.width * scale1) / 2, 0, canvas1.width * scale1, canvas1.height * scale1);
                           canvas1 = tempCanvas1;
    
                           const scale2 = midWidth / canvas2.width;
                           const tempCanvas2 = document.createElement('canvas');
                           tempCanvas2.width = midWidth;
                           tempCanvas2.height = canvas2.height * scale2;
                           const tempCtx2 = tempCanvas2.getContext('2d');
                           tempCtx2.fillStyle = "white";
                           tempCtx2.fillRect(0, 0, tempCanvas2.width, tempCanvas2.height);
                           tempCtx2.drawImage(canvas2, (midWidth - canvas2.width * scale2) / 2, 0, canvas2.width * scale2, canvas2.height * scale2);
                           canvas2 = tempCanvas2;
    
                           // 创建一个新的Canvas,大小为两个Canvas的高度之和,宽度为中间值
                           const combinedCanvas = document.createElement('canvas');
                           combinedCanvas.width = midWidth;
                           combinedCanvas.height = canvas1.height + canvas2.height;
    
                           const ctx = combinedCanvas.getContext('2d');
    
                           // 填充背景颜色
                           ctx.fillStyle = 'rgba(156, 155, 176, 0.5)';
                           ctx.fillRect(0, 0, combinedCanvas.width, combinedCanvas.height);
    
                           ctx.drawImage(canvas1, 0, 0);
                           ctx.drawImage(canvas2, 0, canvas1.height);
    


                           // 在新Canvas上添加水印
                           ctx.font = '18px Arial';
                           ctx.fillStyle = 'rgba(79, 80, 89, 0.5)';
                           ctx.textAlign = 'right';
                           ctx.fillText('恋与深空evol攻略组', combinedCanvas.width - 10, combinedCanvas.height - 10);
                           // 获取当前时间并格式化为文件名
                           const now = new Date();
                           const formattedTime = now.getFullYear() + '-' +
                               String(now.getMonth() + 1).padStart(2, '0') + '-' +
                               String(now.getDate()).padStart(2, '0') + '_' +
                               String(now.getHours()).padStart(2, '0') + '-' +
                               String(now.getMinutes()).padStart(2, '0') + '-' +
                               String(now.getSeconds()).padStart(2, '0');
                           const fileName = `combined_divs_image_${formattedTime}.png`;
    
                           // 将新Canvas内容保存为图片
                           const imgData = combinedCanvas.toDataURL('image/png');
                           const link = document.createElement('a');
                           link.href = imgData;
                           link.download = fileName;
                           link.click();
    
                       });
                   // 确保在任何情况下隐藏 capture2
                   capture2.style.display = 'none';
    


               },
    
               waitForImagesToLoad(element) {
                   const images = element.getElementsByTagName('img');
                   const promises = [];
                   for (let i = 0; i < images.length; i++) {
                       const img = images[i];
                       if (!img.complete) {
                           promises.push(new Promise((resolve, reject) => {
                               img.onload = resolve;
                               img.onerror = reject;
                           }));
                       }
                   }
                   return Promise.all(promises);
               },
               fetchMemoriesData() {
                   const dataPage = "思念筛选"; // 替换为目标页面的路径
                   const gameName = "lysk";
                   const url = `https://wiki.biligame.com/${gameName}/${dataPage}`;
                   $.ajax({
                       url: url,
                       method: 'GET',
                       success: (data) => {
                           const parser = new DOMParser();
                           const doc = parser.parseFromString(data, 'text/html');
                           const elements = doc.querySelectorAll("#CardSelectTr .divsort");
    
                           // 提取数据并存储到 memories 数组
                           const memories = Array.from(elements).map((element, index) => {
                               const clonedElement = element.cloneNode(true);
    
                               // 移除所有链接,并替换为span,添加点击事件
                               clonedElement.querySelectorAll('a').forEach(a => {
                                   const span = document.createElement('span');
                                   span.innerHTML = a.innerHTML;
                                   span.style.cursor = 'pointer';
                                   span.onclick = () => this.selectMemory(index);
                                   a.parentNode.replaceChild(span, a);
                               });
                               // 提取所需的子元素内容
                               const cardImg = clonedElement.querySelector('.card-img').outerHTML;
                               const cardImgSrc = clonedElement.querySelector('.card-img img').src; // 提取图片src
    
                               const cardFg = clonedElement.querySelector('.card-fg').outerHTML;
                               const cardColor = clonedElement.querySelector('.card-color').outerHTML;
                               const cardPos = clonedElement.querySelector('.card-pos').outerHTML;
                               const stars = clonedElement.querySelector('.stars').outerHTML;
                               const cardName = clonedElement.querySelector('.card-name').textContent.trim(); // 提取name
    
                               return {
                                   role: clonedElement.getAttribute('data-param1'),
                                   star: clonedElement.getAttribute('data-param2'),
                                   starchart: clonedElement.getAttribute('data-param3'),
                                   position: clonedElement.getAttribute('data-param4'),
                                   talent: clonedElement.getAttribute('data-param5'),
                                   name: cardName, // 存储name
                                   content: `${cardImg}${cardFg}${cardColor}${cardPos}${stars}`,
                                   path: cardImgSrc,
                               };
                           });
                           this.memories = memories;
                       },
                       error: (jqXHR, textStatus, errorThrown) => {
                           console.error('Error fetching data:', textStatus, errorThrown);
                       }
                   });
               },
               setGrowthCount(tab) {
                   tab.growthCount = [0, 0, 0, 0, 0];
               },
               setGrowthCount1(tab) {
                   tab.growthCount1 = [0, 0, 0, 0, 0];
               },
               updateGrowthCount(index, value) {
                   const parsedValue = parseInt(value, 10);
                   if (isNaN(parsedValue) || parsedValue < 0) {
                       // 如果值无效,重置为当前值
                       this.$set(this.currentTabData.growthCount, index, this.currentTabData.growthCount[index]);
                   } else {
                       // 计算新的总提升次数
                       const newGrowthCount = [...this.currentTabData.growthCount];
                       newGrowthCount[index] = parsedValue;
                       const usedPromotions = newGrowthCount.reduce((total, count) => total + count, 0);
                       const totalPromotions = this.totalPromotions.total;
    
                       // 检查是否超出提升次数
                       if (usedPromotions > totalPromotions) {
                           this.originalGrowthCount = [...this.currentTabData.growthCount]; // 保存当前的增长计数值
                           this.modalMessage = `合计可使用的提升次数:${usedPromotions}`;
                           this.message = `目前已使用的提升次数:${totalPromotions}`;
                           this.showModal = true; // 显示模态框
                           // 重置为当前值
                           this.$set(this.currentTabData.growthCount, index, this.currentTabData.growthCount[index]);
                       } else {
                           // 更新实际的 growthCount 数组
                           this.$set(this.currentTabData.growthCount, index, parsedValue);
                       }
                   }
               },
    
               updateGrowthCount1(index, value) {
                   const parsedValue = parseInt(value, 10);
                   if (isNaN(parsedValue) || parsedValue < 0) {
                       this.$set(this.currentTabData.growthCount1, index, this.currentTabData.growthCount1[index]);
                   } else {
                       // 计算新的总提升次数
                       const newGrowthCount1 = [...this.currentTabData.growthCount1];
                       newGrowthCount1[index] = parsedValue;
                       const usedPromotions1 = newGrowthCount1.reduce((total, count) => total + count, 0);
                       const totalPromotions1 = this.totalPromotions.total1;
    
                       // 检查是否超出提升次数
                       if (usedPromotions1 > totalPromotions1) {
                           this.originalGrowthCount1 = [...this.currentTabData.growthCount1]; // 保存当前的增长计数值
                           this.modalMessage1 = `合计可使用的提升次数:${usedPromotions1}`;
                           this.message1 = `目前已使用的提升次数:${totalPromotions1}`;
                           this.showModal1 = true; // 显示模态框
                           // 重置为当前值
                           this.$set(this.currentTabData.growthCount1, index, this.currentTabData.growthCount1[index]);
                       } else {
                           // 更新实际的 growthCount1 数组
                           this.$set(this.currentTabData.growthCount1, index, parsedValue);
                       }
                   }
               },
    
               resetGrowthCount1() {
                   this.showModal1 = false; // 关闭模态框
               },
    
               resetGrowthCount() {
                   this.showModal = false;
               },
               isPercentage(key) {
                   return this.percentageKeys.includes(key);
               },
               formatValue(value, key) {
                   //const percentageValue = value * 100;
                   return this.percentageKeys.includes(key) ? `${value}%` : value;
               },
               formatTableValue(value, key) {
                   const percentageValue = Number((value * 100).toFixed(2));
                   return this.percentageKeys.includes(key) ? `${percentageValue}%` : value;
               },
    
               resetCoreLevel(module) {
                   module.level = 0;
               },
               showPanel(key) {
                   let total = 0;
                   Object.keys(this.tabs).forEach(tab => {
                       if (this.tabs[tab].tabValues[key] !== undefined) {
                           total += parseFloat(this.tabs[tab].tabValues[key]);
                       }
                   });
                   const showTotal = total.toFixed(1);
                   return this.percentageKeys.includes(key) ? `${showTotal}%` : total.toFixed(0);
               },
               checkMemoryLevel() {
                   if (this.currentTabData.memoryModule.level < 0) {
                       this.currentTabData.memoryModule.level = 0;
                       console.log(this.currentTabData.memoryModule.level, this.currentTabData.memoryModule.attack)
                   } else if (this.currentTabData.memoryModule.level > 80) {
                       this.currentTabData.memoryModule.level = 80;
                   }
               },
               checkCoreLevel(module) {
                   if (module.level < 0) {
                       module.level = 0;
                       console.log(module.level)
                   } else if (module.selected === '璀璨' && module.level > 15) {
                       module.level = 15;
                   }
                   else if (module.selected === '珍贵' && module.level > 12) {
                       module.level = 12;
                   }
                   else if (module.selected === '稀有' && module.level > 9) {
                       module.level = 9;
                   }
               },
               checkTieLevel() {
                   if (this.tieLevel < 0) {
                       this.tieLevel = 0;
                   } else if (this.tieLevel > 130) {
                       this.tieLevel = 130;
                   }
                   this.totalAttributes();
               },
               updateAttributes() {
    
                   this.totalAttributes()
               },
               setMaxTie() {
                   this.tieLevel = 130; // 将等级设置为最大值
                   this.totalAttributes(); // 更新属性
               },
               getAttributeRange(quality, attribute, type) {
                   const subAttrData = this.subAttributeData[quality];
                   const minAttr = subAttrData['最小值'][attribute];
                   const maxAttr = subAttrData['最大值'][attribute];
                   if (type == 'initial') {
                       if (this.isPercentage(attribute)) {
                           return {
                               min: minAttr ? Number((minAttr.初始值 * 100).toFixed(2)) : 0,
                               max: maxAttr ? Number((maxAttr.初始值 * 100).toFixed(2)) : 0,
                               suffix: '%',
                           };
                       }
                       else {
                           return {
                               min: minAttr ? minAttr.初始值 : 0,
                               max: maxAttr ? maxAttr.初始值 : 0,
                               suffix: ,
                           };
                       }
                   }
                   else {
                       if (this.isPercentage(attribute)) {
                           return {
                               min: minAttr ? Number((minAttr.每次提升值 * 100).toFixed(2)) : 0,
                               max: maxAttr ? Number((maxAttr.每次提升值 * 100).toFixed(2)) : 0,
                               suffix: '%',
                           };
                       }
                       else {
                           return {
                               min: minAttr ? minAttr.每次提升值 : 0,
                               max: maxAttr ? maxAttr.每次提升值 : 0,
                               suffix: ,
                           };
                       }
                   }
               },
               validateSelections1(index) {
                   const selectedOptions = this.currentTabData.selectedSecondaryOptions1;
                   const currentValue = selectedOptions[index];
    
                   // Check for duplicates
                   const duplicates = selectedOptions.filter(option => option === currentValue && option !== );
                   if (duplicates.length > 1) {
                       // Show tooltip first
                       this.showTooltip1(index);
    
                   } else {
                       this.hideTooltip1(index);
                   }
               },
               validateSelections(index) {
                   const selectedOptions = this.currentTabData.selectedSecondaryOptions;
                   const currentValue = selectedOptions[index];
    
                   // Check for duplicates
                   const duplicates = selectedOptions.filter(option => option === currentValue && option !== );
                   if (duplicates.length > 1) {
                       // Show tooltip first
                       this.showTooltip(index);
    
                   } else {
                       this.hideTooltip(index);
                   }
               },
    
               showTooltip(index) {
                   const tooltip = this.$refs['tooltip' + this.currentTabIndex + '-' + index][0];
                   tooltip.classList.add('visible');
               },
               hideTooltip(index) {
                   const tooltip = this.$refs['tooltip' + this.currentTabIndex + '-' + index][0];
                   tooltip.classList.remove('visible');
               },
               showTooltip1(index) {
                   const tooltip = this.$refs['tooltip1' + this.currentTabIndex + '-' + index][0];
                   tooltip.classList.add('visible');
               },
               hideTooltip1(index) {
                   const tooltip = this.$refs['tooltip1' + this.currentTabIndex + '-' + index][0];
                   tooltip.classList.remove('visible');
               },
               validateAndSetCustom(module, attribute, type, event) {
                   const range = this.getAttributeRange(module.selected, attribute, type);
                   let value = parseFloat(event.target.value) || 0;
    
                   if (value < range.min) {
                       value = range.min;
                   } else if (value > range.max) {
                       value = range.max;
                   }
                   if (type == 'initial') {
                       module.attributes.secondary[attribute].初始值 = value;
                   }
                   else {
                       module.attributes.secondary[attribute].每次提升值 = value;
                   }
                   if (module === this.currentTabData.coreModule1) {
    
                       this.updateSelections1();
                   } else if (module === this.currentTabData.coreModule) {
    
                       this.updateSelections();
                   }
                   this.mergeAndCalculateTotalValues();
                   this.totalAttributes();
               },
               setCustom(module, key, type, event) {
                   const value = event.target.value;
                   if (type === 'initial') {
                       this.$set(module.attributes.secondary[key], '初始值', value);
                   } else if (type === 'growth') {
                       this.$set(module.attributes.secondary[key], '每次提升值', value);
                   }
    
                   if (module === this.currentTabData.coreModule1) {
    
                       this.updateSelections1();
                   } else if (module === this.currentTabData.coreModule) {
    
                       this.updateSelections();
                   }
                   this.mergeAndCalculateTotalValues();
               },
               resetMemoryModuleData(index) {
                   const tab = this.tabs[index];
                   tab.memoryModule.level = 0;
                   tab.memoryModule.awakend = false;
                   tab.memoryModule.advancement = 0;
                   tab.memoryModule.attack = 0;
                   tab.memoryModule.defense = 0;
                   tab.memoryModule.hp = 0;
                   tab.memoryModule.crit = 0;
                   tab.memoryModule.critDamage = 0;
                   tab.memoryModule.weak_increase = 0;
                   this.$nextTick(() => {
                       this.roleSet(tab.memoryModule);
    
                   });
               },
               hideTable() {
                   this.currentTabData.isFilterTableVisible = false;
               },
               selectMemory(memory) {
                   let existingRole = null;
                   existingRole = this.selectedRole;
                   memoryName = memory.name;
                   const existingMemory = this.tabs.find(tab => tab.memoryModule.name !== '思念名字' && tab.memoryModule.name === memory.name);
                   // 检查选择的 memory.role 是否与现有角色匹配
                   if (existingRole && existingRole !== memory.role) {
                       this.memoryMessage = '请上阵同一角色的思念';
                       setTimeout(() => { this.memoryMessage = ; }, 3000);
    
                       return;
                   }
    
                   if (existingMemory) {
                       this.memoryMessage = '请选则不重复的思念';
                       setTimeout(() => { this.memoryMessage = ; }, 3000);
                       return;
                   }
                   this.currentTabData.selectedMemoryContent = memory.content; // 更新为盒子内容
                   this.currentTabData.memoryModule.name = memory.name; // 更新名称
                   this.currentTabData.memoryModule.position = memory.position;
                   this.currentTabData.coreModule.selectedType = memory.position;
                   this.currentTabData.coreModule1.selectedType = memory.position;
                   this.currentTabData.memoryModule.talent = memory.talent;
                   this.currentTabData.memoryModule.star = memory.star;
                   this.selectedRole = memory.role;
                   this.currentTabData.isFilterTableVisible = !this.currentTabData.isFilterTableVisible;
                   this.tabs.forEach((tab, index) => {
                       if (this.currentTabIndex === index) {
                           tab.backgroundImage = memory.path;
                           tab.imageSize = 90;
                           tab.maskImage = 'https://patchwiki.biligame.com/images/lysk/a/af/1y385o0ewqa50kfvwaavo5k252zte6x.png';
                           tab.selectedMemory = true;
                       }
                       this.resetMemoryModuleData(this.currentTabIndex);
                   });
               },
               setMaxMem(memoryModule) {
                   this.currentTabData.memoryModule.level = 80;
                   this.calculateAttributes(this.currentTabData.memoryModule); // 更新思念信息
               },
               toggleFilterTable() {
                   this.currentTabData.isFilterTableVisible = !this.currentTabData.isFilterTableVisible; // 切换表格的显示状态
               },
               roleSet(module) {
                   module.level = Number(module.level);
                   this.calculateAttributes(this.currentTabData.memoryModule);
               },
               filterByRole(role) {
                   console.log('Selected role:', role);
                   this.currentTabData.activeRole = role;
                   //this.updateFilteredMemories();
               },
               filterByStarchart(chart) {
                   console.log('Selected chart:', chart);
                   this.currentTabData.activeStarchart = chart;
                   //this.updateFilteredMemories();
               },
    
               coreSet(module) {
                   module.level = Number(module.level);
                   if (module.selected == "无芯核") {
                       this.reSetCore(module);
                   }
                   else {
                       this.updateCoreAttributes(module);
                       if (module === this.currentTabData.coreModule1) {
                           this.updateSelections1();
                       } else if (module === this.currentTabData.coreModule) {
    
                           this.updateSelections();
                       }
                       this.mergeAndCalculateTotalValues();
    
                   }
    
               },
    
               reSetCore(module) {
                   module.level = 0;     // 芯核等级
                   module.coreoption = '平均值';// 副属性取值类型
                   module.attributes = {
                       primary: {},
                       secondary: {
                       }
                   };
                   if (module === this.currentTabData.coreModule1) {
                       this.currentTabData.selectedSecondaryOptions1 = [, '攻击加成', '暴击', , ];
                       this.updateSelections1();
                       this.currentTabData.growthCount1 = [0, 0, 0, 0, 0];
                   }
                   else {
                       this.currentTabData.selectedSecondaryOptions = [, '攻击加成', '暴击', , ];
                       this.updateSelections();
                       this.currentTabData.growthCount = [0, 0, 0, 0, 0];
                   }
                   this.currentTabData.cores = {
                       '攻击': 0,
                       '生命': 0,
                       '防御': 0,
                       '暴击': 0,
                       '暴伤': 0,
                       '虚弱增伤': 0,
                       '加速回能': 0,
                       '誓约回能': 0,
                       '誓约增伤': 0,
                   };
                   this.mergeAndCalculateTotalValues();
    
               },
    
               updateSelections1() {
                   const options = [...this.currentTabData.selectedSecondaryOptions1];
                   if (this.currentTabData.coreModule1.attributes.secondary) {
                       options.forEach((option, index) => {
                           if (this.currentTabData.coreModule1.attributes.secondary[option]) {
                               //console.log(JSON.parse(JSON.stringify(this.currentTabData.coreModule1.attributes.secondary[option])));
                               const attributeDetails = JSON.parse(JSON.stringify(this.currentTabData.coreModule1.attributes.secondary[option])) || { 初始值: 0, 每次提升值: 0 };
                               this.$set(this.currentTabData.selections1, index, {
                                   attribute: option,
                                   initialValue: parseFloat(attributeDetails.初始值) || 0,
                                   growthValue: parseFloat(attributeDetails.每次提升值) || 0,
                                   growthCount: this.currentTabData.growthCount1[index] || 0// 同步成长次数
                               });
                           } else {
                               // 清空或重置无效的选项
                               this.$set(this.currentTabData.selections1, index, { attribute: , initialValue: 0, growthValue: 0, growthCount: 0 });
                           }
                       });
                   }
               },
    
               updateSelections() {
                   const options = [...this.currentTabData.selectedSecondaryOptions];
                   if (this.currentTabData.coreModule.attributes.secondary) {
                       options.forEach((option, index) => {
                           if (this.currentTabData.coreModule.attributes.secondary[option]) {
                               const attributeDetails = JSON.parse(JSON.stringify(this.currentTabData.coreModule.attributes.secondary[option])) || { 初始值: 0, 每次提升值: 0 };
                               this.$set(this.currentTabData.selections, index, {
                                   attribute: option,
                                   initialValue: parseFloat(attributeDetails.初始值) || 0,
                                   growthValue: parseFloat(attributeDetails.每次提升值) || 0,
                                   growthCount: this.currentTabData.growthCount[index] || 0 // 同步成长次数
                               });
                           } else {
                               // 清空或重置无效的选项
                               this.$set(this.currentTabData.selections, index, { attribute: , initialValue: 0, growthValue: 0, growthCount: 0 });
                           }
                       });
                   }
               },
    
               setMaxCore(module) {
                   if (module.selected === '璀璨') {
                       module.level = 15;
                   }
                   else if (module.selected === '珍贵') {
                       module.level = 12;
                   }
                   else {
                       module.level = 9;
                   }
    
                   this.mergeAndCalculateTotalValues(); // 更新芯核信息
               },
    
               updateCoreAttributes(module) {
                   let position = this.currentTabData.memoryModule.position;  // 确保memoryModule已经定义并有position属性
                   let selectedCore = module.selectedCore;    // 使用传入模块的selectedCore
                   let selectedType = module.selected;        // 使用传入模块的selected
    
                   if (!position || !selectedCore || !selectedType) {
                       return;  // 如果必要的信息不完整则退出
                   }
    
                   let typeData = this.coreData[position][selectedCore];
                   if (typeData) {
                       let qualityData = typeData[selectedType];
                       if (qualityData) {
                           module.attributes.primary = JSON.parse(JSON.stringify(qualityData)); // 深拷贝 primary 属性,重要
                           if (module.coreoption) {
    
                               module.attributes.secondary = JSON.parse(JSON.stringify(this.subAttributeData[selectedType][module.coreoption])); // 深拷贝 secondary 属性
                               //console.log("After secondary update:", this.currentTabIndex,  JSON.stringify(this.tabs[0].coreModule.attributes.secondary));
                           } else {
                               console.warn("Sub-attribute data missing or core option not selected.");
                           }
                       } else {
                           console.warn("No quality data found for selected type.");
                       }
                   } else {
                       console.warn("No type data found for selected core.");
                   }
               },
    
               calculateTotalValue(option, initialValue, perLevelIncrease, level) {
                   result = initialValue + level * perLevelIncrease;
                   resultPercentage = Number((initialValue + level * perLevelIncrease).toFixed(1));
                   return this.percentageKeys.includes(option) ? `${resultPercentage}%` : result.toFixed(0);
               },
               calculateAndFormat(key, initialValue, perLevelIncrease, level) {
                   result = initialValue + level * perLevelIncrease;
                   resultPercentage = ((initialValue + level * perLevelIncrease) * 100).toFixed(1);
                   return this.percentageKeys.includes(key) ? `${resultPercentage}%` : result.toFixed(0);
               },
    
               calculateAttributes(module) {
    
                   const baseValues = {
                       attack: 120,
                       defense: 60,
                       hp: 2400,
                       crit: module.position === '日冕' ? 0 : 2.6,
                       critDamage: module.position === '日冕' ? 5.2 : 0
                   };
    
                   const growthValues = {
                       attack: 6,
                       defense: 3,
                       hp: 120
                   };
    
                   const breakValues = {
                       attack: 24,
                       defense: 12,
                       hp: 480,
                       crit: module.position === '日冕' ? 0 : 0.3,
                       critDamage: module.position === '日冕' ? 0.6 : 0
                   };
    
                   const awakendValues = {
                       attack: 60,
                       defense: 30,
                       hp: 1200,
                       crit: module.position === '日冕' ? 0 : 0.8,
                       critDamage: module.position === '日冕' ? 1.6 : 0
                   };
    
                   const advancementValues = {
                       crit: module.position === '日冕' ? 0 : 1.5,
                       critDamage: module.position === '日冕' ? 3.0 : 0
                   };
    
                   const starLevelMultipliers = {
                       upgradeBreak: module.star === '5' ? 1.0 : module.star === '4' ? 0.67 : 0.42,
                       normaladvancement: module.star === '5' ? 0.12 : 0.05,
                       highadvancement: module.star === '5' ? 1.0 : module.star === '4' ? 0.3333 : 0.2
                   };
                   const level = module.level < 1 ? 1 : module.level;
                   // 计算基础属性值
                   const baseAttack = baseValues.attack + growthValues.attack * (level - 1);
                   const baseDefense = baseValues.defense + growthValues.defense * (level - 1);
                   const baseHP = baseValues.hp + growthValues.hp * (level - 1);
                   let breakCount;
                   if (module.level < 80) {
                       if (module.level % 10 === 0) {
                           breakCount = Math.max(0, Math.min(7, Math.floor(module.level / 10) - (module.awakend ? 0 : 1)));
                       }
                       else {
                           breakCount = Math.max(0, Math.min(7, Math.floor(module.level / 10)));
    
                       }
                   } else {
                       // 等级等于80时的突破计数
                       breakCount = Math.min(7, Math.floor(module.level / 10));
                   }
    
                   // 计算突破属性值
                   //const breakCount = Math.min(7, Math.floor(module.level / 10));
                   const breakAttack = breakValues.attack * breakCount;
                   const breakDefense = breakValues.defense * breakCount;
                   const breakHP = breakValues.hp * breakCount;
    
                   // 计算觉醒属性值(仅80级时)
                   const awakendAttack = module.level === 80 && module.awakend ? awakendValues.attack : 0;
                   const awakendDefense = module.level === 80 && module.awakend ? awakendValues.defense : 0;
                   const awakendHP = module.level === 80 && module.awakend ? awakendValues.hp : 0;
    
                   // 总属性值(不包括进阶,未放大)
                   const totalAttack = baseAttack + breakAttack + awakendAttack;
                   const totalDefense = baseDefense + breakDefense + awakendDefense;
                   const totalHP = baseHP + breakHP + awakendHP;
    
                   // 应用星级间属性比例(升级突破)
                   const adjustedAttack = totalAttack * starLevelMultipliers.upgradeBreak * (1 + starLevelMultipliers.normaladvancement * module.advancement);
                   const adjustedDefense = totalDefense * starLevelMultipliers.upgradeBreak * (1 + starLevelMultipliers.normaladvancement * module.advancement);
                   const adjustedHP = totalHP * starLevelMultipliers.upgradeBreak * (1 + starLevelMultipliers.normaladvancement * module.advancement);
    
                   // 计算进阶属性值(暴击/暴伤)
                   const advancementCrit = advancementValues.crit * starLevelMultipliers.highadvancement * module.advancement;
                   const advancementCritDamage = advancementValues.critDamage * starLevelMultipliers.highadvancement * module.advancement;
    
                   // 计算基础暴击/暴伤
                   const breakCrit = breakValues.crit * breakCount;
                   const breakCritDamage = breakValues.critDamage * breakCount;
    
                   // 计算觉醒暴击/暴伤(仅80级时)
                   const awakendCrit = module.level === 80 && module.awakend ? awakendValues.crit : 0;
                   const awakendCritDamage = module.level === 80 && module.awakend ? awakendValues.critDamage : 0;
    
                   const baseCrit = baseValues.crit * starLevelMultipliers.upgradeBreak;
                   const baseCritDamage = baseValues.critDamage * starLevelMultipliers.upgradeBreak;
    
                   // 总暴击/暴伤值
                   const totalCrit = baseCrit + (breakCrit + awakendCrit) * starLevelMultipliers.upgradeBreak + advancementCrit;
                   const totalCritDamage = baseCritDamage + (breakCritDamage + awakendCritDamage) * starLevelMultipliers.upgradeBreak + advancementCritDamage;
    
                   // 放大系数
                   const finalAttack = adjustedAttack * (module.talent === '攻击' ? 1.1 : 1.0);
                   const finalDefense = adjustedDefense * (module.talent === '防御' ? 1.1 : 1.0);
                   const finalHP = adjustedHP * (module.talent === '生命' ? 1.1 : 1.0);
                   const selectedValues = module.talent === '攻击' ? { finalValue: finalAttack, value1: 400, value2: 20 } :
                       module.talent === '防御' ? { finalValue: finalDefense, value1: 200, value2: 10 } :
                           module.talent === '生命' ? { finalValue: finalHP, value1: 8000, value2: 400 } :
                               { finalValue: null, value1: 0, value2: 0 };
    
                   let absresult = (selectedValues.finalValue - selectedValues.value1) < 0 ? 0 : (selectedValues.finalValue - selectedValues.value1);
    
                   const weak = absresult / selectedValues.value2;
                   const totalweak = Math.floor(weak) * 0.2;
                   attack = finalAttack;
                   df = finalDefense;
                   hp = finalHP;
                   crit = totalCrit;
                   critDamage = totalCritDamage;
                   weak_increase = totalweak;
                   if (module.level === 0) {
                       module.attack = 0;
                       module.defense = 0;
                       module.hp = 0;
                       module.crit = 0;
                       module.critDamage = 0;
                       module.weak_increase = 0;
    
                   }
                   else {
                       // 更新属性
                       module.attack = Math.floor(finalAttack);
                       module.defense = Math.floor(finalDefense);
                       module.hp = Math.floor(finalHP);
                       module.crit = totalCrit.toFixed(1);
                       module.critDamage = totalCritDamage.toFixed(1);
                       module.weak_increase = totalweak.toFixed(1);
                   }
    
                   this.totalAttributes();
    
               },
    
               mergeAndCalculateTotalValues() {
                   //console.log(this.currentTabData.coreModule.attributes.secondary)
                   //console.log(this.currentTabData.coreModule1.attributes.secondary)
                   let resultMap = {};
                   let key = Object.keys(this.currentTabData.coreModule.attributes.primary);
                   const attributeDetails = this.currentTabData.coreModule.attributes.primary[key];
                   if (attributeDetails) {
                       let newAttribute = {
                           attribute: key[0],
                           initialValue: attributeDetails.初始值,
                           growthValue: attributeDetails.每次提升值,
                           growthCount: this.currentTabData.coreModule.level, // 同步成长次数
                       }
                       let newAttributeTotalValue = Number(newAttribute.initialValue) + Number(newAttribute.growthValue) * Number(newAttribute.growthCount);
                       resultMap[newAttribute.attribute] = newAttributeTotalValue;
                   }
    
                   let keys = this.currentTabData.selectedPrimaryAttribute;
                   const attributes = this.currentTabData.coreModule1.attributes.primary[keys];
                   if (attributes) {
                       let newAttribute1 = {
                           attribute: keys,
                           initialValue: attributes.初始值,
                           growthValue: attributes.每次提升值,
                           growthCount: this.currentTabData.coreModule1.level, // 同步成长次数
                       }
                       let newAttributeTotalValue1 = Number(newAttribute1.initialValue) + Number(newAttribute1.growthValue) * Number(newAttribute1.growthCount);
                       resultMap[newAttribute1.attribute] = Number((newAttributeTotalValue1 * 100).toFixed(1));
                   }
    
                   // 遍历第一个数组,从索引1开始
                   this.currentTabData.selections.forEach(item => {
                       if (item.attribute && this.currentTabData.coreModule.selected != '无芯核') {
                           let totalValue = Number(item.initialValue) + Number(item.growthValue) * Number(item.growthCount);
                           if (!resultMap[item.attribute]) {
                               if (this.percentageKeys.includes(item.attribute) && this.currentTabData.coreModule.coreoption !== '自定义') {
                                   resultMap[item.attribute] = Number((totalValue * 100).toFixed(1));
                               }
                               else {
                                   resultMap[item.attribute] = totalValue;
                               }
    
                           } else if (this.percentageKeys.includes(item.attribute) && this.currentTabData.coreModule.coreoption !== '自定义') {
                               resultMap[item.attribute] += Number((totalValue * 100).toFixed(1));
                           }
                           else {
                               resultMap[item.attribute] += totalValue;
                           }
                       }
                   });
    


                   // 遍历第二个数组,从索引1开始
                   this.currentTabData.selections1.forEach(item => {
                       if (item.attribute) {
                           let totalValue = Number(item.initialValue) + Number(item.growthValue) * Number(item.growthCount);
                           if (!resultMap[item.attribute]) {
                               if (this.percentageKeys.includes(item.attribute) && this.currentTabData.coreModule1.coreoption !== '自定义') {
                                   resultMap[item.attribute] = Number((totalValue * 100).toFixed(1));
                               }
                               else {
                                   resultMap[item.attribute] = totalValue;
                               }
    
                           } else if (this.percentageKeys.includes(item.attribute) && this.currentTabData.coreModule1.coreoption !== '自定义') {
                               resultMap[item.attribute] += Number((totalValue * 100).toFixed(1));
                           }
                           else {
                               resultMap[item.attribute] += totalValue;
                           }
                       }
                   });
                   // 将结果对象转换为数组
                   this.currentTabData.mergedResults = Object.keys(resultMap).map(key => ({
                       key: key,
                       value: resultMap[key]
                   }));
    
                   this.totalAttributes();
    
               },
               //更新芯核面板
               //更新面板,动态响应方式,编队面板有依赖
               totalAttributes() {
                   // 获取思念和芯核基础数值
                   const sinenAttack = parseFloat(this.currentTabData.memoryModule.attack) || 0;
                   const sinenDefense = parseFloat(this.currentTabData.memoryModule.defense) || 0;
                   const sinenHP = parseFloat(this.currentTabData.memoryModule.hp) || 0;
                   const sinenCrit = parseFloat(this.currentTabData.memoryModule.crit) || 0;
                   const sinenCritDamage = parseFloat(this.currentTabData.memoryModule.critDamage) || 0;
                   const sinenWeakIncrease = parseFloat(this.currentTabData.memoryModule.weak_increase) || 0;
                   const increment = Math.floor(this.tieLevel / 5); // 输入等级除以5向下取整
                   const attackBonus = increment * 10;
                   const defenseBonus = increment * 5;
                   const hpBonus = increment * 200;
    
                   const lifeItem = this.currentTabData.mergedResults.find(item => item.key === '生命');
                   const coreHP = lifeItem ? lifeItem.value : 0;
    
                   const critItem = this.currentTabData.mergedResults.find(item => item.key === '暴击');
                   const coreCrit = critItem ? critItem.value : 0;
    
                   const attItem = this.currentTabData.mergedResults.find(item => item.key === '攻击');
                   const coreAttack = attItem ? attItem.value : 0;
                   const dfItem = this.currentTabData.mergedResults.find(item => item.key === '防御');
                   const coreDefense = dfItem ? dfItem.value : 0;
                   const cdItem = this.currentTabData.mergedResults.find(item => item.key === '暴伤');
                   const coreCritDamage = cdItem ? cdItem.value : 0;
                   const attincreaseItem = this.currentTabData.mergedResults.find(item => item.key === '攻击加成');
                   const attincrease = attincreaseItem ? attincreaseItem.value : 0;
                   const dfincreaseItem = this.currentTabData.mergedResults.find(item => item.key === '防御加成');
                   const dfincrease = dfincreaseItem ? dfincreaseItem.value : 0;
                   const hpincreaseItem = this.currentTabData.mergedResults.find(item => item.key === '生命加成');
                   const hpincrease = hpincreaseItem ? hpincreaseItem.value : 0;
                   const weakItem = this.currentTabData.mergedResults.find(item => item.key === '虚弱增伤');
                   const coreWeakIncrease = weakItem ? weakItem.value : 0;
                   const syItem = this.currentTabData.mergedResults.find(item => item.key === '誓约增伤');
                   const coresy = syItem ? syItem.value : 0;
                   const hnItem = this.currentTabData.mergedResults.find(item => item.key === '誓约回能');
                   const corehn = hnItem ? hnItem.value : 0;
                   const jsItem = this.currentTabData.mergedResults.find(item => item.key === '加速回能');
                   const corejs = jsItem ? jsItem.value : 0;
    
                   this.currentTabData.cores['暴击'] = Number(coreCrit.toFixed(1));
                   this.currentTabData.cores['暴伤'] = Number(coreCritDamage.toFixed(1));
    


                   this.currentTabData.cores['攻击'] = (sinenAttack * Number(attincrease / 100) + coreAttack).toFixed(0);
                   this.currentTabData.cores['防御'] = (sinenDefense * Number(dfincrease / 100) + coreDefense).toFixed(0);
                   this.currentTabData.cores['生命'] = (sinenHP * Number(hpincrease / 100) + coreHP).toFixed(0);
                   this.currentTabData.cores['虚弱增伤'] = coreWeakIncrease;
                   this.currentTabData.cores['誓约增伤'] = coresy;
                   this.currentTabData.cores['誓约回能'] = corehn;
                   this.currentTabData.cores['加速回能'] = corejs;
    
                   // 使用 parseFloat 并转换为固定的小数位数
                   let finalCrit = Number(this.currentTabData.memoryModule.crit) + Number(coreCrit.toFixed(1));
                   let finalCD = Number(this.currentTabData.memoryModule.critDamage) + Number(coreCritDamage.toFixed(1));
                   // 基础属性加成
                   let finalAttack = (sinenAttack * (1 + Number(attincrease / 100)) + coreAttack).toFixed(0);
                   let finalDefense = (sinenDefense * (1 + Number(dfincrease / 100)) + coreDefense).toFixed(0);
                   let finalHP = (sinenHP * (1 + Number(hpincrease / 100)) + coreHP).toFixed(0);
    
                   // 加上牵绊增加的属性
                   let finalAttackbonus = (sinenAttack * (1 + Number(attincrease / 100)) + coreAttack + attackBonus).toFixed(0);
                   let finalDefensebonus = (sinenDefense * (1 + Number(dfincrease / 100)) + coreDefense + defenseBonus).toFixed(0);
                   let finalHPbonus = (sinenHP * (1 + Number(hpincrease / 100)) + coreHP + hpBonus).toFixed(0);
                   // 虚弱增伤
                   const selectedValues = this.currentTabData.memoryModule.talent === '攻击' ? { finalValue: finalAttack, value1: 400, value2: 20 } :
                       this.currentTabData.memoryModule.talent === '防御' ? { finalValue: finalDefense, value1: 200, value2: 10 } :
                           this.currentTabData.memoryModule.talent === '生命' ? { finalValue: finalHP, value1: 8000, value2: 400 } :
                               { finalValue: null, value1: 0, value2: 0 };
    
                   let absresult = (selectedValues.finalValue - selectedValues.value1) < 0 ? 0 : (selectedValues.finalValue - selectedValues.value1);
                   let totalweak = Math.floor(absresult / selectedValues.value2) * 0.2 + coreWeakIncrease;
    
                   this.currentTabData.tabValues['暴击'] = finalCrit;
                   this.currentTabData.tabValues['暴伤'] = finalCD;
    
                   this.currentTabData.tabValues['攻击'] = finalAttackbonus; //计算虚弱增伤的三维属性和最终面板不同
                   this.currentTabData.tabValues['防御'] = finalDefensebonus;
                   this.currentTabData.tabValues['生命'] = finalHPbonus;
                   this.currentTabData.tabValues['虚弱增伤'] = totalweak.toFixed(1);
                   this.currentTabData.tabValues['誓约增伤'] = coresy;
                   this.currentTabData.tabValues['誓约回能'] = corehn;
                   this.currentTabData.tabValues['加速回能'] = corejs;
               },
    
           },
           watch: {
    


               'currentTabData.memoryModule.level': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
                           this.currentTabData.memoryModule.awakend = false;
                       }
                   },
                   deep: true
               },
               'currentTabData.selectedSecondaryOptions1': {
                   handler(newValues, oldValues) {
                       newValues.forEach((option, index) => {
                           if (option) {
                               const attributeDetails = this.currentTabData.coreModule1.attributes.secondary[option] || { 初始值: 0, 每次提升值: 0 };
                               this.currentTabData.selections1[index] = {
                                   attribute: option,
                                   initialValue: attributeDetails.初始值,
                                   growthValue: attributeDetails.每次提升值,
                                   growthCount: this.currentTabData.growthCount1[index] // 同步成长次数
                               };
                           } else {
                               // 清空或重置无效的选项
                               this.currentTabData.selections1[index] = { attribute: , initialValue: 0, growthValue: 0, growthCount: 0 };
                           }
                       });
                       this.mergeAndCalculateTotalValues();
                   },
                   deep: true,
                   immediate: true
               },
               'currentTabData.growthCount1': {
                   handler(newValues, oldValues) {
                       this.updateSelections1();
                       this.mergeAndCalculateTotalValues();
                   },
                   deep: true,
                   immediate: true
    
               },
    
               'currentTabData.coreModule1.attributes.secondary': {
                   handler(newValues, oldValues) {
                       if (newValues && typeof newValues === 'object') {
                           Object.keys(newValues).forEach(key => {
                               const index = this.currentTabData.selectedSecondaryOptions1.indexOf(key);
                               if (index !== -1 && this.currentTabData.selections1[index]) {
                                   this.currentTabData.selections1[index].growthCount = this.currentTabData.growthCount1[index];
                               }
                           });
                           this.mergeAndCalculateTotalValues();
                       }
                   },
                   deep: true,
                   immediate: true
               },
               'currentTabData.selectedSecondaryOptions': {
                   handler(newValues, oldValues) {
                       newValues.forEach((option, index) => {
                           if (option) {
                               const attributeDetails = this.currentTabData.coreModule.attributes.secondary[option] || { 初始值: 0, 每次提升值: 0 };
                               this.currentTabData.selections[index] = {
                                   attribute: option,
                                   initialValue: attributeDetails.初始值,
                                   growthValue: attributeDetails.每次提升值,
                                   growthCount: this.currentTabData.growthCount[index] // 同步成长次数
                               };
                           } else {
                               // 清空或重置无效的选项
                               this.currentTabData.selections[index] = { attribute: , initialValue: 0, growthValue: 0, growthCount: 0 };
                           }
                       });
                       this.mergeAndCalculateTotalValues();
                   },
                   deep: true,
                   immediate: true
               },
               'currentTabData.growthCount': {
                   handler(newValues, oldValues) {
                       this.updateSelections();
                       this.mergeAndCalculateTotalValues();
                   },
                   deep: true,
                   immediate: true
               },
    
               'currentTabData.coreModule.level': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
    
                           this.mergeAndCalculateTotalValues();
                       }
                   },
                   deep: true
               },
               'currentTabData.coreModule.coreoption': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
    
                           this.mergeAndCalculateTotalValues();
                       }
                   },
                   deep: true
               },
               'currentTabData.coreModule1.level': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
    
                           this.mergeAndCalculateTotalValues();
    
                       }
                   },
                   deep: true
               },
               'currentTabData.coreModule1.coreoption': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
    
                           this.mergeAndCalculateTotalValues();
    
                       }
                   },
                   deep: true
               },
    
               'currentTabData.selectedPrimaryAttribute': {
                   handler(newValue, oldValue) {
                       if (newValue !== oldValue) {
    
                           this.mergeAndCalculateTotalValues();
    
                       }
                   },
                   deep: true
               },
    
           },
           mounted() {
    
           },
    
       });   
    

    </script>