From afa720674522f04c648bc24328880d3216ff6df8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 28 Oct 2023 17:27:19 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
---
uni_modules/uni-transition/package.json | 84
subPackage/bs/views/rentDetail.vue | 145 +
uni_modules/uni-icons/package.json | 86
uni_modules/uni-scss/styles/setting/_variables.scss | 146 +
uni_modules/uni-icons/components/uni-icons/icons.js | 1169 +++++++++++
uni_modules/uni-transition/readme.md | 11
uni_modules/uni-icons/components/uni-icons/uni-icons.vue | 96
uni_modules/uni-scss/variables.scss | 62
uni_modules/wyh-tree-select/changelog.md | 14
uni_modules/uni-popup/changelog.md | 68
uni_modules/uni-icons/components/uni-icons/uniicons.ttf | 0
uni_modules/uni-scss/styles/setting/_color.scss | 66
uni_modules/uni-scss/styles/setting/_space.scss | 56
pages.json | 26
uni_modules/uni-icons/changelog.md | 22
uni_modules/uni-popup/components/uni-popup/keypress.js | 45
uni_modules/uni-scss/styles/setting/_styles.scss | 167 +
uni_modules/uni-transition/components/uni-transition/createAnimation.js | 131 +
uni_modules/uni-transition/changelog.md | 22
uni_modules/uni-popup/components/uni-popup/i18n/en.json | 7
subPackage/workbench/views/cscj.vue | 256 ++
uni_modules/uni-scss/readme.md | 4
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json | 7
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js | 45
uni_modules/uni-scss/styles/setting/_text.scss | 24
uni_modules/uni-scss/styles/tools/functions.scss | 19
uni_modules/uni-popup/components/uni-popup/popup.js | 26
uni_modules/uni-popup/package.json | 87
uni_modules/uni-popup/readme.md | 17
uni_modules/uni-icons/readme.md | 8
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue | 275 ++
uni_modules/uni-popup/components/uni-popup/i18n/index.js | 8
uni_modules/uni-scss/changelog.md | 8
uni_modules/uni-popup/components/uni-popup/uni-popup.vue | 473 ++++
uni_modules/wyh-tree-select/README.md | 291 ++
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue | 187 +
uni_modules/uni-scss/index.scss | 1
uni_modules/wyh-tree-select/package.json | 78
subPackage/bs/views/zhsb.vue | 58
uni_modules/uni-transition/components/uni-transition/uni-transition.vue | 286 ++
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue | 143 +
uni_modules/uni-scss/package.json | 82
subPackage/bs/components/list/rentList.vue | 8
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json | 7
uni_modules/uni-scss/styles/setting/_border.scss | 3
uni_modules/uni-scss/styles/setting/_radius.scss | 55
uni_modules/uni-scss/styles/index.scss | 7
components/boxTitle/index.vue | 1
uni_modules/uni-icons/components/uni-icons/uniicons.css | 663 ++++++
uni_modules/uni-scss/theme.scss | 31
uni_modules/wyh-tree-select/components/wyh-tree-select/wyh-tree-select.vue | 670 ++++++
subPackage/workbench/components/lineItem.vue | 72
52 files changed, 6,295 insertions(+), 28 deletions(-)
diff --git a/components/boxTitle/index.vue b/components/boxTitle/index.vue
index d01cdf3..11b29b8 100644
--- a/components/boxTitle/index.vue
+++ b/components/boxTitle/index.vue
@@ -38,6 +38,7 @@
height: 60rpx;
.title {
+ display: flex;
position: absolute;
z-index: 1;
}
diff --git a/pages.json b/pages.json
index e005a2f..205afdf 100644
--- a/pages.json
+++ b/pages.json
@@ -370,6 +370,23 @@
]
},
+ //工作台
+ {
+ "root": "subPackage/workbench",
+ "pages": [{
+ "path": "views/cscj",
+ "style": {
+ "navigationBarTitleText": "场所维护",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white"
+ }
+ }
+
+
+ ]
+ },
+
//报事
{
"root": "subPackage/bs",
@@ -406,6 +423,15 @@
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "views/rentDetail",
+ "style": {
+ "navigationBarTitleText": "租户详情",
+ "navigationBarBackgroundColor": "#4586fe",
+ "navigationBarTextStyle": "white",
+ "enablePullDownRefresh": false
+ }
}
]
diff --git a/subPackage/bs/components/list/rentList.vue b/subPackage/bs/components/list/rentList.vue
index 3911721..204c455 100644
--- a/subPackage/bs/components/list/rentList.vue
+++ b/subPackage/bs/components/list/rentList.vue
@@ -16,7 +16,7 @@
</view>
</view>
- <view class="btn">
+ <view class="list-btn">
<u-button :customStyle="btnCustomStyle" color="#cdf3df" type="primary" text="修改"></u-button>
</view>
@@ -81,14 +81,12 @@
}
- .btn {
+ .list-btn {
padding: 24rpx;
}
}
- .tip {
- padding-bottom: 20px;
- }
+ .tip {}
}
</style>
\ No newline at end of file
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
new file mode 100644
index 0000000..1e1df41
--- /dev/null
+++ b/subPackage/bs/views/rentDetail.vue
@@ -0,0 +1,145 @@
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <view class="basic-info">
+
+ <u-form-item @click="showList.relation = true" class="form-item" labelWidth="100" label="租客关系:" required
+ prop="type">
+ <u--input border="none" v-model="nameList.relation" disabled disabledColor="#ffffff"
+ placeholder="请选择租客关系">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="事件类型:" required
+ prop="type">
+ <u--input border="none" v-model="typeName" disabled disabledColor="#ffffff" placeholder="请选择事件类型">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ </view>
+
+ <view class="box-title">
+ <box-title title="合同上传"></box-title>
+ </view>
+
+ <view class="pic">
+
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+
+ <view class="box-title">
+ <box-title title="租客信息"></box-title>
+ </view>
+
+ <view class="rent-info">
+
+
+ </view>
+
+
+ </u-form>
+
+
+ <!-- 租客关系下拉框 -->
+ <my-select v-if="showList.relation" :show="showList.relation" v-model="form.relation" type="radio"
+ popupTitle="请选择租客关系" :dataLists="dataList.relation" @cancel="showList.relation = false">
+ </my-select>
+
+
+
+
+
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ export default {
+ mixins: [uploadMixin],
+ data() {
+ return {
+ form: {
+ relation: ""
+ },
+ showList: {
+ relation: false
+ },
+ nameList: {
+ relation: ""
+ },
+ dataList: {
+ relation: []
+ }
+
+
+ }
+ },
+ created() {
+
+ },
+ mounted() {
+
+ },
+ onLoad(option) {
+
+ },
+ onShow() {
+
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .box-title {
+ padding: 10px 0;
+ }
+
+ .basic-info {
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 5rpx 20rpx;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ .btn-group {
+ padding: 30rpx;
+ position: absolute;
+ bottom: 28rpx;
+ width: calc(100% - 60rpx);
+
+ .btn {
+ margin-bottom: 30rpx;
+ }
+ }
+
+
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/bs/views/zhsb.vue b/subPackage/bs/views/zhsb.vue
index cf4ca5c..4ff95e7 100644
--- a/subPackage/bs/views/zhsb.vue
+++ b/subPackage/bs/views/zhsb.vue
@@ -1,36 +1,36 @@
<template>
<view class="container">
- <view class="info">
- <view class="item location">
- <u-icon name="map" color="#000000" size="16"></u-icon>
- <view class="location">
- {{location}}
+ <view class="content-box">
+ <view class="info">
+ <view class="item location">
+ <u-icon name="map" color="#000000" size="16"></u-icon>
+ <view class="location">
+ {{location}}
+ </view>
+ </view>
+
+ <view class="item statistics">
+ <view class="room">{{room}}</view>
+ <view class="num">{{`(共${num}人)`}}</view>
</view>
</view>
- <view class="item statistics">
- <view class="room">{{room}}</view>
- <view class="num">{{`(共${num}人)`}}</view>
+
+ <view class="box-title">
+ <box-title title="出租管理"></box-title>
</view>
- </view>
-
- <view class="box-title">
- <box-title title="出租管理"></box-title>
- </view>
-
- <view class="list">
- <rentList :list="rentList"></rentList>
+ <view class="list">
+ <rentList :list="rentList"></rentList>
+ </view>
</view>
<view class="bottom">
<view class="btn">
- <u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
+ <u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
</view>
</view>
-
-
</view>
</template>
@@ -84,7 +84,9 @@
},
methods: {
-
+ addRent() {
+ this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail")
+ }
}
}
</script>
@@ -97,6 +99,16 @@
display: flex;
flex-direction: column;
background: #F9F9FA;
+
+ .content-box {
+ height: 0;
+ flex: 1;
+ overflow-y: auto;
+ }
+
+ .list {
+ // padding-bottom: 20px;
+ }
.item {
display: flex;
@@ -114,13 +126,13 @@
}
.bottom {
-
+ padding: 20rpx;
background-color: #ffffff;
display: flex;
+ justify-content: center;
+ align-items: center;
.btn {
- position: fixed;
- bottom: 28rpx;
// width: calc(100% - 40rpx);
}
}
diff --git a/subPackage/workbench/components/lineItem.vue b/subPackage/workbench/components/lineItem.vue
new file mode 100644
index 0000000..36f1bd2
--- /dev/null
+++ b/subPackage/workbench/components/lineItem.vue
@@ -0,0 +1,72 @@
+<template>
+ <view class="line-item-container" style="margin-bottom: 1px;">
+
+ <view v-for="(item, index) in dataInfo" :key="index" class="line-item">
+ <view class="l">
+ {{item.label}}
+ </view>
+ <view class="r" v-if="!item.useSlot">
+ {{item.value}}
+ </view>
+
+ <view class="r" v-else>
+ <slot :name="item.useSlot" :scope="item"></slot>
+ </view>
+ </view>
+ </view>
+
+</template>
+
+<script>
+ export default {
+ props: {
+ dataInfo: {
+ type: Array,
+ default: () => []
+ }
+ },
+ data() {
+ return {
+
+ }
+ },
+ created() {
+
+ },
+ mounted() {
+
+ },
+ onLoad(option) {
+
+ },
+ onShow() {
+
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .line-item-container {
+ .line-item {
+ background-color: #ffffff;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+
+ .l {}
+
+ .r {
+ color: #969799;
+ }
+ }
+ }
+
+ view {
+ font-size: 30rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
new file mode 100644
index 0000000..129019b
--- /dev/null
+++ b/subPackage/workbench/views/cscj.vue
@@ -0,0 +1,256 @@
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <view class="item">
+ <u-form-item class="form-item" labelWidth="100" label="场所名称:" required prop="location">
+ <u--input border="none" v-model="form.location" placeholder="请输入当前位置">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item @click="popup" class="form-item" labelWidth="100" label="标签:" required prop="location">
+ <u--input border="none" placeholder="请选择地址标签">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <view v-if="showLabelList.length>0" class="label">
+ <view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
+ <u-tag size="mini" :text="item.text"></u-tag>
+ </view>
+ </view>
+
+ <u-form-item class="form-item" labelWidth="100" label="备注:" required prop="location">
+ <u--input border="none" v-model="form.remark" placeholder="请输入备注">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="100" label="经纬度:" required prop="location">
+ <u--input border="none" v-model="form.jwd" placeholder="请输入经纬度">
+ </u--input>
+ </u-form-item>
+ </view>
+
+ <view class="box-title">
+ <box-title title="负责人信息"></box-title>
+ </view>
+
+ <view class="item">
+ <u-form-item class="form-item" labelWidth="100" label="场所负责人:" required prop="location">
+ <u--input border="none" v-model="form.charge" placeholder="请输入场所负责人">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" label="手机号:" required prop="location">
+ <u--input border="none" v-model="form.phone" placeholder="请输入手机号">
+ </u--input>
+ </u-form-item>
+ </view>
+
+
+ <view class="box-title">
+ <box-title title="场所照片"></box-title>
+ </view>
+
+ <view class="item pic">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+
+
+
+
+ </u-form>
+
+ <view class="box-title">
+ <view>
+ <box-title title="综治网格"></box-title>
+ </view>
+ </view>
+
+ <view class="item">
+ <lineItem :dataInfo="dataInfo">
+ </lineItem>
+
+ <lineItem :dataInfo="dataInfo1">
+ <template v-slot:pic="{scope}">
+ {{scope.value}}
+ </template>
+ </lineItem>
+ </view>
+
+
+
+ <uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
+ <wyh-tree-select :items="items" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
+ :activeIds="activeIds" @clickItem="labelClick" :showCancel="false" :showConfirm="false">
+ </wyh-tree-select>
+ </uni-popup>
+
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import lineItem from "@/subPackage/workbench/components/lineItem.vue"
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ lineItem
+ },
+ data() {
+ return {
+ form: {},
+ rules: {},
+
+ items: [{
+ text: '全部标签',
+ children: [{
+ text: '餐馆',
+ id: 1,
+ },
+ {
+ text: '旅馆、招待所',
+ id: 2,
+ }, {
+ text: '居民住宿',
+ id: 3
+ }
+ ],
+ dot: false
+ }, ],
+
+ dataInfo: [{
+ label: "社区名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格员",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+
+ dataInfo1: [{
+ label: "场所照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "场所负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ }
+ ],
+
+ activeIds: [],
+ showLabelList: []
+ }
+ },
+ created() {
+
+ },
+ mounted() {
+
+ },
+ onLoad(option) {
+
+ },
+ onShow() {
+
+ },
+ methods: {
+ //弹出层打开
+ popup() {
+ this.$refs.uniPopup.open()
+ },
+
+ labelClick(item) {
+
+ //判断label是否已在
+ const label = this.showLabelList.find(e => e.id == item.id)
+
+ if (label) {
+ //在,去掉
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => id != label.id)
+ } else {
+ //不在,添加
+ this.showLabelList.push(item)
+ this.activeIds.push(item.id)
+ }
+
+ this.showLabelList.sort((a, b) => a.id - b.id)
+
+ }
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .box-title {
+ padding: 10px 0;
+ }
+
+ .item {
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ .label {
+ padding: 10rpx 30rpx;
+ display: flex;
+ background-color: #ffffff;
+
+ .activeLabel {
+ // width: 80rpx;
+ margin-left: 10rpx;
+ }
+ }
+
+
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/uni_modules/uni-icons/changelog.md b/uni_modules/uni-icons/changelog.md
new file mode 100644
index 0000000..6449885
--- /dev/null
+++ b/uni_modules/uni-icons/changelog.md
@@ -0,0 +1,22 @@
+## 1.3.5(2022-01-24)
+- 优化 size 属性可以传入不带单位的字符串数值
+## 1.3.4(2022-01-24)
+- 优化 size 支持其他单位
+## 1.3.3(2022-01-17)
+- 修复 nvue 有些图标不显示的bug,兼容老版本图标
+## 1.3.2(2021-12-01)
+- 优化 示例可复制图标名称
+## 1.3.1(2021-11-23)
+- 优化 兼容旧组件 type 值
+## 1.3.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-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
+## 1.1.7(2021-11-08)
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.5(2021-05-12)
+- 新增 组件示例地址
+## 1.1.4(2021-02-05)
+- 调整为uni_modules目录规范
diff --git a/uni_modules/uni-icons/components/uni-icons/icons.js b/uni_modules/uni-icons/components/uni-icons/icons.js
new file mode 100644
index 0000000..7889936
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/icons.js
@@ -0,0 +1,1169 @@
+export default {
+ "id": "2852637",
+ "name": "uniui图标库",
+ "font_family": "uniicons",
+ "css_prefix_text": "uniui-",
+ "description": "",
+ "glyphs": [
+ {
+ "icon_id": "25027049",
+ "name": "yanse",
+ "font_class": "color",
+ "unicode": "e6cf",
+ "unicode_decimal": 59087
+ },
+ {
+ "icon_id": "25027048",
+ "name": "wallet",
+ "font_class": "wallet",
+ "unicode": "e6b1",
+ "unicode_decimal": 59057
+ },
+ {
+ "icon_id": "25015720",
+ "name": "settings-filled",
+ "font_class": "settings-filled",
+ "unicode": "e6ce",
+ "unicode_decimal": 59086
+ },
+ {
+ "icon_id": "25015434",
+ "name": "shimingrenzheng-filled",
+ "font_class": "auth-filled",
+ "unicode": "e6cc",
+ "unicode_decimal": 59084
+ },
+ {
+ "icon_id": "24934246",
+ "name": "shop-filled",
+ "font_class": "shop-filled",
+ "unicode": "e6cd",
+ "unicode_decimal": 59085
+ },
+ {
+ "icon_id": "24934159",
+ "name": "staff-filled-01",
+ "font_class": "staff-filled",
+ "unicode": "e6cb",
+ "unicode_decimal": 59083
+ },
+ {
+ "icon_id": "24932461",
+ "name": "VIP-filled",
+ "font_class": "vip-filled",
+ "unicode": "e6c6",
+ "unicode_decimal": 59078
+ },
+ {
+ "icon_id": "24932462",
+ "name": "plus_circle_fill",
+ "font_class": "plus-filled",
+ "unicode": "e6c7",
+ "unicode_decimal": 59079
+ },
+ {
+ "icon_id": "24932463",
+ "name": "folder_add-filled",
+ "font_class": "folder-add-filled",
+ "unicode": "e6c8",
+ "unicode_decimal": 59080
+ },
+ {
+ "icon_id": "24932464",
+ "name": "yanse-filled",
+ "font_class": "color-filled",
+ "unicode": "e6c9",
+ "unicode_decimal": 59081
+ },
+ {
+ "icon_id": "24932465",
+ "name": "tune-filled",
+ "font_class": "tune-filled",
+ "unicode": "e6ca",
+ "unicode_decimal": 59082
+ },
+ {
+ "icon_id": "24932455",
+ "name": "a-rilidaka-filled",
+ "font_class": "calendar-filled",
+ "unicode": "e6c0",
+ "unicode_decimal": 59072
+ },
+ {
+ "icon_id": "24932456",
+ "name": "notification-filled",
+ "font_class": "notification-filled",
+ "unicode": "e6c1",
+ "unicode_decimal": 59073
+ },
+ {
+ "icon_id": "24932457",
+ "name": "wallet-filled",
+ "font_class": "wallet-filled",
+ "unicode": "e6c2",
+ "unicode_decimal": 59074
+ },
+ {
+ "icon_id": "24932458",
+ "name": "paihangbang-filled",
+ "font_class": "medal-filled",
+ "unicode": "e6c3",
+ "unicode_decimal": 59075
+ },
+ {
+ "icon_id": "24932459",
+ "name": "gift-filled",
+ "font_class": "gift-filled",
+ "unicode": "e6c4",
+ "unicode_decimal": 59076
+ },
+ {
+ "icon_id": "24932460",
+ "name": "fire-filled",
+ "font_class": "fire-filled",
+ "unicode": "e6c5",
+ "unicode_decimal": 59077
+ },
+ {
+ "icon_id": "24928001",
+ "name": "refreshempty",
+ "font_class": "refreshempty",
+ "unicode": "e6bf",
+ "unicode_decimal": 59071
+ },
+ {
+ "icon_id": "24926853",
+ "name": "location-ellipse",
+ "font_class": "location-filled",
+ "unicode": "e6af",
+ "unicode_decimal": 59055
+ },
+ {
+ "icon_id": "24926735",
+ "name": "person-filled",
+ "font_class": "person-filled",
+ "unicode": "e69d",
+ "unicode_decimal": 59037
+ },
+ {
+ "icon_id": "24926703",
+ "name": "personadd-filled",
+ "font_class": "personadd-filled",
+ "unicode": "e698",
+ "unicode_decimal": 59032
+ },
+ {
+ "icon_id": "24923351",
+ "name": "back",
+ "font_class": "back",
+ "unicode": "e6b9",
+ "unicode_decimal": 59065
+ },
+ {
+ "icon_id": "24923352",
+ "name": "forward",
+ "font_class": "forward",
+ "unicode": "e6ba",
+ "unicode_decimal": 59066
+ },
+ {
+ "icon_id": "24923353",
+ "name": "arrowthinright",
+ "font_class": "arrow-right",
+ "unicode": "e6bb",
+ "unicode_decimal": 59067
+ },
+ {
+ "icon_id": "24923353",
+ "name": "arrowthinright",
+ "font_class": "arrowthinright",
+ "unicode": "e6bb",
+ "unicode_decimal": 59067
+ },
+ {
+ "icon_id": "24923354",
+ "name": "arrowthinleft",
+ "font_class": "arrow-left",
+ "unicode": "e6bc",
+ "unicode_decimal": 59068
+ },
+ {
+ "icon_id": "24923354",
+ "name": "arrowthinleft",
+ "font_class": "arrowthinleft",
+ "unicode": "e6bc",
+ "unicode_decimal": 59068
+ },
+ {
+ "icon_id": "24923355",
+ "name": "arrowthinup",
+ "font_class": "arrow-up",
+ "unicode": "e6bd",
+ "unicode_decimal": 59069
+ },
+ {
+ "icon_id": "24923355",
+ "name": "arrowthinup",
+ "font_class": "arrowthinup",
+ "unicode": "e6bd",
+ "unicode_decimal": 59069
+ },
+ {
+ "icon_id": "24923356",
+ "name": "arrowthindown",
+ "font_class": "arrow-down",
+ "unicode": "e6be",
+ "unicode_decimal": 59070
+ },{
+ "icon_id": "24923356",
+ "name": "arrowthindown",
+ "font_class": "arrowthindown",
+ "unicode": "e6be",
+ "unicode_decimal": 59070
+ },
+ {
+ "icon_id": "24923349",
+ "name": "arrowdown",
+ "font_class": "bottom",
+ "unicode": "e6b8",
+ "unicode_decimal": 59064
+ },{
+ "icon_id": "24923349",
+ "name": "arrowdown",
+ "font_class": "arrowdown",
+ "unicode": "e6b8",
+ "unicode_decimal": 59064
+ },
+ {
+ "icon_id": "24923346",
+ "name": "arrowright",
+ "font_class": "right",
+ "unicode": "e6b5",
+ "unicode_decimal": 59061
+ },
+ {
+ "icon_id": "24923346",
+ "name": "arrowright",
+ "font_class": "arrowright",
+ "unicode": "e6b5",
+ "unicode_decimal": 59061
+ },
+ {
+ "icon_id": "24923347",
+ "name": "arrowup",
+ "font_class": "top",
+ "unicode": "e6b6",
+ "unicode_decimal": 59062
+ },
+ {
+ "icon_id": "24923347",
+ "name": "arrowup",
+ "font_class": "arrowup",
+ "unicode": "e6b6",
+ "unicode_decimal": 59062
+ },
+ {
+ "icon_id": "24923348",
+ "name": "arrowleft",
+ "font_class": "left",
+ "unicode": "e6b7",
+ "unicode_decimal": 59063
+ },
+ {
+ "icon_id": "24923348",
+ "name": "arrowleft",
+ "font_class": "arrowleft",
+ "unicode": "e6b7",
+ "unicode_decimal": 59063
+ },
+ {
+ "icon_id": "24923334",
+ "name": "eye",
+ "font_class": "eye",
+ "unicode": "e651",
+ "unicode_decimal": 58961
+ },
+ {
+ "icon_id": "24923335",
+ "name": "eye-filled",
+ "font_class": "eye-filled",
+ "unicode": "e66a",
+ "unicode_decimal": 58986
+ },
+ {
+ "icon_id": "24923336",
+ "name": "eye-slash",
+ "font_class": "eye-slash",
+ "unicode": "e6b3",
+ "unicode_decimal": 59059
+ },
+ {
+ "icon_id": "24923337",
+ "name": "eye-slash-filled",
+ "font_class": "eye-slash-filled",
+ "unicode": "e6b4",
+ "unicode_decimal": 59060
+ },
+ {
+ "icon_id": "24923305",
+ "name": "info-filled",
+ "font_class": "info-filled",
+ "unicode": "e649",
+ "unicode_decimal": 58953
+ },
+ {
+ "icon_id": "24923299",
+ "name": "reload-01",
+ "font_class": "reload",
+ "unicode": "e6b2",
+ "unicode_decimal": 59058
+ },
+ {
+ "icon_id": "24923195",
+ "name": "mic_slash_fill",
+ "font_class": "micoff-filled",
+ "unicode": "e6b0",
+ "unicode_decimal": 59056
+ },
+ {
+ "icon_id": "24923165",
+ "name": "map-pin-ellipse",
+ "font_class": "map-pin-ellipse",
+ "unicode": "e6ac",
+ "unicode_decimal": 59052
+ },
+ {
+ "icon_id": "24923166",
+ "name": "map-pin",
+ "font_class": "map-pin",
+ "unicode": "e6ad",
+ "unicode_decimal": 59053
+ },
+ {
+ "icon_id": "24923167",
+ "name": "location",
+ "font_class": "location",
+ "unicode": "e6ae",
+ "unicode_decimal": 59054
+ },
+ {
+ "icon_id": "24923064",
+ "name": "starhalf",
+ "font_class": "starhalf",
+ "unicode": "e683",
+ "unicode_decimal": 59011
+ },
+ {
+ "icon_id": "24923065",
+ "name": "star",
+ "font_class": "star",
+ "unicode": "e688",
+ "unicode_decimal": 59016
+ },
+ {
+ "icon_id": "24923066",
+ "name": "star-filled",
+ "font_class": "star-filled",
+ "unicode": "e68f",
+ "unicode_decimal": 59023
+ },
+ {
+ "icon_id": "24899646",
+ "name": "a-rilidaka",
+ "font_class": "calendar",
+ "unicode": "e6a0",
+ "unicode_decimal": 59040
+ },
+ {
+ "icon_id": "24899647",
+ "name": "fire",
+ "font_class": "fire",
+ "unicode": "e6a1",
+ "unicode_decimal": 59041
+ },
+ {
+ "icon_id": "24899648",
+ "name": "paihangbang",
+ "font_class": "medal",
+ "unicode": "e6a2",
+ "unicode_decimal": 59042
+ },
+ {
+ "icon_id": "24899649",
+ "name": "font",
+ "font_class": "font",
+ "unicode": "e6a3",
+ "unicode_decimal": 59043
+ },
+ {
+ "icon_id": "24899650",
+ "name": "gift",
+ "font_class": "gift",
+ "unicode": "e6a4",
+ "unicode_decimal": 59044
+ },
+ {
+ "icon_id": "24899651",
+ "name": "link",
+ "font_class": "link",
+ "unicode": "e6a5",
+ "unicode_decimal": 59045
+ },
+ {
+ "icon_id": "24899652",
+ "name": "notification",
+ "font_class": "notification",
+ "unicode": "e6a6",
+ "unicode_decimal": 59046
+ },
+ {
+ "icon_id": "24899653",
+ "name": "staff",
+ "font_class": "staff",
+ "unicode": "e6a7",
+ "unicode_decimal": 59047
+ },
+ {
+ "icon_id": "24899654",
+ "name": "VIP",
+ "font_class": "vip",
+ "unicode": "e6a8",
+ "unicode_decimal": 59048
+ },
+ {
+ "icon_id": "24899655",
+ "name": "folder_add",
+ "font_class": "folder-add",
+ "unicode": "e6a9",
+ "unicode_decimal": 59049
+ },
+ {
+ "icon_id": "24899656",
+ "name": "tune",
+ "font_class": "tune",
+ "unicode": "e6aa",
+ "unicode_decimal": 59050
+ },
+ {
+ "icon_id": "24899657",
+ "name": "shimingrenzheng",
+ "font_class": "auth",
+ "unicode": "e6ab",
+ "unicode_decimal": 59051
+ },
+ {
+ "icon_id": "24899565",
+ "name": "person",
+ "font_class": "person",
+ "unicode": "e699",
+ "unicode_decimal": 59033
+ },
+ {
+ "icon_id": "24899566",
+ "name": "email-filled",
+ "font_class": "email-filled",
+ "unicode": "e69a",
+ "unicode_decimal": 59034
+ },
+ {
+ "icon_id": "24899567",
+ "name": "phone-filled",
+ "font_class": "phone-filled",
+ "unicode": "e69b",
+ "unicode_decimal": 59035
+ },
+ {
+ "icon_id": "24899568",
+ "name": "phone",
+ "font_class": "phone",
+ "unicode": "e69c",
+ "unicode_decimal": 59036
+ },
+ {
+ "icon_id": "24899570",
+ "name": "email",
+ "font_class": "email",
+ "unicode": "e69e",
+ "unicode_decimal": 59038
+ },
+ {
+ "icon_id": "24899571",
+ "name": "personadd",
+ "font_class": "personadd",
+ "unicode": "e69f",
+ "unicode_decimal": 59039
+ },
+ {
+ "icon_id": "24899558",
+ "name": "chatboxes-filled",
+ "font_class": "chatboxes-filled",
+ "unicode": "e692",
+ "unicode_decimal": 59026
+ },
+ {
+ "icon_id": "24899559",
+ "name": "contact",
+ "font_class": "contact",
+ "unicode": "e693",
+ "unicode_decimal": 59027
+ },
+ {
+ "icon_id": "24899560",
+ "name": "chatbubble-filled",
+ "font_class": "chatbubble-filled",
+ "unicode": "e694",
+ "unicode_decimal": 59028
+ },
+ {
+ "icon_id": "24899561",
+ "name": "contact-filled",
+ "font_class": "contact-filled",
+ "unicode": "e695",
+ "unicode_decimal": 59029
+ },
+ {
+ "icon_id": "24899562",
+ "name": "chatboxes",
+ "font_class": "chatboxes",
+ "unicode": "e696",
+ "unicode_decimal": 59030
+ },
+ {
+ "icon_id": "24899563",
+ "name": "chatbubble",
+ "font_class": "chatbubble",
+ "unicode": "e697",
+ "unicode_decimal": 59031
+ },
+ {
+ "icon_id": "24881290",
+ "name": "upload-filled",
+ "font_class": "upload-filled",
+ "unicode": "e68e",
+ "unicode_decimal": 59022
+ },
+ {
+ "icon_id": "24881292",
+ "name": "upload",
+ "font_class": "upload",
+ "unicode": "e690",
+ "unicode_decimal": 59024
+ },
+ {
+ "icon_id": "24881293",
+ "name": "weixin",
+ "font_class": "weixin",
+ "unicode": "e691",
+ "unicode_decimal": 59025
+ },
+ {
+ "icon_id": "24881274",
+ "name": "compose",
+ "font_class": "compose",
+ "unicode": "e67f",
+ "unicode_decimal": 59007
+ },
+ {
+ "icon_id": "24881275",
+ "name": "qq",
+ "font_class": "qq",
+ "unicode": "e680",
+ "unicode_decimal": 59008
+ },
+ {
+ "icon_id": "24881276",
+ "name": "download-filled",
+ "font_class": "download-filled",
+ "unicode": "e681",
+ "unicode_decimal": 59009
+ },
+ {
+ "icon_id": "24881277",
+ "name": "pengyouquan",
+ "font_class": "pyq",
+ "unicode": "e682",
+ "unicode_decimal": 59010
+ },
+ {
+ "icon_id": "24881279",
+ "name": "sound",
+ "font_class": "sound",
+ "unicode": "e684",
+ "unicode_decimal": 59012
+ },
+ {
+ "icon_id": "24881280",
+ "name": "trash-filled",
+ "font_class": "trash-filled",
+ "unicode": "e685",
+ "unicode_decimal": 59013
+ },
+ {
+ "icon_id": "24881281",
+ "name": "sound-filled",
+ "font_class": "sound-filled",
+ "unicode": "e686",
+ "unicode_decimal": 59014
+ },
+ {
+ "icon_id": "24881282",
+ "name": "trash",
+ "font_class": "trash",
+ "unicode": "e687",
+ "unicode_decimal": 59015
+ },
+ {
+ "icon_id": "24881284",
+ "name": "videocam-filled",
+ "font_class": "videocam-filled",
+ "unicode": "e689",
+ "unicode_decimal": 59017
+ },
+ {
+ "icon_id": "24881285",
+ "name": "spinner-cycle",
+ "font_class": "spinner-cycle",
+ "unicode": "e68a",
+ "unicode_decimal": 59018
+ },
+ {
+ "icon_id": "24881286",
+ "name": "weibo",
+ "font_class": "weibo",
+ "unicode": "e68b",
+ "unicode_decimal": 59019
+ },
+ {
+ "icon_id": "24881288",
+ "name": "videocam",
+ "font_class": "videocam",
+ "unicode": "e68c",
+ "unicode_decimal": 59020
+ },
+ {
+ "icon_id": "24881289",
+ "name": "download",
+ "font_class": "download",
+ "unicode": "e68d",
+ "unicode_decimal": 59021
+ },
+ {
+ "icon_id": "24879601",
+ "name": "help",
+ "font_class": "help",
+ "unicode": "e679",
+ "unicode_decimal": 59001
+ },
+ {
+ "icon_id": "24879602",
+ "name": "navigate-filled",
+ "font_class": "navigate-filled",
+ "unicode": "e67a",
+ "unicode_decimal": 59002
+ },
+ {
+ "icon_id": "24879603",
+ "name": "plusempty",
+ "font_class": "plusempty",
+ "unicode": "e67b",
+ "unicode_decimal": 59003
+ },
+ {
+ "icon_id": "24879604",
+ "name": "smallcircle",
+ "font_class": "smallcircle",
+ "unicode": "e67c",
+ "unicode_decimal": 59004
+ },
+ {
+ "icon_id": "24879605",
+ "name": "minus-filled",
+ "font_class": "minus-filled",
+ "unicode": "e67d",
+ "unicode_decimal": 59005
+ },
+ {
+ "icon_id": "24879606",
+ "name": "micoff",
+ "font_class": "micoff",
+ "unicode": "e67e",
+ "unicode_decimal": 59006
+ },
+ {
+ "icon_id": "24879588",
+ "name": "closeempty",
+ "font_class": "closeempty",
+ "unicode": "e66c",
+ "unicode_decimal": 58988
+ },
+ {
+ "icon_id": "24879589",
+ "name": "clear",
+ "font_class": "clear",
+ "unicode": "e66d",
+ "unicode_decimal": 58989
+ },
+ {
+ "icon_id": "24879590",
+ "name": "navigate",
+ "font_class": "navigate",
+ "unicode": "e66e",
+ "unicode_decimal": 58990
+ },
+ {
+ "icon_id": "24879591",
+ "name": "minus",
+ "font_class": "minus",
+ "unicode": "e66f",
+ "unicode_decimal": 58991
+ },
+ {
+ "icon_id": "24879592",
+ "name": "image",
+ "font_class": "image",
+ "unicode": "e670",
+ "unicode_decimal": 58992
+ },
+ {
+ "icon_id": "24879593",
+ "name": "mic",
+ "font_class": "mic",
+ "unicode": "e671",
+ "unicode_decimal": 58993
+ },
+ {
+ "icon_id": "24879594",
+ "name": "paperplane",
+ "font_class": "paperplane",
+ "unicode": "e672",
+ "unicode_decimal": 58994
+ },
+ {
+ "icon_id": "24879595",
+ "name": "close",
+ "font_class": "close",
+ "unicode": "e673",
+ "unicode_decimal": 58995
+ },
+ {
+ "icon_id": "24879596",
+ "name": "help-filled",
+ "font_class": "help-filled",
+ "unicode": "e674",
+ "unicode_decimal": 58996
+ },
+ {
+ "icon_id": "24879597",
+ "name": "plus-filled",
+ "font_class": "paperplane-filled",
+ "unicode": "e675",
+ "unicode_decimal": 58997
+ },
+ {
+ "icon_id": "24879598",
+ "name": "plus",
+ "font_class": "plus",
+ "unicode": "e676",
+ "unicode_decimal": 58998
+ },
+ {
+ "icon_id": "24879599",
+ "name": "mic-filled",
+ "font_class": "mic-filled",
+ "unicode": "e677",
+ "unicode_decimal": 58999
+ },
+ {
+ "icon_id": "24879600",
+ "name": "image-filled",
+ "font_class": "image-filled",
+ "unicode": "e678",
+ "unicode_decimal": 59000
+ },
+ {
+ "icon_id": "24855900",
+ "name": "locked-filled",
+ "font_class": "locked-filled",
+ "unicode": "e668",
+ "unicode_decimal": 58984
+ },
+ {
+ "icon_id": "24855901",
+ "name": "info",
+ "font_class": "info",
+ "unicode": "e669",
+ "unicode_decimal": 58985
+ },
+ {
+ "icon_id": "24855903",
+ "name": "locked",
+ "font_class": "locked",
+ "unicode": "e66b",
+ "unicode_decimal": 58987
+ },
+ {
+ "icon_id": "24855884",
+ "name": "camera-filled",
+ "font_class": "camera-filled",
+ "unicode": "e658",
+ "unicode_decimal": 58968
+ },
+ {
+ "icon_id": "24855885",
+ "name": "chat-filled",
+ "font_class": "chat-filled",
+ "unicode": "e659",
+ "unicode_decimal": 58969
+ },
+ {
+ "icon_id": "24855886",
+ "name": "camera",
+ "font_class": "camera",
+ "unicode": "e65a",
+ "unicode_decimal": 58970
+ },
+ {
+ "icon_id": "24855887",
+ "name": "circle",
+ "font_class": "circle",
+ "unicode": "e65b",
+ "unicode_decimal": 58971
+ },
+ {
+ "icon_id": "24855888",
+ "name": "checkmarkempty",
+ "font_class": "checkmarkempty",
+ "unicode": "e65c",
+ "unicode_decimal": 58972
+ },
+ {
+ "icon_id": "24855889",
+ "name": "chat",
+ "font_class": "chat",
+ "unicode": "e65d",
+ "unicode_decimal": 58973
+ },
+ {
+ "icon_id": "24855890",
+ "name": "circle-filled",
+ "font_class": "circle-filled",
+ "unicode": "e65e",
+ "unicode_decimal": 58974
+ },
+ {
+ "icon_id": "24855891",
+ "name": "flag",
+ "font_class": "flag",
+ "unicode": "e65f",
+ "unicode_decimal": 58975
+ },
+ {
+ "icon_id": "24855892",
+ "name": "flag-filled",
+ "font_class": "flag-filled",
+ "unicode": "e660",
+ "unicode_decimal": 58976
+ },
+ {
+ "icon_id": "24855893",
+ "name": "gear-filled",
+ "font_class": "gear-filled",
+ "unicode": "e661",
+ "unicode_decimal": 58977
+ },
+ {
+ "icon_id": "24855894",
+ "name": "home",
+ "font_class": "home",
+ "unicode": "e662",
+ "unicode_decimal": 58978
+ },
+ {
+ "icon_id": "24855895",
+ "name": "home-filled",
+ "font_class": "home-filled",
+ "unicode": "e663",
+ "unicode_decimal": 58979
+ },
+ {
+ "icon_id": "24855896",
+ "name": "gear",
+ "font_class": "gear",
+ "unicode": "e664",
+ "unicode_decimal": 58980
+ },
+ {
+ "icon_id": "24855897",
+ "name": "smallcircle-filled",
+ "font_class": "smallcircle-filled",
+ "unicode": "e665",
+ "unicode_decimal": 58981
+ },
+ {
+ "icon_id": "24855898",
+ "name": "map-filled",
+ "font_class": "map-filled",
+ "unicode": "e666",
+ "unicode_decimal": 58982
+ },
+ {
+ "icon_id": "24855899",
+ "name": "map",
+ "font_class": "map",
+ "unicode": "e667",
+ "unicode_decimal": 58983
+ },
+ {
+ "icon_id": "24855825",
+ "name": "refresh-filled",
+ "font_class": "refresh-filled",
+ "unicode": "e656",
+ "unicode_decimal": 58966
+ },
+ {
+ "icon_id": "24855826",
+ "name": "refresh",
+ "font_class": "refresh",
+ "unicode": "e657",
+ "unicode_decimal": 58967
+ },
+ {
+ "icon_id": "24855808",
+ "name": "cloud-upload",
+ "font_class": "cloud-upload",
+ "unicode": "e645",
+ "unicode_decimal": 58949
+ },
+ {
+ "icon_id": "24855809",
+ "name": "cloud-download-filled",
+ "font_class": "cloud-download-filled",
+ "unicode": "e646",
+ "unicode_decimal": 58950
+ },
+ {
+ "icon_id": "24855810",
+ "name": "cloud-download",
+ "font_class": "cloud-download",
+ "unicode": "e647",
+ "unicode_decimal": 58951
+ },
+ {
+ "icon_id": "24855811",
+ "name": "cloud-upload-filled",
+ "font_class": "cloud-upload-filled",
+ "unicode": "e648",
+ "unicode_decimal": 58952
+ },
+ {
+ "icon_id": "24855813",
+ "name": "redo",
+ "font_class": "redo",
+ "unicode": "e64a",
+ "unicode_decimal": 58954
+ },
+ {
+ "icon_id": "24855814",
+ "name": "images-filled",
+ "font_class": "images-filled",
+ "unicode": "e64b",
+ "unicode_decimal": 58955
+ },
+ {
+ "icon_id": "24855815",
+ "name": "undo-filled",
+ "font_class": "undo-filled",
+ "unicode": "e64c",
+ "unicode_decimal": 58956
+ },
+ {
+ "icon_id": "24855816",
+ "name": "more",
+ "font_class": "more",
+ "unicode": "e64d",
+ "unicode_decimal": 58957
+ },
+ {
+ "icon_id": "24855817",
+ "name": "more-filled",
+ "font_class": "more-filled",
+ "unicode": "e64e",
+ "unicode_decimal": 58958
+ },
+ {
+ "icon_id": "24855818",
+ "name": "undo",
+ "font_class": "undo",
+ "unicode": "e64f",
+ "unicode_decimal": 58959
+ },
+ {
+ "icon_id": "24855819",
+ "name": "images",
+ "font_class": "images",
+ "unicode": "e650",
+ "unicode_decimal": 58960
+ },
+ {
+ "icon_id": "24855821",
+ "name": "paperclip",
+ "font_class": "paperclip",
+ "unicode": "e652",
+ "unicode_decimal": 58962
+ },
+ {
+ "icon_id": "24855822",
+ "name": "settings",
+ "font_class": "settings",
+ "unicode": "e653",
+ "unicode_decimal": 58963
+ },
+ {
+ "icon_id": "24855823",
+ "name": "search",
+ "font_class": "search",
+ "unicode": "e654",
+ "unicode_decimal": 58964
+ },
+ {
+ "icon_id": "24855824",
+ "name": "redo-filled",
+ "font_class": "redo-filled",
+ "unicode": "e655",
+ "unicode_decimal": 58965
+ },
+ {
+ "icon_id": "24841702",
+ "name": "list",
+ "font_class": "list",
+ "unicode": "e644",
+ "unicode_decimal": 58948
+ },
+ {
+ "icon_id": "24841489",
+ "name": "mail-open-filled",
+ "font_class": "mail-open-filled",
+ "unicode": "e63a",
+ "unicode_decimal": 58938
+ },
+ {
+ "icon_id": "24841491",
+ "name": "hand-thumbsdown-filled",
+ "font_class": "hand-down-filled",
+ "unicode": "e63c",
+ "unicode_decimal": 58940
+ },
+ {
+ "icon_id": "24841492",
+ "name": "hand-thumbsdown",
+ "font_class": "hand-down",
+ "unicode": "e63d",
+ "unicode_decimal": 58941
+ },
+ {
+ "icon_id": "24841493",
+ "name": "hand-thumbsup-filled",
+ "font_class": "hand-up-filled",
+ "unicode": "e63e",
+ "unicode_decimal": 58942
+ },
+ {
+ "icon_id": "24841494",
+ "name": "hand-thumbsup",
+ "font_class": "hand-up",
+ "unicode": "e63f",
+ "unicode_decimal": 58943
+ },
+ {
+ "icon_id": "24841496",
+ "name": "heart-filled",
+ "font_class": "heart-filled",
+ "unicode": "e641",
+ "unicode_decimal": 58945
+ },
+ {
+ "icon_id": "24841498",
+ "name": "mail-open",
+ "font_class": "mail-open",
+ "unicode": "e643",
+ "unicode_decimal": 58947
+ },
+ {
+ "icon_id": "24841488",
+ "name": "heart",
+ "font_class": "heart",
+ "unicode": "e639",
+ "unicode_decimal": 58937
+ },
+ {
+ "icon_id": "24839963",
+ "name": "loop",
+ "font_class": "loop",
+ "unicode": "e633",
+ "unicode_decimal": 58931
+ },
+ {
+ "icon_id": "24839866",
+ "name": "pulldown",
+ "font_class": "pulldown",
+ "unicode": "e632",
+ "unicode_decimal": 58930
+ },
+ {
+ "icon_id": "24813798",
+ "name": "scan",
+ "font_class": "scan",
+ "unicode": "e62a",
+ "unicode_decimal": 58922
+ },
+ {
+ "icon_id": "24813786",
+ "name": "bars",
+ "font_class": "bars",
+ "unicode": "e627",
+ "unicode_decimal": 58919
+ },
+ {
+ "icon_id": "24813788",
+ "name": "cart-filled",
+ "font_class": "cart-filled",
+ "unicode": "e629",
+ "unicode_decimal": 58921
+ },
+ {
+ "icon_id": "24813790",
+ "name": "checkbox",
+ "font_class": "checkbox",
+ "unicode": "e62b",
+ "unicode_decimal": 58923
+ },
+ {
+ "icon_id": "24813791",
+ "name": "checkbox-filled",
+ "font_class": "checkbox-filled",
+ "unicode": "e62c",
+ "unicode_decimal": 58924
+ },
+ {
+ "icon_id": "24813794",
+ "name": "shop",
+ "font_class": "shop",
+ "unicode": "e62f",
+ "unicode_decimal": 58927
+ },
+ {
+ "icon_id": "24813795",
+ "name": "headphones",
+ "font_class": "headphones",
+ "unicode": "e630",
+ "unicode_decimal": 58928
+ },
+ {
+ "icon_id": "24813796",
+ "name": "cart",
+ "font_class": "cart",
+ "unicode": "e631",
+ "unicode_decimal": 58929
+ }
+ ]
+}
diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
new file mode 100644
index 0000000..86e7444
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
@@ -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>
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.css b/uni_modules/uni-icons/components/uni-icons/uniicons.css
new file mode 100644
index 0000000..2f56eab
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/uniicons.css
@@ -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";
+}
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
new file mode 100644
index 0000000..835f33b
--- /dev/null
+++ b/uni_modules/uni-icons/components/uni-icons/uniicons.ttf
Binary files differ
diff --git a/uni_modules/uni-icons/package.json b/uni_modules/uni-icons/package.json
new file mode 100644
index 0000000..d1c4e77
--- /dev/null
+++ b/uni_modules/uni-icons/package.json
@@ -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"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-icons/readme.md b/uni_modules/uni-icons/readme.md
new file mode 100644
index 0000000..86234ba
--- /dev/null
+++ b/uni_modules/uni-icons/readme.md
@@ -0,0 +1,8 @@
+## Icons 图标
+> **组件名:uni-icons**
+> 代码块: `uIcons`
+
+用于展示 icons 图标 。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/uni_modules/uni-popup/changelog.md b/uni_modules/uni-popup/changelog.md
new file mode 100644
index 0000000..bc59f07
--- /dev/null
+++ b/uni_modules/uni-popup/changelog.md
@@ -0,0 +1,68 @@
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
+## 1.7.9(2022-04-02)
+- 修复 弹出层内部无法滚动的bug
+## 1.7.8(2022-03-28)
+- 修复 小程序中高度错误的bug
+## 1.7.7(2022-03-17)
+- 修复 快速调用open出现问题的Bug
+## 1.7.6(2022-02-14)
+- 修复 safeArea 属性不能设置为false的bug
+## 1.7.5(2022-01-19)
+- 修复 isMaskClick 失效的bug
+## 1.7.4(2022-01-19)
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
+## 1.7.3(2022-01-13)
+- 修复 设置 safeArea 属性不生效的bug
+## 1.7.2(2021-11-26)
+- 优化 组件示例
+## 1.7.1(2021-11-26)
+- 修复 vuedoc 文字错误
+## 1.7.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-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端
diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
new file mode 100644
index 0000000..6ef26a2
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+ name: 'Keypress',
+ props: {
+ disable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ const keyNames = {
+ esc: ['Esc', 'Escape'],
+ tab: 'Tab',
+ enter: 'Enter',
+ space: [' ', 'Spacebar'],
+ up: ['Up', 'ArrowUp'],
+ left: ['Left', 'ArrowLeft'],
+ right: ['Right', 'ArrowRight'],
+ down: ['Down', 'ArrowDown'],
+ delete: ['Backspace', 'Delete', 'Del']
+ }
+ const listener = ($event) => {
+ if (this.disable) {
+ return
+ }
+ const keyName = Object.keys(keyNames).find(key => {
+ const keyName = $event.key
+ const value = keyNames[key]
+ return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ })
+ if (keyName) {
+ // 避免和其他按键事件冲突
+ setTimeout(() => {
+ this.$emit(keyName, {})
+ }, 0)
+ }
+ }
+ document.addEventListener('keyup', listener)
+ this.$once('hook:beforeDestroy', () => {
+ document.removeEventListener('keyup', listener)
+ })
+ },
+ render: () => {}
+}
+// #endif
diff --git a/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
new file mode 100644
index 0000000..b5eee79
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
@@ -0,0 +1,275 @@
+<template>
+ <view class="uni-popup-dialog">
+ <view class="uni-dialog-title">
+ <text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
+ </view>
+ <view v-if="mode === 'base'" class="uni-dialog-content">
+ <slot>
+ <text class="uni-dialog-content-text">{{content}}</text>
+ </slot>
+ </view>
+ <view v-else class="uni-dialog-content">
+ <slot>
+ <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
+ </slot>
+ </view>
+ <view class="uni-dialog-button-group">
+ <view class="uni-dialog-button" @click="closeDialog">
+ <text class="uni-dialog-button-text">{{closeText}}</text>
+ </view>
+ <view class="uni-dialog-button uni-border-left" @click="onOk">
+ <text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
+ </view>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import popup from '../uni-popup/popup.js'
+ import {
+ initVueI18n
+ } from '@dcloudio/uni-i18n'
+ import messages from '../uni-popup/i18n/index.js'
+ const { t } = initVueI18n(messages)
+ /**
+ * PopUp 弹出层-对话框样式
+ * @description 弹出层-对话框样式
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+ * @property {String} value input 模式下的默认值
+ * @property {String} placeholder input 模式下输入提示
+ * @property {String} type = [success|warning|info|error] 主题样式
+ * @value success 成功
+ * @value warning 提示
+ * @value info 消息
+ * @value error 错误
+ * @property {String} mode = [base|input] 模式、
+ * @value base 基础对话框
+ * @value input 可输入对话框
+ * @property {String} content 对话框内容
+ * @property {Boolean} beforeClose 是否拦截取消事件
+ * @event {Function} confirm 点击确认按钮触发
+ * @event {Function} close 点击取消按钮触发
+ */
+
+ export default {
+ name: "uniPopupDialog",
+ mixins: [popup],
+ emits:['confirm','close'],
+ props: {
+ inputType:{
+ type: String,
+ default: 'text'
+ },
+ value: {
+ type: [String, Number],
+ default: ''
+ },
+ placeholder: {
+ type: [String, Number],
+ default: ''
+ },
+ type: {
+ type: String,
+ default: 'error'
+ },
+ mode: {
+ type: String,
+ default: 'base'
+ },
+ title: {
+ type: String,
+ default: ''
+ },
+ content: {
+ type: String,
+ default: ''
+ },
+ beforeClose: {
+ type: Boolean,
+ default: false
+ },
+ cancelText:{
+ type: String,
+ default: ''
+ },
+ confirmText:{
+ type: String,
+ default: ''
+ }
+ },
+ data() {
+ return {
+ dialogType: 'error',
+ focus: false,
+ val: ""
+ }
+ },
+ computed: {
+ okText() {
+ return this.confirmText || t("uni-popup.ok")
+ },
+ closeText() {
+ return this.cancelText || t("uni-popup.cancel")
+ },
+ placeholderText() {
+ return this.placeholder || t("uni-popup.placeholder")
+ },
+ titleText() {
+ return this.title || t("uni-popup.title")
+ }
+ },
+ watch: {
+ type(val) {
+ this.dialogType = val
+ },
+ mode(val) {
+ if (val === 'input') {
+ this.dialogType = 'info'
+ }
+ },
+ value(val) {
+ this.val = val
+ }
+ },
+ created() {
+ // 对话框遮罩不可点击
+ this.popup.disableMask()
+ // this.popup.closeMask()
+ if (this.mode === 'input') {
+ this.dialogType = 'info'
+ this.val = this.value
+ } else {
+ this.dialogType = this.type
+ }
+ },
+ mounted() {
+ this.focus = true
+ },
+ methods: {
+ /**
+ * 点击确认按钮
+ */
+ onOk() {
+ if (this.mode === 'input'){
+ this.$emit('confirm', this.val)
+ }else{
+ this.$emit('confirm')
+ }
+ if(this.beforeClose) return
+ this.popup.close()
+ },
+ /**
+ * 点击取消按钮
+ */
+ closeDialog() {
+ this.$emit('close')
+ if(this.beforeClose) return
+ this.popup.close()
+ },
+ close(){
+ this.popup.close()
+ }
+ }
+ }
+</script>
+
+<style lang="scss" >
+ .uni-popup-dialog {
+ width: 300px;
+ border-radius: 11px;
+ background-color: #fff;
+ }
+
+ .uni-dialog-title {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ padding-top: 25px;
+ }
+
+ .uni-dialog-title-text {
+ font-size: 16px;
+ font-weight: 500;
+ }
+
+ .uni-dialog-content {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ padding: 20px;
+ }
+
+ .uni-dialog-content-text {
+ font-size: 14px;
+ color: #6C6C6C;
+ }
+
+ .uni-dialog-button-group {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ border-top-color: #f5f5f5;
+ border-top-style: solid;
+ border-top-width: 1px;
+ }
+
+ .uni-dialog-button {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+
+ flex: 1;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ height: 45px;
+ }
+
+ .uni-border-left {
+ border-left-color: #f0f0f0;
+ border-left-style: solid;
+ border-left-width: 1px;
+ }
+
+ .uni-dialog-button-text {
+ font-size: 16px;
+ color: #333;
+ }
+
+ .uni-button-color {
+ color: #007aff;
+ }
+
+ .uni-dialog-input {
+ flex: 1;
+ font-size: 14px;
+ border: 1px #eee solid;
+ height: 40px;
+ padding: 0 10px;
+ border-radius: 5px;
+ color: #555;
+ }
+
+ .uni-popup__success {
+ color: #4cd964;
+ }
+
+ .uni-popup__warn {
+ color: #f0ad4e;
+ }
+
+ .uni-popup__error {
+ color: #dd524d;
+ }
+
+ .uni-popup__info {
+ color: #909399;
+ }
+</style>
diff --git a/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
new file mode 100644
index 0000000..91370a8
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
@@ -0,0 +1,143 @@
+<template>
+ <view class="uni-popup-message">
+ <view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
+ <slot>
+ <text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+ </slot>
+ </view>
+ </view>
+</template>
+
+<script>
+ import popup from '../uni-popup/popup.js'
+ /**
+ * PopUp 弹出层-消息提示
+ * @description 弹出层-消息提示
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+ * @property {String} type = [success|warning|info|error] 主题样式
+ * @value success 成功
+ * @value warning 提示
+ * @value info 消息
+ * @value error 错误
+ * @property {String} message 消息提示文字
+ * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+ */
+
+ export default {
+ name: 'uniPopupMessage',
+ mixins:[popup],
+ props: {
+ /**
+ * 主题 success/warning/info/error 默认 success
+ */
+ type: {
+ type: String,
+ default: 'success'
+ },
+ /**
+ * 消息文字
+ */
+ message: {
+ type: String,
+ default: ''
+ },
+ /**
+ * 显示时间,设置为 0 则不会自动关闭
+ */
+ duration: {
+ type: Number,
+ default: 3000
+ },
+ maskShow:{
+ type:Boolean,
+ default:false
+ }
+ },
+ data() {
+ return {}
+ },
+ created() {
+ this.popup.maskShow = this.maskShow
+ this.popup.messageChild = this
+ },
+ methods: {
+ timerClose(){
+ if(this.duration === 0) return
+ clearTimeout(this.timer)
+ this.timer = setTimeout(()=>{
+ this.popup.close()
+ },this.duration)
+ }
+ }
+ }
+</script>
+<style lang="scss" >
+ .uni-popup-message {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ }
+
+ .uni-popup-message__box {
+ background-color: #e1f3d8;
+ padding: 10px 15px;
+ border-color: #eee;
+ border-style: solid;
+ border-width: 1px;
+ flex: 1;
+ }
+
+ @media screen and (min-width: 500px) {
+ .fixforpc-width {
+ margin-top: 20px;
+ border-radius: 4px;
+ flex: none;
+ min-width: 380px;
+ /* #ifndef APP-NVUE */
+ max-width: 50%;
+ /* #endif */
+ /* #ifdef APP-NVUE */
+ max-width: 500px;
+ /* #endif */
+ }
+ }
+
+ .uni-popup-message-text {
+ font-size: 14px;
+ padding: 0;
+ }
+
+ .uni-popup__success {
+ background-color: #e1f3d8;
+ }
+
+ .uni-popup__success-text {
+ color: #67C23A;
+ }
+
+ .uni-popup__warn {
+ background-color: #faecd8;
+ }
+
+ .uni-popup__warn-text {
+ color: #E6A23C;
+ }
+
+ .uni-popup__error {
+ background-color: #fde2e2;
+ }
+
+ .uni-popup__error-text {
+ color: #F56C6C;
+ }
+
+ .uni-popup__info {
+ background-color: #F2F6FC;
+ }
+
+ .uni-popup__info-text {
+ color: #909399;
+ }
+</style>
diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
new file mode 100644
index 0000000..5be7624
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
@@ -0,0 +1,187 @@
+<template>
+ <view class="uni-popup-share">
+ <view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+ <view class="uni-share-content">
+ <view class="uni-share-content-box">
+ <view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+ <image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+ <text class="uni-share-text">{{item.text}}</text>
+ </view>
+
+ </view>
+ </view>
+ <view class="uni-share-button-box">
+ <button class="uni-share-button" @click="close">{{cancelText}}</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import popup from '../uni-popup/popup.js'
+ import {
+ initVueI18n
+ } from '@dcloudio/uni-i18n'
+ import messages from '../uni-popup/i18n/index.js'
+ const { t } = initVueI18n(messages)
+ export default {
+ name: 'UniPopupShare',
+ mixins:[popup],
+ emits:['select'],
+ props: {
+ title: {
+ type: String,
+ default: ''
+ },
+ beforeClose: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ bottomData: [{
+ text: '微信',
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
+ name: 'wx'
+ },
+ {
+ text: '支付宝',
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
+ name: 'wx'
+ },
+ {
+ text: 'QQ',
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
+ name: 'qq'
+ },
+ {
+ text: '新浪',
+ icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
+ name: 'sina'
+ },
+ // {
+ // text: '百度',
+ // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
+ // name: 'copy'
+ // },
+ // {
+ // text: '其他',
+ // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
+ // name: 'more'
+ // }
+ ]
+ }
+ },
+ created() {},
+ computed: {
+ cancelText() {
+ return t("uni-popup.cancel")
+ },
+ shareTitleText() {
+ return this.title || t("uni-popup.shareTitle")
+ }
+ },
+ methods: {
+ /**
+ * 选择内容
+ */
+ select(item, index) {
+ this.$emit('select', {
+ item,
+ index
+ })
+ this.close()
+
+ },
+ /**
+ * 关闭窗口
+ */
+ close() {
+ if(this.beforeClose) return
+ this.popup.close()
+ }
+ }
+ }
+</script>
+<style lang="scss" >
+ .uni-popup-share {
+ background-color: #fff;
+ border-top-left-radius: 11px;
+ border-top-right-radius: 11px;
+ }
+ .uni-share-title {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ }
+ .uni-share-title-text {
+ font-size: 14px;
+ color: #666;
+ }
+ .uni-share-content {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ justify-content: center;
+ padding-top: 10px;
+ }
+
+ .uni-share-content-box {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ flex-wrap: wrap;
+ width: 360px;
+ }
+
+ .uni-share-content-item {
+ width: 90px;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: column;
+ justify-content: center;
+ padding: 10px 0;
+ align-items: center;
+ }
+
+ .uni-share-content-item:active {
+ background-color: #f5f5f5;
+ }
+
+ .uni-share-image {
+ width: 30px;
+ height: 30px;
+ }
+
+ .uni-share-text {
+ margin-top: 10px;
+ font-size: 14px;
+ color: #3B4144;
+ }
+
+ .uni-share-button-box {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ padding: 10px 15px;
+ }
+
+ .uni-share-button {
+ flex: 1;
+ border-radius: 50px;
+ color: #666;
+ font-size: 16px;
+ }
+
+ .uni-share-button::after {
+ border-radius: 50px;
+ }
+</style>
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/uni_modules/uni-popup/components/uni-popup/i18n/en.json
new file mode 100644
index 0000000..7f1bd06
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/en.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "cancel",
+ "uni-popup.ok": "ok",
+ "uni-popup.placeholder": "pleace enter",
+ "uni-popup.title": "Hint",
+ "uni-popup.shareTitle": "Share to"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/uni_modules/uni-popup/components/uni-popup/i18n/index.js
new file mode 100644
index 0000000..de7509c
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/index.js
@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+ en,
+ 'zh-Hans': zhHans,
+ 'zh-Hant': zhHant
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
new file mode 100644
index 0000000..5e3003c
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "取消",
+ "uni-popup.ok": "确定",
+ "uni-popup.placeholder": "请输入",
+ "uni-popup.title": "提示",
+ "uni-popup.shareTitle": "分享到"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
new file mode 100644
index 0000000..13e39eb
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
@@ -0,0 +1,7 @@
+{
+ "uni-popup.cancel": "取消",
+ "uni-popup.ok": "確定",
+ "uni-popup.placeholder": "請輸入",
+ "uni-popup.title": "提示",
+ "uni-popup.shareTitle": "分享到"
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/keypress.js b/uni_modules/uni-popup/components/uni-popup/keypress.js
new file mode 100644
index 0000000..62dda46
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/keypress.js
@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+ name: 'Keypress',
+ props: {
+ disable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ const keyNames = {
+ esc: ['Esc', 'Escape'],
+ tab: 'Tab',
+ enter: 'Enter',
+ space: [' ', 'Spacebar'],
+ up: ['Up', 'ArrowUp'],
+ left: ['Left', 'ArrowLeft'],
+ right: ['Right', 'ArrowRight'],
+ down: ['Down', 'ArrowDown'],
+ delete: ['Backspace', 'Delete', 'Del']
+ }
+ const listener = ($event) => {
+ if (this.disable) {
+ return
+ }
+ const keyName = Object.keys(keyNames).find(key => {
+ const keyName = $event.key
+ const value = keyNames[key]
+ return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ })
+ if (keyName) {
+ // 避免和其他按键事件冲突
+ setTimeout(() => {
+ this.$emit(keyName, {})
+ }, 0)
+ }
+ }
+ document.addEventListener('keyup', listener)
+ // this.$once('hook:beforeDestroy', () => {
+ // document.removeEventListener('keyup', listener)
+ // })
+ },
+ render: () => {}
+}
+// #endif
diff --git a/uni_modules/uni-popup/components/uni-popup/popup.js b/uni_modules/uni-popup/components/uni-popup/popup.js
new file mode 100644
index 0000000..c4e5781
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/popup.js
@@ -0,0 +1,26 @@
+
+export default {
+ data() {
+ return {
+
+ }
+ },
+ created(){
+ this.popup = this.getParent()
+ },
+ methods:{
+ /**
+ * 获取父元素实例
+ */
+ getParent(name = 'uniPopup') {
+ let parent = this.$parent;
+ let parentName = parent.$options.name;
+ while (parentName !== name) {
+ parent = parent.$parent;
+ if (!parent) return false
+ parentName = parent.$options.name;
+ }
+ return parent;
+ },
+ }
+}
diff --git a/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue
new file mode 100644
index 0000000..54afee2
--- /dev/null
+++ b/uni_modules/uni-popup/components/uni-popup/uni-popup.vue
@@ -0,0 +1,473 @@
+<template>
+ <view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
+ <view @touchstart="touchstart">
+ <uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
+ :duration="duration" :show="showTrans" @click="onTap" />
+ <uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
+ :show="showTrans" @click="onTap">
+ <view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
+ <slot />
+ </view>
+ </uni-transition>
+ </view>
+ <!-- #ifdef H5 -->
+ <keypress v-if="maskShow" @esc="onTap" />
+ <!-- #endif -->
+ </view>
+</template>
+
+<script>
+ // #ifdef H5
+ import keypress from './keypress.js'
+ // #endif
+
+ /**
+ * PopUp 弹出层
+ * @description 弹出层组件,为了解决遮罩弹层的问题
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+ * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
+ * @value top 顶部弹出
+ * @value center 中间弹出
+ * @value bottom 底部弹出
+ * @value left 左侧弹出
+ * @value right 右侧弹出
+ * @value message 消息提示
+ * @value dialog 对话框
+ * @value share 底部分享示例
+ * @property {Boolean} animation = [true|false] 是否开启动画
+ * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
+ * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
+ * @property {String} backgroundColor 主窗口背景色
+ * @property {String} maskBackgroundColor 蒙版颜色
+ * @property {Boolean} safeArea 是否适配底部安全区
+ * @event {Function} change 打开关闭弹窗触发,e={show: false}
+ * @event {Function} maskClick 点击遮罩触发
+ */
+
+ export default {
+ name: 'uniPopup',
+ components: {
+ // #ifdef H5
+ keypress
+ // #endif
+ },
+ emits: ['change', 'maskClick'],
+ props: {
+ // 开启动画
+ animation: {
+ type: Boolean,
+ default: true
+ },
+ // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+ // message: 消息提示 ; dialog : 对话框
+ type: {
+ type: String,
+ default: 'center'
+ },
+ // maskClick
+ isMaskClick: {
+ type: Boolean,
+ default: null
+ },
+ // TODO 2 个版本后废弃属性 ,使用 isMaskClick
+ maskClick: {
+ type: Boolean,
+ default: null
+ },
+ backgroundColor: {
+ type: String,
+ default: 'none'
+ },
+ safeArea: {
+ type: Boolean,
+ default: true
+ },
+ maskBackgroundColor: {
+ type: String,
+ default: 'rgba(0, 0, 0, 0.4)'
+ },
+ },
+
+ watch: {
+ /**
+ * 监听type类型
+ */
+ type: {
+ handler: function(type) {
+ if (!this.config[type]) return
+ this[this.config[type]](true)
+ },
+ immediate: true
+ },
+ isDesktop: {
+ handler: function(newVal) {
+ if (!this.config[newVal]) return
+ this[this.config[this.type]](true)
+ },
+ immediate: true
+ },
+ /**
+ * 监听遮罩是否可点击
+ * @param {Object} val
+ */
+ maskClick: {
+ handler: function(val) {
+ this.mkclick = val
+ },
+ immediate: true
+ },
+ isMaskClick: {
+ handler: function(val) {
+ this.mkclick = val
+ },
+ immediate: true
+ },
+ // H5 下禁止底部滚动
+ showPopup(show) {
+ // #ifdef H5
+ // fix by mehaotian 处理 h5 滚动穿透的问题
+ document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
+ // #endif
+ }
+ },
+ data() {
+ return {
+ duration: 300,
+ ani: [],
+ showPopup: false,
+ showTrans: false,
+ popupWidth: 0,
+ popupHeight: 0,
+ config: {
+ top: 'top',
+ bottom: 'bottom',
+ center: 'center',
+ left: 'left',
+ right: 'right',
+ message: 'top',
+ dialog: 'center',
+ share: 'bottom'
+ },
+ maskClass: {
+ position: 'fixed',
+ bottom: 0,
+ top: 0,
+ left: 0,
+ right: 0,
+ backgroundColor: 'rgba(0, 0, 0, 0.4)'
+ },
+ transClass: {
+ position: 'fixed',
+ left: 0,
+ right: 0
+ },
+ maskShow: true,
+ mkclick: true,
+ popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
+ }
+ },
+ computed: {
+ isDesktop() {
+ return this.popupWidth >= 500 && this.popupHeight >= 500
+ },
+ bg() {
+ if (this.backgroundColor === '' || this.backgroundColor === 'none') {
+ return 'transparent'
+ }
+ return this.backgroundColor
+ }
+ },
+ mounted() {
+ const fixSize = () => {
+ const {
+ windowWidth,
+ windowHeight,
+ windowTop,
+ safeArea,
+ screenHeight,
+ safeAreaInsets
+ } = uni.getSystemInfoSync()
+ this.popupWidth = windowWidth
+ this.popupHeight = windowHeight + (windowTop || 0)
+ // TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
+ if (safeArea && this.safeArea) {
+ // #ifdef MP-WEIXIN
+ this.safeAreaInsets = screenHeight - safeArea.bottom
+ // #endif
+ // #ifndef MP-WEIXIN
+ this.safeAreaInsets = safeAreaInsets.bottom
+ // #endif
+ } else {
+ this.safeAreaInsets = 0
+ }
+ }
+ fixSize()
+ // #ifdef H5
+ // window.addEventListener('resize', fixSize)
+ // this.$once('hook:beforeDestroy', () => {
+ // window.removeEventListener('resize', fixSize)
+ // })
+ // #endif
+ },
+ // #ifndef VUE3
+ // TODO vue2
+ destroyed() {
+ this.setH5Visible()
+ },
+ // #endif
+ // #ifdef VUE3
+ // TODO vue3
+ unmounted() {
+ this.setH5Visible()
+ },
+ // #endif
+ created() {
+ // this.mkclick = this.isMaskClick || this.maskClick
+ if (this.isMaskClick === null && this.maskClick === null) {
+ this.mkclick = true
+ } else {
+ this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
+ }
+ if (this.animation) {
+ this.duration = 300
+ } else {
+ this.duration = 0
+ }
+ // TODO 处理 message 组件生命周期异常的问题
+ this.messageChild = null
+ // TODO 解决头条冒泡的问题
+ this.clearPropagation = false
+ this.maskClass.backgroundColor = this.maskBackgroundColor
+ },
+ methods: {
+ setH5Visible() {
+ // #ifdef H5
+ // fix by mehaotian 处理 h5 滚动穿透的问题
+ document.getElementsByTagName('body')[0].style.overflow = 'visible'
+ // #endif
+ },
+ /**
+ * 公用方法,不显示遮罩层
+ */
+ closeMask() {
+ this.maskShow = false
+ },
+ /**
+ * 公用方法,遮罩层禁止点击
+ */
+ disableMask() {
+ this.mkclick = false
+ },
+ // TODO nvue 取消冒泡
+ clear(e) {
+ // #ifndef APP-NVUE
+ e.stopPropagation()
+ // #endif
+ this.clearPropagation = true
+ },
+
+ open(direction) {
+ // fix by mehaotian 处理快速打开关闭的情况
+ if (this.showPopup) {
+ return
+ }
+ let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
+ if (!(direction && innerType.indexOf(direction) !== -1)) {
+ direction = this.type
+ }
+ if (!this.config[direction]) {
+ console.error('缺少类型:', direction)
+ return
+ }
+ this[this.config[direction]]()
+ this.$emit('change', {
+ show: true,
+ type: direction
+ })
+ },
+ close(type) {
+ this.showTrans = false
+ this.$emit('change', {
+ show: false,
+ type: this.type
+ })
+ clearTimeout(this.timer)
+ // // 自定义关闭事件
+ // this.customOpen && this.customClose()
+ this.timer = setTimeout(() => {
+ this.showPopup = false
+ }, 300)
+ },
+ // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
+ touchstart() {
+ this.clearPropagation = false
+ },
+
+ onTap() {
+ if (this.clearPropagation) {
+ // fix by mehaotian 兼容 nvue
+ this.clearPropagation = false
+ return
+ }
+ this.$emit('maskClick')
+ if (!this.mkclick) return
+ this.close()
+ },
+ /**
+ * 顶部弹出样式处理
+ */
+ top(type) {
+ this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
+ this.ani = ['slide-top']
+ this.transClass = {
+ position: 'fixed',
+ left: 0,
+ right: 0,
+ backgroundColor: this.bg
+ }
+ // TODO 兼容 type 属性 ,后续会废弃
+ if (type) return
+ this.showPopup = true
+ this.showTrans = true
+ this.$nextTick(() => {
+ if (this.messageChild && this.type === 'message') {
+ this.messageChild.timerClose()
+ }
+ })
+ },
+ /**
+ * 底部弹出样式处理
+ */
+ bottom(type) {
+ this.popupstyle = 'bottom'
+ this.ani = ['slide-bottom']
+ this.transClass = {
+ position: 'fixed',
+ left: 0,
+ right: 0,
+ bottom: 0,
+ paddingBottom: this.safeAreaInsets + 'px',
+ backgroundColor: this.bg
+ }
+ // TODO 兼容 type 属性 ,后续会废弃
+ if (type) return
+ this.showPopup = true
+ this.showTrans = true
+ },
+ /**
+ * 中间弹出样式处理
+ */
+ center(type) {
+ this.popupstyle = 'center'
+ this.ani = ['zoom-out', 'fade']
+ this.transClass = {
+ position: 'fixed',
+ /* #ifndef APP-NVUE */
+ display: 'flex',
+ flexDirection: 'column',
+ /* #endif */
+ bottom: 0,
+ left: 0,
+ right: 0,
+ top: 0,
+ justifyContent: 'center',
+ alignItems: 'center'
+ }
+ // TODO 兼容 type 属性 ,后续会废弃
+ if (type) return
+ this.showPopup = true
+ this.showTrans = true
+ },
+ left(type) {
+ this.popupstyle = 'left'
+ this.ani = ['slide-left']
+ this.transClass = {
+ position: 'fixed',
+ left: 0,
+ bottom: 0,
+ top: 0,
+ backgroundColor: this.bg,
+ /* #ifndef APP-NVUE */
+ display: 'flex',
+ flexDirection: 'column'
+ /* #endif */
+ }
+ // TODO 兼容 type 属性 ,后续会废弃
+ if (type) return
+ this.showPopup = true
+ this.showTrans = true
+ },
+ right(type) {
+ this.popupstyle = 'right'
+ this.ani = ['slide-right']
+ this.transClass = {
+ position: 'fixed',
+ bottom: 0,
+ right: 0,
+ top: 0,
+ backgroundColor: this.bg,
+ /* #ifndef APP-NVUE */
+ display: 'flex',
+ flexDirection: 'column'
+ /* #endif */
+ }
+ // TODO 兼容 type 属性 ,后续会废弃
+ if (type) return
+ this.showPopup = true
+ this.showTrans = true
+ }
+ }
+ }
+</script>
+<style lang="scss">
+ .uni-popup {
+ position: fixed;
+ /* #ifndef APP-NVUE */
+ z-index: 99;
+
+ /* #endif */
+ &.top,
+ &.left,
+ &.right {
+ /* #ifdef H5 */
+ top: var(--window-top);
+ /* #endif */
+ /* #ifndef H5 */
+ top: 0;
+ /* #endif */
+ }
+
+ .uni-popup__wrapper {
+ /* #ifndef APP-NVUE */
+ display: block;
+ /* #endif */
+ position: relative;
+
+ /* iphonex 等安全区设置,底部安全区适配 */
+ /* #ifndef APP-NVUE */
+ // padding-bottom: constant(safe-area-inset-bottom);
+ // padding-bottom: env(safe-area-inset-bottom);
+ /* #endif */
+ &.left,
+ &.right {
+ /* #ifdef H5 */
+ padding-top: var(--window-top);
+ /* #endif */
+ /* #ifndef H5 */
+ padding-top: 0;
+ /* #endif */
+ flex: 1;
+ }
+ }
+ }
+
+ .fixforpc-z-index {
+ /* #ifndef APP-NVUE */
+ z-index: 999;
+ /* #endif */
+ }
+
+ .fixforpc-top {
+ top: 0;
+ }
+</style>
diff --git a/uni_modules/uni-popup/package.json b/uni_modules/uni-popup/package.json
new file mode 100644
index 0000000..f40556b
--- /dev/null
+++ b/uni_modules/uni-popup/package.json
@@ -0,0 +1,87 @@
+{
+ "id": "uni-popup",
+ "displayName": "uni-popup 弹出层",
+ "version": "1.8.3",
+ "description": " Popup 组件,提供常用的弹层",
+ "keywords": [
+ "uni-ui",
+ "弹出层",
+ "弹窗",
+ "popup",
+ "弹框"
+ ],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss",
+ "uni-transition"
+ ],
+ "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"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-popup/readme.md b/uni_modules/uni-popup/readme.md
new file mode 100644
index 0000000..fdad4b3
--- /dev/null
+++ b/uni_modules/uni-popup/readme.md
@@ -0,0 +1,17 @@
+
+
+## Popup 弹出层
+> **组件名:uni-popup**
+> 代码块: `uPopup`
+> 关联组件:`uni-transition`
+
+
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
+
+
+
+
+
diff --git a/uni_modules/uni-scss/changelog.md b/uni_modules/uni-scss/changelog.md
new file mode 100644
index 0000000..b863bb0
--- /dev/null
+++ b/uni_modules/uni-scss/changelog.md
@@ -0,0 +1,8 @@
+## 1.0.3(2022-01-21)
+- 优化 组件示例
+## 1.0.2(2021-11-22)
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
+## 1.0.1(2021-11-22)
+- 修复 vue3中scss语法兼容问题
+## 1.0.0(2021-11-18)
+- init
diff --git a/uni_modules/uni-scss/index.scss b/uni_modules/uni-scss/index.scss
new file mode 100644
index 0000000..1744a5f
--- /dev/null
+++ b/uni_modules/uni-scss/index.scss
@@ -0,0 +1 @@
+@import './styles/index.scss';
diff --git a/uni_modules/uni-scss/package.json b/uni_modules/uni-scss/package.json
new file mode 100644
index 0000000..7cc0ccb
--- /dev/null
+++ b/uni_modules/uni-scss/package.json
@@ -0,0 +1,82 @@
+{
+ "id": "uni-scss",
+ "displayName": "uni-scss 辅助样式",
+ "version": "1.0.3",
+ "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+ "keywords": [
+ "uni-scss",
+ "uni-ui",
+ "辅助样式"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "category": [
+ "JS SDK",
+ "通用 SDK"
+ ],
+ "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": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "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"
+ },
+ "快应用": {
+ "华为": "n",
+ "联盟": "n"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-scss/readme.md b/uni_modules/uni-scss/readme.md
new file mode 100644
index 0000000..b7d1c25
--- /dev/null
+++ b/uni_modules/uni-scss/readme.md
@@ -0,0 +1,4 @@
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/index.scss b/uni_modules/uni-scss/styles/index.scss
new file mode 100644
index 0000000..ffac4fe
--- /dev/null
+++ b/uni_modules/uni-scss/styles/index.scss
@@ -0,0 +1,7 @@
+@import './setting/_variables.scss';
+@import './setting/_border.scss';
+@import './setting/_color.scss';
+@import './setting/_space.scss';
+@import './setting/_radius.scss';
+@import './setting/_text.scss';
+@import './setting/_styles.scss';
diff --git a/uni_modules/uni-scss/styles/setting/_border.scss b/uni_modules/uni-scss/styles/setting/_border.scss
new file mode 100644
index 0000000..12a11c3
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_border.scss
@@ -0,0 +1,3 @@
+.uni-border {
+ border: 1px $uni-border-1 solid;
+}
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/setting/_color.scss b/uni_modules/uni-scss/styles/setting/_color.scss
new file mode 100644
index 0000000..1ededd9
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_color.scss
@@ -0,0 +1,66 @@
+
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
+// @mixin get-styles($k,$c) {
+// @if $k == size or $k == weight{
+// font-#{$k}:#{$c}
+// }@else{
+// #{$k}:#{$c}
+// }
+// }
+$uni-ui-color:(
+ // 主色
+ primary: $uni-primary,
+ primary-disable: $uni-primary-disable,
+ primary-light: $uni-primary-light,
+ // 辅助色
+ success: $uni-success,
+ success-disable: $uni-success-disable,
+ success-light: $uni-success-light,
+ warning: $uni-warning,
+ warning-disable: $uni-warning-disable,
+ warning-light: $uni-warning-light,
+ error: $uni-error,
+ error-disable: $uni-error-disable,
+ error-light: $uni-error-light,
+ info: $uni-info,
+ info-disable: $uni-info-disable,
+ info-light: $uni-info-light,
+ // 中性色
+ main-color: $uni-main-color,
+ base-color: $uni-base-color,
+ secondary-color: $uni-secondary-color,
+ extra-color: $uni-extra-color,
+ // 背景色
+ bg-color: $uni-bg-color,
+ // 边框颜色
+ border-1: $uni-border-1,
+ border-2: $uni-border-2,
+ border-3: $uni-border-3,
+ border-4: $uni-border-4,
+ // 黑色
+ black:$uni-black,
+ // 白色
+ white:$uni-white,
+ // 透明
+ transparent:$uni-transparent
+) !default;
+@each $key, $child in $uni-ui-color {
+ .uni-#{"" + $key} {
+ color: $child;
+ }
+ .uni-#{"" + $key}-bg {
+ background-color: $child;
+ }
+}
+.uni-shadow-sm {
+ box-shadow: $uni-shadow-sm;
+}
+.uni-shadow-base {
+ box-shadow: $uni-shadow-base;
+}
+.uni-shadow-lg {
+ box-shadow: $uni-shadow-lg;
+}
+.uni-mask {
+ background-color:$uni-mask;
+}
diff --git a/uni_modules/uni-scss/styles/setting/_radius.scss b/uni_modules/uni-scss/styles/setting/_radius.scss
new file mode 100644
index 0000000..9a0428b
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_radius.scss
@@ -0,0 +1,55 @@
+@mixin radius($r,$d:null ,$important: false){
+ $radius-value:map-get($uni-radius, $r) if($important, !important, null);
+ // Key exists within the $uni-radius variable
+ @if (map-has-key($uni-radius, $r) and $d){
+ @if $d == t {
+ border-top-left-radius:$radius-value;
+ border-top-right-radius:$radius-value;
+ }@else if $d == r {
+ border-top-right-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == b {
+ border-bottom-left-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == l {
+ border-top-left-radius:$radius-value;
+ border-bottom-left-radius:$radius-value;
+ }@else if $d == tl {
+ border-top-left-radius:$radius-value;
+ }@else if $d == tr {
+ border-top-right-radius:$radius-value;
+ }@else if $d == br {
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == bl {
+ border-bottom-left-radius:$radius-value;
+ }
+ }@else{
+ border-radius:$radius-value;
+ }
+}
+
+@each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $key} {
+ @include radius($key)
+ }
+ }@else{
+ .uni-radius {
+ @include radius($key)
+ }
+ }
+}
+
+@each $direction in t, r, b, l,tl, tr, br, bl {
+ @each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $direction}-#{"" + $key} {
+ @include radius($key,$direction,false)
+ }
+ }@else{
+ .uni-radius-#{$direction} {
+ @include radius($key,$direction,false)
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-scss/styles/setting/_space.scss b/uni_modules/uni-scss/styles/setting/_space.scss
new file mode 100644
index 0000000..3c89528
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_space.scss
@@ -0,0 +1,56 @@
+
+@mixin fn($space,$direction,$size,$n) {
+ @if $n {
+ #{$space}-#{$direction}: #{$size*$uni-space-root}px
+ } @else {
+ #{$space}-#{$direction}: #{-$size*$uni-space-root}px
+ }
+}
+@mixin get-styles($direction,$i,$space,$n){
+ @if $direction == t {
+ @include fn($space, top,$i,$n);
+ }
+ @if $direction == r {
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == b {
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == l {
+ @include fn($space, left,$i,$n);
+ }
+ @if $direction == x {
+ @include fn($space, left,$i,$n);
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == y {
+ @include fn($space, top,$i,$n);
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == a {
+ @if $n {
+ #{$space}:#{$i*$uni-space-root}px;
+ } @else {
+ #{$space}:#{-$i*$uni-space-root}px;
+ }
+ }
+}
+
+@each $orientation in m,p {
+ $space: margin;
+ @if $orientation == m {
+ $space: margin;
+ } @else {
+ $space: padding;
+ }
+ @for $i from 0 through 16 {
+ @each $direction in t, r, b, l, x, y, a {
+ .uni-#{$orientation}#{$direction}-#{$i} {
+ @include get-styles($direction,$i,$space,true);
+ }
+ .uni-#{$orientation}#{$direction}-n#{$i} {
+ @include get-styles($direction,$i,$space,false);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/setting/_styles.scss b/uni_modules/uni-scss/styles/setting/_styles.scss
new file mode 100644
index 0000000..689afec
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_styles.scss
@@ -0,0 +1,167 @@
+/* #ifndef APP-NVUE */
+
+$-color-white:#fff;
+$-color-black:#000;
+@mixin base-style($color) {
+ color: #fff;
+ background-color: $color;
+ border-color: mix($-color-black, $color, 8%);
+ &:not([hover-class]):active {
+ background: mix($-color-black, $color, 10%);
+ border-color: mix($-color-black, $color, 20%);
+ color: $-color-white;
+ outline: none;
+ }
+}
+@mixin is-color($color) {
+ @include base-style($color);
+ &[loading] {
+ @include base-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &[loading],
+ &:not([hover-class]):active {
+ color: $-color-white;
+ border-color: mix(darken($color,10%), $-color-white);
+ background-color: mix($color, $-color-white);
+ }
+ }
+
+}
+@mixin base-plain-style($color) {
+ color:$color;
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 70%);
+ &:not([hover-class]):active {
+ background: mix($-color-white, $color, 80%);
+ color: $color;
+ outline: none;
+ border-color: mix($-color-white, $color, 50%);
+ }
+}
+@mixin is-plain($color){
+ &[plain] {
+ @include base-plain-style($color);
+ &[loading] {
+ @include base-plain-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &:active {
+ color: mix($-color-white, $color, 40%);
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 80%);
+ }
+ }
+ }
+}
+
+
+.uni-btn {
+ margin: 5px;
+ color: #393939;
+ border:1px solid #ccc;
+ font-size: 16px;
+ font-weight: 200;
+ background-color: #F9F9F9;
+ // TODO 暂时处理边框隐藏一边的问题
+ overflow: visible;
+ &::after{
+ border: none;
+ }
+
+ &:not([type]),&[type=default] {
+ color: #999;
+ &[loading] {
+ background: none;
+ &::before {
+ margin-right:5px;
+ }
+ }
+
+
+
+ &[disabled]{
+ color: mix($-color-white, #999, 60%);
+ &,
+ &[loading],
+ &:active {
+ color: mix($-color-white, #999, 60%);
+ background-color: mix($-color-white,$-color-black , 98%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+
+ &[plain] {
+ color: #999;
+ background: none;
+ border-color: $uni-border-1;
+ &:not([hover-class]):active {
+ background: none;
+ color: mix($-color-white, $-color-black, 80%);
+ border-color: mix($-color-white, $-color-black, 90%);
+ outline: none;
+ }
+ &[disabled]{
+ &,
+ &[loading],
+ &:active {
+ background: none;
+ color: mix($-color-white, #999, 60%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+ }
+ }
+
+ &:not([hover-class]):active {
+ color: mix($-color-white, $-color-black, 50%);
+ }
+
+ &[size=mini] {
+ font-size: 16px;
+ font-weight: 200;
+ border-radius: 8px;
+ }
+
+
+
+ &.uni-btn-small {
+ font-size: 14px;
+ }
+ &.uni-btn-mini {
+ font-size: 12px;
+ }
+
+ &.uni-btn-radius {
+ border-radius: 999px;
+ }
+ &[type=primary] {
+ @include is-color($uni-primary);
+ @include is-plain($uni-primary)
+ }
+ &[type=success] {
+ @include is-color($uni-success);
+ @include is-plain($uni-success)
+ }
+ &[type=error] {
+ @include is-color($uni-error);
+ @include is-plain($uni-error)
+ }
+ &[type=warning] {
+ @include is-color($uni-warning);
+ @include is-plain($uni-warning)
+ }
+ &[type=info] {
+ @include is-color($uni-info);
+ @include is-plain($uni-info)
+ }
+}
+/* #endif */
diff --git a/uni_modules/uni-scss/styles/setting/_text.scss b/uni_modules/uni-scss/styles/setting/_text.scss
new file mode 100644
index 0000000..a34d08f
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_text.scss
@@ -0,0 +1,24 @@
+@mixin get-styles($k,$c) {
+ @if $k == size or $k == weight{
+ font-#{$k}:#{$c}
+ }@else{
+ #{$k}:#{$c}
+ }
+}
+
+@each $key, $child in $uni-headings {
+ /* #ifndef APP-NVUE */
+ .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+ /* #ifdef APP-NVUE */
+ .container .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+}
diff --git a/uni_modules/uni-scss/styles/setting/_variables.scss b/uni_modules/uni-scss/styles/setting/_variables.scss
new file mode 100644
index 0000000..557d3d7
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_variables.scss
@@ -0,0 +1,146 @@
+// @use "sass:math";
+@import '../tools/functions.scss';
+// 间距基础倍数
+$uni-space-root: 2 !default;
+// 边框半径默认值
+$uni-radius-root:5px !default;
+$uni-radius: () !default;
+// 边框半径断点
+$uni-radius: map-deep-merge(
+ (
+ 0: 0,
+ // TODO 当前版本暂时不支持 sm 属性
+ // 'sm': math.div($uni-radius-root, 2),
+ null: $uni-radius-root,
+ 'lg': $uni-radius-root * 2,
+ 'xl': $uni-radius-root * 6,
+ 'pill': 9999px,
+ 'circle': 50%
+ ),
+ $uni-radius
+);
+// 字体家族
+$body-font-family: 'Roboto', sans-serif !default;
+// 文本
+$heading-font-family: $body-font-family !default;
+$uni-headings: () !default;
+$letterSpacing: -0.01562em;
+$uni-headings: map-deep-merge(
+ (
+ 'h1': (
+ size: 32px,
+ weight: 300,
+ line-height: 50px,
+ // letter-spacing:-0.01562em
+ ),
+ 'h2': (
+ size: 28px,
+ weight: 300,
+ line-height: 40px,
+ // letter-spacing: -0.00833em
+ ),
+ 'h3': (
+ size: 24px,
+ weight: 400,
+ line-height: 32px,
+ // letter-spacing: normal
+ ),
+ 'h4': (
+ size: 20px,
+ weight: 400,
+ line-height: 30px,
+ // letter-spacing: 0.00735em
+ ),
+ 'h5': (
+ size: 16px,
+ weight: 400,
+ line-height: 24px,
+ // letter-spacing: normal
+ ),
+ 'h6': (
+ size: 14px,
+ weight: 500,
+ line-height: 18px,
+ // letter-spacing: 0.0125em
+ ),
+ 'subtitle': (
+ size: 12px,
+ weight: 400,
+ line-height: 20px,
+ // letter-spacing: 0.00937em
+ ),
+ 'body': (
+ font-size: 14px,
+ font-weight: 400,
+ line-height: 22px,
+ // letter-spacing: 0.03125em
+ ),
+ 'caption': (
+ 'size': 12px,
+ 'weight': 400,
+ 'line-height': 20px,
+ // 'letter-spacing': 0.03333em,
+ // 'text-transform': false
+ )
+ ),
+ $uni-headings
+);
+
+
+
+// 主色
+$uni-primary: #2979ff !default;
+$uni-primary-disable:lighten($uni-primary,20%) !default;
+$uni-primary-light: lighten($uni-primary,25%) !default;
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37 !default;
+$uni-success-disable:lighten($uni-success,20%) !default;
+$uni-success-light: lighten($uni-success,25%) !default;
+
+$uni-warning: #f3a73f !default;
+$uni-warning-disable:lighten($uni-warning,20%) !default;
+$uni-warning-light: lighten($uni-warning,25%) !default;
+
+$uni-error: #e43d33 !default;
+$uni-error-disable:lighten($uni-error,20%) !default;
+$uni-error-light: lighten($uni-error,25%) !default;
+
+$uni-info: #8f939c !default;
+$uni-info-disable:lighten($uni-info,20%) !default;
+$uni-info-light: lighten($uni-info,25%) !default;
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a !default; // 主要文字
+$uni-base-color: #6a6a6a !default; // 常规文字
+$uni-secondary-color: #909399 !default; // 次要文字
+$uni-extra-color: #c7c7c7 !default; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0 !default;
+$uni-border-2: #EDEDED !default;
+$uni-border-3: #DCDCDC !default;
+$uni-border-4: #B9B9B9 !default;
+
+// 常规色
+$uni-black: #000000 !default;
+$uni-white: #ffffff !default;
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
+
+// 背景色
+$uni-bg-color: #f7f7f7 !default;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px !default;
+$uni-spacing-base: 15px !default;
+$uni-spacing-lg: 30px !default;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
diff --git a/uni_modules/uni-scss/styles/tools/functions.scss b/uni_modules/uni-scss/styles/tools/functions.scss
new file mode 100644
index 0000000..ac6f63e
--- /dev/null
+++ b/uni_modules/uni-scss/styles/tools/functions.scss
@@ -0,0 +1,19 @@
+// 合并 map
+@function map-deep-merge($parent-map, $child-map){
+ $result: $parent-map;
+ @each $key, $child in $child-map {
+ $parent-has-key: map-has-key($result, $key);
+ $parent-value: map-get($result, $key);
+ $parent-type: type-of($parent-value);
+ $child-type: type-of($child);
+ $parent-is-map: $parent-type == map;
+ $child-is-map: $child-type == map;
+
+ @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
+ $result: map-merge($result, ( $key: $child ));
+ }@else {
+ $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
+ }
+ }
+ @return $result;
+};
diff --git a/uni_modules/uni-scss/theme.scss b/uni_modules/uni-scss/theme.scss
new file mode 100644
index 0000000..80ee62f
--- /dev/null
+++ b/uni_modules/uni-scss/theme.scss
@@ -0,0 +1,31 @@
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+// 主色
+$uni-primary: #2979ff;
+// 辅助色
+$uni-success: #4cd964;
+// 警告色
+$uni-warning: #f0ad4e;
+// 错误色
+$uni-error: #dd524d;
+// 描述色
+$uni-info: #909399;
+// 中性色
+$uni-main-color: #303133;
+$uni-base-color: #606266;
+$uni-secondary-color: #909399;
+$uni-extra-color: #C0C4CC;
+// 背景色
+$uni-bg-color: #f5f5f5;
+// 边框颜色
+$uni-border-1: #DCDFE6;
+$uni-border-2: #E4E7ED;
+$uni-border-3: #EBEEF5;
+$uni-border-4: #F2F6FC;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
diff --git a/uni_modules/uni-scss/variables.scss b/uni_modules/uni-scss/variables.scss
new file mode 100644
index 0000000..1c062d4
--- /dev/null
+++ b/uni_modules/uni-scss/variables.scss
@@ -0,0 +1,62 @@
+@import './styles/setting/_variables.scss';
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+
+// 主色
+$uni-primary: #2979ff;
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
+$uni-primary-light: mix(#fff,$uni-primary,80%);
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37;
+$uni-success-disable:mix(#fff,$uni-success,50%);
+$uni-success-light: mix(#fff,$uni-success,80%);
+
+$uni-warning: #f3a73f;
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
+$uni-warning-light: mix(#fff,$uni-warning,80%);
+
+$uni-error: #e43d33;
+$uni-error-disable:mix(#fff,$uni-error,50%);
+$uni-error-light: mix(#fff,$uni-error,80%);
+
+$uni-info: #8f939c;
+$uni-info-disable:mix(#fff,$uni-info,50%);
+$uni-info-light: mix(#fff,$uni-info,80%);
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a; // 主要文字
+$uni-base-color: #6a6a6a; // 常规文字
+$uni-secondary-color: #909399; // 次要文字
+$uni-extra-color: #c7c7c7; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0;
+$uni-border-2: #EDEDED;
+$uni-border-3: #DCDCDC;
+$uni-border-4: #B9B9B9;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
+
+// 背景色
+$uni-bg-color: #f7f7f7;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px;
+$uni-spacing-base: 15px;
+$uni-spacing-lg: 30px;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4);
diff --git a/uni_modules/uni-transition/changelog.md b/uni_modules/uni-transition/changelog.md
new file mode 100644
index 0000000..70c1cd4
--- /dev/null
+++ b/uni_modules/uni-transition/changelog.md
@@ -0,0 +1,22 @@
+## 1.3.2(2023-05-04)
+- 修复 NVUE 平台报错的问题
+## 1.3.1(2021-11-23)
+- 修复 init 方法初始化问题
+## 1.3.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-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
+## 1.2.1(2021-09-27)
+- 修复 init 方法不生效的 Bug
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.1(2021-05-12)
+- 新增 示例地址
+- 修复 示例项目缺少组件的 Bug
+## 1.1.0(2021-04-22)
+- 新增 通过方法自定义动画
+- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
+- 优化 动画触发逻辑,使动画更流畅
+- 优化 支持单独的动画类型
+- 优化 文档示例
+## 1.0.2(2021-02-05)
+- 调整为 uni_modules 目录规范
diff --git a/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/uni_modules/uni-transition/components/uni-transition/createAnimation.js
new file mode 100644
index 0000000..8f89b18
--- /dev/null
+++ b/uni_modules/uni-transition/components/uni-transition/createAnimation.js
@@ -0,0 +1,131 @@
+// const defaultOption = {
+// duration: 300,
+// timingFunction: 'linear',
+// delay: 0,
+// transformOrigin: '50% 50% 0'
+// }
+// #ifdef APP-NVUE
+const nvueAnimation = uni.requireNativePlugin('animation')
+// #endif
+class MPAnimation {
+ constructor(options, _this) {
+ this.options = options
+ // 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
+ this.animation = uni.createAnimation({
+ ...options
+ })
+ this.currentStepAnimates = {}
+ this.next = 0
+ this.$ = _this
+
+ }
+
+ _nvuePushAnimates(type, args) {
+ let aniObj = this.currentStepAnimates[this.next]
+ let styles = {}
+ if (!aniObj) {
+ styles = {
+ styles: {},
+ config: {}
+ }
+ } else {
+ styles = aniObj
+ }
+ if (animateTypes1.includes(type)) {
+ if (!styles.styles.transform) {
+ styles.styles.transform = ''
+ }
+ let unit = ''
+ if(type === 'rotate'){
+ unit = 'deg'
+ }
+ styles.styles.transform += `${type}(${args+unit}) `
+ } else {
+ styles.styles[type] = `${args}`
+ }
+ this.currentStepAnimates[this.next] = styles
+ }
+ _animateRun(styles = {}, config = {}) {
+ let ref = this.$.$refs['ani'].ref
+ if (!ref) return
+ return new Promise((resolve, reject) => {
+ nvueAnimation.transition(ref, {
+ styles,
+ ...config
+ }, res => {
+ resolve()
+ })
+ })
+ }
+
+ _nvueNextAnimate(animates, step = 0, fn) {
+ let obj = animates[step]
+ if (obj) {
+ let {
+ styles,
+ config
+ } = obj
+ this._animateRun(styles, config).then(() => {
+ step += 1
+ this._nvueNextAnimate(animates, step, fn)
+ })
+ } else {
+ this.currentStepAnimates = {}
+ typeof fn === 'function' && fn()
+ this.isEnd = true
+ }
+ }
+
+ step(config = {}) {
+ // #ifndef APP-NVUE
+ this.animation.step(config)
+ // #endif
+ // #ifdef APP-NVUE
+ this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
+ this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
+ this.next++
+ // #endif
+ return this
+ }
+
+ run(fn) {
+ // #ifndef APP-NVUE
+ this.$.animationData = this.animation.export()
+ this.$.timer = setTimeout(() => {
+ typeof fn === 'function' && fn()
+ }, this.$.durationTime)
+ // #endif
+ // #ifdef APP-NVUE
+ this.isEnd = false
+ let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
+ if(!ref) return
+ this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
+ this.next = 0
+ // #endif
+ }
+}
+
+
+const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
+ 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
+ 'translateZ'
+]
+const animateTypes2 = ['opacity', 'backgroundColor']
+const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
+animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
+ MPAnimation.prototype[type] = function(...args) {
+ // #ifndef APP-NVUE
+ this.animation[type](...args)
+ // #endif
+ // #ifdef APP-NVUE
+ this._nvuePushAnimates(type, args)
+ // #endif
+ return this
+ }
+})
+
+export function createAnimation(option, _this) {
+ if(!_this) return
+ clearTimeout(_this.timer)
+ return new MPAnimation(option, _this)
+}
diff --git a/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue
new file mode 100644
index 0000000..bfbba93
--- /dev/null
+++ b/uni_modules/uni-transition/components/uni-transition/uni-transition.vue
@@ -0,0 +1,286 @@
+<template>
+ <!-- #ifndef APP-NVUE -->
+ <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+ <!-- #endif -->
+ <!-- #ifdef APP-NVUE -->
+ <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+ <!-- #endif -->
+</template>
+
+<script>
+import { createAnimation } from './createAnimation'
+
+/**
+ * Transition 过渡动画
+ * @description 简单过渡动画组件
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+ * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+ * @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+ * @value fade 渐隐渐出过渡
+ * @value slide-top 由上至下过渡
+ * @value slide-right 由右至左过渡
+ * @value slide-bottom 由下至上过渡
+ * @value slide-left 由左至右过渡
+ * @value zoom-in 由小到大过渡
+ * @value zoom-out 由大到小过渡
+ * @property {Number} duration 过渡动画持续时间
+ * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+ */
+export default {
+ name: 'uniTransition',
+ emits:['click','change'],
+ props: {
+ show: {
+ type: Boolean,
+ default: false
+ },
+ modeClass: {
+ type: [Array, String],
+ default() {
+ return 'fade'
+ }
+ },
+ duration: {
+ type: Number,
+ default: 300
+ },
+ styles: {
+ type: Object,
+ default() {
+ return {}
+ }
+ },
+ customClass:{
+ type: String,
+ default: ''
+ },
+ onceRender:{
+ type:Boolean,
+ default:false
+ },
+ },
+ data() {
+ return {
+ isShow: false,
+ transform: '',
+ opacity: 1,
+ animationData: {},
+ durationTime: 300,
+ config: {}
+ }
+ },
+ watch: {
+ show: {
+ handler(newVal) {
+ if (newVal) {
+ this.open()
+ } else {
+ // 避免上来就执行 close,导致动画错乱
+ if (this.isShow) {
+ this.close()
+ }
+ }
+ },
+ immediate: true
+ }
+ },
+ computed: {
+ // 生成样式数据
+ stylesObject() {
+ let styles = {
+ ...this.styles,
+ 'transition-duration': this.duration / 1000 + 's'
+ }
+ let transform = ''
+ for (let i in styles) {
+ let line = this.toLine(i)
+ transform += line + ':' + styles[i] + ';'
+ }
+ return transform
+ },
+ // 初始化动画条件
+ transformStyles() {
+ return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject
+ }
+ },
+ created() {
+ // 动画默认配置
+ this.config = {
+ duration: this.duration,
+ timingFunction: 'ease',
+ transformOrigin: '50% 50%',
+ delay: 0
+ }
+ this.durationTime = this.duration
+ },
+ methods: {
+ /**
+ * ref 触发 初始化动画
+ */
+ init(obj = {}) {
+ if (obj.duration) {
+ this.durationTime = obj.duration
+ }
+ this.animation = createAnimation(Object.assign(this.config, obj),this)
+ },
+ /**
+ * 点击组件触发回调
+ */
+ onClick() {
+ this.$emit('click', {
+ detail: this.isShow
+ })
+ },
+ /**
+ * ref 触发 动画分组
+ * @param {Object} obj
+ */
+ step(obj, config = {}) {
+ if (!this.animation) return
+ for (let i in obj) {
+ try {
+ if(typeof obj[i] === 'object'){
+ this.animation[i](...obj[i])
+ }else{
+ this.animation[i](obj[i])
+ }
+ } catch (e) {
+ console.error(`方法 ${i} 不存在`)
+ }
+ }
+ this.animation.step(config)
+ return this
+ },
+ /**
+ * ref 触发 执行动画
+ */
+ run(fn) {
+ if (!this.animation) return
+ this.animation.run(fn)
+ },
+ // 开始过度动画
+ open() {
+ clearTimeout(this.timer)
+ this.transform = ''
+ this.isShow = true
+ let { opacity, transform } = this.styleInit(false)
+ if (typeof opacity !== 'undefined') {
+ this.opacity = opacity
+ }
+ this.transform = transform
+ // 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
+ this.$nextTick(() => {
+ // TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
+ this.timer = setTimeout(() => {
+ this.animation = createAnimation(this.config, this)
+ this.tranfromInit(false).step()
+ this.animation.run()
+ this.$emit('change', {
+ detail: this.isShow
+ })
+ }, 20)
+ })
+ },
+ // 关闭过度动画
+ close(type) {
+ if (!this.animation) return
+ this.tranfromInit(true)
+ .step()
+ .run(() => {
+ this.isShow = false
+ this.animationData = null
+ this.animation = null
+ let { opacity, transform } = this.styleInit(false)
+ this.opacity = opacity || 1
+ this.transform = transform
+ this.$emit('change', {
+ detail: this.isShow
+ })
+ })
+ },
+ // 处理动画开始前的默认样式
+ styleInit(type) {
+ let styles = {
+ transform: ''
+ }
+ let buildStyle = (type, mode) => {
+ if (mode === 'fade') {
+ styles.opacity = this.animationType(type)[mode]
+ } else {
+ styles.transform += this.animationType(type)[mode] + ' '
+ }
+ }
+ if (typeof this.modeClass === 'string') {
+ buildStyle(type, this.modeClass)
+ } else {
+ this.modeClass.forEach(mode => {
+ buildStyle(type, mode)
+ })
+ }
+ return styles
+ },
+ // 处理内置组合动画
+ tranfromInit(type) {
+ let buildTranfrom = (type, mode) => {
+ let aniNum = null
+ if (mode === 'fade') {
+ aniNum = type ? 0 : 1
+ } else {
+ aniNum = type ? '-100%' : '0'
+ if (mode === 'zoom-in') {
+ aniNum = type ? 0.8 : 1
+ }
+ if (mode === 'zoom-out') {
+ aniNum = type ? 1.2 : 1
+ }
+ if (mode === 'slide-right') {
+ aniNum = type ? '100%' : '0'
+ }
+ if (mode === 'slide-bottom') {
+ aniNum = type ? '100%' : '0'
+ }
+ }
+ this.animation[this.animationMode()[mode]](aniNum)
+ }
+ if (typeof this.modeClass === 'string') {
+ buildTranfrom(type, this.modeClass)
+ } else {
+ this.modeClass.forEach(mode => {
+ buildTranfrom(type, mode)
+ })
+ }
+
+ return this.animation
+ },
+ animationType(type) {
+ return {
+ fade: type ? 1 : 0,
+ 'slide-top': `translateY(${type ? '0' : '-100%'})`,
+ 'slide-right': `translateX(${type ? '0' : '100%'})`,
+ 'slide-bottom': `translateY(${type ? '0' : '100%'})`,
+ 'slide-left': `translateX(${type ? '0' : '-100%'})`,
+ 'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
+ 'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
+ }
+ },
+ // 内置动画类型与实际动画对应字典
+ animationMode() {
+ return {
+ fade: 'opacity',
+ 'slide-top': 'translateY',
+ 'slide-right': 'translateX',
+ 'slide-bottom': 'translateY',
+ 'slide-left': 'translateX',
+ 'zoom-in': 'scale',
+ 'zoom-out': 'scale'
+ }
+ },
+ // 驼峰转中横线
+ toLine(name) {
+ return name.replace(/([A-Z])/g, '-$1').toLowerCase()
+ }
+ }
+}
+</script>
+
+<style></style>
diff --git a/uni_modules/uni-transition/package.json b/uni_modules/uni-transition/package.json
new file mode 100644
index 0000000..ea995a2
--- /dev/null
+++ b/uni_modules/uni-transition/package.json
@@ -0,0 +1,84 @@
+{
+ "id": "uni-transition",
+ "displayName": "uni-transition 过渡动画",
+ "version": "1.3.2",
+ "description": "元素的简单过渡动画",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "动画",
+ "过渡",
+ "过渡动画"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "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"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-transition/readme.md b/uni_modules/uni-transition/readme.md
new file mode 100644
index 0000000..2f8a77e
--- /dev/null
+++ b/uni_modules/uni-transition/readme.md
@@ -0,0 +1,11 @@
+
+
+## Transition 过渡动画
+> **组件名:uni-transition**
+> 代码块: `uTransition`
+
+
+元素过渡动画
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/wyh-tree-select/README.md b/uni_modules/wyh-tree-select/README.md
new file mode 100644
index 0000000..266b861
--- /dev/null
+++ b/uni_modules/wyh-tree-select/README.md
@@ -0,0 +1,291 @@
+### 分类选择
+ 分类选择组件,支持单选、多选、搜索、默认选中值、禁用项,建议搭配弹出层uni-popup使用
+## 注意事项
+ 组件需要依赖 scss 插件, 或自己去手动修改css样式(很简单)
+## 属性 Props
+| 属性名 | 类型 | 默认值| 说明 |
+| ---- | ---- | ---- | ---- |
+| showNav | Boolean |false | 是否显示标题栏,为true时,activeIds数据单向绑定,请通过 @clickConfirm 操作|
+| title | String | 标题 | 标题文字 |
+| cancelText | String |取消 | 取消按钮文字 |
+| confirmText | String |确认 | 确认按钮文字 |
+| activeIndex | Number |0 | 左侧选中的索引 |
+| items | Array |[ ] | 为分类显示所需的数据,数据格式见下方示例 |
+| activeIds | Array | [ ] | 表示右侧高亮选项的id,默认数据双向绑定,showNva为true时,数据单向绑定, 请通过 @clickConfirm 操作 |
+| max | Number | 0 | 表示右侧项最大选中个数, 为1时表示单选 |
+| selectedIcon | String |'' | 自定义右侧栏选中状态的图标,暂只支持相对路径 |
+| selectAll | Boolean |false | 是否支持全选,默认为false |
+| defaultActiveColor | String | #FC2A57 | 默认重点颜色 |
+| isSearch | Boolean |false | 是否支持搜索,默认为false |
+| searchText | String |搜索 | 搜索按钮文字 |
+| searchPlaceholder | String |请输入关键词 | 搜索框placeholder |
+### item
+| 属性名 | 类型 | 默认值| 说明 |
+| ---- | ---- | ---- | ---- |
+| dot | Boolean |false | 圆点徽标 |
+| badge | Number | '' | 带数字的徽标 |
+| disabled | String |false | 是否禁用选项 |
+
+## 方法 Events
+| 属性名 | 返回值 | 说明 |
+| ---- | ---- | ---- |
+| clickConfirm |所有选中的数据Array |showNav 为true时有效, 点击确认按钮时触发 |
+| clickCancel | | showNav 为true时有效,点击取消按钮时触发 |
+| clickNav |被点击的导航的索引 Number | 点击左侧导航时触发 |
+| clickItem |该点击项的数据 Object | 点击右侧选择项时触发 |
+
+
+### 代码示例
+```
+<template>
+ <view class="test">
+ <view class="title">
+ 1、单选 -- {{city_ids1}}
+ </view>
+ <view class="val">
+ {{city_name1}}
+ </view>
+ <wyh-tree-select :items="items" :activeIds="city_ids1" :max="1" @clickItem="onItem"/>
+ <view class="title">
+ 2、多选 -- {{city_ids2}}
+ </view>
+ <view class="val">
+ {{city_name2}}
+ </view>
+ <wyh-tree-select :items="items" :activeIds="city_ids2" :max="2"/>
+
+ <view class="title">
+ 3、全选 -- {{city_ids5}}
+ </view>
+ <view class="val">
+ {{city_name5}}
+ </view>
+ <wyh-tree-select :items="items" :activeIds="city_ids5" :selectAll="true"/>
+
+ <view class="title">
+ 4、搭配弹出层 -- {{city_ids3}}
+ </view>
+ <view class="select" @click="$refs.popup_citys.open()">
+ <view class="title">选择城市</view>
+ <view class="val">{{city_name3}}</view>
+ </view>
+ <uni-popup class="citys_win popup_win" ref="popup_citys" type="bottom">
+ <wyh-tree-select :items="items" :activeIds="city_ids3" :title="'选择地区'"/>
+ </uni-popup>
+ <view class="title">
+ 5、搭配弹出层(showNav) -- {{city_ids4}}
+ </view>
+ <view class="select" @click="$refs.popup_citys2.open()">
+ <view class="title">选择城市</view>
+ <view class="val">{{city_name4}}</view>
+ </view>
+ <uni-popup class="citys_win popup_win" ref="popup_citys2" type="bottom">
+ <wyh-tree-select :items="items" :activeIds="city_ids4" :title="'选择地区'" :showNav="true" @clickCancel="onCancel" @clickConfirm='onConfirm'/>
+ </uni-popup>
+
+ <view class="title">
+ 6、搭配弹出层-全选(showNav) -- {{city_ids6}}
+ </view>
+ <view class="select" @click="$refs.popup_citys3.open()">
+ <view class="title">选择城市</view>
+ <view class="val">{{city_name6}}</view>
+ </view>
+ <uni-popup class="citys_win popup_win" ref="popup_citys3" type="bottom">
+ <wyh-tree-select :items="items" :activeIds="city_ids6" :title="'选择地区'" :showNav="true" :selectAll="true" @clickCancel="onCancel2" @clickConfirm='onConfirm2'/>
+ </uni-popup>
+
+ <view class="title">
+ 7、搭配弹出层-搜索、全选(showNav) -- {{city_ids7}}
+ </view>
+ <view class="select" @click="$refs.popup_citys4.open()">
+ <view class="title">选择城市</view>
+ <view class="val">{{city_name7}}</view>
+ </view>
+ <uni-popup class="citys_win popup_win" ref="popup_citys4" type="bottom">
+ <wyh-tree-select :items="items" :activeIds="city_ids7" :title="'选择地区'" :defaultActiveColor="'red'" :showNav="true" :selectAll="true" :isSearch="true" @clickCancel="onCancel3" @clickConfirm='onConfirm3'/>
+ </uni-popup>
+ </view>
+</template>
+
+<script>
+ export default {
+ computed: {
+ city_name1() {
+ return this.getCityNames(this.city_ids1);
+ },
+ city_name2() {
+ return this.getCityNames(this.city_ids2);
+ },
+ city_name3() {
+ return this.getCityNames(this.city_ids3);
+ },
+ city_name4() {
+ return this.getCityNames(this.city_ids4);
+ },
+ city_name5() {
+ return this.getCityNames(this.city_ids5);
+ },
+ city_name6() {
+ return this.getCityNames(this.city_ids6);
+ },
+ city_name7() {
+ return this.getCityNames(this.city_ids7);
+ }
+ },
+ data() {
+ return {
+ items: [{
+ text: '浙江',
+ children: [
+ {
+ // 名称
+ text: '温州',
+ // id,作为匹配选中状态的标识符
+ id: 1,
+ // 禁用选项
+ disabled: true,
+ },
+ {
+ text: '杭州',
+ id: 2,
+ },{
+ text: '宁波',
+ id: 3
+ }
+ ],
+ dot: false
+ },
+ {
+ text: '江苏',
+ children: [
+ {
+ // 名称
+ text: '南京',
+ id: 4,
+ // 禁用选项
+ disabled: true,
+ },
+ {
+ text: '无锡',
+ id: 5,
+ },
+ {
+ text: '九江',
+ id: 6,
+ },
+ {
+ text: '常州',
+ id: 7,
+ }
+ ],
+ badge: 1
+ },
+ {
+ text: '福建',
+ disabled: true,
+ children: [
+ {
+ // 名称
+ text: '厦门',
+ id: 8,
+ },
+ {
+ // 名称
+ text: '泉州',
+ id: 9,
+ }
+ ]
+ }
+ ],
+ city_ids1: [5],
+ city_ids2: [3],
+ city_ids3: [2],
+ city_ids4: [],
+ city_ids5: [2,3],
+ city_ids6: [2],
+ city_ids7: [7]
+ }
+ },
+ methods: {
+ onItem(res) {
+ console.log(res);
+ },
+ getCityNames(ids) {
+ if(!ids) return;
+ if(ids.length == 0) {
+ return '';
+ }
+ let city_name = [];
+ this.items.map(function (item, index) {
+ item.children.map(function (city, ind) {
+ ids.map(function (id, i) {
+ if(id == city.id) {
+ city_name.push(city.text);
+ }
+ })
+ })
+ })
+ return city_name.join(',');
+ },
+ onCancel() {
+ this.$refs.popup_citys2.close();
+ },
+ onConfirm(res) {
+ let ids = [];
+ res.map(function (item, ind) {
+ ids.push(item.id);
+ })
+ this.city_ids4 = ids;
+ this.$refs.popup_citys2.close();
+ },
+ onCancel2() {
+ this.$refs.popup_citys3.close();
+ },
+ onConfirm2(res) {
+ let ids = [];
+ res.map(function (item, ind) {
+ ids.push(item.id);
+ })
+ this.city_ids6 = ids;
+ this.$refs.popup_citys3.close();
+ },
+ onCancel3() {
+ this.$refs.popup_citys4.close();
+ },
+ onConfirm3(res) {
+ let ids = [];
+ res.map(function (item, ind) {
+ ids.push(item.id);
+ })
+ this.city_ids7 = ids;
+ this.$refs.popup_citys4.close();
+ }
+ },
+ created() {
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ page {
+ background: #F4F4F4 !important;
+ }
+ .test {
+ padding-bottom: 800rpx;
+ .title {
+ padding: 20rpx;
+ font-weight: 700;
+ }
+ .val {
+ display: flex;
+ align-items: center;
+ height: 80rpx;
+ padding: 0 20rpx;
+ background: #ffffff;
+ margin-bottom: 20rpx;
+ }
+ }
+</style>
+
+```
\ No newline at end of file
diff --git a/uni_modules/wyh-tree-select/changelog.md b/uni_modules/wyh-tree-select/changelog.md
new file mode 100644
index 0000000..4f8d21b
--- /dev/null
+++ b/uni_modules/wyh-tree-select/changelog.md
@@ -0,0 +1,14 @@
+## 0.06(2021-12-14)
+监听外部修改选中项
+## 0.05(2021-11-09)
+1、新增徽标统计
+2、新增搜索功能
+3、自定义颜色
+## 0.04(2021-09-29)
+1、新增全选功能
+## 0.03(2021-08-18)
+1: 修复max=1时,数据没有双向绑定的bug
+2: 修复当选中项达到最大选中项max时,无法取消选中的bug
+3:showNav = true时,数据单向绑定
+## 0.02(2021-08-16)
+迁移uni_modules插件
diff --git a/uni_modules/wyh-tree-select/components/wyh-tree-select/wyh-tree-select.vue b/uni_modules/wyh-tree-select/components/wyh-tree-select/wyh-tree-select.vue
new file mode 100644
index 0000000..c49e7ff
--- /dev/null
+++ b/uni_modules/wyh-tree-select/components/wyh-tree-select/wyh-tree-select.vue
@@ -0,0 +1,670 @@
+<template>
+ <view class="tree_select_con">
+ <view class="title_con" v-if="selfShowNav">
+ <view v-if="showCancel" class="cancel" @click="bindCancel">{{cancelText || cancel_text}}</view>
+ <view class="title">{{title}}</view>
+ <view v-if="showConfirm" class="confirm" @click="bindConfirm" :style="{'color':defaultActiveColor}">
+ {{confirmText || confirm_text}}
+ </view>
+ </view>
+ <view class="search_box" v-if="isSearch">
+ <uni-easyinput v-model="search_key" :prefixIcon="'search'" :confirmType="'search'" :trim="'both'"
+ :placeholder="searchPlaceholder" @input="bindInput" @confirm="bindSearch" />
+ <view class="search" @click="bindSearch" :style="{'background':defaultActiveColor}">{{searchText}}</view>
+ </view>
+
+ <view class="tree_select" v-if="items.length">
+ <view class="select_l">
+ <scroll-view scroll-y="true">
+ <template v-for="(item, ind) in items">
+ <view class="item" :class="{'active':active_index==ind,'disabled':item.disabled}" :key="ind"
+ @click="bindNav(ind)">
+ <view class="br" :style="{'background':defaultActiveColor}"></view>
+ <view class="txt">
+ {{item.text}}
+ <view class="dot" v-if="item.dot" :style="{'background':defaultActiveColor}"></view>
+ <view class="badge" v-if="item.badge" :style="{'background':defaultActiveColor}">
+ {{item.badge}}
+ </view>
+ </view>
+ </view>
+ </template>
+ </scroll-view>
+ </view>
+ <view class="select_r">
+ <scroll-view scroll-y="true">
+ <view class="item" v-if="selectAll" :class="{'active':select_all}"
+ :style="{'color':select_all?defaultActiveColor:'initial'}" @click="bindAll()">
+ <view class="txt">
+ 全选
+ </view>
+ <view class="ic_con">
+ <image class="icon" :src="selectedIcon" mode="mode" v-if="selectedIcon"></image>
+ <uni-icons class="ic" :type="'checkmarkempty'" :size="20" :color="defaultActiveColor"
+ v-else></uni-icons>
+ </view>
+ </view>
+ <template v-for="(item,ind) in items[active_index].children">
+ <!-- <view class="item disabled" v-if="item.disabled" @click="bindItem(ind, item)" :key="ind">
+ <view class="txt">
+ {{item.text}}
+ </view>
+ <view class="ic_con">
+ <image class="icon" :src="selectedIcon" mode="mode" v-if="selectedIcon"></image>
+ <view class="ic" v-else></view>
+ </view>
+ </view> -->
+ <view class="item" :class="{'active':isHave(item.id), 'disabled':item.disabled}"
+ :style="{'color':isHave(item.id)?defaultActiveColor:'initial'}" @click="bindItem(ind, item)"
+ :key="ind">
+ <view class="txt">
+ {{item.text}}
+ </view>
+ <view class="ic_con">
+ <image class="icon" :src="selectedIcon" mode="mode" v-if="selectedIcon"></image>
+ <uni-icons class="ic" :type="'checkmarkempty'" :size="20" :color="defaultActiveColor"
+ v-else></uni-icons>
+ </view>
+ </view>
+ </template>
+ </scroll-view>
+ </view>
+ <view class="search_result" v-if="isSearch" :style="{'height': search_height}">
+ <scroll-view scroll-y="true">
+ <template v-if="search_list.length">
+ <view class="search_list">
+ <view class="item" :class="{'active':isHave(item.id),'disabled':item.disabled}"
+ v-for="(item, ind) in search_list" :key="ind"
+ :style="{'color':isHave(item.id)?defaultActiveColor:'initial'}"
+ @click="bindItem(ind, item)">
+ <view class="txt">{{item.all_text}}</view>
+ <view class="ic_con">
+ <image class="icon" :src="selectedIcon" mode="mode" v-if="selectedIcon"></image>
+ <uni-icons class="ic" :type="'checkmarkempty'" :size="20"
+ :color="defaultActiveColor" v-else></uni-icons>
+ </view>
+ </view>
+ </view>
+ <view class="close_btn" :style="{'background':defaultActiveColor}" @click="bindClose">关闭</view>
+ </template>
+ <template v-else>
+ <view class="empty">
+ <view class="txt">暂无相关数据</view>
+ <view class="close" :style="{'background':defaultActiveColor}" @click="bindClose">关闭</view>
+ </view>
+ </template>
+ </scroll-view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: "wyh-tree-select",
+ components: {},
+ props: {
+ showNav: {
+ type: Boolean,
+ default: false
+ },
+ showCancel: {
+ type: Boolean,
+ default: true
+ },
+ showConfirm: {
+ type: Boolean,
+ default: true
+ },
+ defaultActiveColor: {
+ type: String,
+ default: '#FC2A57'
+ },
+ title: {
+ type: String,
+ default: '标题'
+ },
+ cancel_text: {
+ type: String,
+ default: '取消'
+ },
+ cancelText: {
+ type: String,
+ default: '取消'
+ },
+ confirm_text: {
+ type: String,
+ default: '确认'
+ },
+ confirmText: {
+ type: String,
+ default: '确认'
+ },
+ // 分类显示所需的数据
+ items: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ // 左侧选中项的索引
+ activeIndex: {
+ type: Number | String,
+ default: 0
+ },
+ // 右侧选中项的 id,支持传入数组
+ activeIds: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ // 右侧项最大选中个数
+ max: {
+ type: Number,
+ default: 0
+ },
+ // 自定义右侧栏选中状态的图标
+ selectedIcon: {
+ type: String,
+ default: ''
+ },
+ // 是否支持全选
+ selectAll: {
+ type: Boolean,
+ default: false
+ },
+ // 是否支持搜索
+ isSearch: {
+ type: Boolean,
+ default: false
+ },
+ searchPlaceholder: {
+ type: String,
+ default: '请输入关键词'
+ },
+ searchText: {
+ type: String,
+ default: '搜索'
+ }
+ },
+ data() {
+ return {
+ list: this.items,
+ active_index: this.activeIndex,
+ active_ids: this.activeIds,
+ select_all: false,
+ search_key: '', //搜索关键词
+ search_list: [], //搜索结果列表
+ search_height: 0
+ };
+ },
+ watch: {
+ activeIds(val) {
+ this.active_ids = val;
+ }
+ },
+ computed: {
+ selfShowNav() {
+ if (this.showNav) {
+ let arr = [].concat(this.activeIds);
+ this.active_ids = arr;
+ }
+ return this.showNav;
+ }
+ },
+ methods: {
+ // 确认
+ bindConfirm() {
+ let that = this;
+ let result = [];
+ this.items.map(function(item, ind) {
+ item.children.map(function(it, index) {
+ that.active_ids.map(function(id, i) {
+ if (it.id == id) {
+ result.push(it);
+ }
+ })
+ })
+ })
+ this.$emit('clickConfirm', result);
+ },
+ // 全选
+ bindAll() {
+ let that = this;
+ let ind = this.active_index;
+ if (this.select_all) {
+ this.items[ind].children.map(function(item, index) {
+ if (that.isHave(item.id)) {
+ let index = that.active_ids.indexOf(item.id);
+ that.active_ids.splice(index, 1);
+ }
+ })
+ } else {
+ this.items[ind].children.map(function(item, index) {
+ let ind = that.active_ids.indexOf(item.id);
+ if (!item.disabled && ind == -1) {
+ that.active_ids.push(item.id);
+ }
+ })
+ }
+ // console.log(this.active_ids);
+ this.select_all = !this.select_all;
+ this.initBadge();
+ },
+ // 取消
+ bindCancel() {
+ this.$emit('clickCancel');
+ },
+ // 左侧点击
+ bindNav(ind) {
+ if (!this.items[ind].disabled) {
+ this.active_index = ind;
+ if (this.selectAll) {
+ this.select_all = this.isAll();
+ }
+ }
+ this.$emit('clickNav', ind);
+ },
+ // 右侧点击
+ bindItem(ind, item) {
+ if (item.disabled) {
+ return this.$emit('clickItem', item);
+ }
+ if (this.max == 1) {
+ // 单选
+ this.$set(this.active_ids, 0, item.id);
+ } else {
+ if (this.isHave(item.id)) {
+ let index = this.active_ids.indexOf(item.id);
+ this.active_ids.splice(index, 1);
+ // console.log(this.activeIds);
+ } else if (this.max > 0 && !(this.active_ids.length < this.max)) {
+ uni.showToast({
+ title: '最大选中数为' + this.max,
+ duration: 2000,
+ icon: 'none'
+ });
+ } else {
+ this.active_ids.push(item.id);
+ // console.log(this.activeIds);
+ }
+ }
+ // 全选
+ if (this.selectAll) {
+ this.select_all = this.isAll();
+ }
+ this.initBadge();
+ this.$emit('clickItem', item);
+ },
+ // 是否已经选中
+ isHave(id) {
+ if (this.active_ids.indexOf(id) == -1) {
+ return false;
+ } else {
+ return true;
+ }
+ },
+ // 判断是否全选
+ isAll() {
+ let that = this;
+ let len = 0;
+ let len2 = 0;
+ let _ind = this.active_index;
+ this.items[_ind].children.map(function(item, index) {
+ if (!item.disabled) {
+ len += 1;
+ }
+ if (that.isHave(item.id)) {
+ len2 += 1;
+ }
+ })
+ if (len == len2 && len > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // 计算徽标
+ initBadge() {
+ let that = this;
+ let ind = this.active_index;
+ if (this.list[ind].badge !== undefined) {
+ // 数字徽标
+ }
+ if (this.list[ind].dot !== undefined) {
+ // 圆点徽标
+ }
+ this.list.map(function(item, index) {
+ if (item.badge !== undefined) {
+ item.badge = 0;
+ item.children.map(function(child, key) {
+ if (that.isHave(child.id)) {
+ item.badge += 1;
+ }
+ })
+ }
+ if (item.dot !== undefined) {
+ item.dot = false;
+ item.children.map(function(child, key) {
+ if (that.isHave(child.id)) {
+ item.dot = true;
+ }
+ })
+ }
+ })
+ // console.log(this.list);
+ },
+ // 输入
+ bindInput() {
+ if (!this.search_key) {
+ this.search_height = 0;
+ this.search_list = [];
+ }
+ },
+ bindClose() {
+ this.search_key = '';
+ this.search_height = 0;
+ this.search_list = [];
+ },
+ // 搜索
+ bindSearch() {
+ let that = this;
+ if (!this.search_key) {
+ uni.showToast({
+ title: '请输入关键词',
+ icon: 'none'
+ });
+ return false;
+ }
+ this.search_height = '100%';
+ this.search_list = [];
+ this.list.map(function(item, index) {
+ if (!item.disabled) {
+ item.children.map(function(child, key) {
+ if (child.text.indexOf(that.search_key) !== -1) {
+ child.all_text = `${item.text} -- ${child.text}`;
+ that.search_list.push(child);
+ }
+ })
+ }
+ })
+ // console.log(this.search_list);
+ }
+ },
+ created() {
+ this.initBadge();
+ if (this.selectAll) {
+ this.select_all = this.isAll();
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .tree_select_con {
+ .title_con {
+ display: flex;
+ align-items: center;
+ // justify-content: space-between;
+ justify-content: center;
+ height: 100rpx;
+ background: #ffffff;
+ color: #333333;
+ border-radius: 30rpx 30rpx 0 0;
+
+ .title {
+ font-size: 30rpx;
+ font-weight: 700;
+ }
+
+ .cancel {
+ color: #999999;
+ padding: 20rpx;
+ font-size: 28rpx;
+ }
+
+ .confirm {
+ padding: 20rpx;
+ font-size: 28rpx;
+ }
+ }
+
+ .search_box {
+ display: flex;
+ padding: 20rpx;
+ background: #fff;
+
+ .search {
+ flex-shrink: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 30rpx;
+ font-weight: 700;
+ color: #fff;
+ padding: 0 30rpx;
+ border-radius: 10rpx;
+ margin-left: 20rpx;
+ letter-spacing: 2px;
+ }
+ }
+
+ .tree_select {
+ position: relative;
+ display: flex;
+ height: 600rpx;
+ overflow: hidden;
+ background: #ffffff;
+ color: #333333;
+
+ scroll-view {
+ height: 600rpx;
+ }
+
+ .select_l {
+ flex: 1;
+ background: #F4F4F4;
+ overflow: hidden;
+
+ .item {
+ padding: 20rpx;
+ font-size: 30rpx;
+ position: relative;
+ display: flex;
+ align-items: center;
+
+ .txt {
+ display: flex;
+ align-items: center;
+ position: relative;
+
+ .dot {
+ position: absolute;
+ top: -15rpx;
+ left: 100%;
+ width: 14rpx;
+ height: 14rpx;
+ border-radius: 7rpx;
+ }
+
+ .badge {
+ position: absolute;
+ top: -15rpx;
+ left: 100%;
+ padding: 0 10rpx;
+ border-radius: 50rpx;
+ font-size: 24rpx;
+ color: #ffffff;
+ }
+ }
+
+ .br {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 4rpx;
+ opacity: 0;
+ }
+
+ &.active {
+ background: #ffffff;
+
+ .br {
+ opacity: 1;
+ }
+ }
+
+ &.disabled {
+ color: #aaaaaa;
+ cursor: not-allowed;
+ }
+ }
+ }
+
+ .select_r {
+ flex: 2;
+ overflow: hidden;
+
+ .item {
+ padding: 20rpx;
+ font-size: 30rpx;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .ic_con {
+ width: 40rpx;
+ height: 40rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .ic {
+ opacity: 0;
+ font-weight: initial;
+ }
+
+ .icon {
+ width: 36rpx;
+ height: 36rpx;
+ opacity: 0;
+ }
+
+ &.active {
+ .ic {
+ opacity: 1;
+ }
+
+ .icon {
+ opacity: 1;
+ }
+ }
+
+ &.disabled {
+ color: #aaaaaa !important;
+ cursor: not-allowed;
+ }
+ }
+ }
+
+ .search_result {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ background: #fff;
+ box-sizing: border-box;
+ transition: all 0.3s;
+ overflow: hidden;
+
+ .search_list {
+ padding-bottom: 90rpx;
+
+ .item {
+ padding: 15rpx 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .ic_con {
+ width: 40rpx;
+ height: 40rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .ic {
+ opacity: 0;
+ font-weight: initial;
+ }
+
+ .icon {
+ width: 36rpx;
+ height: 36rpx;
+ opacity: 0;
+ }
+
+ &.active {
+ .ic {
+ opacity: 1;
+ }
+
+ .icon {
+ opacity: 1;
+ }
+ }
+
+ &.disabled {
+ color: #aaaaaa !important;
+ cursor: not-allowed;
+ }
+ }
+ }
+
+ .close_btn {
+ position: fixed;
+ bottom: 10rpx;
+ left: 25%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 50%;
+ height: 70rpx;
+ border-radius: 35rpx;
+ font-size: 30rpx;
+ color: #fff;
+ letter-spacing: 4px;
+ box-shadow: 1px 4px 4px rgba(252, 42, 87, 0.3);
+ }
+
+ .empty {
+ display: flex;
+ flex-flow: column;
+ align-items: center;
+ justify-content: center;
+
+ .txt {
+ font-size: 40rpx;
+ color: #bbb;
+ margin: 100rpx 0;
+ }
+
+ .close {
+ color: #fff;
+ margin: 0 auto;
+ padding: 15rpx 40rpx;
+ border-radius: 10rpx;
+ letter-spacing: 2px;
+ font-size: 30rpx;
+ }
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/uni_modules/wyh-tree-select/package.json b/uni_modules/wyh-tree-select/package.json
new file mode 100644
index 0000000..d09f23a
--- /dev/null
+++ b/uni_modules/wyh-tree-select/package.json
@@ -0,0 +1,78 @@
+{
+ "id": "wyh-tree-select",
+ "displayName": "分类选择",
+ "version": "0.06",
+ "description": "分类选择组件,支持单选、多选、全选、默认选中值、禁用项,建议搭配弹出层uni-popup使用",
+ "keywords": [
+ "分类选择"
+ ],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.1.22"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "插件不采集任何数据",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "n"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "u",
+ "IE": "u",
+ "Edge": "u",
+ "Firefox": "u",
+ "Safari": "u"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3