Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
6ebf43fd
Commit
6ebf43fd
authored
Dec 03, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner图跳转链接
parent
8e751aff
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
250 additions
and
3 deletions
+250
-3
components/carousel/carousel.vue
+5
-3
uni_modules/uni-link/changelog.md
+17
-0
uni_modules/uni-link/components/uni-link/uni-link.vue
+128
-0
uni_modules/uni-link/package.json
+88
-0
uni_modules/uni-link/readme.md
+12
-0
No files found.
components/carousel/carousel.vue
View file @
6ebf43fd
...
...
@@ -4,7 +4,9 @@
<swiper
class=
"swiper"
circular
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
:interval=
"interval"
:duration=
"duration"
>
<swiper-item
v-for=
"bannerItem in carouselList"
>
<navigator
url=
"bannerItem.destinationAddress"
><image
:src=
"bannerItem.filePath"
mode=
"widthFix"
></image></navigator>
<uni-link
:href=
"bannerItem.destinationAddress"
>
<image
:src=
"bannerItem.filePath"
mode=
"widthFix"
></image>
</uni-link>
</swiper-item>
</swiper>
</view>
...
...
@@ -24,8 +26,8 @@
},
name
:
'carousel'
,
components
:{},
onLoa
d
(){
console
.
log
(
this
.
fileUploadItem
List
)
mounte
d
(){
console
.
log
(
this
.
carousel
List
)
},
methods
:{
...
...
uni_modules/uni-link/changelog.md
0 → 100644
View file @
6ebf43fd
## 1.0.0(2021-11-19)
-
优化 组件UI,并提供设计资源,详见:
[
https://uniapp.dcloud.io/component/uniui/resource
](
https://uniapp.dcloud.io/component/uniui/resource
)
-
文档迁移,详见:
[
https://uniapp.dcloud.io/component/uniui/uni-link
](
https://uniapp.dcloud.io/component/uniui/uni-link
)
## 1.1.7(2021-11-08)
## 0.0.7(2021-09-03)
-
修复 在 nvue 下不显示的 bug
## 0.0.6(2021-07-30)
-
新增 支持自定义插槽
## 0.0.5(2021-06-21)
-
新增 download 属性,H5平台下载文件名
## 0.0.4(2021-05-12)
-
新增 组件示例地址
## 0.0.3(2021-03-09)
-
新增 href 属性支持 tel:|mailto:
## 0.0.2(2021-02-05)
-
调整为uni_modules目录规范
uni_modules/uni-link/components/uni-link/uni-link.vue
0 → 100644
View file @
6ebf43fd
<
template
>
<a
v-if=
"isShowA"
class=
"uni-link"
:href=
"href"
:class=
"
{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
:style="{color,fontSize:fontSize+'px'}" :download="download">
<slot>
{{
text
}}
</slot>
</a>
<!-- #ifndef APP-NVUE -->
<text
v-else
class=
"uni-link"
:class=
"
{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
:style="{color,fontSize:fontSize+'px'}" @click="openURL">
<slot>
{{
text
}}
</slot>
</text>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<text
v-else
class=
"uni-link"
:class=
"
{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
:style="{color,fontSize:fontSize+'px'}" @click="openURL">
{{
text
}}
</text>
<!-- #endif -->
</
template
>
<
script
>
/**
* Link 外部网页超链接组件
* @description uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页
* @tutorial https://ext.dcloud.net.cn/plugin?id=1182
* @property {String} href 点击后打开的外部网页url
* @property {String} text 显示的文字
* @property {String} downlaod H5平台下载文件名
* @property {Boolean} showUnderLine 是否显示下划线
* @property {String} copyTips 在小程序端复制链接时显示的提示语
* @property {String} color 链接文字颜色
* @property {String} fontSize 链接文字大小
* @example * <uni-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn"></uni-link>
*/
export
default
{
name
:
'uniLink'
,
props
:
{
href
:
{
type
:
String
,
default
:
''
},
text
:
{
type
:
String
,
default
:
''
},
download
:
{
type
:
String
,
default
:
''
},
showUnderLine
:
{
type
:
[
Boolean
,
String
],
default
:
true
},
copyTips
:
{
type
:
String
,
default
:
'已自动复制网址,请在手机浏览器里粘贴该网址'
},
color
:
{
type
:
String
,
default
:
'#999999'
},
fontSize
:
{
type
:
[
Number
,
String
],
default
:
14
}
},
computed
:
{
isShowA
()
{
// #ifdef H5
this
.
_isH5
=
true
;
// #endif
if
((
this
.
isMail
()
||
this
.
isTel
())
&&
this
.
_isH5
===
true
)
{
return
true
;
}
return
false
;
}
},
created
()
{
this
.
_isH5
=
null
;
},
methods
:
{
isMail
()
{
return
this
.
href
.
startsWith
(
'mailto:'
);
},
isTel
()
{
return
this
.
href
.
startsWith
(
'tel:'
);
},
openURL
()
{
// #ifdef APP-PLUS
if
(
this
.
isTel
())
{
this
.
makePhoneCall
(
this
.
href
.
replace
(
'tel:'
,
''
));
}
else
{
plus
.
runtime
.
openURL
(
this
.
href
);
}
// #endif
// #ifdef H5
window
.
open
(
this
.
href
)
// #endif
// #ifdef MP
uni
.
setClipboardData
({
data
:
this
.
href
});
uni
.
showModal
({
content
:
this
.
copyTips
,
showCancel
:
false
});
// #endif
},
makePhoneCall
(
phoneNumber
)
{
uni
.
makePhoneCall
({
phoneNumber
})
}
}
}
</
script
>
<
style
>
/* #ifndef APP-NVUE */
.uni-link
{
cursor
:
pointer
;
}
/* #endif */
.uni-link--withline
{
text-decoration
:
underline
;
}
</
style
>
uni_modules/uni-link/package.json
0 → 100644
View file @
6ebf43fd
{
"id"
:
"uni-link"
,
"displayName"
:
"uni-link 超链接"
,
"version"
:
"1.0.0"
,
"description"
:
"uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打"
,
"keywords"
:
[
"uni-ui"
,
"uniui"
,
"link"
,
"超链接"
,
""
],
"repository"
:
"https://github.com/dcloudio/uni-ui"
,
"engines"
:
{
"HBuilderX"
:
""
},
"directories"
:
{
"example"
:
"../../temps/example_temps"
},
"dcloudext"
:
{
"category"
:
[
"前端组件"
,
"通用组件"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules"
:
{
"dependencies"
:
[
"uni-scss"
],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"App"
:
{
"app-vue"
:
"y"
,
"app-nvue"
:
"y"
},
"H5-mobile"
:
{
"Safari"
:
"y"
,
"Android Browser"
:
"y"
,
"微信浏览器(Android)"
:
"y"
,
"QQ浏览器(Android)"
:
"y"
},
"H5-pc"
:
{
"Chrome"
:
"y"
,
"IE"
:
"y"
,
"Edge"
:
"y"
,
"Firefox"
:
"y"
,
"Safari"
:
"y"
},
"小程序"
:
{
"微信"
:
"y"
,
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
},
"快应用"
:
{
"华为"
:
"y"
,
"联盟"
:
"y"
},
"Vue"
:
{
"vue2"
:
"y"
,
"vue3"
:
"y"
}
}
}
}
}
\ No newline at end of file
uni_modules/uni-link/readme.md
0 → 100644
View file @
6ebf43fd
## Link 链接
> **组件名:uni-link**
> 代码块: `uLink`
uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-link)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
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