Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 318f623d
authored
Nov 02, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品管理
1 parent
3275500c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
src/components/d2-table/index.vue
src/views/goods/commodity.vue
src/components/d2-table/index.vue
View file @
318f623
...
@@ -11,9 +11,10 @@
...
@@ -11,9 +11,10 @@
:stripe=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
@
selection-change=
"handleSelect"
:tree-props=
"
{children: 'updateGoodsList'}"
>
>
<el-table-column
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey"
v-if=
"tableParams.mutiSelectUniqueKey
&& tableParams.mutiSelectName
"
type=
"selection"
type=
"selection"
width=
"55"
width=
"55"
:reserve-selection=
"true"
:reserve-selection=
"true"
...
@@ -62,7 +63,8 @@
...
@@ -62,7 +63,8 @@
<span
v-text=
"item.formatter(scope.row)"
></span>
<span
v-text=
"item.formatter(scope.row)"
></span>
</
template
>
</
template
>
<
template
v-else-if=
"getListApi"
>
<
template
v-else-if=
"getListApi"
>
<span
v-text=
"data[scope.$index][item.prop]"
></span>
<!--
<span>
{{
data
[
scope
.
$index
][
item
.
prop
]
}}
</span>
-->
<span>
{{
scope
.
row
[
item
.
prop
]
}}
</span>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<span
v-text=
"tableData[scope.$index][item.prop]"
></span>
<span
v-text=
"tableData[scope.$index][item.prop]"
></span>
...
@@ -108,7 +110,6 @@ export default {
...
@@ -108,7 +110,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
oldValue
:
{},
data
:
[],
data
:
[],
// 页码
// 页码
page
:
{
page
:
{
...
...
src/views/goods/commodity.vue
View file @
318f623
...
@@ -56,25 +56,32 @@
...
@@ -56,25 +56,32 @@
</d2-table-header>
</d2-table-header>
<d2-table
<d2-table
ref=
"commodityTable"
ref=
"commodityTable"
:hasNum=
"false"
:searchForm=
"searchForm"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:beforeSearchFn=
"beforeSearchFn"
>
>
<
span
<
img
slot=
"img"
slot=
"img"
slot-scope=
"scope"
slot-scope=
"scope"
>
<img
class=
"pro-img"
class=
"pro-img"
:src=
"scope.scope.img"
:src=
"scope.scope.img"
/>
/>
</span>
<auth-button
<auth-button
v-if=
"Object.keys(scope.scope).includes('updateGoodsList')"
slot=
"auth-button"
slot=
"auth-button"
slot-scope=
"scope"
slot-scope=
"scope"
:data=
"scope.scope"
:data=
"scope.scope"
></auth-button>
></auth-button>
<el-button
v-else
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
type=
"text"
@
click=
"handleUpOrDown"
>
{{
scope
.
scope
.
state
?
'上架'
:
'下架'
}}
</el-button>
</d2-table>
</d2-table>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -96,6 +103,7 @@ export default {
...
@@ -96,6 +103,7 @@ export default {
getListApi
:
getList
,
getListApi
:
getList
,
// 表格参数
// 表格参数
tableParams
:
{
tableParams
:
{
mutiSelectUniqueKey
:
'id'
,
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
true
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment