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
af67db57
authored
Dec 01, 2023
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营销:适配商城装修组件【用户卡片】
parent
d5f9d31d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
1 deletions
+70
-1
src/components/DiyEditor/components/ComponentContainerProperty.vue
+1
-1
src/components/DiyEditor/components/mobile/UserCard/config.ts
+23
-0
src/components/DiyEditor/components/mobile/UserCard/index.vue
+29
-0
src/components/DiyEditor/components/mobile/UserCard/property.vue
+17
-0
No files found.
src/components/DiyEditor/components/ComponentContainerProperty.vue
View file @
af67db57
<
template
>
<el-tabs
stretch
>
<el-tab-pane
label=
"内容"
>
<el-tab-pane
label=
"内容"
v-if=
"$slots.default"
>
<slot></slot>
</el-tab-pane>
<el-tab-pane
label=
"样式"
lazy
>
...
...
src/components/DiyEditor/components/mobile/UserCard/config.ts
0 → 100644
View file @
af67db57
import
{
ComponentStyle
,
DiyComponent
}
from
'@/components/DiyEditor/util'
/** 用户卡片属性 */
export
interface
UserCardProperty
{
// 组件样式
style
:
ComponentStyle
}
// 定义组件
export
const
component
=
{
id
:
'UserCard'
,
name
:
'用户卡片'
,
icon
:
'mdi:user-card-details'
,
property
:
{
style
:
{
bgType
:
'color'
,
bgColor
:
''
,
marginLeft
:
8
,
marginRight
:
8
,
marginBottom
:
8
}
as
ComponentStyle
}
}
as
DiyComponent
<
UserCardProperty
>
src/components/DiyEditor/components/mobile/UserCard/index.vue
0 → 100644
View file @
af67db57
<
template
>
<div
class=
"flex flex-col"
>
<div
class=
"flex items-center justify-between p-x-18px p-y-24px"
>
<div
class=
"flex flex-1 items-center gap-16px"
>
<el-avatar
:size=
"60"
>
<Icon
icon=
"ep:avatar"
:size=
"60"
/>
</el-avatar>
<span
class=
"text-18px font-bold"
>
芋道源码
</span>
</div>
<Icon
icon=
"tdesign:qrcode"
:size=
"20"
/>
</div>
<div
class=
"flex items-center justify-between justify-between bg-white p-x-20px p-y-8px text-12px"
>
<span
class=
"color-#ff690d"
>
点击绑定手机号
</span>
<span
class=
"rounded-26px bg-#ff6100 p-x-8px p-y-5px color-white"
>
去绑定
</span>
</div>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
UserCardProperty
}
from
'./config'
/** 用户卡片 */
defineOptions
({
name
:
'UserCard'
})
// 定义属性
defineProps
<
{
property
:
UserCardProperty
}
>
()
</
script
>
<
style
scoped
lang=
"scss"
></
style
>
src/components/DiyEditor/components/mobile/UserCard/property.vue
0 → 100644
View file @
af67db57
<
template
>
<ComponentContainerProperty
v-model=
"formData.style"
/>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
UserCardProperty
}
from
'./config'
import
{
usePropertyForm
}
from
'@/components/DiyEditor/util'
// 用户卡片属性面板
defineOptions
({
name
:
'UserCardProperty'
})
const
props
=
defineProps
<
{
modelValue
:
UserCardProperty
}
>
()
const
emit
=
defineEmits
([
'update:modelValue'
])
const
{
formData
}
=
usePropertyForm
(
props
.
modelValue
,
emit
)
</
script
>
<
style
scoped
lang=
"scss"
></
style
>
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