upd 个人中心页面

This commit is contained in:
zhuwanli
2025-03-05 18:32:53 +08:00
parent cdf530856a
commit 083a84534c
32 changed files with 2992 additions and 41 deletions

View File

@@ -0,0 +1,16 @@
{ // launch.json 配置了启动调试时相关设置configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

@@ -1,3 +1,9 @@
<!--
* @Description:
* @Author: zhuWanLi
* @version: 1.0.0
* @Date: 2025-03-04 13:33:32
-->
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
@@ -14,4 +20,5 @@
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
</style> @import "@/static/font/iconfont.css";
</style>

View File

@@ -3,15 +3,56 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "uni-app" "navigationBarTextStyle": "white",
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/healthCard/healthCard",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "健康卡"
}
},
{
"path": "pages/personInfo/personInfo",
"style": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "个人中心"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app", "backgroundColor": "#F8F8F8",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#ffffff"
"backgroundColor": "#F8F8F8" // "titleNView": true
}, },
"uniIdRouter": {} "uniIdRouter": {},
}
"tabBar": {
"color": "#282828",
"selectedColor": "#00a2f3",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/shouye.png",
"selectedIconPath": "static/images/tabbar/shouye_1.png",
"text": "首页"
},
{
"pagePath": "pages/healthCard/healthCard",
"iconPath": "static/images/tabbar/erweima.png",
"selectedIconPath": "static/images/tabbar/erweima_1.png",
"text": "健康卡"
},
{
"pagePath": "pages/personInfo/personInfo",
"iconPath": "static/images/tabbar/wode.png",
"selectedIconPath": "static/images/tabbar/wode_1.png",
"text": "个人中心"
}
]
}
}

View File

@@ -0,0 +1,168 @@
<template>
<view class="service-page">
<!-- 顶部功能入口 -->
<view class="top-section">
<view class="top-item" @click="navigateTo('my-doctor')">
<image src="/static/icons/doctor.png" mode="aspectFit"></image>
<text>我的医生</text>
</view>
<view class="top-item" @click="navigateTo('online-consult')">
<image src="/static/icons/online.png" mode="aspectFit"></image>
<text>一键在线复诊</text>
</view>
</view>
<!-- 会员中心 -->
<view class="vip-section" @click="navigateTo('vip-center')">
<image src="/static/icons/vip.png" mode="aspectFit"></image>
<text>会员中心 · 精选权益超值享</text>
</view>
<!-- 服务与工具网格 -->
<view class="service-grid">
<view
class="grid-item"
v-for="(item, index) in serviceList"
:key="index"
@click="handleServiceClick(item)"
>
<image :src="item.icon" mode="aspectFit"></image>
<text>{{ item.title }}</text>
</view>
</view>
<!-- 商务合作 -->
<view class="cooperation" @click="navigateTo('business')">
<text>商务合作</text>
<image src="/static/icons/arrow-right.png" mode="aspectFit"></image>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
// 服务列表数据
const serviceList = ref([
{ id: 1, title: '收藏', icon: '/static/icons/collect.png', type: 'collect' },
{ id: 2, title: '我的医生', icon: '/static/icons/doctor.png', type: 'my-doctor' },
{ id: 3, title: '随访计划', icon: '/static/icons/follow-up.png', type: 'follow-plan' },
{ id: 4, title: '客服中心', icon: '/static/icons/service.png', type: 'customer-service' }
]);
// 处理服务点击
const handleServiceClick = (item) => {
switch(item.type) {
case 'customer-service':
uni.makePhoneCall({ phoneNumber: '400-123-4567' });
break;
default:
navigateTo(item.type);
}
};
// 通用跳转方法
const navigateTo = (path) => {
uni.navigateTo({ url: `/pages/${path}/${path}` });
};
</script>
<style lang="scss" scoped>
.service-page {
padding: 20rpx;
background-color: #f5f5f5;
}
.top-section {
display: flex;
justify-content: space-between;
margin: 20rpx 0;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
.top-item {
display: flex;
flex-direction: column;
align-items: center;
width: 45%;
image {
width: 100rpx;
height: 100rpx;
margin-bottom: 20rpx;
}
text {
font-size: 28rpx;
color: #333;
}
}
}
.vip-section {
display: flex;
align-items: center;
padding: 30rpx;
margin: 20rpx 0;
background-color: #fff;
border-radius: 16rpx;
image {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
}
text {
font-size: 28rpx;
color: #ff9900;
}
}
.service-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
.grid-item {
display: flex;
flex-direction: column;
align-items: center;
image {
width: 80rpx;
height: 80rpx;
margin-bottom: 20rpx;
}
text {
font-size: 24rpx;
color: #666;
}
}
}
.cooperation {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
margin-top: 20rpx;
background-color: #fff;
border-radius: 16rpx;
text {
font-size: 28rpx;
color: #333;
}
image {
width: 32rpx;
height: 32rpx;
}
}
</style>

