chore:细节问题调整
This commit is contained in:
parent
c85d39467f
commit
3b0021a275
12
src/App.vue
12
src/App.vue
@ -14,9 +14,8 @@
|
||||
<img src="./assets/svg/add.svg" class="tool-icon" @click="add({},'add')" />
|
||||
<a title="我的博客" href="https://zhanhongzhu.top" target="_blank"><img src="./assets/svg/blog.svg" class="tool-icon" /></a>
|
||||
<a title="在线翻译" href="https://translate.google.cn" target="_blank"><img src="./assets/svg/translate.svg" class="tool-icon" /></a>
|
||||
<span class="login-s" @click="loginClick"><img src="./assets/svg/user.svg" class="tool-icon" title="已登录"/><span class="login-status" :title="userInfo.username">{{userInfo.username.slice(0, 5)}}</span></span>
|
||||
<span class="login-s" @click="loginClick"><img src="./assets/svg/user.svg" class="tool-icon" title="已登录" /><span class="login-status" :title="userInfo.username">{{userInfo.username.slice(0, 5)}}</span></span>
|
||||
</div>
|
||||
|
||||
<!-- userInfo.objectId?LoginOut:handleUserLogin -->
|
||||
</div>
|
||||
<!-- 侧边导航栏 -->
|
||||
@ -138,17 +137,20 @@ export default {
|
||||
fn()
|
||||
} else {
|
||||
// 已登录 系统无数据
|
||||
getObject('BOOKMARK').then((res) => {
|
||||
getObject('BOOKMARK')
|
||||
.then((res) => {
|
||||
if (res.length > 0) {
|
||||
rowData = JSON.parse(res[0].attributes.formDatas)
|
||||
} else {
|
||||
localStorage.setItem('BOOKMARK', JSON.stringify(myData))
|
||||
rowData = JSON.parse(JSON.stringify(myData))
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
localStorage.setItem('BOOKMARK', JSON.stringify(myData))
|
||||
rowData = JSON.parse(JSON.stringify(myData))
|
||||
}).finally(() => {
|
||||
})
|
||||
.finally(() => {
|
||||
fn()
|
||||
data.data = rowData
|
||||
data.bookMark = rowData[0].children
|
||||
|
@ -46,21 +46,21 @@ import { ElMessage } from 'element-plus'
|
||||
export default {
|
||||
model: {
|
||||
value: 'isDetailVisible',
|
||||
events: 'closeViews'
|
||||
events: 'closeViews',
|
||||
},
|
||||
props: {
|
||||
isDetailVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
selectType: {
|
||||
type: Number,
|
||||
default: 0
|
||||
default: 0,
|
||||
},
|
||||
detail: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
setup(props, context) {
|
||||
const isBOOKMARK = JSON.parse(localStorage.getItem('BOOKMARK'))
|
||||
@ -71,13 +71,13 @@ export default {
|
||||
type: '',
|
||||
desc: '',
|
||||
url: '',
|
||||
logo: ''
|
||||
}
|
||||
logo: '',
|
||||
},
|
||||
})
|
||||
// 定义校验规则 表单代码中必须以 :rules 接收
|
||||
const rules = {
|
||||
title: [{ required: true, message: '请输入书签名称', trigger: 'blur' }],
|
||||
type: [{ required: true, message: '请选择书签类别', trigger: 'change' }]
|
||||
type: [{ required: true, message: '请选择书签类别', trigger: 'change' }],
|
||||
}
|
||||
const refruleForm = ref(null)
|
||||
// 确定按钮的格式
|
||||
@ -101,7 +101,9 @@ export default {
|
||||
// 更改了分类
|
||||
// 当前分类删除该数据
|
||||
if (myDetail.type === v.type) {
|
||||
const pindex = v.children.findIndex(p => p.title === myDetail.title)
|
||||
const pindex = v.children.findIndex(
|
||||
(p) => p.title === myDetail.title
|
||||
)
|
||||
v.children.splice(pindex, 1)
|
||||
}
|
||||
// 新分类添加该分类
|
||||
@ -148,11 +150,10 @@ export default {
|
||||
submitForm,
|
||||
refruleForm,
|
||||
rules,
|
||||
BOOKMARK
|
||||
BOOKMARK,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
<el-input v-model="ruleForm.password" show-password placeholder="请输入密码"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -6,7 +6,9 @@ import 'element-plus/lib/theme-chalk/index.css'
|
||||
|
||||
// 接入了Leancloud
|
||||
import AV from 'leancloud-storage'
|
||||
// 请注册leancloud,新建应用,然后替换这个
|
||||
AV.init({ appId: '\x42\x77\x4c\x72\x43\x67\x64\x56\x79\x4c\x73\x35\x32\x6d\x4a\x4f\x31\x48\x63\x72\x58\x61\x6b\x49\x2d\x67\x7a\x47\x7a\x6f\x48\x73\x7a', appKey: '\x32\x35\x67\x4e\x77\x7a\x77\x34\x64\x56\x37\x49\x41\x68\x37\x69\x30\x49\x7a\x44\x6e\x59\x76\x56', serverURL: '\x68\x74\x74\x70\x73\x3a\x2f\x2f\x62\x77\x6c\x72\x63\x67\x64\x76\x2e\x6c\x63\x2d\x63\x6e\x2d\x6e\x31\x2d\x73\x68\x61\x72\x65\x64\x2e\x63\x6f\x6d' })
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
|
Loading…
Reference in New Issue
Block a user