Browse Source

Merge branch 'v1.0' of http://www.xumy.vip/mengyxu/vue-idle-game into v1.0

v1.0
许孟阳 7 days ago
parent
commit
76c7adbccb
  1. 6
      src/config/beings.ts
  2. 3
      src/tool/caller/attribute.ts
  3. 2
      src/tool/random.ts
  4. 21
      src/views/archive.vue
  5. 16
      src/views/backpack/player.vue
  6. 2
      src/views/illustrated/illustrated.vue
  7. 57
      src/views/point/point.vue

6
src/config/beings.ts

@ -52,6 +52,12 @@ export class Attribute {
}); });
} }
} }
copy(attr: Attribute) {
Object.keys(attr).forEach((key) => {
this[key] = attr[key];
});
}
} }
export class Player { export class Player {

3
src/tool/caller/attribute.ts

@ -48,7 +48,8 @@ export const callPlayerAttribute = (player: Player, base: any) => {
attribute.dps = Math.ceil((1 - crit + crit * critdmg) * atk * (1 + dmgPercent)); attribute.dps = Math.ceil((1 - crit + crit * critdmg) * atk * (1 + dmgPercent));
//计算减伤比例 //计算减伤比例
attribute.reducPercent = callReducPercent(attribute.def, player.lv); attribute.reducPercent = callReducPercent(attribute.def, player.lv);
player.attribute = attribute;
player.attribute.copy(attribute);
}; };
/** /**

2
src/tool/random.ts

@ -1,7 +1,7 @@
import { difficultys, Categorys, qualitys, extra_quality, extra_quality_rate, extra_quality_lv } from '@/config'; import { difficultys, Categorys, qualitys, extra_quality, extra_quality_rate, extra_quality_lv } from '@/config';
import * as Equips from '@/config/equips'; import * as Equips from '@/config/equips';
const types = ['weapon', 'arrmor', 'neck', 'ring', 'jewelry', 'bracers', 'pants', 'shoes']; const types = ['weapon', 'armor', 'neck', 'ring', 'jewelry', 'bracers', 'pants', 'shoes'];
const normal: Categorys[] = new Array(); const normal: Categorys[] = new Array();
const uniques: Categorys[] = new Array(); const uniques: Categorys[] = new Array();
const colorfuls: Categorys[] = new Array(); const colorfuls: Categorys[] = new Array();

21
src/views/archive.vue

@ -47,12 +47,23 @@ const showMenu = () => {
} }
const copyArchive = () => { const copyArchive = () => {
navigator.clipboard.writeText(archive.value).then(() => { if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(archive.value).then(() => {
commit('set_sys_info', { msg: t('copyArchive.1'), type: 'win' })
showMenu();
}).catch(() => {
commit('set_sys_info', { msg: t('copyArchive.2'), type: 'waring' })
});
} else {
const textField = document.createElement("textarea");
textField.innerText = archive.value;
document.body.appendChild(textField);
textField.select();
document.execCommand("copy");
textField.remove();
commit('set_sys_info', { msg: t('copyArchive.1'), type: 'win' }) commit('set_sys_info', { msg: t('copyArchive.1'), type: 'win' })
}, () => { showMenu();
commit('set_sys_info', { msg: t('copyArchive.2'), type: 'waring' }) }
});
showMenu();
} }
const pasteArchive = () => { const pasteArchive = () => {

16
src/views/backpack/player.vue

@ -89,6 +89,14 @@ onMounted(() => { });
text-align: start; text-align: start;
} }
.label,
.value {
div {
line-height: 1.5rem;
height: 1.5rem;
}
}
} }
.equips { .equips {
@ -181,6 +189,14 @@ onMounted(() => { });
text-align: start; text-align: start;
} }
.label,
.value {
div {
line-height: 1.2rem;
height: 1.2rem;
}
}
} }
.equips { .equips {

2
src/views/illustrated/illustrated.vue

@ -3,7 +3,7 @@
<img class="menu-img" :src="menu_icons.illustrated" @click="showMenu"> <img class="menu-img" :src="menu_icons.illustrated" @click="showMenu">
</Tooltip> </Tooltip>
<Drawer :title="t('illustrated.0')" v-model="showIllustrated"> <Drawer :title="t('illustrated.0')" v-model="showIllustrated" :width="state.mobile ? '100%' : ''">
<Tabs :tabs="tabs"> <Tabs :tabs="tabs">
<tab v-for="item in tabs" :name="item.name"> <tab v-for="item in tabs" :name="item.name">
<Equips :type="item.name" quality="colorful" extraQuality="taigu" :samples="taigu[item.name]" /> <Equips :type="item.name" quality="colorful" extraQuality="taigu" :samples="taigu[item.name]" />

57
src/views/point/point.vue

@ -213,4 +213,61 @@ onBeforeUnmount(() => {
} }
} }
@media only screen and (max-width: 768px) {
.message {
padding-bottom: 0.5rem;
p {
margin: 0.5rem;
}
.tips {
padding-left: 0.8rem;
}
.btn-div {
padding: 0rem;
padding-right: 1rem;
}
}
.points {
padding: 0.1rem;
width: 23.5rem;
.info {
padding: 0.2rem;
}
}
.attributes {
padding: 0.05rem 0;
}
.attribute {
padding: 0.2rem 0rem;
p {
span {
margin-left: 0.2rem;
}
}
.group {
input {
width: 4rem;
color: black;
height: 1.8rem;
font-size: 0.8rem;
}
}
}
}
</style> </style>
Loading…
Cancel
Save