mirror of
https://github.com/wmn1525/grasscutterTools.git
synced 2024-11-21 22:58:26 +00:00
:fix 修改UI库
This commit is contained in:
parent
e4ea0d703b
commit
7e20c25607
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -63,7 +63,7 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
@ -91,7 +91,7 @@
|
||||
"source.fixAll.eslint": true,
|
||||
"source.fixAll.stylelint": true
|
||||
},
|
||||
"editor.defaultFormatter": "johnsoncodehk.volar"
|
||||
"editor.defaultFormatter": "octref.vetur"
|
||||
},
|
||||
"i18n-ally.localesPaths": ["src/locales/lang"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
|
13
src/App.vue
13
src/App.vue
@ -1,15 +1,10 @@
|
||||
<template>
|
||||
<n-config-provider :theme="apptheme">
|
||||
<n-message-provider>
|
||||
<router-view></router-view>
|
||||
</n-message-provider>
|
||||
</n-config-provider>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { title } from 'process';
|
||||
import { title } from 'process'
|
||||
import { useAppStore } from './store/modules/app'
|
||||
|
||||
|
||||
import { ref, watch } from 'vue'
|
||||
import { darkTheme } from 'naive-ui'
|
||||
const appStore = useAppStore()
|
||||
@ -40,7 +35,7 @@ watch(
|
||||
() => appStore.theme,
|
||||
() => {
|
||||
const theme: string = appStore.theme
|
||||
if (theme == "dark") {
|
||||
if (theme == 'dark') {
|
||||
apptheme.value = darkTheme
|
||||
} else {
|
||||
apptheme.value = null
|
||||
@ -48,7 +43,7 @@ watch(
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
|
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@ -7,8 +7,10 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
AButton: typeof import('@arco-design/web-vue')['Button']
|
||||
ACascader: typeof import('@arco-design/web-vue')['Cascader']
|
||||
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
|
||||
AInput: typeof import('@arco-design/web-vue')['Input']
|
||||
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
|
||||
ASelect: typeof import('@arco-design/web-vue')['Select']
|
||||
ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
|
||||
Footer: typeof import('./components/footer/index.vue')['default']
|
||||
Header: typeof import('./components/Header/index.vue')['default']
|
||||
|
@ -10,8 +10,7 @@ import '@arco-design/web-vue/dist/arco.css';
|
||||
// 支持SVG
|
||||
import 'virtual:svg-icons-register'
|
||||
|
||||
import naive from 'naive-ui'
|
||||
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const app = createApp(App)
|
||||
app.use(naive)
|
||||
Message._context = app._context;
|
||||
app.use(router).use(ArcoVue).use(ArcoVueIcon).use(piniaStore).mount('#app')
|
||||
|
@ -2,7 +2,7 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
@ -55,7 +55,7 @@ const options = reactive([
|
||||
value: 224,
|
||||
},
|
||||
])
|
||||
const message = useMessage()
|
||||
const message = Message
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
@ -93,7 +93,7 @@ function copyvalue() {
|
||||
/>
|
||||
</div>
|
||||
<div class="generate">
|
||||
<a-input v-model="value" placeholder="请输入UID" />
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
|
@ -2,129 +2,112 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import holyrelicname from './json/holyrelicname.json'
|
||||
import holyrelicnmain from './json/holyrelicnmain.json'
|
||||
import holyrelicx from './json/holyrelicnx.json'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
var uid = ref('')
|
||||
var holyrelicnamevalue = ref('')
|
||||
var holyrelicnmainvalue = ref('')
|
||||
|
||||
|
||||
|
||||
var uid = ref("")
|
||||
var holyrelicnamevalue = ref("")
|
||||
var holyrelicnmainvalue = ref("")
|
||||
|
||||
var grade = ref("0")
|
||||
var grade = ref('0')
|
||||
var selectedValue = ref()
|
||||
var num = ref()
|
||||
|
||||
const value = computed(() => {
|
||||
|
||||
var xct = ''
|
||||
options3.value.forEach(k => {
|
||||
options3.value.forEach((k) => {
|
||||
if (k.isCheck) {
|
||||
xct = xct + ` ${k.value},${k.num}`
|
||||
}
|
||||
});
|
||||
return `/giveart ${uid.value} ${holyrelicnamevalue.value} ${holyrelicnmainvalue.value}${xct} ${grade.value + 1}`
|
||||
})
|
||||
return `/giveart ${uid.value} ${holyrelicnamevalue.value} ${holyrelicnmainvalue.value}${xct} ${
|
||||
grade.value + 1
|
||||
}`
|
||||
})
|
||||
const options = reactive(
|
||||
holyrelicname
|
||||
)
|
||||
const options = reactive(holyrelicname)
|
||||
|
||||
const options2 = reactive(
|
||||
holyrelicnmain
|
||||
)
|
||||
const options2 = reactive(holyrelicnmain)
|
||||
|
||||
var holyrelicx1 = holyrelicx.map(k => {
|
||||
var holyrelicx1 = holyrelicx.map((k) => {
|
||||
const obj = {
|
||||
isCheck: false,
|
||||
num: 1,
|
||||
label: k.label,
|
||||
value: k.value
|
||||
value: k.value,
|
||||
}
|
||||
return obj
|
||||
})
|
||||
const options3 = ref(
|
||||
holyrelicx1
|
||||
)
|
||||
const options3 = ref(holyrelicx1)
|
||||
|
||||
|
||||
|
||||
const message = useMessage()
|
||||
const message = Message
|
||||
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value.value}`
|
||||
)
|
||||
message.success(`已复制${value.value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
UID:
|
||||
</div>
|
||||
<n-input v-model:value="uid" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> UID: </div>
|
||||
<a-input v-model="uid" placeholder="请输入UID" allow-clear />
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
圣遗物:
|
||||
</div>
|
||||
<n-cascader v-model:value="holyrelicnamevalue" filterable placeholder="选择圣遗物" :options="options" check-strategy="child"/>
|
||||
<div class="text-slate-900 dark:text-slate-100"> 圣遗物: </div>
|
||||
<a-cascader
|
||||
allow-search
|
||||
v-model="holyrelicnamevalue"
|
||||
:options="options"
|
||||
placeholder="请输入物品"
|
||||
filterable
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
主属性:
|
||||
</div>
|
||||
<n-select v-model:value="holyrelicnmainvalue" filterable placeholder="选择圣遗物主属性" :options="options2" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 主属性: </div>
|
||||
<a-cascader
|
||||
allow-search
|
||||
v-model="holyrelicnmainvalue"
|
||||
:options="options2"
|
||||
placeholder="请输入主属性"
|
||||
filterable
|
||||
/>
|
||||
<!-- <n-select v-model:value="holyrelicnmainvalue" filterable placeholder="选择圣遗物主属性" :options="options2" /> -->
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
属性小词条:
|
||||
</div>
|
||||
<div class="text-slate-900 dark:text-slate-100"> 属性小词条: </div>
|
||||
|
||||
<n-scrollbar class="smallho" style="height: 300px;">
|
||||
<div class="smallho">
|
||||
<div class="smallho-item" v-for="(item, index) in options3" :key="index">
|
||||
<n-checkbox v-model:checked="item.isCheck" style="margin-right: 12px"
|
||||
class="text-slate-900 dark:text-slate-100" />
|
||||
<a-checkbox v-model="item.isCheck"></a-checkbox>
|
||||
<div class="text-slate-900 dark:text-slate-100">{{ item.label }} </div>
|
||||
<div>
|
||||
<n-input-number v-model:value="item.num" :min="1" placeholder="" :show-button="false" />
|
||||
<a-input-number placeholder="" v-model="item.num" :min="1" />
|
||||
</div>
|
||||
</div>
|
||||
</n-scrollbar>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
强化等级:
|
||||
</div>
|
||||
<n-input-number v-model:value="grade" placeholder="" :min="0" :max="20" :show-button="false" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 强化等级: </div>
|
||||
|
||||
<a-input-number placeholder="" v-model="grade" :min="0" :max="20" />
|
||||
</div>
|
||||
|
||||
<div class="generate">
|
||||
<n-input id="input" v-model:value="value" type="text" placeholder="" />
|
||||
<n-button type="tertiary" @click="copyvalue">
|
||||
复制
|
||||
</n-button>
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
@ -138,7 +121,7 @@ function copyvalue() {
|
||||
color: #000;
|
||||
margin: 18px 0;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
@ -154,12 +137,16 @@ function copyvalue() {
|
||||
}
|
||||
|
||||
.smallho {
|
||||
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
.smallho-item {
|
||||
margin: 10px 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(3) {
|
||||
width: 80px;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,13 +2,11 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
import monster from './json/monster.json'
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
|
||||
|
||||
var value2 = ref(21010101)
|
||||
var grade = ref(80)
|
||||
var num = ref(10)
|
||||
@ -16,55 +14,49 @@ var num = ref(10)
|
||||
const value = computed(() => {
|
||||
return `/spawn ${value2.value} ${num.value} ${grade.value}`
|
||||
})
|
||||
const options = reactive(
|
||||
monster
|
||||
)
|
||||
const message = useMessage()
|
||||
const options = reactive(monster)
|
||||
const message = Message
|
||||
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value.value}`
|
||||
)
|
||||
message.success(`已复制${value.value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
怪物:
|
||||
</div>
|
||||
<n-select v-model:value="value2" filterable :options="options" />
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
等级:
|
||||
</div>
|
||||
<n-input v-model:value="grade" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 怪物: </div>
|
||||
<a-cascader allow-search v-model="value2" :options="options" placeholder="" filterable />
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
数量:
|
||||
</div>
|
||||
<n-input-number v-model:value="num" clearable />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 等级: </div>
|
||||
<a-input-number
|
||||
v-model="grade"
|
||||
placeholder="请输入数量"
|
||||
mode="button"
|
||||
size="large"
|
||||
class="input-demo"
|
||||
/>
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100"> 数量: </div>
|
||||
<a-input-number
|
||||
v-model="num"
|
||||
placeholder="请输入数量"
|
||||
mode="button"
|
||||
size="large"
|
||||
class="input-demo"
|
||||
/>
|
||||
</div>
|
||||
<div class="generate">
|
||||
<n-input id="input" v-model:value="value" type="text" placeholder="" />
|
||||
<n-button type="tertiary" @click="copyvalue">
|
||||
复制
|
||||
</n-button>
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
@ -78,7 +70,7 @@ function copyvalue() {
|
||||
color: #000;
|
||||
margin: 18px 0;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
|
@ -2,101 +2,83 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
|
||||
|
||||
|
||||
const options = reactive(
|
||||
[
|
||||
{
|
||||
title: "治疗队伍中所有角色",
|
||||
isuse: '仅客户端',
|
||||
value: "/heal"
|
||||
},
|
||||
{
|
||||
title: "列出在线玩家",
|
||||
isuse: '均可使用',
|
||||
value: "/list"
|
||||
},
|
||||
{
|
||||
title: "获取当前坐标",
|
||||
isuse: '仅客户端',
|
||||
value: "/position"
|
||||
},
|
||||
{
|
||||
title: "重载服务器配置",
|
||||
isuse: '均可使用',
|
||||
value: "/reload"
|
||||
},
|
||||
{
|
||||
title: "重启服务端",
|
||||
isuse: '均可使用',
|
||||
value: "/restart"
|
||||
},
|
||||
{
|
||||
title: "停止服务器",
|
||||
isuse: '均可使用',
|
||||
value: "/stop"
|
||||
},
|
||||
{
|
||||
title: "世界等级8",
|
||||
isuse: '仅客户端',
|
||||
value: "/setworldlevel 8"
|
||||
}
|
||||
]
|
||||
)
|
||||
const message = useMessage()
|
||||
const options = reactive([
|
||||
{
|
||||
title: '治疗队伍中所有角色',
|
||||
isuse: '仅客户端',
|
||||
value: '/heal',
|
||||
},
|
||||
{
|
||||
title: '列出在线玩家',
|
||||
isuse: '均可使用',
|
||||
value: '/list',
|
||||
},
|
||||
{
|
||||
title: '获取当前坐标',
|
||||
isuse: '仅客户端',
|
||||
value: '/position',
|
||||
},
|
||||
{
|
||||
title: '重载服务器配置',
|
||||
isuse: '均可使用',
|
||||
value: '/reload',
|
||||
},
|
||||
{
|
||||
title: '重启服务端',
|
||||
isuse: '均可使用',
|
||||
value: '/restart',
|
||||
},
|
||||
{
|
||||
title: '停止服务器',
|
||||
isuse: '均可使用',
|
||||
value: '/stop',
|
||||
},
|
||||
{
|
||||
title: '世界等级8',
|
||||
isuse: '仅客户端',
|
||||
value: '/setworldlevel 8',
|
||||
},
|
||||
])
|
||||
const message = Message
|
||||
|
||||
function copyvalue(value: string) {
|
||||
copy(value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value}`
|
||||
)
|
||||
message.success(`已复制${value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
<div v-for="(item, index) in options">
|
||||
<div v-for="(item, index) in options" :key="index">
|
||||
<div class="text-slate-900 dark:text-slate-100">{{ item.title }}</div>
|
||||
<div>
|
||||
<n-input v-model:value="item.value" type="text" disabled />
|
||||
<a-input v-model="item.value" placeholder="" disabled />
|
||||
</div>
|
||||
<div>
|
||||
<n-button type="tertiary" @click="copyvalue(item.value)">
|
||||
复制
|
||||
</n-button>
|
||||
</div>
|
||||
<div>
|
||||
<n-gradient-text gradient="linear-gradient(90deg, red 0%, green 50%, blue 100%)">
|
||||
{{ item.isuse }}
|
||||
</n-gradient-text>
|
||||
<a-button type="outline" @click="copyvalue(item.value)">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue(item.value)">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
width: 500px;
|
||||
margin: auto;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
margin: 10px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #000;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 130px;
|
||||
}
|
||||
@ -106,8 +88,6 @@ function copyvalue(value: string) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.generate {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -2,66 +2,47 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
import role from './json/role.json'
|
||||
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
|
||||
|
||||
|
||||
var value2 = ref()
|
||||
var num = ref()
|
||||
|
||||
const value = computed(() => {
|
||||
return `/setstats ${value2.value} ${num.value}`
|
||||
})
|
||||
const options = reactive(
|
||||
role
|
||||
)
|
||||
const message = useMessage()
|
||||
const options = reactive(role)
|
||||
const message = Message
|
||||
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value.value}`
|
||||
)
|
||||
message.success(`已复制${value.value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
<div class="title">
|
||||
直接修改当前角色的面板
|
||||
</div>
|
||||
<div class="title"> 直接修改当前角色的面板 </div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
属性:
|
||||
</div>
|
||||
<n-select v-model:value="value2" :options="options" placeholder=""/>
|
||||
<div class="text-slate-900 dark:text-slate-100"> 属性: </div>
|
||||
<a-cascader allow-search v-model="value2" :options="options" placeholder="" filterable />
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
数值:
|
||||
</div>
|
||||
<n-input v-model:value="num" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 数值: </div>
|
||||
<a-input-number v-model="num" placeholder="" mode="button" size="large" class="input-demo" />
|
||||
</div>
|
||||
<div class="generate">
|
||||
<n-input id="input" v-model:value="value" type="text" placeholder="" />
|
||||
<n-button type="tertiary" @click="copyvalue">
|
||||
复制
|
||||
</n-button>
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
@ -81,7 +62,7 @@ function copyvalue() {
|
||||
color: #000;
|
||||
margin: 18px 0;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
|
@ -2,89 +2,78 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import thing from './json/thing.json'
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
|
||||
|
||||
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
var value2 = ref()
|
||||
var value3 = ref("/give")
|
||||
var value3 = ref('/give')
|
||||
var uid = ref()
|
||||
var num = ref()
|
||||
|
||||
const value = computed(() => {
|
||||
return `${value3.value} ${uid.value} ${value2.value} ${num.value}`
|
||||
})
|
||||
const options = reactive(
|
||||
thing
|
||||
)
|
||||
const options2 = reactive(
|
||||
[
|
||||
{
|
||||
"label": "给予指定玩家一定数量的物品",
|
||||
"value": "/give"
|
||||
},
|
||||
{
|
||||
"label": "在指定玩家周围掉落指定物品",
|
||||
"value": "/drop"
|
||||
},
|
||||
]
|
||||
)
|
||||
const message = useMessage()
|
||||
const options = reactive(thing)
|
||||
const options2 = reactive([
|
||||
{
|
||||
label: '给予指定玩家一定数量的物品',
|
||||
value: '/give',
|
||||
},
|
||||
{
|
||||
label: '在指定玩家周围掉落指定物品',
|
||||
value: '/drop',
|
||||
},
|
||||
])
|
||||
const message = Message
|
||||
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value.value}`
|
||||
)
|
||||
message.success(`已复制${value.value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
UID:
|
||||
</div>
|
||||
<n-input v-model:value="uid" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> UID: </div>
|
||||
<a-input v-model="uid" placeholder="请输入UID" allow-clear />
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
获取方式:
|
||||
</div>
|
||||
<n-select filterable v-model:value="value3" :options="options2" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 获取方式: </div>
|
||||
<a-cascader allow-search v-model="value3" :options="options2" placeholder="" filterable />
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
物品:
|
||||
</div>
|
||||
<n-select filterable v-model:value="value2" :options="options" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 物品: </div>
|
||||
<a-select
|
||||
allow-search
|
||||
v-model="value2"
|
||||
:options="options"
|
||||
placeholder="请输入物品"
|
||||
:virtual-list-props="{ height: 200 }"
|
||||
filterable
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
数量:
|
||||
</div>
|
||||
<n-input-number v-model:value="num" clearable />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 数量: </div>
|
||||
<a-input-number
|
||||
v-model="num"
|
||||
placeholder="请输入数量"
|
||||
mode="button"
|
||||
size="large"
|
||||
class="input-demo"
|
||||
/>
|
||||
</div>
|
||||
<div class="generate">
|
||||
<n-input id="input" v-model:value="value" type="text" placeholder="" />
|
||||
<n-button type="tertiary" @click="copyvalue">
|
||||
复制
|
||||
</n-button>
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
@ -98,7 +87,7 @@ function copyvalue() {
|
||||
color: #000;
|
||||
margin: 18px 0;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
|
@ -2,13 +2,10 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from 'vue'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { useMessage } from 'naive-ui'
|
||||
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import weapon from './json/weapon.json'
|
||||
const { text, isSupported, copy } = useClipboard()
|
||||
|
||||
|
||||
|
||||
var uid = ref(1)
|
||||
var value2 = ref(12510)
|
||||
var num = ref(5)
|
||||
@ -18,66 +15,63 @@ var refined = ref(5)
|
||||
const value = computed(() => {
|
||||
return `/give ${uid.value} ${value2.value} ${num.value} ${grade.value} ${refined.value}`
|
||||
})
|
||||
const options = reactive(
|
||||
weapon
|
||||
)
|
||||
const message = useMessage()
|
||||
const options = reactive(weapon)
|
||||
|
||||
function copyvalue() {
|
||||
copy(value.value)
|
||||
if (isSupported) {
|
||||
message.success(
|
||||
`已复制${value.value}`
|
||||
)
|
||||
Message.success(`已复制${value.value}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div class="commuse">
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
UID:
|
||||
</div>
|
||||
<n-input v-model:value="uid" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> UID: </div>
|
||||
<a-input v-model="uid" placeholder="请输入UID" allow-clear />
|
||||
</div>
|
||||
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
武器:
|
||||
</div>
|
||||
<n-select v-model:value="value2" filterable :options="options" />
|
||||
</div >
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
数量:
|
||||
</div>
|
||||
<n-input v-model:value="grade" type="text" placeholder="" />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 武器: </div>
|
||||
<a-cascader
|
||||
allow-search
|
||||
v-model="value2"
|
||||
:options="options"
|
||||
placeholder="请输入物品"
|
||||
filterable
|
||||
/>
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
等级:
|
||||
</div>
|
||||
<n-input-number v-model:value="num" clearable />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 数量: </div>
|
||||
<a-input-number v-model="num" placeholder="" mode="button" size="large" class="input-demo" />
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100">
|
||||
精炼等级:
|
||||
</div>
|
||||
<n-input-number v-model:value="refined" clearable />
|
||||
<div class="text-slate-900 dark:text-slate-100"> 等级: </div>
|
||||
<a-input-number
|
||||
v-model="grade"
|
||||
placeholder="请输入"
|
||||
mode="button"
|
||||
size="large"
|
||||
class="input-demo"
|
||||
/>
|
||||
</div>
|
||||
<div class="commuse-item">
|
||||
<div class="text-slate-900 dark:text-slate-100"> 精炼等级: </div>
|
||||
<a-input-number
|
||||
v-model="refined"
|
||||
placeholder="请输入"
|
||||
mode="button"
|
||||
size="large"
|
||||
class="input-demo"
|
||||
/>
|
||||
</div>
|
||||
<div class="generate">
|
||||
<n-input id="input" v-model:value="value" type="text" placeholder="" />
|
||||
<n-button type="tertiary" @click="copyvalue">
|
||||
复制
|
||||
</n-button>
|
||||
<a-input v-model="value" placeholder="" />
|
||||
<a-button type="outline" @click="copyvalue">复制</a-button>
|
||||
<!-- <a-button type="outline" @click="copyvalue">执行</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.commuse {
|
||||
@ -91,7 +85,7 @@ function copyvalue() {
|
||||
color: #000;
|
||||
margin: 18px 0;
|
||||
|
||||
>div {
|
||||
> div {
|
||||
&:nth-child(1) {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
|
Loading…
Reference in New Issue
Block a user