View File

@@ -0,0 +1,64 @@
<template>
<view class="content">
<!-- <image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view> -->
<view :style="{visibility: showSkeleton ? 'hidden' : 'visible'}">
<!-- 导航 -->
<home-navi @goLogin="openAuto"></home-navi>
<!-- 轮播 -->
<home-swiper :dataList="dataBanner"></home-swiper>
<!-- 菜单 -->
<home-menus :dataList="dataMenus" @goLogin="openAuto"></home-menus>
<!-- 健康科普 -->
<home-article :dataList="dataArticle" @goLogin="openAuto"></home-article>
<!-- 视频课堂 -->
<home-video :dataList="dataVideo" @goLogin="openAuto"></home-video>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '1111'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

View File

@@ -1,52 +1,318 @@
<template> <template>
<view class="content"> <view class="container">
<image class="logo" src="/static/logo.png"></image> <!-- 轮播图 -->
<view class="text-area"> <swiper class="swiper-container" autoplay circular indicator-dots>
<text class="title">{{title}}</text> <swiper-item v-for="(item, index) in swiperList" :key="index">
<image :src="item.image" mode="aspectFill" class="swiper-image"></image>
</swiper-item>
</swiper>
<!-- 用户信息栏 -->
<!-- <view class="user-card">
<view class="user-info">
<view class="user-info-left">
<image class="avatar" src="/static/images/user.png"></image>
</view>
<text class="name">{{ currentPatient.name }}</text>
<text class="switch" @click="switchPatient">切换就诊人 ></text>
</view>
<text class="patient-id">就诊号{{ currentPatient.id }}</text>
</view> -->
<view class="user-card">
<view class="user-info-left">
<image class="avatar" src="/static/images/user.png"></image>
<text class="name">{{ currentPatient.name }}</text>
<text class="switch-patient" @click="switchPatient">切换就诊人 ></text>
</view>
<text class="patient-id">就诊号{{ currentPatient.id }}</text>
</view> </view>
<!-- 功能宫格区域 -->
<scroll-view scroll-y class="main-content">
<view class="grid-container">
<view class="section-title">医院服务</view>
<view class="grid-row">
<view v-for="(item, index) in firstRow" :key="index" class="grid-item"
@click="handleFunction(item)">
<image class="icon" :src="item.icon" mode="aspectFit" />
<text class="label">{{ item.label }}</text>
</view>
</view>
<view class="grid-row">
<view v-for="(item, index) in secondRow" :key="index" class="grid-item"
@click="handleFunction(item)">
<image class="icon" :src="item.icon" mode="aspectFit" />
<text class="label">{{ item.label }}</text>
</view>
</view>
</view>
<view class="section">
<view class="service-grid">
<view v-for="(item, index) in hospitalServices" :key="index" class="service-item">
<text>{{ item }}</text>
</view>
</view>
</view>
</scroll-view>
</view> </view>
</template> </template>
<script setup>
import {
ref,
reactive
} from 'vue';
<script> // 轮播图数据
export default { const swiperList = ref([{
data() { image: '/static/shouye/lunbotu1.png'
return {
title: 'Hello666'
}
}, },
onLoad() { {
image: '/static/shouye/lunbotu2.png'
}, },
methods: { {
image: '/static/shouye/lunbotu1.png'
} }
} ]);
</script> // 当前就诊人信息
const currentPatient = reactive({
name: '张三',
id: '123456'
});
<style>
.content { // 功能配置(示例数据)
const firstRow = ref([{
label: '健康码',
icon: '/static/icons/health-code.png',
path: '/pages/health-code'
},
{
label: '预约挂号',
icon: '/static/icons/appointment.png',
path: '/pages/appointment'
},
{
label: '当日挂号',
icon: '/static/icons/today-reg.png',
path: '/pages/today-reg'
},
{
label: '门诊缴费',
icon: '/static/icons/payment.png',
path: '/pages/payment'
}
]);
const secondRow = ref([{
label: '查看报告',
icon: '/static/icons/report.png',
path: '/pages/report'
},
{
label: '就诊记录',
icon: '/static/icons/record.png',
path: '/pages/records'
},
{
label: '科室查询',
icon: '/static/icons/department.png',
path: '/pages/department'
},
{
label: '医生查询',
icon: '/static/icons/doctor.png',
path: '/pages/doctor'
}
]);
// 医院服务
const hospitalServices = ref([
'医院介绍',
'国粹中医',
'惠民政策',
'特色疗法'
]);
// 底部导航
const tabItems = ref([{
text: '首页',
icon: '/static/tabs/home.png',
selectedIcon: '/static/tabs/home-active.png'
},
{
text: '健康卡',
icon: '/static/tabs/health-card.png',
selectedIcon: '/static/tabs/health-card-active.png'
},
{
text: '个人中心',
icon: '/static/tabs/profile.png',
selectedIcon: '/static/tabs/profile-active.png'
}
]);
const activeTab = ref(0);
// 切换就诊人
const switchPatient = () => {
uni.navigateTo({
url: '/pages/patient/switch'
});
};
// 处理功能点击
const handleFunction = (item) => {
if (item.path) {
uni.navigateTo({
url: item.path
});
}
};
// 切换底部导航
const switchTab = (index) => {
activeTab.value = index;
// 实际项目应使用路由跳转
};
</script>
<style scoped>
.swiper-container {
width: 100%;
height: 300rpx;
}
.swiper-image {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 15rpx;
}
.container {
height: 100vh;
display: flex;
flex-direction: column;
}
.user-card {
/* background: linear-gradient(135deg, #6eb4ff, #007aff); */
padding: 30rpx;
color: black;
}
.user-info {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20rpx;
}
.name {
font-size: 36rpx;
font-weight: bold;
}
.switch {
padding-left: 10rpx;
font-size: 28rpx;
/* text-decoration: underline; */
}
.patient-id {
font-size: 28rpx;
}
.main-content {
flex: 1;
background-color: #f5f5f5;
}
.grid-container {
padding-top: 1vh;
}
.grid-row {
display: flex;
justify-content: space-between;
margin-bottom: 1vh;
}
.grid-item {
width: 23%;
background: white;
border-radius: 16rpx;
padding: 20rpx;
text-align: center;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}
.icon {
width: 80rpx;
height: 80rpx;
margin-bottom: 15rpx;
}
.label {
font-size: 24rpx;
color: #333;
}
.section {
background: white;
margin: 20rpx;
border-radius: 16rpx;
padding: 30rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 30rpx;
}
.service-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.service-item {
background: #f8f8f8;
padding: 30rpx;
border-radius: 12rpx;
text-align: center;
}
.tabbar {
height: 100rpx;
background: white;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 -4rpx 12rpx rgba(0, 0, 0, 0.05);
}
.tab-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
} }
.logo { .tab-icon {
height: 200rpx; width: 48rpx;
width: 200rpx; height: 48rpx;
margin-top: 200rpx; margin-bottom: 8rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
} }
.text-area { .active {
display: flex; color: #007aff;
justify-content: center;
} }
.title { .avatar {
font-size: 36rpx; width: 120rpx;
color: #8f8f94; height: 120rpx;
border-radius: 50%;
margin-right: 30rpx;
} }
</style> </style>

View File

@@ -0,0 +1,43 @@
<template>
<view class="service-item" @click="handleClick">
<image :src="icon" class="icon" />
<text class="title">{{ title }}</text>
</view>
</template>
<script>
export default {
props: {
icon: {
type: String,
required: true
},
title: {
type: String,
required: true
}
},
methods: {
handleClick() {
this.$emit('click');
}
}
}
</script>
<style>
.service-item {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
}
.icon {
width: 40px;
height: 40px;
}
.title {
margin-top: 5px;
font-size: 14px;
}
</style>

View File

@@ -0,0 +1,233 @@
<template>
<view class="container">
<!-- 用户信息区域 -->
<view class="user-info">
<view class="avatar-section">
<view class="user-info-left">
<image class="avatar" src="/static/images/user.png"></image>
</view>
<view class="user-info-right">
<view class="name-section">
<view>
<text class="name">{{ currentPatient.name }}</text>
<text class="switch-patient" @click="switchPatient">切换就诊人></text>
</view>
<view class="patient-id">
<text>就诊号{{ currentPatient.id }}</text>
</view>
</view>
</view>
</view>
</view>
<!-- 顶部功能入口 -->
<view class="top-section">
<view class="top-item" @click="navigateTo('my-doctor')">
<uni-icons custom-prefix="iconfont" type="my-jiaofeijilu" size="30"></uni-icons>
<text>缴费记录</text>
</view>
<view class="top-item" @click="navigateTo('my-doctor')">
<uni-icons custom-prefix="iconfont" type="my-guahaojilu" size="30"></uni-icons>
<text>挂号记录</text>
</view>
<view class="top-item" @click="navigateTo('my-doctor')">
<uni-icons custom-prefix="iconfont" type="my-jiuzhenjilu" size="30"></uni-icons>
<text>就诊记录</text>
</view>
<view class="top-item" @click="navigateTo('online-consult')">
<uni-icons custom-prefix="iconfont" type="my-wodebaogao" size="30"></uni-icons>
<text>我的报告</text>
</view>
<view class="top-item" @click="navigateTo('my-doctor')">
<uni-icons custom-prefix="iconfont" type="my-jiuzhenrenguanli" size="30"></uni-icons>
<text>就诊人管理</text>
</view>
</view>
<!-- 功能列表 -->
<view class="menu-list">
<navigator v-for="(item, index) in menus" :key="index" class="menu-item" :url="item.url">
<text>{{ item.label }}</text>
</navigator>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive
} from 'vue';
import {
onLoad
} from '@dcloudio/uni-app';
// 用户信息
const userInfo = reactive({
avatar: ''
});
// 当前就诊人信息
const currentPatient = ref({
name: '张三',
id: '123456'
});
// 菜单配置
const menus = ref([{
label: '缴费记录',
url: '/pages/records/payment'
},
{
label: '挂号记录',
url: '/pages/records/registration'
},
{
label: '就诊记录',
url: '/pages/records/medical'
},
{
label: '我的报告',
url: '/pages/records/report'
},
{
label: '就诊人管理',
url: '/pages/patient/manage'
}
]);
// 处理头像点击
const handleAvatarClick = () => {
uni.chooseImage({
count: 1,
success: (res) => {
userInfo.avatar = res.tempFilePaths[0];
}
});
};
// 切换就诊人
const switchPatient = () => {
uni.navigateTo({
url: '/pages/patient/select'
});
};
// 初始化数据
onLoad(() => {
// 这里可以添加请求用户数据的逻辑
});
</script>
<style scoped lang='scss'>
.container {
background-color: #f5f5f5;
min-height: 100vh;
}
/* 设置整个用户信息区域 */
.user-info {
background-color: #fff;
padding-top: 20rpx;
padding-left: 20rpx;
padding-right: 20rpx;
display: flex;
/* 启用Flex布局 */
justify-content: space-between;
/* 在水平上分配空间 */
align-items: center;
/* 垂直方向居中对齐 */
}
/* 名字和切换按钮布局 */
.name-section {
display: flex;
flex-direction: column;
}
/* 名字布局 */
.name {
font-weight: bold;
}
/* 选择就诊人布局 */
.switch-patient {
border: #007aff;
color: #007aff;
padding-left: 10px;
font-size: 28rpx;
}
/* 就诊号 */
.patient-id {
font-size: 26rpx;
color: #666;
padding-top: 10rpx;
}
.avatar-section {
display: flex;
align-items: center;
margin-bottom: 20rpx;
/* 左侧区域 */
.user-info-left {
display: flex;
/* 启用Flex布局 */
align-items: center;
/* 垂直方向居中 */
}
/* 右侧区域 */
.user-info-right {
display: flex;
/* 启用Flex布局 */
align-items: center;
/* 垂直方向居中 */
}
}
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
margin-right: 30rpx;
}
.menu-list {
margin-top: 20rpx;
background-color: #fff;
}
/* .menu-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 2rpx solid #eee;
} */
.top-section {
display: flex;
margin: 20rpx 0;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
.top-item {
display: flex;
flex-direction: column;
align-items: center;
width: 45%;
font-size: 25 rpx;
.image {
width: 100rpx;
height: 100rpx;
margin-bottom: 20rpx;
}
.text {
/* font-size: 20rpx ; */
color: #333;
}
}
}
</style>

View File

@@ -0,0 +1,69 @@
@font-face {
font-family: "iconfont";
src: url('/static/font/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-keshi:before {
content: "\e624";
}
.icon-yisheng_1:before {
content: "\e633";
}
.icon-menzhenjiaofei2:before {
content: "\e605";
}
.icon-erweima:before {
content: "\e642";
}
.icon-jinriguahao:before {
content: "\e627";
}
.icon-qiandao_:before {
content: "\e687";
}
.icon-chakanbaogao:before {
content: "\e69d";
}
.icon-homejiuzhenjilu:before {
content: "\e6b1";
}
.icon-yuyueguahao:before {
content: "\e606";
}
.my-jiuzhenjilu:before {
content: "\e61a";
}
.my-guahaojilu:before {
content: "\e718";
}
.my-wodebaogao:before {
content: "\e67a";
}
.my-jiaofeijilu:before {
content: "\e6ce";
}
.my-jiuzhenrenguanli:before {
content: "\e6a9";
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

View File

@@ -0,0 +1,22 @@
## 1.3.52022-01-24
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.42022-01-24
- 优化 size 支持其他单位
## 1.3.32022-01-17
- 修复 nvue 有些图标不显示的bug兼容老版本图标
## 1.3.22021-12-01
- 优化 示例可复制图标名称
## 1.3.12021-11-23
- 优化 兼容旧组件 type 值
## 1.3.02021-11-19
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.72021-11-08
## 1.2.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.52021-05-12
- 新增 组件示例地址
## 1.1.42021-02-05
- 调整为uni_modules目录规范

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
<template>
<!-- #ifdef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
<!-- #endif -->
</template>
<script>
import icons from './icons.js';
const getVal = (val) => {
const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
}
// #ifdef APP-NVUE
var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', {
'fontFamily': "uniicons",
'src': "url('"+iconUrl+"')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: 'UniIcons',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
customPrefix:{
type: String,
default: ''
}
},
data() {
return {
icons: icons.glyphs
}
},
computed:{
unicode(){
let code = this.icons.find(v=>v.font_class === this.type)
if(code){
return unescape(`%u${code.unicode}`)
}
return ''
},
iconSize(){
return getVal(this.size)
}
},
methods: {
_onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
@import './uniicons.css';
@font-face {
font-family: uniicons;
src: url('./uniicons.ttf') format('truetype');
}
/* #endif */
.uni-icons {
font-family: uniicons;
text-decoration: none;
text-align: center;
}
</style>

View File

@@ -0,0 +1,663 @@
.uniui-color:before {
content: "\e6cf";
}
.uniui-wallet:before {
content: "\e6b1";
}
.uniui-settings-filled:before {
content: "\e6ce";
}
.uniui-auth-filled:before {
content: "\e6cc";
}
.uniui-shop-filled:before {
content: "\e6cd";
}
.uniui-staff-filled:before {
content: "\e6cb";
}
.uniui-vip-filled:before {
content: "\e6c6";
}
.uniui-plus-filled:before {
content: "\e6c7";
}
.uniui-folder-add-filled:before {
content: "\e6c8";
}
.uniui-color-filled:before {
content: "\e6c9";
}
.uniui-tune-filled:before {
content: "\e6ca";
}
.uniui-calendar-filled:before {
content: "\e6c0";
}
.uniui-notification-filled:before {
content: "\e6c1";
}
.uniui-wallet-filled:before {
content: "\e6c2";
}
.uniui-medal-filled:before {
content: "\e6c3";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-fire-filled:before {
content: "\e6c5";
}
.uniui-refreshempty:before {
content: "\e6bf";
}
.uniui-location-filled:before {
content: "\e6af";
}
.uniui-person-filled:before {
content: "\e69d";
}
.uniui-personadd-filled:before {
content: "\e698";
}
.uniui-back:before {
content: "\e6b9";
}
.uniui-forward:before {
content: "\e6ba";
}
.uniui-arrow-right:before {
content: "\e6bb";
}
.uniui-arrowthinright:before {
content: "\e6bb";
}
.uniui-arrow-left:before {
content: "\e6bc";
}
.uniui-arrowthinleft:before {
content: "\e6bc";
}
.uniui-arrow-up:before {
content: "\e6bd";
}
.uniui-arrowthinup:before {
content: "\e6bd";
}
.uniui-arrow-down:before {
content: "\e6be";
}
.uniui-arrowthindown:before {
content: "\e6be";
}
.uniui-bottom:before {
content: "\e6b8";
}
.uniui-arrowdown:before {
content: "\e6b8";
}
.uniui-right:before {
content: "\e6b5";
}
.uniui-arrowright:before {
content: "\e6b5";
}
.uniui-top:before {
content: "\e6b6";
}
.uniui-arrowup:before {
content: "\e6b6";
}
.uniui-left:before {
content: "\e6b7";
}
.uniui-arrowleft:before {
content: "\e6b7";
}
.uniui-eye:before {
content: "\e651";
}
.uniui-eye-filled:before {
content: "\e66a";
}
.uniui-eye-slash:before {
content: "\e6b3";
}
.uniui-eye-slash-filled:before {
content: "\e6b4";
}
.uniui-info-filled:before {
content: "\e649";
}
.uniui-reload:before {
content: "\e6b2";
}
.uniui-micoff-filled:before {
content: "\e6b0";
}
.uniui-map-pin-ellipse:before {
content: "\e6ac";
}
.uniui-map-pin:before {
content: "\e6ad";
}
.uniui-location:before {
content: "\e6ae";
}
.uniui-starhalf:before {
content: "\e683";
}
.uniui-star:before {
content: "\e688";
}
.uniui-star-filled:before {
content: "\e68f";
}
.uniui-calendar:before {
content: "\e6a0";
}
.uniui-fire:before {
content: "\e6a1";
}
.uniui-medal:before {
content: "\e6a2";
}
.uniui-font:before {
content: "\e6a3";
}
.uniui-gift:before {
content: "\e6a4";
}
.uniui-link:before {
content: "\e6a5";
}
.uniui-notification:before {
content: "\e6a6";
}
.uniui-staff:before {
content: "\e6a7";
}
.uniui-vip:before {
content: "\e6a8";
}
.uniui-folder-add:before {
content: "\e6a9";
}
.uniui-tune:before {
content: "\e6aa";
}
.uniui-auth:before {
content: "\e6ab";
}
.uniui-person:before {
content: "\e699";
}
.uniui-email-filled:before {
content: "\e69a";
}
.uniui-phone-filled:before {
content: "\e69b";
}
.uniui-phone:before {
content: "\e69c";
}
.uniui-email:before {
content: "\e69e";
}
.uniui-personadd:before {
content: "\e69f";
}
.uniui-chatboxes-filled:before {
content: "\e692";
}
.uniui-contact:before {
content: "\e693";
}
.uniui-chatbubble-filled:before {
content: "\e694";
}
.uniui-contact-filled:before {
content: "\e695";
}
.uniui-chatboxes:before {
content: "\e696";
}
.uniui-chatbubble:before {
content: "\e697";
}
.uniui-upload-filled:before {
content: "\e68e";
}
.uniui-upload:before {
content: "\e690";
}
.uniui-weixin:before {
content: "\e691";
}
.uniui-compose:before {
content: "\e67f";
}
.uniui-qq:before {
content: "\e680";
}
.uniui-download-filled:before {
content: "\e681";
}
.uniui-pyq:before {
content: "\e682";
}
.uniui-sound:before {
content: "\e684";
}
.uniui-trash-filled:before {
content: "\e685";
}
.uniui-sound-filled:before {
content: "\e686";
}
.uniui-trash:before {
content: "\e687";
}
.uniui-videocam-filled:before {
content: "\e689";
}
.uniui-spinner-cycle:before {
content: "\e68a";
}
.uniui-weibo:before {
content: "\e68b";
}
.uniui-videocam:before {
content: "\e68c";
}
.uniui-download:before {
content: "\e68d";
}
.uniui-help:before {
content: "\e679";
}
.uniui-navigate-filled:before {
content: "\e67a";
}
.uniui-plusempty:before {
content: "\e67b";
}
.uniui-smallcircle:before {
content: "\e67c";
}
.uniui-minus-filled:before {
content: "\e67d";
}
.uniui-micoff:before {
content: "\e67e";
}
.uniui-closeempty:before {
content: "\e66c";
}
.uniui-clear:before {
content: "\e66d";
}
.uniui-navigate:before {
content: "\e66e";
}
.uniui-minus:before {
content: "\e66f";
}
.uniui-image:before {
content: "\e670";
}
.uniui-mic:before {
content: "\e671";
}
.uniui-paperplane:before {
content: "\e672";
}
.uniui-close:before {
content: "\e673";
}
.uniui-help-filled:before {
content: "\e674";
}
.uniui-paperplane-filled:before {
content: "\e675";
}
.uniui-plus:before {
content: "\e676";
}
.uniui-mic-filled:before {
content: "\e677";
}
.uniui-image-filled:before {
content: "\e678";
}
.uniui-locked-filled:before {
content: "\e668";
}
.uniui-info:before {
content: "\e669";
}
.uniui-locked:before {
content: "\e66b";
}
.uniui-camera-filled:before {
content: "\e658";
}
.uniui-chat-filled:before {
content: "\e659";
}
.uniui-camera:before {
content: "\e65a";
}
.uniui-circle:before {
content: "\e65b";
}
.uniui-checkmarkempty:before {
content: "\e65c";
}
.uniui-chat:before {
content: "\e65d";
}
.uniui-circle-filled:before {
content: "\e65e";
}
.uniui-flag:before {
content: "\e65f";
}
.uniui-flag-filled:before {
content: "\e660";
}
.uniui-gear-filled:before {
content: "\e661";
}
.uniui-home:before {
content: "\e662";
}
.uniui-home-filled:before {
content: "\e663";
}
.uniui-gear:before {
content: "\e664";
}
.uniui-smallcircle-filled:before {
content: "\e665";
}
.uniui-map-filled:before {
content: "\e666";
}
.uniui-map:before {
content: "\e667";
}
.uniui-refresh-filled:before {
content: "\e656";
}
.uniui-refresh:before {
content: "\e657";
}
.uniui-cloud-upload:before {
content: "\e645";
}
.uniui-cloud-download-filled:before {
content: "\e646";
}
.uniui-cloud-download:before {
content: "\e647";
}
.uniui-cloud-upload-filled:before {
content: "\e648";
}
.uniui-redo:before {
content: "\e64a";
}
.uniui-images-filled:before {
content: "\e64b";
}
.uniui-undo-filled:before {
content: "\e64c";
}
.uniui-more:before {
content: "\e64d";
}
.uniui-more-filled:before {
content: "\e64e";
}
.uniui-undo:before {
content: "\e64f";
}
.uniui-images:before {
content: "\e650";
}
.uniui-paperclip:before {
content: "\e652";
}
.uniui-settings:before {
content: "\e653";
}
.uniui-search:before {
content: "\e654";
}
.uniui-redo-filled:before {
content: "\e655";
}
.uniui-list:before {
content: "\e644";
}
.uniui-mail-open-filled:before {
content: "\e63a";
}
.uniui-hand-down-filled:before {
content: "\e63c";
}
.uniui-hand-down:before {
content: "\e63d";
}
.uniui-hand-up-filled:before {
content: "\e63e";
}
.uniui-hand-up:before {
content: "\e63f";
}
.uniui-heart-filled:before {
content: "\e641";
}
.uniui-mail-open:before {
content: "\e643";
}
.uniui-heart:before {
content: "\e639";
}
.uniui-loop:before {
content: "\e633";
}
.uniui-pulldown:before {
content: "\e632";
}
.uniui-scan:before {
content: "\e62a";
}
.uniui-bars:before {
content: "\e627";
}
.uniui-cart-filled:before {
content: "\e629";
}
.uniui-checkbox:before {
content: "\e62b";
}
.uniui-checkbox-filled:before {
content: "\e62c";
}
.uniui-shop:before {
content: "\e62f";
}
.uniui-headphones:before {
content: "\e630";
}
.uniui-cart:before {
content: "\e631";
}

View File

@@ -0,0 +1,86 @@
{
"id": "uni-icons",
"displayName": "uni-icons 图标",
"version": "1.3.5",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [
"uni-ui",
"uniui",
"icon",
"图标"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.2.14"
},
"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"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
## Icons 图标
> **组件名uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839