Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
najiu-frontend
najiu-admin-template
Commits
8f5016e3
Commit
8f5016e3
authored
Oct 27, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: the Button component extends the and attributes
parent
6bffdb5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+2
-0
index.vue
src/components/Button/index.vue
+12
-1
index.vue
src/views/demo/feat/msg/index.vue
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
8f5016e3
...
...
@@ -3,6 +3,7 @@
### ✨ Features
-
新增
`pwa`
功能,可在
`.env.production`
开启
-
Button 组件扩展
`preIcon`
和
`postIcon`
属性用于在文本前后添加图标
### 🎫 Chores
...
...
@@ -25,6 +26,7 @@
-
修复热更新时多次注册组件警告问题
-
修复登录后出现登录标签页
-
修复路由切换参数消失问题
## 2.0.0-rc.5 (2020-10-26)
...
...
src/components/Button/index.vue
View file @
8f5016e3
<
template
>
<Button
v-bind=
"getBindValue"
:class=
"[getColor, $attrs.class]"
>
<template
#[item]=
"data"
v-for=
"item in Object.keys($slots)"
>
<
!--
<
template
#[item]=
"data"
v-for=
"item in Object.keys($slots)"
>
<slot
:name=
"item"
v-bind=
"data"
/>
</
template
>
-->
<
template
#default
="
data
"
>
<g-icon
:icon=
"preIcon"
class=
"mr-1"
v-if=
"preIcon"
/>
<slot
v-bind=
"data"
/>
<g-icon
:icon=
"preIcon"
class=
"ml-1"
v-if=
"postIcon"
/>
</
template
>
</Button>
</template>
...
...
@@ -44,6 +49,12 @@
type
:
Boolean
as
PropType
<
boolean
>
,
default
:
false
,
},
preIcon
:
{
type
:
String
as
PropType
<
string
>
,
},
postIcon
:
{
type
:
String
as
PropType
<
string
>
,
},
},
setup
(
props
,
{
attrs
})
{
const
getListeners
=
computed
(()
=>
{
...
...
src/views/demo/feat/msg/index.vue
View file @
8f5016e3
<
template
>
<div
class=
"p-4"
>
<CollapseContainer
class=
"px-20 bg-white w-full h-32 rounded-md"
title=
"Message"
>
<a-button
@
click=
"infoMsg('Info message')"
class=
"mr-2"
>
Info
</a-button>
<a-button
@
click=
"infoMsg('Info message')"
class=
"mr-2"
>
Info
</a-button>
<a-button
@
click=
"successMsg('Success message')"
class=
"mr-2"
color=
"success"
>
Success
</a-button>
...
...
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