Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢林臻
sun
Commits
7972f2e6
Commit
7972f2e6
authored
Dec 19, 2018
by
Davve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加标签类型过滤和标签图片
parent
a67122a3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
tag.py
api/tag.py
+1
-0
proxy.js
vu/mock/proxy.js
+1
-1
TagDetail.vue
vu/src/views/tag/components/TagDetail.vue
+11
-1
list.vue
vu/src/views/tag/list.vue
+1
-0
No files found.
api/tag.py
View file @
7972f2e6
...
...
@@ -63,6 +63,7 @@ class TagUpdateOrCreateView(APIView):
'down_tags'
:
down_tags
,
'up_tags'
:
up_tags
,
'tagtypes'
:
tagtypes
,
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
]
}
try
:
data
=
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
...
vu/mock/proxy.js
View file @
7972f2e6
var
api
=
require
(
'./api'
)
//
// const target = 'http://doctor.test.env'
const
target
=
'http://172.30.8.
2
31:8000'
const
target
=
'http://172.30.8.
1
31:8000'
// const target = 'http://192.168.1.9:8000'
// 可以修改请求内容
...
...
vu/src/views/tag/components/TagDetail.vue
View file @
7972f2e6
...
...
@@ -88,6 +88,13 @@
placeholder=
"请输入内容"
/>
<span
v-show=
"contentShortLength"
class=
"word-counter"
>
{{
contentShortLength
}}
字
</span>
</el-form-item>
<div
style=
"margin-bottom: 20px"
>
<el-form-item
style=
"margin-bottom: 40px;"
label-width=
"75px"
label=
"帖子图片:"
prop=
"icon_url"
>
<span
v-model=
"uploadType"
></span>
<Upload
v-model=
"postForm.icon_url"
:uploadType=
"uploadType"
/>
</el-form-item>
</div>
</div>
</el-form>
...
...
@@ -95,6 +102,7 @@
</
template
>
<
script
>
import
Upload
from
'@/components/Upload/singleImage3'
import
MDinput
from
'@/components/MDinput'
import
Sticky
from
'@/components/Sticky'
// 粘性header组件
import
{
fetchTagDetail
,
CreateTag
}
from
'@/api/tag'
...
...
@@ -109,11 +117,12 @@
up_tags
:
[],
down_tags
:
[],
tagtypes
:
[],
icon_url
:
''
,
}
export
default
{
name
:
'TagDetail'
,
components
:
{
MDinput
,
Sticky
},
components
:
{
MDinput
,
Sticky
,
Upload
},
props
:
{
isEdit
:
{
type
:
Boolean
,
...
...
@@ -141,6 +150,7 @@
up_tags
:
[],
down_tags
:
[],
tagtypes
:
[],
uploadType
:
25
,
rules
:
{
name
:
[{
validator
:
validateRequire
,
trigger
:
'blur'
}],
},
...
...
vu/src/views/tag/list.vue
View file @
7972f2e6
...
...
@@ -86,6 +86,7 @@ export default {
SearchTypeOptions
:[
{
'key'
:
'id'
,
'display_name'
:
'ID'
},
{
'key'
:
'name'
,
'display_name'
:
'标签名称'
},
{
'key'
:
'tagtype_name'
,
'display_name'
:
'标签类型'
},
]
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment