mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 11:13:42 +08:00
feat: add task type params for add new mj task
This commit is contained in:
@@ -58,8 +58,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
|
||||
import {computed, onMounted, ref} from "vue"
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import {ElMessage} from "element-plus";
|
||||
@@ -107,7 +105,7 @@ const afterRead = (file) => {
|
||||
// 执行上传操作
|
||||
httpPost('/api/upload', formData).then((res) => {
|
||||
form.value.avatar = res.data
|
||||
ElMessage.success('上传成功')
|
||||
ElMessage.success({message: "上传成功", duration: 500})
|
||||
}).catch((e) => {
|
||||
ElMessage.error('上传失败:' + e.message)
|
||||
})
|
||||
@@ -124,6 +122,7 @@ const save = function () {
|
||||
httpPost('/api/user/profile/update', form.value).then(() => {
|
||||
ElMessage.success({
|
||||
message: '更新成功',
|
||||
duration: 500,
|
||||
onClose: () => emits('hide', false)
|
||||
})
|
||||
// 更新用户数据
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="waterfall" ref="container">
|
||||
<div class="waterfall-inner">
|
||||
<div class="list-box" ref="container">
|
||||
<div class="list-inner">
|
||||
<div
|
||||
class="waterfall-item"
|
||||
class="list-item"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:style="{width:itemWidth + 'px', height:height+'px', marginBottom: margin*2+'px'}"
|
||||
:style="{width:itemWidth + 'px', marginBottom: margin*2+'px'}"
|
||||
>
|
||||
<div :style="{marginLeft: margin+'px', marginRight: margin+'px'}">
|
||||
<div class="item-wrapper">
|
||||
@@ -51,10 +51,10 @@ onMounted(() => {
|
||||
const computeSize = () => {
|
||||
const w = container.value.offsetWidth - 10 // 减去滚动条的宽度
|
||||
let cols = Math.floor(w / props.width)
|
||||
itemWidth.value = w / cols
|
||||
itemWidth.value = Math.floor(w / cols) - 1
|
||||
while (itemWidth.value < props.width && cols > 1) {
|
||||
cols -= 1
|
||||
itemWidth.value = w / cols
|
||||
itemWidth.value = Math.floor(w / cols) - 1
|
||||
}
|
||||
|
||||
if (props.gap > 0) {
|
||||
@@ -69,13 +69,13 @@ window.onresize = () => {
|
||||
|
||||
<style scoped lang="stylus">
|
||||
|
||||
.waterfall {
|
||||
.list-box {
|
||||
|
||||
.waterfall-inner {
|
||||
.list-inner {
|
||||
display flex
|
||||
flex-wrap wrap
|
||||
|
||||
.waterfall-item {
|
||||
.list-item {
|
||||
|
||||
div {
|
||||
display flex
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div>小试牛刀</div>
|
||||
</div>
|
||||
|
||||
<div class="item-list">
|
||||
<div class="list-box">
|
||||
<ul>
|
||||
<li v-for="item in samples" :key="item"><a @click="send(item)">{{ item }}</a></li>
|
||||
</ul>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div>插件增强</div>
|
||||
</div>
|
||||
|
||||
<div class="item-list">
|
||||
<div class="list-box">
|
||||
<ul>
|
||||
<li v-for="item in plugins" :key="item.value"><a @click="send(item.value)">{{ item.text }}</a></li>
|
||||
</ul>
|
||||
@@ -39,7 +39,7 @@
|
||||
<div>能力扩展</div>
|
||||
</div>
|
||||
|
||||
<div class="item-list">
|
||||
<div class="list-box">
|
||||
<ul>
|
||||
<li v-for="item in capabilities" :key="item">
|
||||
<span v-if="item.value === ''">{{ item.text }}</span>
|
||||
@@ -139,7 +139,7 @@ const send = (text) => {
|
||||
}
|
||||
}
|
||||
|
||||
.item-list {
|
||||
.list-box {
|
||||
ul {
|
||||
padding 10px;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user