Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2b8eb49f
authored
Jan 11, 2024
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review代码修改
parent
bdf95dc0
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
16 additions
and
34 deletions
+16
-34
src/components/DiyEditor/components/ComponentContainerProperty.vue
+2
-2
src/components/DiyEditor/components/mobile/CouponCard/component.tsx
+4
-10
src/components/DiyEditor/components/mobile/CouponCard/config.ts
+0
-1
src/components/DiyEditor/components/mobile/MagicCube/config.ts
+0
-1
src/components/DiyEditor/components/mobile/ProductCard/config.ts
+0
-1
src/components/DiyEditor/components/mobile/ProductList/config.ts
+0
-1
src/components/DiyEditor/components/mobile/PromotionArticle/index.vue
+2
-3
src/components/DiyEditor/components/mobile/PromotionCombination/config.ts
+0
-2
src/components/DiyEditor/components/mobile/SearchBar/config.ts
+0
-1
src/components/DiyEditor/components/mobile/VideoPlayer/config.ts
+1
-2
src/components/DiyEditor/components/mobile/VideoPlayer/property.vue
+2
-2
src/components/DiyEditor/util.ts
+3
-4
src/router/modules/remaining.ts
+2
-4
No files found.
src/components/DiyEditor/components/ComponentContainerProperty.vue
View file @
2b8eb49f
...
...
@@ -23,7 +23,7 @@
<template
#
tip
>
建议宽度 750px
</
template
>
</UploadImg>
</el-form-item>
<el-tree
:data=
"treeData"
:expand-on-click-node=
"false"
>
<el-tree
:data=
"treeData"
:expand-on-click-node=
"false"
default-expand-all
>
<
template
#
default=
"{ node, data }"
>
<el-form-item
:label=
"data.label"
...
...
@@ -43,7 +43,7 @@
</el-form-item>
</
template
>
</el-tree>
<slot
name=
"style"
:
formData
=
"formData"
></slot>
<slot
name=
"style"
:
style
=
"formData"
></slot>
</el-form>
</el-card>
</el-tab-pane>
...
...
src/components/DiyEditor/components/mobile/CouponCard/component.tsx
View file @
2b8eb49f
...
...
@@ -2,15 +2,13 @@ import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
import
{
CouponTemplateValidityTypeEnum
,
PromotionDiscountTypeEnum
}
from
'@/utils/constants'
import
{
floatToFixed2
}
from
'@/utils'
import
{
formatDate
}
from
'@/utils/formatTime'
import
{
object
}
from
'vue-types'
// 优惠值
// TODO @疯狂:idea 有告警
export
const
CouponDiscount
=
defineComponent
({
name
:
'CouponDiscount'
,
props
:
{
coupon
:
{
type
:
CouponTemplateApi
.
CouponTemplateVO
}
coupon
:
object
<
CouponTemplateApi
.
CouponTemplateVO
>
()
},
setup
(
props
)
{
const
coupon
=
props
.
coupon
as
CouponTemplateApi
.
CouponTemplateVO
...
...
@@ -35,9 +33,7 @@ export const CouponDiscount = defineComponent({
export
const
CouponDiscountDesc
=
defineComponent
({
name
:
'CouponDiscountDesc'
,
props
:
{
coupon
:
{
type
:
CouponTemplateApi
.
CouponTemplateVO
}
coupon
:
object
<
CouponTemplateApi
.
CouponTemplateVO
>
()
},
setup
(
props
)
{
const
coupon
=
props
.
coupon
as
CouponTemplateApi
.
CouponTemplateVO
...
...
@@ -61,9 +57,7 @@ export const CouponDiscountDesc = defineComponent({
export
const
CouponValidTerm
=
defineComponent
({
name
:
'CouponValidTerm'
,
props
:
{
coupon
:
{
type
:
CouponTemplateApi
.
CouponTemplateVO
}
coupon
:
object
<
CouponTemplateApi
.
CouponTemplateVO
>
()
},
setup
(
props
)
{
const
coupon
=
props
.
coupon
as
CouponTemplateApi
.
CouponTemplateVO
...
...
src/components/DiyEditor/components/mobile/CouponCard/config.ts
View file @
2b8eb49f
...
...
@@ -24,7 +24,6 @@ export interface CouponCardProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'CouponCard'
,
name
:
'优惠券'
,
...
...
src/components/DiyEditor/components/mobile/MagicCube/config.ts
View file @
2b8eb49f
...
...
@@ -31,7 +31,6 @@ export interface MagicCubeItemProperty {
}
// 定义组件
// TODO @疯狂:有 idea 爆红告警
export
const
component
=
{
id
:
'MagicCube'
,
name
:
'广告魔方'
,
...
...
src/components/DiyEditor/components/mobile/ProductCard/config.ts
View file @
2b8eb49f
...
...
@@ -59,7 +59,6 @@ export interface ProductCardFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'ProductCard'
,
name
:
'商品卡片'
,
...
...
src/components/DiyEditor/components/mobile/ProductList/config.ts
View file @
2b8eb49f
...
...
@@ -38,7 +38,6 @@ export interface ProductListFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'ProductList'
,
name
:
'商品栏'
,
...
...
src/components/DiyEditor/components/mobile/PromotionArticle/index.vue
View file @
2b8eb49f
<
template
>
<div
class=
"min-h-30px"
v-html=
"article.content"
></div>
<div
class=
"min-h-30px"
v-html=
"article
?
.content"
></div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
PromotionArticleProperty
}
from
'./config'
import
*
as
ArticleApi
from
'@/api/mall/promotion/article/index'
/** 营销文章 */
// TODO @疯狂:idea 有告警
defineOptions
({
name
:
'PromotionArticle'
})
// 定义属性
const
props
=
defineProps
<
{
property
:
PromotionArticleProperty
}
>
()
// 商品列表
const
article
=
ref
<
ArticleApi
.
ArticleVO
[]
>
({}
)
const
article
=
ref
<
ArticleApi
.
ArticleVO
>
(
)
watch
(
()
=>
props
.
property
.
id
,
async
()
=>
{
...
...
src/components/DiyEditor/components/mobile/PromotionCombination/config.ts
View file @
2b8eb49f
...
...
@@ -39,13 +39,11 @@ export interface PromotionCombinationFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'PromotionCombination'
,
name
:
'拼团'
,
icon
:
'mdi:account-group'
,
property
:
{
activityId
:
undefined
,
layoutType
:
'oneCol'
,
fields
:
{
name
:
{
show
:
true
,
color
:
'#000'
},
...
...
src/components/DiyEditor/components/mobile/SearchBar/config.ts
View file @
2b8eb49f
...
...
@@ -17,7 +17,6 @@ export interface SearchProperty {
export
type
PlaceholderPosition
=
'left'
|
'center'
// 定义组件
// TODO @疯狂:idea 这里爆红,可以卡看咋优化下哇:is missing the following properties from type DiyComponent<SearchProperty>: uid, position
export
const
component
=
{
id
:
'SearchBar'
,
name
:
'搜索框'
,
...
...
src/components/DiyEditor/components/mobile/VideoPlayer/config.ts
View file @
2b8eb49f
...
...
@@ -19,7 +19,6 @@ export interface VideoPlayerStyle extends ComponentStyle {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'VideoPlayer'
,
name
:
'视频播放'
,
...
...
@@ -33,6 +32,6 @@ export const component = {
bgColor
:
'#fff'
,
marginBottom
:
8
,
height
:
300
}
as
Component
Style
}
as
VideoPlayer
Style
}
}
as
DiyComponent
<
VideoPlayerProperty
>
src/components/DiyEditor/components/mobile/VideoPlayer/property.vue
View file @
2b8eb49f
<
template
>
<ComponentContainerProperty
v-model=
"formData.style"
>
<template
#
style
=
"
{ formData }"
>
<template
#
style
>
<el-form-item
label=
"高度"
prop=
"height"
>
<el-slider
v-model=
"formData.height"
v-model=
"formData.
style.
height"
:max=
"500"
:min=
"100"
show-input
...
...
src/components/DiyEditor/util.ts
View file @
2b8eb49f
...
...
@@ -6,7 +6,7 @@ import { TabBarProperty } from '@/components/DiyEditor/components/mobile/TabBar/
// 页面装修组件
export
interface
DiyComponent
<
T
>
{
// 用于区分同一种组件的不同实例
uid
:
number
uid
?
:
number
// 组件唯一标识
id
:
string
// 组件名称
...
...
@@ -21,7 +21,7 @@ export interface DiyComponent<T> {
空:同center
fixed: 由组件自己决定位置,如弹窗位于手机中心、浮动按钮一般位于手机右下角
*/
position
:
'top'
|
'bottom'
|
'center'
|
''
|
'fixed'
position
?
:
'top'
|
'bottom'
|
'center'
|
''
|
'fixed'
// 组件属性
property
:
T
}
...
...
@@ -103,8 +103,7 @@ export function usePropertyForm<T>(modelValue: T, emit: Function): { formData: R
}
)
// TODO @疯狂:这个 idea 爆红,看看怎么可以解决哈
return
{
formData
}
return
{
formData
}
as
{
formData
:
Ref
<
T
>
}
}
// 页面组件库
...
...
src/router/modules/remaining.ts
View file @
2b8eb49f
...
...
@@ -473,8 +473,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
title
:
'模板装修'
,
noCache
:
true
,
hidden
:
true
,
// TODO @疯狂:建议 menu 那的 /mall/promotion/diy-template/diy-template 改成 /mall/promotion/diy/template
activeMenu
:
'/mall/promotion/diy-template/diy-template'
activeMenu
:
'/mall/promotion/diy/template'
},
component
:
()
=>
import
(
'@/views/mall/promotion/diy/template/decorate.vue'
)
},
...
...
@@ -485,8 +484,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
title
:
'页面装修'
,
noCache
:
true
,
hidden
:
true
,
// TODO @疯狂:建议 menu 那的 /mall/promotion/diy-template/diy-page 改成 /mall/promotion/diy/page
activeMenu
:
'/mall/promotion/diy-template/diy-page'
activeMenu
:
'/mall/promotion/diy/page'
},
component
:
()
=>
import
(
'@/views/mall/promotion/diy/page/decorate.vue'
)
}
...
...
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