Ver código fonte

首次提交

ydf 1 mês atrás
commit
1d8d3a4ff5
100 arquivos alterados com 9801 adições e 0 exclusões
  1. 9 0
      .hbuilderx/launch.json
  2. 18 0
      App.vue
  3. 1461 0
      common/uni.css
  4. 152 0
      common/util.js
  5. 20 0
      index.html
  6. 22 0
      main.js
  7. 85 0
      manifest.json
  8. 88 0
      pages.json
  9. 323 0
      pages/clockIn/clockIn - 副本.vue
  10. 51 0
      pages/clockIn/clockIn.js
  11. 294 0
      pages/clockIn/clockIn.vue
  12. 199 0
      pages/daixjgk/daixjgk.vue
  13. 74 0
      pages/home/home - 副本.vue
  14. 73 0
      pages/home/home.vue
  15. 52 0
      pages/index/index.vue
  16. 287 0
      pages/popup/popup.vue
  17. 53 0
      pages/systemSet/systemSet.vue
  18. 140 0
      pages/warehouse/components/warehouseInfo/warehouseInfo.vue
  19. 177 0
      pages/warehouse/components/warehouseList/warehouseList.vue
  20. 276 0
      pages/warehouse/warehouse.vue
  21. BIN
      static/bg.jpg
  22. BIN
      static/home.png
  23. BIN
      static/home/beixjsk.png
  24. BIN
      static/home/daixjsk.png
  25. BIN
      static/home/home-bj.png
  26. BIN
      static/home/jiaosklqjc.png
  27. BIN
      static/home/jiaoskxdqk.png
  28. BIN
      static/home/logo.png
  29. BIN
      static/homeHL.png
  30. BIN
      static/icons/location-ico.png
  31. BIN
      static/icons/shaix-ico.png
  32. BIN
      static/icons/warehouse-ico.png
  33. BIN
      static/logo.png
  34. BIN
      static/set.png
  35. BIN
      static/setHL.png
  36. BIN
      static/tp.png
  37. BIN
      static/uni.ttf
  38. 13 0
      uni.promisify.adaptor.js
  39. 76 0
      uni.scss
  40. 26 0
      uni_modules/uni-card/changelog.md
  41. 270 0
      uni_modules/uni-card/components/uni-card/uni-card.vue
  42. 90 0
      uni_modules/uni-card/package.json
  43. 12 0
      uni_modules/uni-card/readme.md
  44. 40 0
      uni_modules/uni-icons/changelog.md
  45. 91 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
  46. 110 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  47. 664 0
      uni_modules/uni-icons/components/uni-icons/uniicons.css
  48. BIN
      uni_modules/uni-icons/components/uni-icons/uniicons.ttf
  49. 664 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
  50. 649 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
  51. 88 0
      uni_modules/uni-icons/package.json
  52. 8 0
      uni_modules/uni-icons/readme.md
  53. 90 0
      uni_modules/uni-popup/changelog.md
  54. 45 0
      uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
  55. 316 0
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  56. 143 0
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  57. 188 0
      uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
  58. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/en.json
  59. 8 0
      uni_modules/uni-popup/components/uni-popup/i18n/index.js
  60. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
  61. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
  62. 45 0
      uni_modules/uni-popup/components/uni-popup/keypress.js
  63. 26 0
      uni_modules/uni-popup/components/uni-popup/popup.js
  64. 90 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
  65. 518 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue
  66. 90 0
      uni_modules/uni-popup/package.json
  67. 17 0
      uni_modules/uni-popup/readme.md
  68. 8 0
      uni_modules/uni-scss/changelog.md
  69. 1 0
      uni_modules/uni-scss/index.scss
  70. 82 0
      uni_modules/uni-scss/package.json
  71. 4 0
      uni_modules/uni-scss/readme.md
  72. 7 0
      uni_modules/uni-scss/styles/index.scss
  73. 3 0
      uni_modules/uni-scss/styles/setting/_border.scss
  74. 66 0
      uni_modules/uni-scss/styles/setting/_color.scss
  75. 55 0
      uni_modules/uni-scss/styles/setting/_radius.scss
  76. 56 0
      uni_modules/uni-scss/styles/setting/_space.scss
  77. 167 0
      uni_modules/uni-scss/styles/setting/_styles.scss
  78. 24 0
      uni_modules/uni-scss/styles/setting/_text.scss
  79. 146 0
      uni_modules/uni-scss/styles/setting/_variables.scss
  80. 19 0
      uni_modules/uni-scss/styles/tools/functions.scss
  81. 31 0
      uni_modules/uni-scss/theme.scss
  82. 62 0
      uni_modules/uni-scss/variables.scss
  83. 2 0
      uni_modules/uni-section/changelog.md
  84. 167 0
      uni_modules/uni-section/components/uni-section/uni-section.vue
  85. 87 0
      uni_modules/uni-section/package.json
  86. 8 0
      uni_modules/uni-section/readme.md
  87. 24 0
      uni_modules/uni-transition/changelog.md
  88. 131 0
      uni_modules/uni-transition/components/uni-transition/createAnimation.js
  89. 286 0
      uni_modules/uni-transition/components/uni-transition/uni-transition.vue
  90. 85 0
      uni_modules/uni-transition/package.json
  91. 11 0
      uni_modules/uni-transition/readme.md
  92. 8 0
      unpackage/dist/cache/.vite/deps/_metadata.json
  93. 3 0
      unpackage/dist/cache/.vite/deps/package.json
  94. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/components/TopDownPopup/TopDownPopup.js.map
  95. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/clockIn/clockIn.js.map
  96. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/daixjgk/daixjgk.js.map
  97. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/home/home.js.map
  98. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/popup/popup.js.map
  99. 1 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/warehouseInfo/warehouseInfo.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin-devtools/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js.map

+ 9 - 0
.hbuilderx/launch.json

@@ -0,0 +1,9 @@
1
+{
2
+    "version" : "1.0",
3
+    "configurations" : [
4
+        {
5
+            "playground" : "custom",
6
+            "type" : "uni-app:app-ios"
7
+        }
8
+    ]
9
+}

+ 18 - 0
App.vue

@@ -0,0 +1,18 @@
1
+<script>
2
+	export default {
3
+		onLaunch: function() {
4
+			console.log('App Launch')
5
+		},
6
+		onShow: function() {
7
+			console.log('App Show')
8
+		},
9
+		onHide: function() {
10
+			console.log('App Hide')
11
+		}
12
+	}
13
+</script>
14
+
15
+<style>
16
+	/*每个页面公共css */
17
+	@import './common/uni.css';
18
+</style>

Diferenças do arquivo suprimidas por serem muito extensas
+ 1461 - 0
common/uni.css


+ 152 - 0
common/util.js

@@ -0,0 +1,152 @@
1
+// utils.js
2
+
3
+export function formatTime(time) {
4
+	if (typeof time !== 'number' || time < 0) {
5
+		return time.toString();
6
+	}
7
+
8
+	const hour = Math.floor(time / 3600);
9
+	time %= 3600;
10
+	const minute = Math.floor(time / 60);
11
+	const second = time % 60;
12
+
13
+	return [hour, minute, second].map(n => n.toString().padStart(2, '0')).join(':');
14
+}
15
+
16
+export function formatLocation(longitude, latitude) {
17
+	if (typeof longitude === 'string' && typeof latitude === 'string') {
18
+		longitude = parseFloat(longitude);
19
+		latitude = parseFloat(latitude);
20
+	}
21
+
22
+	return {
23
+		longitude: longitude.toFixed(2).split('.'),
24
+		latitude: latitude.toFixed(2).split('.')
25
+	};
26
+}
27
+
28
+export const dateUtils = {
29
+	UNITS: {
30
+		'年': 31557600000,
31
+		'月': 2629800000,
32
+		'天': 86400000,
33
+		'小时': 3600000,
34
+		'分钟': 60000,
35
+		'秒': 1000
36
+	},
37
+	humanize(milliseconds) {
38
+		for (const key in this.UNITS) {
39
+			if (milliseconds >= this.UNITS[key]) {
40
+				return Math.floor(milliseconds / this.UNITS[key]) + key + '前';
41
+			}
42
+		}
43
+		return '刚刚';
44
+	},
45
+	format(dateStr) {
46
+		const date = this.parse(dateStr);
47
+		const diff = Date.now() - date.getTime();
48
+
49
+		if (diff < this.UNITS['天']) {
50
+			return this.humanize(diff);
51
+		}
52
+
53
+		const _format = number => (number < 10 ? `0${number}` : number);
54
+
55
+		return `${date.getFullYear()}/${_format(date.getMonth() + 1)}/${_format(date.getDate())} - ${_format(date.getHours())}:${_format(date.getMinutes())}`;
56
+	},
57
+	parse(str) { // 将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象
58
+		const a = str.split(/[^0-9]/);
59
+		return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]);
60
+	}
61
+};
62
+
63
+export function formateDates(datetime, type) {
64
+	const year = datetime.getFullYear();
65
+	const month = String(datetime.getMonth() + 1).padStart(2, '0');
66
+	const date = String(datetime.getDate()).padStart(2, '0');
67
+	const hour = String(datetime.getHours()).padStart(2, '0');
68
+	const minute = String(datetime.getMinutes()).padStart(2, '0');
69
+	const second = String(datetime.getSeconds()).padStart(2, '0');
70
+
71
+	switch (type) {
72
+		case "Y-M-D h:min:s":
73
+			return `${year}-${month}-${date} ${hour}:${minute}:${second}`;
74
+		case "Y-M-D":
75
+			return `${year}-${month}-${date}`;
76
+		case "h:min:s":
77
+			return `${hour}:${minute}:${second}`;
78
+		default:
79
+			return '';
80
+	}
81
+}
82
+
83
+export function deteleObject(obj) {
84
+	const uniques = [];
85
+	const stringify = {};
86
+	obj.forEach(item => {
87
+		const keys = Object.keys(item).sort();
88
+		const str = keys.map(key => JSON.stringify([key, item[key]])).join('');
89
+		if (!stringify[str]) {
90
+			uniques.push(item);
91
+			stringify[str] = true;
92
+		}
93
+	});
94
+	return uniques;
95
+}
96
+
97
+export function formateDate(datetime, type) {
98
+	const year = datetime.getFullYear();
99
+	const month = String(datetime.getMonth() + 1).padStart(2, '0');
100
+	const date = String(datetime.getDate()).padStart(2, '0');
101
+	const hour = String(datetime.getHours()).padStart(2, '0');
102
+	const minute = String(datetime.getMinutes()).padStart(2, '0');
103
+	const second = String(datetime.getSeconds()).padStart(2, '0');
104
+
105
+	switch (type) {
106
+		case "Y-M-D h:min:s":
107
+			return `${year}-${month}-${date} ${hour}:${minute}:${second}`;
108
+		case "Y-M-D":
109
+			return `${year}年${month}月${date}日`;
110
+		case "h:min:s":
111
+			return `${hour}:${minute}:${second}`;
112
+		case "h":
113
+			return hour;
114
+		case "min":
115
+			return minute;
116
+		default:
117
+			return '';
118
+	}
119
+}
120
+
121
+export function randomNum(minNum, maxNum = null) {
122
+	if (maxNum === null) {
123
+		maxNum = minNum;
124
+		minNum = 0;
125
+	}
126
+	return Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;
127
+}
128
+
129
+export function pointInsideCircle(point, circle, r) {
130
+	if (r === 0) return false;
131
+	const dx = circle[0] - point[0];
132
+	const dy = circle[1] - point[1];
133
+	return dx * dx + dy * dy <= r * r;
134
+}
135
+
136
+export function isSameDay(timeStampA) {
137
+	const dateA = new Date(timeStampA);
138
+	const dateB = new Date();
139
+	return dateA.setHours(0, 0, 0, 0) === dateB.setHours(0, 0, 0, 0);
140
+}
141
+
142
+export function getCurrentMonthFirst() {
143
+	const date = new Date();
144
+	date.setDate(1);
145
+	return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`;
146
+}
147
+
148
+export function getCurrentMonthLast() {
149
+	const date = new Date();
150
+	date.setMonth(date.getMonth() + 1, 0);
151
+	return `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日`;
152
+}

+ 20 - 0
index.html

@@ -0,0 +1,20 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+  <head>
4
+    <meta charset="UTF-8" />
5
+    <script>
6
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
7
+        CSS.supports('top: constant(a)'))
8
+      document.write(
9
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
10
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
11
+    </script>
12
+    <title></title>
13
+    <!--preload-links-->
14
+    <!--app-context-->
15
+  </head>
16
+  <body>
17
+    <div id="app"><!--app-html--></div>
18
+    <script type="module" src="/main.js"></script>
19
+  </body>
20
+</html>

+ 22 - 0
main.js

@@ -0,0 +1,22 @@
1
+import App from './App'
2
+
3
+// #ifndef VUE3
4
+import Vue from 'vue'
5
+import './uni.promisify.adaptor'
6
+Vue.config.productionTip = false
7
+App.mpType = 'app'
8
+const app = new Vue({
9
+  ...App
10
+})
11
+app.$mount()
12
+// #endif
13
+
14
+// #ifdef VUE3
15
+import { createSSRApp } from 'vue'
16
+export function createApp() {
17
+  const app = createSSRApp(App)
18
+  return {
19
+    app
20
+  }
21
+}
22
+// #endif

+ 85 - 0
manifest.json

@@ -0,0 +1,85 @@
1
+{
2
+    "name" : "jgk-project",
3
+    "appid" : "",
4
+    "description" : "",
5
+    "versionName" : "1.0.0",
6
+    "versionCode" : "100",
7
+    "transformPx" : false,
8
+    /* 5+App特有相关 */
9
+    "app-plus" : {
10
+        "usingComponents" : true,
11
+        "nvueStyleCompiler" : "uni-app",
12
+        "compilerVersion" : 3,
13
+        "splashscreen" : {
14
+            "alwaysShowBeforeRender" : true,
15
+            "waiting" : true,
16
+            "autoclose" : true,
17
+            "delay" : 0
18
+        },
19
+        /* 模块配置 */
20
+        "modules" : {},
21
+        /* 应用发布信息 */
22
+        "distribute" : {
23
+            /* android打包配置 */
24
+            "android" : {
25
+                "permissions" : [
26
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
27
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
28
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
29
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
30
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
31
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
32
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
33
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
34
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
35
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
36
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
37
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
38
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
39
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
40
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
41
+                ]
42
+            },
43
+            /* ios打包配置 */
44
+            "ios" : {},
45
+            /* SDK配置 */
46
+            "sdkConfigs" : {}
47
+        }
48
+    },
49
+    /* 快应用特有相关 */
50
+    "quickapp" : {},
51
+    /* 小程序特有相关 */
52
+	"mp-weixin": {
53
+	    "appid": "wxdfdc0eaf29fe3f93",
54
+	    "setting": {
55
+	        "urlCheck": false // 开发阶段设为false,发布时应设为true
56
+	    },
57
+	    "usingComponents": true, // 启用自定义组件支持
58
+	    "permission": {
59
+	        "scope.userLocation": {
60
+	            "desc": "您的位置信息将用于定位打卡功能"
61
+	        }
62
+	    },
63
+	    "requiredPrivateInfos": [
64
+	      "getLocation" // 将其作为数组元素
65
+	    ]
66
+	},
67
+	"h5" : {
68
+	    "sdkConfigs" : {
69
+	        "maps" : {}
70
+	    }
71
+	},
72
+    "mp-alipay" : {
73
+        "usingComponents" : true
74
+    },
75
+    "mp-baidu" : {
76
+        "usingComponents" : true
77
+    },
78
+    "mp-toutiao" : {
79
+        "usingComponents" : true
80
+    },
81
+    "uniStatistics" : {
82
+        "enable" : false
83
+    },
84
+    "vueVersion" : "3"
85
+}

+ 88 - 0
pages.json

@@ -0,0 +1,88 @@
1
+{
2
+  "entryPagePath": "pages/daixjgk/daixjgk",
3
+  "pages": [
4
+    {
5
+      "path": "pages/home/home",
6
+      "style": {
7
+        "navigationBarTitleText": "首页"
8
+      }
9
+    },
10
+	{
11
+	  "path": "pages/daixjgk/daixjgk",
12
+	  "style": {
13
+	    "navigationBarTitleText": "待选交割库"
14
+	  }
15
+	},
16
+	{
17
+	  "path": "pages/warehouse/warehouse",
18
+	  "style": {
19
+	    "navigationBarTitleText": "库区基本信息"
20
+	  }
21
+	},
22
+    {
23
+      "path": "pages/systemSet/systemSet",
24
+      "style": {
25
+        "navigationBarTitleText": "系统设置"
26
+      }
27
+    },
28
+    {
29
+      "path": "pages/clockIn/clockIn",
30
+      "style": {
31
+        "navigationBarTitleText": "打卡信息"
32
+      }
33
+    },
34
+	{
35
+	  "path": "pages/popup/popup",
36
+	  "style": {
37
+	    "navigationBarTitleText": "Popup 弹出层",
38
+	    "app-plus": {
39
+	      "softinputMode": "adjustResize"
40
+	    }
41
+	  }
42
+	},
43
+    {
44
+      "path": "pages/index/index",
45
+      "style": {
46
+        "navigationBarTitleText": "uni-app"
47
+      }
48
+    }
49
+  ],
50
+  "tabBar": {
51
+    "color": "#7A7E83",
52
+    "selectedColor": "#007AFF",
53
+    "borderStyle": "black",
54
+    "backgroundColor": "#F8F8F8",
55
+    "list": [
56
+      {
57
+        "pagePath": "pages/home/home",
58
+        "iconPath": "static/home.png",
59
+        "selectedIconPath": "static/homeHL.png",
60
+        "text": "首页"
61
+      },
62
+      {
63
+        "pagePath": "pages/systemSet/systemSet",
64
+        "iconPath": "static/set.png",
65
+        "selectedIconPath": "static/setHL.png",
66
+        "text": "系统设置"
67
+      }
68
+    ]
69
+  },
70
+  "globalStyle": {
71
+    "navigationBarTextStyle": "black",
72
+    "navigationBarTitleText": "uni-app",
73
+    "navigationBarBackgroundColor": "#cfddfc",
74
+    "backgroundColor": "#F8F8F8"
75
+  },
76
+  "permission": {
77
+    "scope.userLocation": {
78
+      "desc": "你的位置信息将用于打卡功能"
79
+    }
80
+  },
81
+  "requiredBackgroundModes": [
82
+    "location" // 如果需要在后台获取位置信息,则添加此模式
83
+  ],
84
+  "requiredPrivateInfos": {
85
+    "location": true // 声明应用将使用地理位置相关的API
86
+  },
87
+  "uniIdRouter": {}
88
+}

+ 323 - 0
pages/clockIn/clockIn - 副本.vue

@@ -0,0 +1,323 @@
1
+<template>
2
+	<view class="content">
3
+		<view class="page-body">
4
+			
5
+
6
+			<view class="content-show">
7
+				<view v-if="is === null">
8
+					<view class="module CAsh">
9
+						<view class="text">定位失败</view>
10
+						<view class="time">{{time}}</view>
11
+					</view>
12
+					<view class="colorRed" style="text-align: center;">
13
+						<text>请检查手机定位服务状态</text>
14
+						<text class="relocation" @click="relocation">刷新</text>
15
+					</view>
16
+				</view>
17
+				<view v-else>
18
+					<view :class="['module', moduleColor]" @click="clickSign">
19
+						<view class="text">打卡</view>
20
+						<view class="time">{{time}}</view>
21
+					</view>
22
+					
23
+				</view>
24
+			</view>
25
+			<view>
26
+				<view>打卡时间: {{amSign.time}}</view>
27
+				<view>打卡地点:{{amSign.address}}</view>
28
+			</view>
29
+			
30
+		</view>
31
+	</view>
32
+</template>
33
+
34
+<script setup>
35
+	import {
36
+		ref,
37
+		onMounted
38
+	} from 'vue';
39
+	import {
40
+		formateDate,
41
+		pointInsideCircle,
42
+		isSameDay
43
+	} from "@/common/util.js";
44
+	import {
45
+		handleSignClick,
46
+		setSignInfo,
47
+		addSignInfo,
48
+		getSignInfo,
49
+		delSignInfo,
50
+		getInfo,
51
+		key
52
+	} from "./clockIn.js";
53
+
54
+	// 定义响应式数据
55
+	const name = ref("Navy_c");
56
+	const moduleColor = ref('CBlue');
57
+	const moduleTitle = ref('上班打卡');
58
+	const bzText = ref({
59
+		time: "",
60
+		address: "",
61
+		img: "",
62
+		remarks: ""
63
+	});
64
+	const type = ref("");
65
+	const achievement = ref({
66
+		money: "888.88",
67
+		num: "1"
68
+	});
69
+	const r = ref(80);
70
+	const Timer = ref([{
71
+		time: "09:00"
72
+	}, {
73
+		time: "18:00"
74
+	}]);
75
+	const isAm = ref(false);
76
+	const isPm = ref(false);
77
+	const amSign = ref({
78
+		time: "",
79
+		address: "",
80
+		remarks: "",
81
+		img: ""
82
+	});
83
+	const clickNum = ref(0);
84
+	const is = ref(null);
85
+	const isSign = ref(false);
86
+	const time = ref(formateDate(new Date(), 'h:min:s'));
87
+	const date = ref(formateDate(new Date(), 'Y-M-D'));
88
+	const week = ref("");
89
+	const latitude = ref("");
90
+	const longitude = ref("");
91
+	const address = ref("我的位置");
92
+	const wqInfo = ref(null);
93
+	const allSign = ref([]);
94
+	const organize = ref('R & D department');
95
+	const signInfo = ref({
96
+		mode: "",
97
+		latitude: "",
98
+		longitude: "",
99
+		address: "",
100
+		time: "",
101
+		remarks: ""
102
+	});
103
+	const covers = ref([{
104
+		id: 0,
105
+		callout: {
106
+			content: "南京xxx技术有限公司",
107
+			color: "red",
108
+			display: "ALWAYS"
109
+		},
110
+		latitude: 113224630.115,
111
+		longitude: 1837131905.02,
112
+		iconPath: '../../../static/img/location.png'
113
+	}]);
114
+	const circles = ref([{
115
+		latitude: 113224630.115,
116
+		longitude: 1837131905.02,
117
+		radius: 80,
118
+		strokeWidth: 1,
119
+		fillColor: "#7fff0099"
120
+	}]);
121
+
122
+	// 初始化页面数据
123
+	const initializePage = async () => {
124
+		const sign = getSignInfo();
125
+		if (sign && sign.main) {
126
+			const signA = [...sign.main].reverse();
127
+			allSign.value = signA;
128
+
129
+			// 检查当天是否已经签到
130
+			checkIfSigned(signA);
131
+		}
132
+
133
+		await getLocation();
134
+		getTime();
135
+		getWeekDate();
136
+	};
137
+
138
+	// 检查当天是否已经签到
139
+	const checkIfSigned = (signA) => {
140
+		if (signA.length === 1 && isSameDay(signA[0].nowT)) {
141
+			isSign.value = true;
142
+			isAm.value = true;
143
+			amSign.value = signA[0];
144
+		} else if (signA.length > 1) {
145
+			
146
+				isSign.value = true;
147
+				isAm.value = true;
148
+				amSign.value = signA[1];
149
+			
150
+		}
151
+	};
152
+
153
+	// 获取星期几
154
+	const getWeekDate = () => {
155
+		const now = new Date();
156
+		const weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
157
+		week.value = weeks[now.getDay()];
158
+	};
159
+
160
+
161
+
162
+	// 获取地址信息
163
+	const getAdd = async () => {
164
+		if (isAm.value && isPm.value) return;
165
+
166
+		if (is.value === true) {
167
+			address.value = covers.value[0].callout.content;
168
+			signInfo.value.address = address.value;
169
+			return;
170
+		}
171
+
172
+		try {
173
+			const res = await uni.request({
174
+				url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude.value},${longitude.value}&key=${key}`,
175
+			});
176
+
177
+			const data = res.data;
178
+			if (data.status !== 0) {
179
+				throw new Error(data.message);
180
+			}
181
+
182
+			if (is.value === null) {
183
+				address.value = "请检查位置信息!";
184
+			} else if (is.value === false) {
185
+				let addressStr = `${data.result.address} ${data.result.formatted_addresses.recommend}`;
186
+				address.value = addressStr;
187
+				signInfo.value.address = addressStr;
188
+			}
189
+		} catch (error) {
190
+			uni.showToast({
191
+				title: error.message || "获取地址失败",
192
+				icon: "none"
193
+			});
194
+		}
195
+	};
196
+	// 实时时间
197
+	const getTime = async () => {
198
+		setInterval(function() {
199
+			time.value = formateDate(new Date(), 'h:min:s')
200
+		}, 1000)
201
+	};
202
+	// 获取位置信息
203
+	const getLocation = async () => {
204
+		try {
205
+			uni.showLoading({
206
+				title: "获取中...",
207
+				mask: true
208
+			});
209
+
210
+			const res = await uni.getLocation({
211
+				type: 'gcj02'
212
+			});
213
+			uni.hideLoading();
214
+
215
+			latitude.value = res.latitude;
216
+			longitude.value = res.longitude;
217
+			updateLocation(res.latitude, res.longitude);
218
+		} catch (error) {
219
+			uni.hideLoading();
220
+			address.value = "请检查位置信息";
221
+			uni.showToast({
222
+				title: "请检查位置信息状态!",
223
+				icon: "none",
224
+				mask: true,
225
+				duration: 3000
226
+			});
227
+		}
228
+	};
229
+
230
+	// 更新位置信息
231
+	const updateLocation = (lat, lng) => {
232
+		covers.value.push({
233
+			id: 1,
234
+			latitude: lat,
235
+			longitude: lng,
236
+			iconPath: '../../static/location.png'
237
+		});
238
+		const s = pointInsideCircle([lat, lng], [circles.value[0].latitude, circles.value[0].longitude], r.value /
239
+			100000);
240
+		is.value = s;
241
+		signInfo.value.latitude = lat;
242
+		signInfo.value.longitude = lng;
243
+		signInfo.value.mode = s ? "正常打卡" : "外勤打卡";
244
+		getAdd();
245
+	};
246
+
247
+	// 打卡操作
248
+	const clickSign = async () => {
249
+		if (is.value === null) {
250
+			uni.showToast({
251
+				title: "请检查位置信息状态!",
252
+				icon: "none",
253
+				mask: true,
254
+				duration: 3000
255
+			});
256
+			return;
257
+		}
258
+
259
+		try {
260
+			await getLocation(); // 再次获取数据
261
+			uni.showLoading({
262
+				title: "打卡记录中...",
263
+				mask: true
264
+			});
265
+
266
+			signInfo.value.time = formateDate(new Date(), 'Y-M-D h:min:s');
267
+			const a = getSignInfo();
268
+			if (a) {
269
+				addSignInfo(getInfo(signInfo.value), a);
270
+			} else {
271
+				setSignInfo(getInfo(signInfo.value));
272
+			}
273
+
274
+			const updatedSign = getSignInfo().main.reverse();
275
+			allSign.value = updatedSign;
276
+			isSign.value = true;
277
+
278
+
279
+			isAm.value = true;
280
+			amSign.value = updatedSign[0];
281
+
282
+
283
+			uni.showToast({
284
+				title: "打卡成功!"
285
+			});
286
+		} catch (error) {
287
+			uni.showToast({
288
+				title: "打卡失败,请稍后再试!",
289
+				icon: "none",
290
+				mask: true
291
+			});
292
+		} finally {
293
+			uni.hideLoading();
294
+		}
295
+	};
296
+
297
+	// 初始化页面
298
+	onMounted(() => {
299
+		initializePage();
300
+	});
301
+</script>
302
+
303
+<style>
304
+	.module {
305
+			overflow: hidden;
306
+			margin: 20upx auto;
307
+			width: 220upx;
308
+			height: 220upx;
309
+			border-radius: 50%;
310
+			color: #fff;
311
+			text-align: center;
312
+		}
313
+	
314
+		.module .text {
315
+			font-size: 20px;
316
+			margin: 50upx auto 10upx;
317
+		}
318
+	
319
+		.CBlue { background-color: #007aff; box-shadow: 0 3px 3px #007aff; }
320
+		.CAsh { background-color: #C8C7CC; box-shadow: 0 3px 3px #C8C7CC; }
321
+	
322
+		.colorRed { color: red; text-align: center; }
323
+</style>

+ 51 - 0
pages/clockIn/clockIn.js

@@ -0,0 +1,51 @@
1
+// clockIn.js
2
+
3
+// 打卡点击处理
4
+export function handleSignClick() {
5
+    console.log(1);
6
+}
7
+
8
+// 本地存储打卡信息
9
+export function setSignInfo(info) {
10
+    const signInfo = { main: [info] };
11
+    uni.setStorageSync("signInfo", JSON.stringify(signInfo));
12
+}
13
+
14
+// 本地添加打卡信息
15
+export function addSignInfo(info, sign) {
16
+    sign.main.push(info);
17
+    uni.setStorageSync("signInfo", JSON.stringify(sign));
18
+}
19
+
20
+// 本地获取打卡信息
21
+export function getSignInfo() {
22
+    const sign = uni.getStorageSync("signInfo");
23
+    return sign ? JSON.parse(sign) : null;
24
+}
25
+
26
+// 本地打卡信息清理
27
+export function delSignInfo() {
28
+    uni.removeStorage({
29
+        key: 'signInfo',
30
+        success() {
31
+            uni.showToast({ title: "重置成功" });
32
+        }
33
+    });
34
+}
35
+
36
+// 打卡信息构造
37
+export function getInfo(signInfo) {
38
+    const nowT = new Date();
39
+    return {
40
+        mode: signInfo.mode,
41
+        nowT,
42
+        address: signInfo.address,
43
+        time: signInfo.time,
44
+        latitude: signInfo.latitude,
45
+        longitude: signInfo.longitude,
46
+        remarks: signInfo.remarks
47
+    };
48
+}
49
+
50
+// 腾讯位置服务key值
51
+export const key = "SOEBZ-J2BHS-7YSOI-64K33-6RO65-G2FEJ";

+ 294 - 0
pages/clockIn/clockIn.vue

@@ -0,0 +1,294 @@
1
+<template>
2
+    <view class="content">
3
+		<view class="sign-box">
4
+			<view class="content-show">
5
+				<view :class="['module', moduleColor]" @click="clickSign">
6
+					<view class="text">打卡</view>
7
+					<view class="time">{{ time }}</view>
8
+				</view>
9
+			</view>
10
+			<view class="sign-info" v-if="amSign.address">
11
+				<view>打卡时间: {{ amSign.time }}</view>
12
+				<view>打卡地点:{{ amSign.address }}</view>
13
+			</view>
14
+		</view>
15
+		<view class="picture-box">
16
+			<button class="picture-btn">拍照</button>
17
+			<view class="picture-show">
18
+				<image src="../../static/tp.png"></image>
19
+			</view>
20
+		</view>
21
+		<view class="button-container">
22
+			<view class="button-pad">
23
+				<button class="clockBtn">核验通过</button>
24
+				<button class="clockBtn">核验不通过</button>
25
+			</view>
26
+		</view>
27
+    </view>
28
+</template>
29
+
30
+<script setup>
31
+import {
32
+    ref,
33
+    onMounted
34
+} from 'vue';
35
+import {
36
+    formateDate,
37
+    isSameDay
38
+} from "@/common/util.js";
39
+import {
40
+    setSignInfo,
41
+    addSignInfo,
42
+    getSignInfo,
43
+    getInfo,
44
+    key
45
+} from "./clockIn.js";
46
+
47
+// 定义响应式数据
48
+const moduleColor = ref('CBlue');
49
+
50
+
51
+const amSign = ref({
52
+    time: "",
53
+    address: "",
54
+    remarks: "",
55
+    img: ""
56
+});
57
+
58
+const time = ref(formateDate(new Date(), 'h:min:s'));
59
+const week = ref("");
60
+const latitude = ref("");
61
+const longitude = ref("");
62
+const address = ref("我的位置");
63
+const allSign = ref([]);
64
+const signInfo = ref({
65
+    mode: "",
66
+    latitude: "",
67
+    longitude: "",
68
+    address: "",
69
+    time: "",
70
+    remarks: ""
71
+});
72
+// 初始化页面数据
73
+const initializePage = async () => {
74
+    const sign = getSignInfo();
75
+    if (sign && sign.main) {
76
+        const signA = [...sign.main].reverse();
77
+        allSign.value = signA;
78
+
79
+        // 检查当天是否已经签到
80
+        checkIfSigned(signA);
81
+    }
82
+
83
+    await getLocation();
84
+    getTime();
85
+    getWeekDate();
86
+};
87
+
88
+// 检查当天是否已经签到
89
+const checkIfSigned = (signA) => {
90
+    if (signA.length === 1 && isSameDay(signA[0].nowT)) {
91
+        amSign.value = signA[0];
92
+    } else if (signA.length > 1) {
93
+        amSign.value = signA[1];
94
+    }
95
+};
96
+
97
+// 获取星期几
98
+const getWeekDate = () => {
99
+    const now = new Date();
100
+    const weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
101
+    week.value = weeks[now.getDay()];
102
+};
103
+
104
+
105
+
106
+// 获取地址信息
107
+const getAdd = async () => {
108
+    try {
109
+        const res = await uni.request({
110
+            url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude.value},${longitude.value}&key=${key}`,
111
+        });
112
+
113
+        const data = res.data;
114
+        if (data.status !== 0) {
115
+            throw new Error(data.message);
116
+        }
117
+
118
+		let addressStr = `${data.result.address} ${data.result.formatted_addresses.recommend}`;
119
+		address.value = addressStr;
120
+		signInfo.value.address = addressStr;
121
+		
122
+    } catch (error) {
123
+        uni.showToast({
124
+            title: error.message || "获取地址失败",
125
+            icon: "none"
126
+        });
127
+    }
128
+};
129
+// 实时时间
130
+const getTime = async () => {
131
+    setInterval(function () {
132
+        time.value = formateDate(new Date(), 'h:min:s')
133
+    }, 1000)
134
+};
135
+// 获取位置信息
136
+const getLocation = async () => {
137
+    try {
138
+        uni.showLoading({
139
+            title: "获取中...",
140
+            mask: true
141
+        });
142
+
143
+        const res = await uni.getLocation({
144
+            type: 'gcj02'
145
+        });
146
+        uni.hideLoading();
147
+
148
+        latitude.value = res.latitude;
149
+        longitude.value = res.longitude;
150
+        updateLocation(res.latitude, res.longitude);
151
+    } catch (error) {
152
+        uni.hideLoading();
153
+        address.value = "请检查位置信息";
154
+        uni.showToast({
155
+            title: "请检查位置信息状态!",
156
+            icon: "none",
157
+            mask: true,
158
+            duration: 3000
159
+        });
160
+    }
161
+};
162
+
163
+// 更新位置信息
164
+const updateLocation = (lat, lng) => {
165
+    signInfo.value.latitude = lat;
166
+    signInfo.value.longitude = lng;
167
+    getAdd();
168
+};
169
+
170
+// 打卡操作
171
+const clickSign = async () => {
172
+    try {
173
+        await getLocation(); // 再次获取数据
174
+        uni.showLoading({
175
+            title: "打卡记录中...",
176
+            mask: true
177
+        });
178
+
179
+        signInfo.value.time = formateDate(new Date(), 'Y-M-D h:min:s');
180
+        const a = getSignInfo();
181
+        if (a) {
182
+            addSignInfo(getInfo(signInfo.value), a);
183
+        } else {
184
+            setSignInfo(getInfo(signInfo.value));
185
+        }
186
+
187
+        const updatedSign = getSignInfo().main.reverse();
188
+        allSign.value = updatedSign;
189
+
190
+
191
+
192
+        amSign.value = updatedSign[0];
193
+
194
+
195
+        uni.showToast({
196
+            title: "打卡成功!"
197
+        });
198
+    } catch (error) {
199
+        uni.showToast({
200
+            title: "打卡失败,请稍后再试!",
201
+            icon: "none",
202
+            mask: true
203
+        });
204
+    } finally {
205
+        uni.hideLoading();
206
+    }
207
+};
208
+
209
+// 初始化页面
210
+onMounted(() => {
211
+    initializePage();
212
+});
213
+</script>
214
+
215
+<style lang="scss" scoped>
216
+.module {
217
+    overflow: hidden;
218
+    margin: 20upx auto;
219
+    width: 320upx;
220
+    height: 320upx;
221
+    border-radius: 50%;
222
+    color: #fff;
223
+    text-align: center;
224
+}
225
+.sign-box{
226
+	margin-top: 40rpx;
227
+}
228
+.module .text {
229
+    font-size: 20px;
230
+    margin: 100upx auto 10upx;
231
+}
232
+
233
+.CBlue {
234
+    background-color: #3E7CF7;
235
+    box-shadow: 0 3px 3px #3E7CF7;
236
+}
237
+
238
+.CAsh {
239
+    background-color: #C8C7CC;
240
+    box-shadow: 0 3px 3px #C8C7CC;
241
+}
242
+
243
+.colorRed {
244
+    color: red;
245
+    text-align: center;
246
+}
247
+.sign-info{
248
+	text-align: center;
249
+	color: #747474;
250
+	line-height: 60rpx;
251
+}
252
+
253
+.picture-box{
254
+	margin-top: 40rpx;
255
+	.picture-btn {
256
+		width: 44%;
257
+		height: 70rpx;
258
+		line-height: 70rpx;
259
+		border-radius: 10rpx;
260
+		background-color: #1E5FDF;
261
+		color: #fff;
262
+		font-size: 28rpx;
263
+		text-align: center;
264
+	  }
265
+	  .picture-show{
266
+		  margin: 40rpx 0 20rpx;
267
+		  text-align: center;
268
+	  }
269
+}
270
+.button-container {
271
+	position: fixed;
272
+	bottom: 0;
273
+	background-color: #ffffff;
274
+	width: 100vw;
275
+	padding: 40rpx 0;
276
+	.button-pad{
277
+		padding: 0 40rpx;
278
+		display: flex;
279
+		justify-content: space-between;
280
+	}
281
+  
282
+
283
+  .clockBtn{
284
+    width: 44%;
285
+    height: 70rpx;
286
+	line-height: 70rpx;
287
+    border-radius: 10rpx;
288
+    background-color: #1E5FDF;
289
+    color: #fff;
290
+    font-size: 28rpx;
291
+    text-align: center;
292
+  }
293
+}
294
+</style>

+ 199 - 0
pages/daixjgk/daixjgk.vue

@@ -0,0 +1,199 @@
1
+<template>
2
+  <view class="page">
3
+	  <view class="filter-icon-container">
4
+		  <image @click="toggle('top')" src="../../static/icons/shaix-ico.png"></image>
5
+	  </view>
6
+    <view class="warehouse-list">
7
+      <view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item">
8
+        <view class="warehouse-header">
9
+          <view class="info-container">
10
+            <view class="warehouse-name">
11
+              <image src="../../static/icons/warehouse-ico.png" mode="widthFix"></image>
12
+              <text>库区名称:{{ warehouse.name }}</text>
13
+            </view>
14
+            <view class="warehouse-address">
15
+              <image src="../../static/icons/location-ico.png" mode="widthFix"></image>
16
+              <text>库区地址:{{ warehouse.address }}</text>
17
+            </view>
18
+          </view>
19
+          <view class="select-button">
20
+            <checkbox :checked="warehouse.selected" @change="toggleSelection(index)"></checkbox>
21
+          </view>
22
+        </view>
23
+        <view class="warehouse-details">
24
+          <view class="detail-row">
25
+            <text>库区空仓仓容: {{ warehouse.capacity }}</text>
26
+            <text>仓房数量: {{ warehouse.rooms }}</text>
27
+          </view>
28
+          <view class="detail-row">
29
+            <text>空仓数量: {{ warehouse.emptyRooms }}</text>
30
+            <text>已选仓房数量: {{ warehouse.selected ? '1个' : '0个' }}</text>
31
+          </view>
32
+        </view>
33
+      </view>
34
+    </view>
35
+
36
+    <view class="button-container">
37
+		<view class="button-pad">
38
+			<button class="select-all" @click="selectAll">全选</button>
39
+			<button class="confirm" @click="confirmSelection">确 认</button>
40
+		</view>
41
+    </view>
42
+	<view>
43
+		<!-- 普通弹窗 -->
44
+		<uni-popup ref="popup" background-color="#fff" @change="change" border-radius="10px 10px 0 0">
45
+			<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }"><text
46
+					class="text">popup 内容1</text></view>
47
+		</uni-popup>
48
+	</view>
49
+  </view>
50
+</template>
51
+
52
+<script setup>
53
+import { ref, reactive } from 'vue';
54
+
55
+const warehouses = ref([
56
+  { name: 'XXXXX', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false },
57
+  { name: 'XXXXX', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false },
58
+  { name: 'XXXXX', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false }
59
+]);
60
+
61
+const toggleSelection = (index) => {
62
+  warehouses.value[index].selected = !warehouses.value[index].selected;
63
+};
64
+
65
+const selectAll = () => {
66
+  warehouses.value.forEach(warehouse => {
67
+    warehouse.selected = true;
68
+  });
69
+};
70
+
71
+const confirmSelection = () => {
72
+  // Implement confirmation logic here
73
+};
74
+// 定义响应式数据
75
+const state = reactive({
76
+  type: 'center',
77
+  msgType: 'success',
78
+  messageText: '这是一条成功提示',
79
+  showClose: true,
80
+});
81
+const popup = ref(null);
82
+const toggle = (type) => {
83
+  state.type = type;
84
+  // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
85
+  popup.value.open(type);
86
+};
87
+</script>
88
+
89
+<style lang="scss" scoped>
90
+.page {
91
+  position: relative; // 确保伪元素相对于 .page 定位
92
+}
93
+
94
+.page::before {
95
+  content: '';
96
+  position: absolute;
97
+  top: 0;
98
+  left: 0;
99
+  width: 100%;
100
+  height: 200rpx; // 设置渐变的高度
101
+  background: linear-gradient(180deg, #cfddfc, #eff2f5);
102
+  z-index: -1; // 确保它在内容之下
103
+}
104
+
105
+.filter-icon-container {
106
+	position: relative;
107
+	float: right;
108
+  top: 20rpx;
109
+  right: 40rpx;
110
+
111
+  image {
112
+    width: 40rpx;
113
+    height: 40rpx;
114
+  }
115
+}
116
+.warehouse-list {
117
+	  padding: 80rpx 40rpx 20rpx;
118
+  .warehouse-item {
119
+    background: linear-gradient(180deg, #ffffff, #F5F8FF);
120
+    border-radius: 10px;
121
+    padding: 20px;
122
+    margin-bottom: 20px;
123
+    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
124
+
125
+    .warehouse-header {
126
+      display: flex;
127
+      justify-content: space-between;
128
+      align-items: flex-start; // 对齐到顶部
129
+      padding-bottom: 30rpx;
130
+	  border-bottom: 1px solid #E7E8EA;
131
+	  font-size: 35rpx;
132
+	  color: #00122F;
133
+
134
+      .info-container {
135
+        flex-grow: 1;
136
+        .warehouse-name,
137
+        .warehouse-address {
138
+          display: flex;
139
+          align-items: center;
140
+          margin-bottom: 5px;
141
+
142
+          &:last-child {
143
+            margin-bottom: 0;
144
+          }
145
+
146
+          image {
147
+            width: 20px;
148
+            height: 20px;
149
+            margin-right: 10px;
150
+          }
151
+        }
152
+      }
153
+
154
+      .select-button {
155
+        display: flex;
156
+        align-items: flex-start;
157
+        margin-left: 10px;
158
+      }
159
+    }
160
+
161
+    .warehouse-details {
162
+		padding-top: 30rpx;
163
+		font-size: 30rpx;
164
+		color: #747476;
165
+      .detail-row {
166
+        display: flex;
167
+        justify-content: space-between;
168
+        margin-bottom: 10px;
169
+      }
170
+    }
171
+  }
172
+}
173
+
174
+.button-container {
175
+	position: fixed;
176
+	bottom: 0;
177
+	background-color: #ffffff;
178
+	width: 100vw;
179
+	padding: 40rpx 0;
180
+	.button-pad{
181
+		padding: 0 40rpx;
182
+		display: flex;
183
+		justify-content: space-between;
184
+	}
185
+  
186
+
187
+  .select-all,
188
+  .confirm {
189
+    width: 44%;
190
+    height: 70rpx;
191
+	line-height: 70rpx;
192
+    border-radius: 10rpx;
193
+    background-color: #1E5FDF;
194
+    color: #fff;
195
+    font-size: 28rpx;
196
+    text-align: center;
197
+  }
198
+}
199
+</style>

+ 74 - 0
pages/home/home - 副本.vue

@@ -0,0 +1,74 @@
1
+<template>
2
+	<view class="home-content">
3
+		<image class="bg-image" src="../../static/home/home-bj.png" mode="widthFix"></image>
4
+		<image class="logo-image" src="../../static/home/logo.png" mode="widthFix"></image>
5
+		<view class="uni-flex uni-column menu-wrap">
6
+			<view @click="goDetailPage('/pages/index/index')" class="flex-item flex-item-V">
7
+				<image src="../../static/home/daixjsk.png" alt="待选交收库" mode="widthFix"></image>
8
+			</view>
9
+			<view class="flex-item flex-item-V">
10
+				<image src="../../static/home/beixjsk.png" alt="备选交收库" mode="widthFix"></image>
11
+			</view>
12
+			<view class="flex-item flex-item-V">
13
+				<image src="../../static/home/jiaoskxdqk.png" alt="交收库选定情况" mode="widthFix"></image>
14
+			</view>
15
+			<view class="flex-item flex-item-V">
16
+				<image src="../../static/home/jiaosklqjc.png" alt="交收库粮情监测" mode="widthFix"></image>
17
+			</view>
18
+		</view>
19
+	</view>
20
+</template>
21
+
22
+<script setup>
23
+	const goDetailPage = (url) => {
24
+		uni.navigateTo({
25
+			url: url
26
+		})
27
+	}
28
+</script>
29
+
30
+<style lang="scss" scoped>
31
+	.home-content {
32
+		background-color: #eff2f5;
33
+		height: 100vh;
34
+		display: flex;
35
+		flex-direction: column;
36
+		position: relative;
37
+		overflow: hidden;
38
+	}
39
+
40
+	.bg-image {
41
+		position: absolute;
42
+		width: 100%;
43
+		height: 100%;
44
+		top: 0;
45
+		left: 0;
46
+		object-fit: cover;
47
+	}
48
+
49
+	.logo-image {
50
+		position: absolute;
51
+		width: 50%;
52
+		top: 140rpx;
53
+		left: 40rpx;
54
+	}
55
+
56
+	.menu-wrap {
57
+		flex-grow: 1;
58
+		display: flex;
59
+		flex-direction: column;
60
+		justify-content: space-around;
61
+		margin: 0 40rpx;
62
+		padding-top: 280rpx;
63
+		box-sizing: border-box;
64
+		z-index: 1;
65
+	}
66
+
67
+	.flex-item {
68
+		flex-grow: 1;
69
+		image {
70
+			width: 100%;
71
+			height: auto;
72
+		}
73
+	}
74
+</style>

+ 73 - 0
pages/home/home.vue

@@ -0,0 +1,73 @@
1
+<template>
2
+	<view class="home-content">
3
+		<image class="bg-image" src="../../static/home/home-bj.png" mode="widthFix"></image>
4
+		<image class="logo-image" src="../../static/home/logo.png" mode="widthFix"></image>
5
+		<view class="uni-flex uni-column menu-wrap">
6
+			<view @click="goDetailPage('/pages/daixjgk/daixjgk')" class="flex-item flex-item-V">
7
+				<image src="../../static/home/daixjsk.png" alt="待选交收库" mode="widthFix"></image>
8
+			</view>
9
+			<view class="flex-item flex-item-V">
10
+				<image src="../../static/home/beixjsk.png" alt="备选交收库" mode="widthFix"></image>
11
+			</view>
12
+			<view class="flex-item flex-item-V">
13
+				<image src="../../static/home/jiaoskxdqk.png" alt="交收库选定情况" mode="widthFix"></image>
14
+			</view>
15
+			<view class="flex-item flex-item-V">
16
+				<image src="../../static/home/jiaosklqjc.png" alt="交收库粮情监测" mode="widthFix"></image>
17
+			</view>
18
+		</view>
19
+	</view>
20
+</template>
21
+
22
+<script setup>
23
+	const goDetailPage = (url) => {
24
+		uni.navigateTo({
25
+			url: url
26
+		})
27
+	}
28
+</script>
29
+
30
+<style lang="scss" scoped>
31
+	.home-content {
32
+		height: 100vh;
33
+		display: flex;
34
+		flex-direction: column;
35
+		position: relative;
36
+		overflow: hidden;
37
+	}
38
+
39
+	.bg-image {
40
+		position: absolute;
41
+		width: 100%;
42
+		height: 100%;
43
+		top: 0;
44
+		left: 0;
45
+		object-fit: cover;
46
+	}
47
+
48
+	.logo-image {
49
+		position: absolute;
50
+		width: 50%;
51
+		top: 140rpx;
52
+		left: 40rpx;
53
+	}
54
+
55
+	.menu-wrap {
56
+		flex-grow: 1;
57
+		display: flex;
58
+		flex-direction: column;
59
+		justify-content: space-around;
60
+		margin: 0 40rpx;
61
+		padding-top: 280rpx;
62
+		box-sizing: border-box;
63
+		z-index: 1;
64
+	}
65
+
66
+	.flex-item {
67
+		flex-grow: 1;
68
+		image {
69
+			width: 100%;
70
+			height: auto;
71
+		}
72
+	}
73
+</style>

+ 52 - 0
pages/index/index.vue

@@ -0,0 +1,52 @@
1
+<template>
2
+	<view class="content">
3
+		<image class="logo" src="/static/logo.png"></image>
4
+		<view class="text-area">
5
+			<text class="title">{{title}}</text>
6
+		</view>
7
+	</view>
8
+</template>
9
+
10
+<script>
11
+	export default {
12
+		data() {
13
+			return {
14
+				title: 'Hello'
15
+			}
16
+		},
17
+		onLoad() {
18
+
19
+		},
20
+		methods: {
21
+
22
+		}
23
+	}
24
+</script>
25
+
26
+<style>
27
+	.content {
28
+		display: flex;
29
+		flex-direction: column;
30
+		align-items: center;
31
+		justify-content: center;
32
+	}
33
+
34
+	.logo {
35
+		height: 200rpx;
36
+		width: 200rpx;
37
+		margin-top: 200rpx;
38
+		margin-left: auto;
39
+		margin-right: auto;
40
+		margin-bottom: 50rpx;
41
+	}
42
+
43
+	.text-area {
44
+		display: flex;
45
+		justify-content: center;
46
+	}
47
+
48
+	.title {
49
+		font-size: 36rpx;
50
+		color: #8f8f94;
51
+	}
52
+</style>

+ 287 - 0
pages/popup/popup.vue

@@ -0,0 +1,287 @@
1
+<template>
2
+	<view class="container">
3
+		<uni-card is-full :is-shadow="false">
4
+			<text class="uni-h6">弹出层组件用于弹出一个覆盖到页面上的内容,使用场景如:底部弹出分享弹窗、页面插屏广告等。</text>
5
+		</uni-card>
6
+		<uni-section title="基本示例" type="line" sub-title="自定义顶部圆角">
7
+			<view class="example-body box">
8
+				<button class="button" type="primary" @click="toggle('top')"><text class="button-text">顶部</text></button>
9
+				<button class="button" type="primary" @click="toggle('bottom')"><text class="button-text">底部</text></button>
10
+				<button class="button" type="primary" @click="toggle('center')"><text class="button-text">居中</text></button>
11
+				<button class="button" type="primary" @click="toggle('left')"><text class="button-text">左侧</text></button>
12
+				<button class="button" type="primary" @click="toggle('right')"><text class="button-text">右侧</text></button>
13
+			</view>
14
+		</uni-section>
15
+
16
+		<uni-section title="提示消息" type="line">
17
+			<view class="example-body box">
18
+				<button class="button popup-success" @click="messageToggle('success')"><text
19
+						class="button-text success-text">成功</text></button>
20
+				<button class="button popup-error" @click="messageToggle('error')"><text
21
+						class="button-text error-text">失败</text></button>
22
+				<button class="button popup-warn" @click="messageToggle('warn')"><text
23
+						class="button-text warn-text">警告</text></button>
24
+				<button class="button popup-info" @click="messageToggle('info')"><text
25
+						class="button-text info-text">信息</text></button>
26
+			</view>
27
+		</uni-section>
28
+
29
+
30
+		<uni-section title="对话框示例" type="line" class="hideOnPc">
31
+			<view class="example-body box">
32
+				<button class="button popup-success" @click="dialogToggle('success')"><text
33
+						class="button-text success-text">成功</text></button>
34
+				<button class="button popup-error" @click="dialogToggle('error')"><text
35
+						class="button-text error-text">失败</text></button>
36
+				<button class="button popup-warn" @click="dialogToggle('warn')"><text
37
+						class="button-text warn-text">警告</text></button>
38
+				<button class="button popup-info" @click="dialogToggle('info')"><text
39
+						class="button-text info-text">信息</text></button>
40
+			</view>
41
+		</uni-section>
42
+
43
+		<uni-section title="输入框示例" type="line" padding>
44
+			<view class="dialog-box">
45
+				<text class="dialog-text">输入内容:{{ value }}</text>
46
+			</view>
47
+			<button class="button" type="primary" @click="inputDialogToggle"><text class="button-text">输入对话框</text></button>
48
+
49
+		</uni-section>
50
+		<uni-section title="底部分享示例" type="line" padding>
51
+			<button class="button" type="primary" @click="shareToggle"><text class="button-text">分享模版示例</text></button>
52
+		</uni-section>
53
+		<view>
54
+			<!-- 普通弹窗 -->
55
+			<uni-popup ref="popup" background-color="#fff" @change="change" border-radius="10px 10px 0 0">
56
+				<view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }"><text
57
+						class="text">popup 内容</text></view>
58
+			</uni-popup>
59
+		</view>
60
+
61
+		<view>
62
+			<!-- 提示信息弹窗 -->
63
+			<uni-popup ref="message" type="message">
64
+				<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
65
+			</uni-popup>
66
+		</view>
67
+
68
+		<view>
69
+			<!-- 提示窗示例 -->
70
+			<uni-popup ref="alertDialog" type="dialog">
71
+				<uni-popup-dialog :showClose="showClose" :type="msgType" cancelText="关闭" confirmText="同意" title="通知"
72
+					content="欢迎使用 uni-popup!" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
73
+			</uni-popup>
74
+		</view>
75
+
76
+		<view>
77
+			<!-- 输入框示例 -->
78
+			<uni-popup ref="inputDialog" type="dialog">
79
+				<uni-popup-dialog ref="inputClose" :maxlength="10" mode="input" title="输入内容" v-model="value"
80
+					placeholder="请输入内容,限制10个字" @confirm="dialogInputConfirm"></uni-popup-dialog>
81
+			</uni-popup>
82
+		</view>
83
+
84
+		<view>
85
+			<!-- 分享示例 -->
86
+			<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
87
+				<uni-popup-share></uni-popup-share>
88
+			</uni-popup>
89
+		</view>
90
+	</view>
91
+</template>
92
+
93
+<script setup>
94
+import { ref, reactive } from 'vue';
95
+
96
+// 定义响应式数据
97
+const state = reactive({
98
+  type: 'center',
99
+  msgType: 'success',
100
+  messageText: '这是一条成功提示',
101
+  showClose: true,
102
+});
103
+
104
+// 定义普通响应式变量
105
+const value = ref('');
106
+
107
+// 获取对uni-popup组件的引用
108
+const popup = ref(null);
109
+const message = ref(null);
110
+const alertDialog = ref(null);
111
+const inputDialog = ref(null);
112
+const share = ref(null);
113
+
114
+// 定义方法
115
+const change = (e) => {
116
+  console.log('当前模式:' + e.type + ',状态:' + e.show);
117
+};
118
+
119
+const toggle = (type) => {
120
+  state.type = type;
121
+  // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
122
+  popup.value.open(type);
123
+};
124
+
125
+const messageToggle = (type) => {
126
+  state.msgType = type;
127
+  state.messageText = `这是一条${type}消息提示`;
128
+  message.value.open();
129
+};
130
+
131
+const dialogToggle = (type) => {
132
+  state.msgType = type;
133
+  alertDialog.value.open();
134
+};
135
+
136
+const dialogConfirm = () => {
137
+  console.log('点击确认');
138
+  state.messageText = `点击确认了 ${state.msgType} 窗口`;
139
+  message.value.open();
140
+};
141
+
142
+const inputDialogToggle = () => {
143
+  inputDialog.value.open();
144
+};
145
+
146
+const dialogClose = () => {
147
+  console.log('点击关闭');
148
+};
149
+
150
+const dialogInputConfirm = (val) => {
151
+  uni.showLoading({ title: '3秒后会关闭' });
152
+  console.log(val); // 注意这里改为直接打印传入的值
153
+  setTimeout(() => {
154
+    uni.hideLoading();
155
+    value.value = val;
156
+    // 关闭窗口后,恢复默认内容
157
+    inputDialog.value.close();
158
+  }, 3000);
159
+};
160
+
161
+const shareToggle = () => {
162
+  share.value.open();
163
+};
164
+</script>
165
+<style lang="scss">
166
+	@mixin flex {
167
+		/* #ifndef APP-NVUE */
168
+		display: flex;
169
+		/* #endif */
170
+		flex-direction: row;
171
+	}
172
+
173
+	@mixin height {
174
+		/* #ifndef APP-NVUE */
175
+		height: 100%;
176
+		/* #endif */
177
+		/* #ifdef APP-NVUE */
178
+		flex: 1;
179
+		/* #endif */
180
+	}
181
+
182
+	.box {
183
+		@include flex;
184
+	}
185
+
186
+	.button {
187
+		@include flex;
188
+		align-items: center;
189
+		justify-content: center;
190
+		flex: 1;
191
+		height: 35px;
192
+		margin: 0 5px;
193
+		border-radius: 5px;
194
+	}
195
+
196
+	.example-body {
197
+		background-color: #fff;
198
+		padding: 10px 0;
199
+	}
200
+
201
+	.button-text {
202
+		color: #fff;
203
+		font-size: 12px;
204
+	}
205
+
206
+	.popup-content {
207
+		@include flex;
208
+		align-items: center;
209
+		justify-content: center;
210
+		padding: 15px;
211
+		height: 50px;
212
+	}
213
+
214
+	.popup-height {
215
+		@include height;
216
+		width: 200px;
217
+	}
218
+
219
+	.text {
220
+		font-size: 12px;
221
+		color: #333;
222
+	}
223
+
224
+	.popup-success {
225
+		color: #fff;
226
+		background-color: #e1f3d8;
227
+	}
228
+
229
+	.popup-warn {
230
+		color: #fff;
231
+		background-color: #faecd8;
232
+	}
233
+
234
+	.popup-error {
235
+		color: #fff;
236
+		background-color: #fde2e2;
237
+	}
238
+
239
+	.popup-info {
240
+		color: #fff;
241
+		background-color: #f2f6fc;
242
+	}
243
+
244
+	.success-text {
245
+		color: #09bb07;
246
+	}
247
+
248
+	.warn-text {
249
+		color: #e6a23c;
250
+	}
251
+
252
+	.error-text {
253
+		color: #f56c6c;
254
+	}
255
+
256
+	.info-text {
257
+		color: #909399;
258
+	}
259
+
260
+	.dialog,
261
+	.share {
262
+		/* #ifndef APP-NVUE */
263
+		display: flex;
264
+		/* #endif */
265
+		flex-direction: column;
266
+	}
267
+
268
+	.dialog-box {
269
+		padding: 10px;
270
+	}
271
+
272
+	.dialog .button,
273
+	.share .button {
274
+		/* #ifndef APP-NVUE */
275
+		width: 100%;
276
+		/* #endif */
277
+		margin: 0;
278
+		margin-top: 10px;
279
+		padding: 3px 0;
280
+		flex: 1;
281
+	}
282
+
283
+	.dialog-text {
284
+		font-size: 14px;
285
+		color: #333;
286
+	}
287
+</style>

+ 53 - 0
pages/systemSet/systemSet.vue

@@ -0,0 +1,53 @@
1
+<template>
2
+	<view class="content">
3
+		<view class="uni-flex uni-column">
4
+			<view class="flex-item flex-item-V uni-bg-red">A</view>
5
+			<view class="flex-item flex-item-V uni-bg-green">B</view>
6
+			<view class="flex-item flex-item-V uni-bg-blue">C</view>
7
+		</view>
8
+	</view>
9
+</template>
10
+
11
+<script>
12
+	export default {
13
+		data() {
14
+			return {
15
+				title: 'Hello'
16
+			}
17
+		},
18
+		onLoad() {
19
+
20
+		},
21
+		methods: {
22
+
23
+		}
24
+	}
25
+</script>
26
+
27
+<style>
28
+	.content {
29
+		display: flex;
30
+		flex-direction: column;
31
+		align-items: center;
32
+		justify-content: center;
33
+	}
34
+
35
+	.logo {
36
+		height: 200rpx;
37
+		width: 200rpx;
38
+		margin-top: 200rpx;
39
+		margin-left: auto;
40
+		margin-right: auto;
41
+		margin-bottom: 50rpx;
42
+	}
43
+
44
+	.text-area {
45
+		display: flex;
46
+		justify-content: center;
47
+	}
48
+
49
+	.title {
50
+		font-size: 36rpx;
51
+		color: #8f8f94;
52
+	}
53
+</style>

+ 140 - 0
pages/warehouse/components/warehouseInfo/warehouseInfo.vue

@@ -0,0 +1,140 @@
1
+<template>
2
+
3
+<view class="content">
4
+	<view class="base-info-box">
5
+		<view class="info-item">
6
+			<text class="label">库区名称:</text>
7
+			<text class="value">天津利达粮油库区</text>
8
+		</view>
9
+		<view class="info-item">
10
+			<text class="label">所属企业:</text>
11
+			<text class="value">天津利达粮油有限公司</text>
12
+		</view>
13
+		<view class="info-item">
14
+			<text class="label">统一社会信用代码:</text>
15
+			<text class="value">522516416985</text>
16
+		</view>
17
+		<view class="info-item">
18
+			<text class="label">库区性质:</text>
19
+			<text class="value">民营企业</text>
20
+		</view>
21
+		<view class="info-item">
22
+			<text class="label">库区地址:</text>
23
+			<text class="value">天津市静海区</text>
24
+		</view>
25
+		<view class="info-item">
26
+			<text class="label">库区负责人:</text>
27
+			<text class="value">张三</text>
28
+		</view>
29
+		<view class="info-item">
30
+			<text class="label">库区联系方式:</text>
31
+			<text class="value">15139959459</text>
32
+		</view>
33
+	</view>
34
+	<view class="base-info-box">
35
+		<view class="info-item">
36
+			<text class="label">占地面积(m²):</text>
37
+			<text class="value">15000</text>
38
+		</view>
39
+		<view class="info-item">
40
+			<text class="label">经度:</text>
41
+			<text class="value">43.2</text>
42
+		</view>
43
+		<view class="info-item">
44
+			<text class="label">纬度:</text>
45
+			<text class="value">25.5</text>
46
+		</view>
47
+		<view class="info-item">
48
+			<text class="label">库区图:</text>
49
+			<image class="kqt-image" src="@/static/tp.png"></image>
50
+		</view>
51
+	</view>
52
+</view>
53
+
54
+</template>
55
+
56
+<script setup>
57
+	import {
58
+		ref
59
+	} from 'vue';
60
+
61
+	// 示例数据
62
+	const warehouseData = {
63
+		name: '天津利达粮油库区',
64
+		company: '天津利达粮油有限公司',
65
+		creditCode: '522516416985',
66
+		nature: '民营企业',
67
+		address: '天津市静海区',
68
+		contactPerson: '张三',
69
+		contactNumber: '15139959459',
70
+		area: '15000',
71
+		longitude: '43.2',
72
+		latitude: '25.5'
73
+	};
74
+</script>
75
+
76
+<style lang="scss" scoped>
77
+	.page {
78
+		display: flex;
79
+		flex-direction: column;
80
+		height: 100%;
81
+	}
82
+
83
+	.header {
84
+		display: flex;
85
+		align-items: center;
86
+		padding: 20rpx;
87
+		background-color: #f8f8f8;
88
+	}
89
+
90
+	.title {
91
+		font-size: 36rpx;
92
+		margin-left: 20rpx;
93
+	}
94
+
95
+	.content {
96
+		flex: 1;
97
+		padding: 20rpx;
98
+	}
99
+
100
+	.base-info-box {
101
+		background: #ffffff;
102
+		border-radius: 20rpx;
103
+		margin-bottom: 40rpx;
104
+		padding: 0px 20rpx;
105
+	}
106
+
107
+	.info-item {
108
+		display: flex;
109
+		justify-content: space-between;
110
+		align-items: center;
111
+		padding: 30rpx 0;
112
+		border-bottom: 1px solid #e5e9ed;
113
+
114
+		.kqt-image {
115
+			max-width: 50%;
116
+			height: 200rpx;
117
+		}
118
+	}
119
+
120
+	.info-item:last-child {
121
+		border: 0 none;
122
+	}
123
+
124
+	.label {
125
+		font-weight: bold;
126
+		color: #777777;
127
+	}
128
+
129
+	.value {
130
+		flex: 1;
131
+		text-align: right;
132
+		color: #0f2239;
133
+		font-weight: 600;
134
+	}
135
+
136
+	.image {
137
+		width: 200rpx;
138
+		height: 200rpx;
139
+	}
140
+</style>

+ 177 - 0
pages/warehouse/components/warehouseList/warehouseList.vue

@@ -0,0 +1,177 @@
1
+<template>
2
+  <view class="page">
3
+    <view class="warehouse-list">
4
+      <view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item">
5
+        <view class="warehouse-header">
6
+          <view class="info-container">
7
+            <view class="warehouse-name">
8
+              <image src="../../static/icons/warehouse-ico.png" mode="widthFix"></image>
9
+              <text>仓房名称:{{ warehouse.name }}</text>
10
+            </view>
11
+          </view>
12
+          <view class="select-button">
13
+            <checkbox :checked="warehouse.selected" @change="toggleSelection(index)"></checkbox>
14
+          </view>
15
+        </view>
16
+        <view class="warehouse-details">
17
+			<view class="detail-row">
18
+			  <text>仓库类型: {{ warehouse.emptyRooms }}</text>
19
+			  <text>仓库状态: {{ warehouse.selected ? '1个' : '0个' }}</text>
20
+			</view>
21
+          <view class="detail-row">
22
+            <text>设计仓容: {{ warehouse.capacity }}</text>
23
+            <text>是否空仓: {{ warehouse.rooms }}</text>
24
+          </view>
25
+          <view class="detail-row">
26
+            <text>租仓参考价: {{ warehouse.emptyRooms }}</text>
27
+            <text>委托保管参考价: {{ warehouse.selected ? '1个' : '0个' }}</text>
28
+          </view>
29
+        </view>
30
+      </view>
31
+    </view>
32
+
33
+    <view class="button-container">
34
+		<view class="button-pad">
35
+			<button class="select-all" @click="selectAll">全选</button>
36
+			<button class="confirm" @click="confirmSelection">确 认</button>
37
+		</view>
38
+    </view>
39
+  </view>
40
+</template>
41
+
42
+<script setup>
43
+import { ref } from 'vue';
44
+
45
+const warehouses = ref([
46
+  { name: '1-1', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false },
47
+  { name: 'XXXXX', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false },
48
+  { name: 'XXXXX', address: 'XXXXXXXXXX', capacity: '1500吨', rooms: '10个', emptyRooms: '5个', selected: false }
49
+]);
50
+
51
+const toggleSelection = (index) => {
52
+  warehouses.value[index].selected = !warehouses.value[index].selected;
53
+};
54
+
55
+const selectAll = () => {
56
+  warehouses.value.forEach(warehouse => {
57
+    warehouse.selected = true;
58
+  });
59
+};
60
+
61
+const confirmSelection = () => {
62
+  // Implement confirmation logic here
63
+};
64
+</script>
65
+
66
+<style lang="scss" scoped>
67
+.page {
68
+  position: relative; // 确保伪元素相对于 .page 定位
69
+}
70
+
71
+.page::before {
72
+  content: '';
73
+  position: absolute;
74
+  top: 0;
75
+  left: 0;
76
+  width: 100%;
77
+  height: 200rpx; // 设置渐变的高度
78
+  background: linear-gradient(180deg, #cfddfc, #eff2f5);
79
+  z-index: -1; // 确保它在内容之下
80
+}
81
+
82
+.filter-icon-container {
83
+	position: relative;
84
+	float: right;
85
+  top: 20rpx;
86
+  right: 40rpx;
87
+
88
+  image {
89
+    width: 40rpx;
90
+    height: 40rpx;
91
+  }
92
+}
93
+.warehouse-list {
94
+	  padding: 80rpx 40rpx 20rpx;
95
+  .warehouse-item {
96
+    background: linear-gradient(180deg, #ffffff, #F5F8FF);
97
+    border-radius: 10px;
98
+    padding: 20px;
99
+    margin-bottom: 20px;
100
+    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
101
+
102
+    .warehouse-header {
103
+      display: flex;
104
+      justify-content: space-between;
105
+      align-items: flex-start; // 对齐到顶部
106
+      padding-bottom: 30rpx;
107
+	  border-bottom: 1px solid #E7E8EA;
108
+	  font-size: 35rpx;
109
+	  color: #00122F;
110
+
111
+      .info-container {
112
+        flex-grow: 1;
113
+        .warehouse-name,
114
+        .warehouse-address {
115
+          display: flex;
116
+          align-items: center;
117
+          margin-bottom: 5px;
118
+
119
+          &:last-child {
120
+            margin-bottom: 0;
121
+          }
122
+
123
+          image {
124
+            width: 20px;
125
+            height: 20px;
126
+            margin-right: 10px;
127
+          }
128
+        }
129
+      }
130
+
131
+      .select-button {
132
+        display: flex;
133
+        align-items: flex-start;
134
+        margin-left: 10px;
135
+      }
136
+    }
137
+
138
+    .warehouse-details {
139
+		padding-top: 30rpx;
140
+		font-size: 30rpx;
141
+		color: #747476;
142
+      .detail-row {
143
+        display: flex;
144
+        justify-content: space-between;
145
+        margin-bottom: 10px;
146
+      }
147
+    }
148
+  }
149
+}
150
+
151
+.button-container {
152
+	position: fixed;
153
+	bottom: 0;
154
+	background-color: #ffffff;
155
+	width: 100vw;
156
+	padding: 40rpx 0;
157
+	.button-pad{
158
+		padding: 0 40rpx;
159
+		display: flex;
160
+		justify-content: space-between;
161
+	}
162
+  
163
+
164
+  .select-all,
165
+  .confirm {
166
+    width: 44%;
167
+    height: 70rpx;
168
+	line-height: 70rpx;
169
+    border-radius: 10rpx;
170
+    background-color: #1E5FDF;
171
+    color: #fff;
172
+    font-size: 28rpx;
173
+    text-align: center;
174
+    
175
+  }
176
+}
177
+</style>

+ 276 - 0
pages/warehouse/warehouse.vue

@@ -0,0 +1,276 @@
1
+<template>
2
+	<view class="page">
3
+		<view class="navbar">
4
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
5
+				:class="{current: tabCurrentIndex === index}" @click="tabClick(index)">
6
+				{{item.text}}
7
+			</view>
8
+		</view>
9
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
10
+			<swiper-item class="tab-content">
11
+				<scroll-view class="list-scroll-content" scroll-y>
12
+					<view class="warehouse-list">
13
+						<view v-for="(warehouse, index) in warehouses" :key="index" class="warehouse-item">
14
+							<view class="warehouse-header">
15
+								<view class="info-container">
16
+									<view class="warehouse-name">
17
+										<image src="../../static/icons/warehouse-ico.png" mode="widthFix"></image>
18
+										<text>仓房名称:{{ warehouse.name }}</text>
19
+									</view>
20
+								</view>
21
+								<view class="select-button">
22
+									<checkbox :checked="warehouse.selected" @change="toggleSelection(index)"></checkbox>
23
+								</view>
24
+							</view>
25
+							<view class="warehouse-details">
26
+								<view class="detail-row">
27
+									<text>仓库类型: {{ warehouse.emptyRooms }}</text>
28
+									<text>仓库状态: {{ warehouse.selected ? '1个' : '0个' }}</text>
29
+								</view>
30
+								<view class="detail-row">
31
+									<text>设计仓容: {{ warehouse.capacity }}</text>
32
+									<text>是否空仓: {{ warehouse.rooms }}</text>
33
+								</view>
34
+								<view class="detail-row">
35
+									<text>租仓参考价: {{ warehouse.emptyRooms }}</text>
36
+									<text>委托保管参考价: {{ warehouse.selected ? '1个' : '0个' }}</text>
37
+								</view>
38
+							</view>
39
+						</view>
40
+					</view>
41
+
42
+				</scroll-view>
43
+				<view class="button-container">
44
+					<view class="button-pad">
45
+						<button class="select-all" @click="selectAll">全选</button>
46
+						<button class="confirm" @click="confirmSelection">确 认</button>
47
+					</view>
48
+				</view>
49
+			</swiper-item>
50
+			<swiper-item class="tab-content">
51
+				<scroll-view class="info-scroll-content" scroll-y>
52
+					<view class="warehouse-info">
53
+						<warehouse-info></warehouse-info>
54
+					</view>
55
+				</scroll-view>
56
+			</swiper-item>
57
+		</swiper>
58
+
59
+	</view>
60
+</template>
61
+
62
+<script setup>
63
+	import warehouseInfo from "./components/warehouseInfo/warehouseInfo.vue";
64
+	import {
65
+		ref
66
+	} from 'vue';
67
+	const navList = [{
68
+			state: 0,
69
+			text: '仓房基本信息',
70
+			loadingType: 'more',
71
+			orderList: []
72
+		},
73
+		{
74
+			state: 1,
75
+			text: '库区基本信息',
76
+			loadingType: 'more',
77
+			orderList: []
78
+		}
79
+	]
80
+	const tabCurrentIndex = ref(0)
81
+	const tabClick = (index) => {
82
+		tabCurrentIndex.value = index;
83
+	}
84
+	const warehouses = ref([{
85
+			name: '1-1',
86
+			address: 'XXXXXXXXXX',
87
+			capacity: '1500吨',
88
+			rooms: '10个',
89
+			emptyRooms: '5个',
90
+			selected: false
91
+		},
92
+		{
93
+			name: 'XXXXX',
94
+			address: 'XXXXXXXXXX',
95
+			capacity: '1500吨',
96
+			rooms: '10个',
97
+			emptyRooms: '5个',
98
+			selected: false
99
+		},
100
+		{
101
+			name: 'XXXXX',
102
+			address: 'XXXXXXXXXX',
103
+			capacity: '1500吨',
104
+			rooms: '10个',
105
+			emptyRooms: '5个',
106
+			selected: false
107
+		}
108
+	]);
109
+
110
+	const toggleSelection = (index) => {
111
+		warehouses.value[index].selected = !warehouses.value[index].selected;
112
+	};
113
+
114
+	const selectAll = () => {
115
+		warehouses.value.forEach(warehouse => {
116
+			warehouse.selected = true;
117
+		});
118
+	};
119
+
120
+	const confirmSelection = () => {
121
+		// Implement confirmation logic here
122
+	};
123
+</script>
124
+
125
+<style lang="scss" scoped>
126
+	.page {
127
+		position: relative; // 确保伪元素相对于 .page 定位
128
+	}
129
+
130
+	.page::before {
131
+		content: '';
132
+		position: absolute;
133
+		top: 0;
134
+		left: 0;
135
+		width: 100%;
136
+		height: 200rpx; // 设置渐变的高度
137
+		background: linear-gradient(180deg, #cfddfc, #eff2f5);
138
+		z-index: -1; // 确保它在内容之下
139
+	}
140
+
141
+	.warehouse-list {
142
+		padding: 40rpx 40rpx 20rpx;
143
+
144
+		.warehouse-item {
145
+			background: linear-gradient(180deg, #ffffff, #F5F8FF);
146
+			border-radius: 10px;
147
+			padding: 20px;
148
+			margin-bottom: 20px;
149
+			box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
150
+
151
+			.warehouse-header {
152
+				display: flex;
153
+				justify-content: space-between;
154
+				align-items: flex-start; // 对齐到顶部
155
+				padding-bottom: 30rpx;
156
+				border-bottom: 1px solid #E7E8EA;
157
+				font-size: 35rpx;
158
+				color: #00122F;
159
+
160
+				.info-container {
161
+					flex-grow: 1;
162
+
163
+					.warehouse-name,
164
+					.warehouse-address {
165
+						display: flex;
166
+						align-items: center;
167
+						margin-bottom: 5px;
168
+
169
+						&:last-child {
170
+							margin-bottom: 0;
171
+						}
172
+
173
+						image {
174
+							width: 20px;
175
+							height: 20px;
176
+							margin-right: 10px;
177
+						}
178
+					}
179
+				}
180
+
181
+				.select-button {
182
+					display: flex;
183
+					align-items: flex-start;
184
+					margin-left: 10px;
185
+				}
186
+			}
187
+
188
+			.warehouse-details {
189
+				padding-top: 30rpx;
190
+				font-size: 30rpx;
191
+				color: #747476;
192
+
193
+				.detail-row {
194
+					display: flex;
195
+					justify-content: space-between;
196
+					margin-bottom: 10px;
197
+				}
198
+			}
199
+		}
200
+	}
201
+	.button-container {
202
+		position: fixed;
203
+		bottom: 0;
204
+		background-color: #ffffff;
205
+		width: 100vw;
206
+		padding: 40rpx 0;
207
+
208
+		.button-pad {
209
+			padding: 0 40rpx;
210
+			display: flex;
211
+			justify-content: space-between;
212
+		}
213
+
214
+
215
+		.select-all,
216
+		.confirm {
217
+			width: 44%;
218
+			height: 70rpx;
219
+			line-height: 70rpx;
220
+			border-radius: 10rpx;
221
+			background-color: #1E5FDF;
222
+			color: #fff;
223
+			font-size: 28rpx;
224
+			text-align: center;
225
+
226
+		}
227
+	}
228
+	
229
+	.warehouse-info{
230
+		padding-top: 20rpx;
231
+	}
232
+
233
+	.navbar {
234
+		display: flex;
235
+		height: 40px;
236
+		padding: 0 5px;
237
+		position: relative;
238
+		z-index: 10;
239
+	
240
+		.nav-item {
241
+			flex: 1;
242
+			display: flex;
243
+			justify-content: center;
244
+			align-items: center;
245
+			height: 100%;
246
+			font-size: 35rpx;
247
+			position: relative;
248
+			color: #334b68;
249
+	
250
+			&.current {
251
+				color: #0f2239;
252
+				&:after {
253
+					content: '';
254
+					position: absolute;
255
+					left: 50%;
256
+					bottom: 0;
257
+					transform: translateX(-50%);
258
+					width: 60%;
259
+					height: 0;
260
+					border-bottom: 4px solid #789fec;
261
+				}
262
+			}
263
+		}
264
+	}
265
+	
266
+	.swiper-box {
267
+		height: calc(100vh - 80rpx);
268
+	}
269
+	
270
+	.list-scroll-content {
271
+		height: calc(100vh - 200rpx);
272
+	}
273
+	.info-scroll-content{
274
+		height: calc(100vh - 120rpx);
275
+	}
276
+</style>

BIN
static/bg.jpg


BIN
static/home.png


BIN
static/home/beixjsk.png


BIN
static/home/daixjsk.png


BIN
static/home/home-bj.png


BIN
static/home/jiaosklqjc.png


BIN
static/home/jiaoskxdqk.png


BIN
static/home/logo.png


BIN
static/homeHL.png


BIN
static/icons/location-ico.png


BIN
static/icons/shaix-ico.png


BIN
static/icons/warehouse-ico.png


BIN
static/logo.png


BIN
static/set.png


BIN
static/setHL.png


BIN
static/tp.png


BIN
static/uni.ttf


+ 13 - 0
uni.promisify.adaptor.js

@@ -0,0 +1,13 @@
1
+uni.addInterceptor({
2
+  returnValue (res) {
3
+    if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
4
+      return res;
5
+    }
6
+    return new Promise((resolve, reject) => {
7
+      res.then((res) => {
8
+        if (!res) return resolve(res) 
9
+        return res[0] ? reject(res[0]) : resolve(res[1])
10
+      });
11
+    });
12
+  },
13
+});

+ 76 - 0
uni.scss

@@ -0,0 +1,76 @@
1
+/**
2
+ * 这里是uni-app内置的常用样式变量
3
+ *
4
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
5
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
6
+ *
7
+ */
8
+
9
+/**
10
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
11
+ *
12
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
13
+ */
14
+
15
+/* 颜色变量 */
16
+
17
+/* 行为相关颜色 */
18
+$uni-color-primary: #007aff;
19
+$uni-color-success: #4cd964;
20
+$uni-color-warning: #f0ad4e;
21
+$uni-color-error: #dd524d;
22
+
23
+/* 文字基本颜色 */
24
+$uni-text-color:#333;//基本色
25
+$uni-text-color-inverse:#fff;//反色
26
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
27
+$uni-text-color-placeholder: #808080;
28
+$uni-text-color-disable:#c0c0c0;
29
+
30
+/* 背景颜色 */
31
+$uni-bg-color:#ffffff;
32
+$uni-bg-color-grey:#f8f8f8;
33
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
34
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
35
+
36
+/* 边框颜色 */
37
+$uni-border-color:#c8c7cc;
38
+
39
+/* 尺寸变量 */
40
+
41
+/* 文字尺寸 */
42
+$uni-font-size-sm:12px;
43
+$uni-font-size-base:14px;
44
+$uni-font-size-lg:16px;
45
+
46
+/* 图片尺寸 */
47
+$uni-img-size-sm:20px;
48
+$uni-img-size-base:26px;
49
+$uni-img-size-lg:40px;
50
+
51
+/* Border Radius */
52
+$uni-border-radius-sm: 2px;
53
+$uni-border-radius-base: 3px;
54
+$uni-border-radius-lg: 6px;
55
+$uni-border-radius-circle: 50%;
56
+
57
+/* 水平间距 */
58
+$uni-spacing-row-sm: 5px;
59
+$uni-spacing-row-base: 10px;
60
+$uni-spacing-row-lg: 15px;
61
+
62
+/* 垂直间距 */
63
+$uni-spacing-col-sm: 4px;
64
+$uni-spacing-col-base: 8px;
65
+$uni-spacing-col-lg: 12px;
66
+
67
+/* 透明度 */
68
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
69
+
70
+/* 文章场景相关 */
71
+$uni-color-title: #2C405A; // 文章标题颜色
72
+$uni-font-size-title:20px;
73
+$uni-color-subtitle: #555555; // 二级标题颜色
74
+$uni-font-size-subtitle:26px;
75
+$uni-color-paragraph: #3F536E; // 文章段落颜色
76
+$uni-font-size-paragraph:15px;

+ 26 - 0
uni_modules/uni-card/changelog.md

@@ -0,0 +1,26 @@
1
+## 1.3.1(2021-12-20)
2
+- 修复 在vue页面下略缩图显示不正常的bug
3
+## 1.3.0(2021-11-19)
4
+- 重构插槽的用法 ,header 替换为 title 
5
+- 新增 actions 插槽
6
+- 新增 cover 封面图属性和插槽
7
+- 新增 padding 内容默认内边距离
8
+- 新增 margin 卡片默认外边距离
9
+- 新增 spacing 卡片默认内边距
10
+- 新增 shadow 卡片阴影属性
11
+- 取消 mode 属性,可使用组合插槽代替
12
+- 取消 note 属性 ,使用actions插槽代替
13
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
14
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card)
15
+## 1.2.1(2021-07-30)
16
+- 优化 vue3下事件警告的问题
17
+## 1.2.0(2021-07-13)
18
+- 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
19
+## 1.1.8(2021-07-01)
20
+- 优化 图文卡片无图片加载时,提供占位图标
21
+- 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持)
22
+- 修复 thumbnail 不存在仍然占位的 bug
23
+## 1.1.7(2021-05-12)
24
+- 新增 组件示例地址
25
+## 1.1.6(2021-02-04)
26
+- 调整为uni_modules目录规范

+ 270 - 0
uni_modules/uni-card/components/uni-card/uni-card.vue

@@ -0,0 +1,270 @@
1
+<template>
2
+	<view class="uni-card" :class="{ 'uni-card--full': isFull, 'uni-card--shadow': isShadow,'uni-card--border':border}"
3
+		:style="{'margin':isFull?0:margin,'padding':spacing,'box-shadow':isShadow?shadow:''}">
4
+		<!-- 封面 -->
5
+		<slot name="cover">
6
+			<view v-if="cover" class="uni-card__cover">
7
+				<image class="uni-card__cover-image" mode="widthFix" @click="onClick('cover')" :src="cover"></image>
8
+			</view>
9
+		</slot>
10
+		<slot name="title">
11
+			<view v-if="title || extra" class="uni-card__header">
12
+				<!-- 卡片标题 -->
13
+				<view class="uni-card__header-box" @click="onClick('title')">
14
+					<view v-if="thumbnail" class="uni-card__header-avatar">
15
+						<image class="uni-card__header-avatar-image" :src="thumbnail" mode="aspectFit" />
16
+					</view>
17
+					<view class="uni-card__header-content">
18
+						<text class="uni-card__header-content-title uni-ellipsis">{{ title }}</text>
19
+						<text v-if="title&&subTitle"
20
+							class="uni-card__header-content-subtitle uni-ellipsis">{{ subTitle }}</text>
21
+					</view>
22
+				</view>
23
+				<view class="uni-card__header-extra" @click="onClick('extra')">
24
+					<text class="uni-card__header-extra-text">{{ extra }}</text>
25
+				</view>
26
+			</view>
27
+		</slot>
28
+		<!-- 卡片内容 -->
29
+		<view class="uni-card__content" :style="{padding:padding}" @click="onClick('content')">
30
+			<slot></slot>
31
+		</view>
32
+		<view class="uni-card__actions" @click="onClick('actions')">
33
+			<slot name="actions"></slot>
34
+		</view>
35
+	</view>
36
+</template>
37
+
38
+<script>
39
+	/**
40
+	 * Card 卡片
41
+	 * @description 卡片视图组件
42
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=22
43
+	 * @property {String} title 标题文字
44
+	 * @property {String} subTitle 副标题
45
+	 * @property {Number} padding 内容内边距
46
+	 * @property {Number} margin 卡片外边距
47
+	 * @property {Number} spacing 卡片内边距
48
+	 * @property {String} extra 标题额外信息
49
+	 * @property {String} cover 封面图(本地路径需要引入)
50
+	 * @property {String} thumbnail 标题左侧缩略图
51
+	 * @property {Boolean} is-full = [true | false] 卡片内容是否通栏,为 true 时将去除padding值
52
+	 * @property {Boolean} is-shadow = [true | false] 卡片内容是否开启阴影
53
+	 * @property {String} shadow 卡片阴影
54
+	 * @property {Boolean} border 卡片边框
55
+	 * @event {Function} click 点击 Card 触发事件
56
+	 */
57
+	export default {
58
+		name: 'UniCard',
59
+		emits: ['click'],
60
+		props: {
61
+			title: {
62
+				type: String,
63
+				default: ''
64
+			},
65
+			subTitle: {
66
+				type: String,
67
+				default: ''
68
+			},
69
+			padding: {
70
+				type: String,
71
+				default: '10px'
72
+			},
73
+			margin: {
74
+				type: String,
75
+				default: '15px'
76
+			},
77
+			spacing: {
78
+				type: String,
79
+				default: '0 10px'
80
+			},
81
+			extra: {
82
+				type: String,
83
+				default: ''
84
+			},
85
+			cover: {
86
+				type: String,
87
+				default: ''
88
+			},
89
+			thumbnail: {
90
+				type: String,
91
+				default: ''
92
+			},
93
+			isFull: {
94
+				// 内容区域是否通栏
95
+				type: Boolean,
96
+				default: false
97
+			},
98
+			isShadow: {
99
+				// 是否开启阴影
100
+				type: Boolean,
101
+				default: true
102
+			},
103
+			shadow: {
104
+				type: String,
105
+				default: '0px 0px 3px 1px rgba(0, 0, 0, 0.08)'
106
+			},
107
+			border: {
108
+				type: Boolean,
109
+				default: true
110
+			}
111
+		},
112
+		methods: {
113
+			onClick(type) {
114
+				this.$emit('click', type)
115
+			}
116
+		}
117
+	}
118
+</script>
119
+
120
+<style lang="scss">
121
+	$uni-border-3: #EBEEF5 !default;
122
+	$uni-shadow-base:0 0px 6px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
123
+	$uni-main-color: #3a3a3a !default;
124
+	$uni-base-color: #6a6a6a !default;
125
+	$uni-secondary-color: #909399 !default;
126
+	$uni-spacing-sm: 8px !default;
127
+	$uni-border-color:$uni-border-3;
128
+	$uni-shadow: $uni-shadow-base;
129
+	$uni-card-title: 15px;
130
+	$uni-cart-title-color:$uni-main-color;
131
+	$uni-card-subtitle: 12px;
132
+	$uni-cart-subtitle-color:$uni-secondary-color;
133
+	$uni-card-spacing: 10px;
134
+	$uni-card-content-color: $uni-base-color;
135
+
136
+	.uni-card {
137
+		margin: $uni-card-spacing;
138
+		padding: 0 $uni-spacing-sm;
139
+		border-radius: 4px;
140
+		overflow: hidden;
141
+		font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
142
+		background-color: #fff;
143
+		flex: 1;
144
+
145
+		.uni-card__cover {
146
+			position: relative;
147
+			margin-top: $uni-card-spacing;
148
+			flex-direction: row;
149
+			overflow: hidden;
150
+			border-radius: 4px;
151
+			.uni-card__cover-image {
152
+				flex: 1;
153
+				// width: 100%;
154
+				/* #ifndef APP-PLUS */
155
+				vertical-align: middle;
156
+				/* #endif */
157
+			}
158
+		}
159
+
160
+		.uni-card__header {
161
+			display: flex;
162
+			border-bottom: 1px $uni-border-color solid;
163
+			flex-direction: row;
164
+			align-items: center;
165
+			padding: $uni-card-spacing;
166
+			overflow: hidden;
167
+
168
+			.uni-card__header-box {
169
+				/* #ifndef APP-NVUE */
170
+				display: flex;
171
+				/* #endif */
172
+				flex: 1;
173
+				flex-direction: row;
174
+				align-items: center;
175
+				overflow: hidden;
176
+			}
177
+
178
+			.uni-card__header-avatar {
179
+				width: 40px;
180
+				height: 40px;
181
+				overflow: hidden;
182
+				border-radius: 5px;
183
+				margin-right: $uni-card-spacing;
184
+				.uni-card__header-avatar-image {
185
+					flex: 1;
186
+					width: 40px;
187
+					height: 40px;
188
+				}
189
+			}
190
+
191
+			.uni-card__header-content {
192
+				/* #ifndef APP-NVUE */
193
+				display: flex;
194
+				/* #endif */
195
+				flex-direction: column;
196
+				justify-content: center;
197
+				flex: 1;
198
+				// height: 40px;
199
+				overflow: hidden;
200
+
201
+				.uni-card__header-content-title {
202
+					font-size: $uni-card-title;
203
+					color: $uni-cart-title-color;
204
+					// line-height: 22px;
205
+				}
206
+
207
+				.uni-card__header-content-subtitle {
208
+					font-size: $uni-card-subtitle;
209
+					margin-top: 5px;
210
+					color: $uni-cart-subtitle-color;
211
+				}
212
+			}
213
+
214
+			.uni-card__header-extra {
215
+				line-height: 12px;
216
+
217
+				.uni-card__header-extra-text {
218
+					font-size: 12px;
219
+					color: $uni-cart-subtitle-color;
220
+				}
221
+			}
222
+		}
223
+
224
+		.uni-card__content {
225
+			padding: $uni-card-spacing;
226
+			font-size: 14px;
227
+			color: $uni-card-content-color;
228
+			line-height: 22px;
229
+		}
230
+
231
+		.uni-card__actions {
232
+			font-size: 12px;
233
+		}
234
+	}
235
+
236
+	.uni-card--border {
237
+		border: 1px solid $uni-border-color;
238
+	}
239
+
240
+	.uni-card--shadow {
241
+		position: relative;
242
+		/* #ifndef APP-NVUE */
243
+		box-shadow: $uni-shadow;
244
+		/* #endif */
245
+	}
246
+
247
+	.uni-card--full {
248
+		margin: 0;
249
+		border-left-width: 0;
250
+		border-left-width: 0;
251
+		border-radius: 0;
252
+	}
253
+
254
+	/* #ifndef APP-NVUE */
255
+	.uni-card--full:after {
256
+		border-radius: 0;
257
+	}
258
+
259
+	/* #endif */
260
+	.uni-ellipsis {
261
+		/* #ifndef APP-NVUE */
262
+		overflow: hidden;
263
+		white-space: nowrap;
264
+		text-overflow: ellipsis;
265
+		/* #endif */
266
+		/* #ifdef APP-NVUE */
267
+		lines: 1;
268
+		/* #endif */
269
+	}
270
+</style>

+ 90 - 0
uni_modules/uni-card/package.json

@@ -0,0 +1,90 @@
1
+{
2
+  "id": "uni-card",
3
+  "displayName": "uni-card 卡片",
4
+  "version": "1.3.1",
5
+  "description": "Card 组件,提供常见的卡片样式。",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "uniui",
9
+    "card",
10
+    "",
11
+    "卡片"
12
+],
13
+  "repository": "https://github.com/dcloudio/uni-ui",
14
+  "engines": {
15
+    "HBuilderX": ""
16
+  },
17
+  "directories": {
18
+    "example": "../../temps/example_temps"
19
+  },
20
+  "dcloudext": {
21
+    "category": [
22
+      "前端组件",
23
+      "通用组件"
24
+    ],
25
+    "sale": {
26
+      "regular": {
27
+        "price": "0.00"
28
+      },
29
+      "sourcecode": {
30
+        "price": "0.00"
31
+      }
32
+    },
33
+    "contact": {
34
+      "qq": ""
35
+    },
36
+    "declaration": {
37
+      "ads": "无",
38
+      "data": "无",
39
+      "permissions": "无"
40
+    },
41
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
42
+  },
43
+  "uni_modules": {
44
+    "dependencies": [
45
+			"uni-icons",
46
+			"uni-scss"
47
+		],
48
+    "encrypt": [],
49
+    "platforms": {
50
+      "cloud": {
51
+        "tcb": "y",
52
+        "aliyun": "y"
53
+      },
54
+      "client": {
55
+        "App": {
56
+          "app-vue": "y",
57
+          "app-nvue": "y"
58
+        },
59
+        "H5-mobile": {
60
+          "Safari": "y",
61
+          "Android Browser": "y",
62
+          "微信浏览器(Android)": "y",
63
+          "QQ浏览器(Android)": "y"
64
+        },
65
+        "H5-pc": {
66
+          "Chrome": "y",
67
+          "IE": "y",
68
+          "Edge": "y",
69
+          "Firefox": "y",
70
+          "Safari": "y"
71
+        },
72
+        "小程序": {
73
+          "微信": "y",
74
+          "阿里": "y",
75
+          "百度": "y",
76
+          "字节跳动": "y",
77
+          "QQ": "y"
78
+        },
79
+        "快应用": {
80
+          "华为": "u",
81
+          "联盟": "u"
82
+        },
83
+        "Vue": {
84
+            "vue2": "y",
85
+            "vue3": "y"
86
+        }
87
+      }
88
+    }
89
+  }
90
+}

+ 12 - 0
uni_modules/uni-card/readme.md

@@ -0,0 +1,12 @@
1
+
2
+
3
+## Card 卡片
4
+> **组件名:uni-card**
5
+> 代码块: `uCard`
6
+
7
+卡片视图组件。
8
+
9
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card)
10
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
11
+
12
+

+ 40 - 0
uni_modules/uni-icons/changelog.md

@@ -0,0 +1,40 @@
1
+## 2.0.9(2024-01-12)
2
+fix: 修复图标大小默认值错误的问题
3
+## 2.0.8(2023-12-14)
4
+- 修复 项目未使用 ts 情况下,打包报错的bug
5
+## 2.0.7(2023-12-14)
6
+- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
7
+## 2.0.6(2023-12-11)
8
+- 优化 兼容老版本icon类型,如 top ,bottom 等
9
+## 2.0.5(2023-12-11)
10
+- 优化 兼容老版本icon类型,如 top ,bottom 等
11
+## 2.0.4(2023-12-06)
12
+- 优化 uni-app x 下示例项目图标排序
13
+## 2.0.3(2023-12-06)
14
+- 修复 nvue下引入组件报错的bug
15
+## 2.0.2(2023-12-05)
16
+-优化 size 属性支持单位
17
+## 2.0.1(2023-12-05)
18
+- 新增 uni-app x 支持定义图标
19
+## 1.3.5(2022-01-24)
20
+- 优化 size 属性可以传入不带单位的字符串数值
21
+## 1.3.4(2022-01-24)
22
+- 优化 size 支持其他单位
23
+## 1.3.3(2022-01-17)
24
+- 修复 nvue 有些图标不显示的bug,兼容老版本图标
25
+## 1.3.2(2021-12-01)
26
+- 优化 示例可复制图标名称
27
+## 1.3.1(2021-11-23)
28
+- 优化 兼容旧组件 type 值
29
+## 1.3.0(2021-11-19)
30
+- 新增 更多图标
31
+- 优化 自定义图标使用方式
32
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
33
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
34
+## 1.1.7(2021-11-08)
35
+## 1.2.0(2021-07-30)
36
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
37
+## 1.1.5(2021-05-12)
38
+- 新增 组件示例地址
39
+## 1.1.4(2021-02-05)
40
+- 调整为uni_modules目录规范

+ 91 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -0,0 +1,91 @@
1
+<template>
2
+	<text class="uni-icons" :style="styleObj">
3
+		<slot>{{unicode}}</slot>
4
+	</text>
5
+</template>
6
+
7
+<script>
8
+	import { fontData, IconsDataItem } from './uniicons_file'
9
+
10
+	/**
11
+	 * Icons 图标
12
+	 * @description 用于展示 icon 图标
13
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
14
+	 * @property {Number} size 图标大小
15
+	 * @property {String} type 图标图案,参考示例
16
+	 * @property {String} color 图标颜色
17
+	 * @property {String} customPrefix 自定义图标
18
+	 * @event {Function} click 点击 Icon 触发事件
19
+	 */
20
+	export default {
21
+		name: "uni-icons",
22
+		props: {
23
+			type: {
24
+				type: String,
25
+				default: ''
26
+			},
27
+			color: {
28
+				type: String,
29
+				default: '#333333'
30
+			},
31
+			size: {
32
+				type: Object,
33
+				default: 16
34
+			},
35
+			fontFamily: {
36
+				type: String,
37
+				default: ''
38
+			}
39
+		},
40
+		data() {
41
+			return {};
42
+		},
43
+		computed: {
44
+			unicode() : string {
45
+				let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
46
+				if (codes !== null) {
47
+					return codes.unicode
48
+				}
49
+				return ''
50
+			},
51
+			iconSize() : string {
52
+				const size = this.size
53
+				if (typeof size == 'string') {
54
+					const reg = /^[0-9]*$/g
55
+					return reg.test(size as string) ? '' + size + 'px' : '' + size;
56
+					// return '' + this.size
57
+				}
58
+				return this.getFontSize(size as number)
59
+			},
60
+			styleObj() : UTSJSONObject {
61
+				if (this.fontFamily !== '') {
62
+					return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
63
+				}
64
+				return { color: this.color, fontSize: this.iconSize }
65
+			}
66
+		},
67
+		created() { },
68
+		methods: {
69
+			/**
70
+			 * 字体大小
71
+			 */
72
+			getFontSize(size : number) : string {
73
+				return size + 'px';
74
+			},
75
+		},
76
+	}
77
+</script>
78
+
79
+<style scoped>
80
+	@font-face {
81
+		font-family: UniIconsFontFamily;
82
+		src: url('./uniicons.ttf');
83
+	}
84
+
85
+	.uni-icons {
86
+		font-family: UniIconsFontFamily;
87
+		font-size: 18px;
88
+		font-style: normal;
89
+		color: #333;
90
+	}
91
+</style>

+ 110 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -0,0 +1,110 @@
1
+<template>
2
+	<!-- #ifdef APP-NVUE -->
3
+	<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
4
+	<!-- #endif -->
5
+	<!-- #ifndef APP-NVUE -->
6
+	<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
7
+		<slot></slot>
8
+	</text>
9
+	<!-- #endif -->
10
+</template>
11
+
12
+<script>
13
+	import { fontData } from './uniicons_file_vue.js';
14
+
15
+	const getVal = (val) => {
16
+		const reg = /^[0-9]*$/g
17
+		return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
18
+	}
19
+
20
+	// #ifdef APP-NVUE
21
+	var domModule = weex.requireModule('dom');
22
+	import iconUrl from './uniicons.ttf'
23
+	domModule.addRule('fontFace', {
24
+		'fontFamily': "uniicons",
25
+		'src': "url('" + iconUrl + "')"
26
+	});
27
+	// #endif
28
+
29
+	/**
30
+	 * Icons 图标
31
+	 * @description 用于展示 icons 图标
32
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
33
+	 * @property {Number} size 图标大小
34
+	 * @property {String} type 图标图案,参考示例
35
+	 * @property {String} color 图标颜色
36
+	 * @property {String} customPrefix 自定义图标
37
+	 * @event {Function} click 点击 Icon 触发事件
38
+	 */
39
+	export default {
40
+		name: 'UniIcons',
41
+		emits: ['click'],
42
+		props: {
43
+			type: {
44
+				type: String,
45
+				default: ''
46
+			},
47
+			color: {
48
+				type: String,
49
+				default: '#333333'
50
+			},
51
+			size: {
52
+				type: [Number, String],
53
+				default: 16
54
+			},
55
+			customPrefix: {
56
+				type: String,
57
+				default: ''
58
+			},
59
+			fontFamily: {
60
+				type: String,
61
+				default: ''
62
+			}
63
+		},
64
+		data() {
65
+			return {
66
+				icons: fontData
67
+			}
68
+		},
69
+		computed: {
70
+			unicode() {
71
+				let code = this.icons.find(v => v.font_class === this.type)
72
+				if (code) {
73
+					return code.unicode
74
+				}
75
+				return ''
76
+			},
77
+			iconSize() {
78
+				return getVal(this.size)
79
+			},
80
+			styleObj() {
81
+				if (this.fontFamily !== '') {
82
+					return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
83
+				}
84
+				return `color: ${this.color}; font-size: ${this.iconSize};`
85
+			}
86
+		},
87
+		methods: {
88
+			_onClick() {
89
+				this.$emit('click')
90
+			}
91
+		}
92
+	}
93
+</script>
94
+
95
+<style lang="scss">
96
+	/* #ifndef APP-NVUE */
97
+	@import './uniicons.css';
98
+
99
+	@font-face {
100
+		font-family: uniicons;
101
+		src: url('./uniicons.ttf');
102
+	}
103
+
104
+	/* #endif */
105
+	.uni-icons {
106
+		font-family: uniicons;
107
+		text-decoration: none;
108
+		text-align: center;
109
+	}
110
+</style>

+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -0,0 +1,664 @@
1
+
2
+.uniui-cart-filled:before {
3
+  content: "\e6d0";
4
+}
5
+
6
+.uniui-gift-filled:before {
7
+  content: "\e6c4";
8
+}
9
+
10
+.uniui-color:before {
11
+  content: "\e6cf";
12
+}
13
+
14
+.uniui-wallet:before {
15
+  content: "\e6b1";
16
+}
17
+
18
+.uniui-settings-filled:before {
19
+  content: "\e6ce";
20
+}
21
+
22
+.uniui-auth-filled:before {
23
+  content: "\e6cc";
24
+}
25
+
26
+.uniui-shop-filled:before {
27
+  content: "\e6cd";
28
+}
29
+
30
+.uniui-staff-filled:before {
31
+  content: "\e6cb";
32
+}
33
+
34
+.uniui-vip-filled:before {
35
+  content: "\e6c6";
36
+}
37
+
38
+.uniui-plus-filled:before {
39
+  content: "\e6c7";
40
+}
41
+
42
+.uniui-folder-add-filled:before {
43
+  content: "\e6c8";
44
+}
45
+
46
+.uniui-color-filled:before {
47
+  content: "\e6c9";
48
+}
49
+
50
+.uniui-tune-filled:before {
51
+  content: "\e6ca";
52
+}
53
+
54
+.uniui-calendar-filled:before {
55
+  content: "\e6c0";
56
+}
57
+
58
+.uniui-notification-filled:before {
59
+  content: "\e6c1";
60
+}
61
+
62
+.uniui-wallet-filled:before {
63
+  content: "\e6c2";
64
+}
65
+
66
+.uniui-medal-filled:before {
67
+  content: "\e6c3";
68
+}
69
+
70
+.uniui-fire-filled:before {
71
+  content: "\e6c5";
72
+}
73
+
74
+.uniui-refreshempty:before {
75
+  content: "\e6bf";
76
+}
77
+
78
+.uniui-location-filled:before {
79
+  content: "\e6af";
80
+}
81
+
82
+.uniui-person-filled:before {
83
+  content: "\e69d";
84
+}
85
+
86
+.uniui-personadd-filled:before {
87
+  content: "\e698";
88
+}
89
+
90
+.uniui-arrowthinleft:before {
91
+  content: "\e6d2";
92
+}
93
+
94
+.uniui-arrowthinup:before {
95
+  content: "\e6d3";
96
+}
97
+
98
+.uniui-arrowthindown:before {
99
+  content: "\e6d4";
100
+}
101
+
102
+.uniui-back:before {
103
+  content: "\e6b9";
104
+}
105
+
106
+.uniui-forward:before {
107
+  content: "\e6ba";
108
+}
109
+
110
+.uniui-arrow-right:before {
111
+  content: "\e6bb";
112
+}
113
+
114
+.uniui-arrow-left:before {
115
+  content: "\e6bc";
116
+}
117
+
118
+.uniui-arrow-up:before {
119
+  content: "\e6bd";
120
+}
121
+
122
+.uniui-arrow-down:before {
123
+  content: "\e6be";
124
+}
125
+
126
+.uniui-arrowthinright:before {
127
+  content: "\e6d1";
128
+}
129
+
130
+.uniui-down:before {
131
+  content: "\e6b8";
132
+}
133
+
134
+.uniui-bottom:before {
135
+  content: "\e6b8";
136
+}
137
+
138
+.uniui-arrowright:before {
139
+  content: "\e6d5";
140
+}
141
+
142
+.uniui-right:before {
143
+  content: "\e6b5";
144
+}
145
+
146
+.uniui-up:before {
147
+  content: "\e6b6";
148
+}
149
+
150
+.uniui-top:before {
151
+  content: "\e6b6";
152
+}
153
+
154
+.uniui-left:before {
155
+  content: "\e6b7";
156
+}
157
+
158
+.uniui-arrowup:before {
159
+  content: "\e6d6";
160
+}
161
+
162
+.uniui-eye:before {
163
+  content: "\e651";
164
+}
165
+
166
+.uniui-eye-filled:before {
167
+  content: "\e66a";
168
+}
169
+
170
+.uniui-eye-slash:before {
171
+  content: "\e6b3";
172
+}
173
+
174
+.uniui-eye-slash-filled:before {
175
+  content: "\e6b4";
176
+}
177
+
178
+.uniui-info-filled:before {
179
+  content: "\e649";
180
+}
181
+
182
+.uniui-reload:before {
183
+  content: "\e6b2";
184
+}
185
+
186
+.uniui-micoff-filled:before {
187
+  content: "\e6b0";
188
+}
189
+
190
+.uniui-map-pin-ellipse:before {
191
+  content: "\e6ac";
192
+}
193
+
194
+.uniui-map-pin:before {
195
+  content: "\e6ad";
196
+}
197
+
198
+.uniui-location:before {
199
+  content: "\e6ae";
200
+}
201
+
202
+.uniui-starhalf:before {
203
+  content: "\e683";
204
+}
205
+
206
+.uniui-star:before {
207
+  content: "\e688";
208
+}
209
+
210
+.uniui-star-filled:before {
211
+  content: "\e68f";
212
+}
213
+
214
+.uniui-calendar:before {
215
+  content: "\e6a0";
216
+}
217
+
218
+.uniui-fire:before {
219
+  content: "\e6a1";
220
+}
221
+
222
+.uniui-medal:before {
223
+  content: "\e6a2";
224
+}
225
+
226
+.uniui-font:before {
227
+  content: "\e6a3";
228
+}
229
+
230
+.uniui-gift:before {
231
+  content: "\e6a4";
232
+}
233
+
234
+.uniui-link:before {
235
+  content: "\e6a5";
236
+}
237
+
238
+.uniui-notification:before {
239
+  content: "\e6a6";
240
+}
241
+
242
+.uniui-staff:before {
243
+  content: "\e6a7";
244
+}
245
+
246
+.uniui-vip:before {
247
+  content: "\e6a8";
248
+}
249
+
250
+.uniui-folder-add:before {
251
+  content: "\e6a9";
252
+}
253
+
254
+.uniui-tune:before {
255
+  content: "\e6aa";
256
+}
257
+
258
+.uniui-auth:before {
259
+  content: "\e6ab";
260
+}
261
+
262
+.uniui-person:before {
263
+  content: "\e699";
264
+}
265
+
266
+.uniui-email-filled:before {
267
+  content: "\e69a";
268
+}
269
+
270
+.uniui-phone-filled:before {
271
+  content: "\e69b";
272
+}
273
+
274
+.uniui-phone:before {
275
+  content: "\e69c";
276
+}
277
+
278
+.uniui-email:before {
279
+  content: "\e69e";
280
+}
281
+
282
+.uniui-personadd:before {
283
+  content: "\e69f";
284
+}
285
+
286
+.uniui-chatboxes-filled:before {
287
+  content: "\e692";
288
+}
289
+
290
+.uniui-contact:before {
291
+  content: "\e693";
292
+}
293
+
294
+.uniui-chatbubble-filled:before {
295
+  content: "\e694";
296
+}
297
+
298
+.uniui-contact-filled:before {
299
+  content: "\e695";
300
+}
301
+
302
+.uniui-chatboxes:before {
303
+  content: "\e696";
304
+}
305
+
306
+.uniui-chatbubble:before {
307
+  content: "\e697";
308
+}
309
+
310
+.uniui-upload-filled:before {
311
+  content: "\e68e";
312
+}
313
+
314
+.uniui-upload:before {
315
+  content: "\e690";
316
+}
317
+
318
+.uniui-weixin:before {
319
+  content: "\e691";
320
+}
321
+
322
+.uniui-compose:before {
323
+  content: "\e67f";
324
+}
325
+
326
+.uniui-qq:before {
327
+  content: "\e680";
328
+}
329
+
330
+.uniui-download-filled:before {
331
+  content: "\e681";
332
+}
333
+
334
+.uniui-pyq:before {
335
+  content: "\e682";
336
+}
337
+
338
+.uniui-sound:before {
339
+  content: "\e684";
340
+}
341
+
342
+.uniui-trash-filled:before {
343
+  content: "\e685";
344
+}
345
+
346
+.uniui-sound-filled:before {
347
+  content: "\e686";
348
+}
349
+
350
+.uniui-trash:before {
351
+  content: "\e687";
352
+}
353
+
354
+.uniui-videocam-filled:before {
355
+  content: "\e689";
356
+}
357
+
358
+.uniui-spinner-cycle:before {
359
+  content: "\e68a";
360
+}
361
+
362
+.uniui-weibo:before {
363
+  content: "\e68b";
364
+}
365
+
366
+.uniui-videocam:before {
367
+  content: "\e68c";
368
+}
369
+
370
+.uniui-download:before {
371
+  content: "\e68d";
372
+}
373
+
374
+.uniui-help:before {
375
+  content: "\e679";
376
+}
377
+
378
+.uniui-navigate-filled:before {
379
+  content: "\e67a";
380
+}
381
+
382
+.uniui-plusempty:before {
383
+  content: "\e67b";
384
+}
385
+
386
+.uniui-smallcircle:before {
387
+  content: "\e67c";
388
+}
389
+
390
+.uniui-minus-filled:before {
391
+  content: "\e67d";
392
+}
393
+
394
+.uniui-micoff:before {
395
+  content: "\e67e";
396
+}
397
+
398
+.uniui-closeempty:before {
399
+  content: "\e66c";
400
+}
401
+
402
+.uniui-clear:before {
403
+  content: "\e66d";
404
+}
405
+
406
+.uniui-navigate:before {
407
+  content: "\e66e";
408
+}
409
+
410
+.uniui-minus:before {
411
+  content: "\e66f";
412
+}
413
+
414
+.uniui-image:before {
415
+  content: "\e670";
416
+}
417
+
418
+.uniui-mic:before {
419
+  content: "\e671";
420
+}
421
+
422
+.uniui-paperplane:before {
423
+  content: "\e672";
424
+}
425
+
426
+.uniui-close:before {
427
+  content: "\e673";
428
+}
429
+
430
+.uniui-help-filled:before {
431
+  content: "\e674";
432
+}
433
+
434
+.uniui-paperplane-filled:before {
435
+  content: "\e675";
436
+}
437
+
438
+.uniui-plus:before {
439
+  content: "\e676";
440
+}
441
+
442
+.uniui-mic-filled:before {
443
+  content: "\e677";
444
+}
445
+
446
+.uniui-image-filled:before {
447
+  content: "\e678";
448
+}
449
+
450
+.uniui-locked-filled:before {
451
+  content: "\e668";
452
+}
453
+
454
+.uniui-info:before {
455
+  content: "\e669";
456
+}
457
+
458
+.uniui-locked:before {
459
+  content: "\e66b";
460
+}
461
+
462
+.uniui-camera-filled:before {
463
+  content: "\e658";
464
+}
465
+
466
+.uniui-chat-filled:before {
467
+  content: "\e659";
468
+}
469
+
470
+.uniui-camera:before {
471
+  content: "\e65a";
472
+}
473
+
474
+.uniui-circle:before {
475
+  content: "\e65b";
476
+}
477
+
478
+.uniui-checkmarkempty:before {
479
+  content: "\e65c";
480
+}
481
+
482
+.uniui-chat:before {
483
+  content: "\e65d";
484
+}
485
+
486
+.uniui-circle-filled:before {
487
+  content: "\e65e";
488
+}
489
+
490
+.uniui-flag:before {
491
+  content: "\e65f";
492
+}
493
+
494
+.uniui-flag-filled:before {
495
+  content: "\e660";
496
+}
497
+
498
+.uniui-gear-filled:before {
499
+  content: "\e661";
500
+}
501
+
502
+.uniui-home:before {
503
+  content: "\e662";
504
+}
505
+
506
+.uniui-home-filled:before {
507
+  content: "\e663";
508
+}
509
+
510
+.uniui-gear:before {
511
+  content: "\e664";
512
+}
513
+
514
+.uniui-smallcircle-filled:before {
515
+  content: "\e665";
516
+}
517
+
518
+.uniui-map-filled:before {
519
+  content: "\e666";
520
+}
521
+
522
+.uniui-map:before {
523
+  content: "\e667";
524
+}
525
+
526
+.uniui-refresh-filled:before {
527
+  content: "\e656";
528
+}
529
+
530
+.uniui-refresh:before {
531
+  content: "\e657";
532
+}
533
+
534
+.uniui-cloud-upload:before {
535
+  content: "\e645";
536
+}
537
+
538
+.uniui-cloud-download-filled:before {
539
+  content: "\e646";
540
+}
541
+
542
+.uniui-cloud-download:before {
543
+  content: "\e647";
544
+}
545
+
546
+.uniui-cloud-upload-filled:before {
547
+  content: "\e648";
548
+}
549
+
550
+.uniui-redo:before {
551
+  content: "\e64a";
552
+}
553
+
554
+.uniui-images-filled:before {
555
+  content: "\e64b";
556
+}
557
+
558
+.uniui-undo-filled:before {
559
+  content: "\e64c";
560
+}
561
+
562
+.uniui-more:before {
563
+  content: "\e64d";
564
+}
565
+
566
+.uniui-more-filled:before {
567
+  content: "\e64e";
568
+}
569
+
570
+.uniui-undo:before {
571
+  content: "\e64f";
572
+}
573
+
574
+.uniui-images:before {
575
+  content: "\e650";
576
+}
577
+
578
+.uniui-paperclip:before {
579
+  content: "\e652";
580
+}
581
+
582
+.uniui-settings:before {
583
+  content: "\e653";
584
+}
585
+
586
+.uniui-search:before {
587
+  content: "\e654";
588
+}
589
+
590
+.uniui-redo-filled:before {
591
+  content: "\e655";
592
+}
593
+
594
+.uniui-list:before {
595
+  content: "\e644";
596
+}
597
+
598
+.uniui-mail-open-filled:before {
599
+  content: "\e63a";
600
+}
601
+
602
+.uniui-hand-down-filled:before {
603
+  content: "\e63c";
604
+}
605
+
606
+.uniui-hand-down:before {
607
+  content: "\e63d";
608
+}
609
+
610
+.uniui-hand-up-filled:before {
611
+  content: "\e63e";
612
+}
613
+
614
+.uniui-hand-up:before {
615
+  content: "\e63f";
616
+}
617
+
618
+.uniui-heart-filled:before {
619
+  content: "\e641";
620
+}
621
+
622
+.uniui-mail-open:before {
623
+  content: "\e643";
624
+}
625
+
626
+.uniui-heart:before {
627
+  content: "\e639";
628
+}
629
+
630
+.uniui-loop:before {
631
+  content: "\e633";
632
+}
633
+
634
+.uniui-pulldown:before {
635
+  content: "\e632";
636
+}
637
+
638
+.uniui-scan:before {
639
+  content: "\e62a";
640
+}
641
+
642
+.uniui-bars:before {
643
+  content: "\e627";
644
+}
645
+
646
+.uniui-checkbox:before {
647
+  content: "\e62b";
648
+}
649
+
650
+.uniui-checkbox-filled:before {
651
+  content: "\e62c";
652
+}
653
+
654
+.uniui-shop:before {
655
+  content: "\e62f";
656
+}
657
+
658
+.uniui-headphones:before {
659
+  content: "\e630";
660
+}
661
+
662
+.uniui-cart:before {
663
+  content: "\e631";
664
+}

BIN
uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts

@@ -0,0 +1,664 @@
1
+
2
+export type IconsData = {
3
+	id : string
4
+	name : string
5
+	font_family : string
6
+	css_prefix_text : string
7
+	description : string
8
+	glyphs : Array<IconsDataItem>
9
+}
10
+
11
+export type IconsDataItem = {
12
+	font_class : string
13
+	unicode : string
14
+}
15
+
16
+
17
+export const fontData = [
18
+  {
19
+    "font_class": "arrow-down",
20
+    "unicode": "\ue6be"
21
+  },
22
+  {
23
+    "font_class": "arrow-left",
24
+    "unicode": "\ue6bc"
25
+  },
26
+  {
27
+    "font_class": "arrow-right",
28
+    "unicode": "\ue6bb"
29
+  },
30
+  {
31
+    "font_class": "arrow-up",
32
+    "unicode": "\ue6bd"
33
+  },
34
+  {
35
+    "font_class": "auth",
36
+    "unicode": "\ue6ab"
37
+  },
38
+  {
39
+    "font_class": "auth-filled",
40
+    "unicode": "\ue6cc"
41
+  },
42
+  {
43
+    "font_class": "back",
44
+    "unicode": "\ue6b9"
45
+  },
46
+  {
47
+    "font_class": "bars",
48
+    "unicode": "\ue627"
49
+  },
50
+  {
51
+    "font_class": "calendar",
52
+    "unicode": "\ue6a0"
53
+  },
54
+  {
55
+    "font_class": "calendar-filled",
56
+    "unicode": "\ue6c0"
57
+  },
58
+  {
59
+    "font_class": "camera",
60
+    "unicode": "\ue65a"
61
+  },
62
+  {
63
+    "font_class": "camera-filled",
64
+    "unicode": "\ue658"
65
+  },
66
+  {
67
+    "font_class": "cart",
68
+    "unicode": "\ue631"
69
+  },
70
+  {
71
+    "font_class": "cart-filled",
72
+    "unicode": "\ue6d0"
73
+  },
74
+  {
75
+    "font_class": "chat",
76
+    "unicode": "\ue65d"
77
+  },
78
+  {
79
+    "font_class": "chat-filled",
80
+    "unicode": "\ue659"
81
+  },
82
+  {
83
+    "font_class": "chatboxes",
84
+    "unicode": "\ue696"
85
+  },
86
+  {
87
+    "font_class": "chatboxes-filled",
88
+    "unicode": "\ue692"
89
+  },
90
+  {
91
+    "font_class": "chatbubble",
92
+    "unicode": "\ue697"
93
+  },
94
+  {
95
+    "font_class": "chatbubble-filled",
96
+    "unicode": "\ue694"
97
+  },
98
+  {
99
+    "font_class": "checkbox",
100
+    "unicode": "\ue62b"
101
+  },
102
+  {
103
+    "font_class": "checkbox-filled",
104
+    "unicode": "\ue62c"
105
+  },
106
+  {
107
+    "font_class": "checkmarkempty",
108
+    "unicode": "\ue65c"
109
+  },
110
+  {
111
+    "font_class": "circle",
112
+    "unicode": "\ue65b"
113
+  },
114
+  {
115
+    "font_class": "circle-filled",
116
+    "unicode": "\ue65e"
117
+  },
118
+  {
119
+    "font_class": "clear",
120
+    "unicode": "\ue66d"
121
+  },
122
+  {
123
+    "font_class": "close",
124
+    "unicode": "\ue673"
125
+  },
126
+  {
127
+    "font_class": "closeempty",
128
+    "unicode": "\ue66c"
129
+  },
130
+  {
131
+    "font_class": "cloud-download",
132
+    "unicode": "\ue647"
133
+  },
134
+  {
135
+    "font_class": "cloud-download-filled",
136
+    "unicode": "\ue646"
137
+  },
138
+  {
139
+    "font_class": "cloud-upload",
140
+    "unicode": "\ue645"
141
+  },
142
+  {
143
+    "font_class": "cloud-upload-filled",
144
+    "unicode": "\ue648"
145
+  },
146
+  {
147
+    "font_class": "color",
148
+    "unicode": "\ue6cf"
149
+  },
150
+  {
151
+    "font_class": "color-filled",
152
+    "unicode": "\ue6c9"
153
+  },
154
+  {
155
+    "font_class": "compose",
156
+    "unicode": "\ue67f"
157
+  },
158
+  {
159
+    "font_class": "contact",
160
+    "unicode": "\ue693"
161
+  },
162
+  {
163
+    "font_class": "contact-filled",
164
+    "unicode": "\ue695"
165
+  },
166
+  {
167
+    "font_class": "down",
168
+    "unicode": "\ue6b8"
169
+  },
170
+	{
171
+	  "font_class": "bottom",
172
+	  "unicode": "\ue6b8"
173
+	},
174
+  {
175
+    "font_class": "download",
176
+    "unicode": "\ue68d"
177
+  },
178
+  {
179
+    "font_class": "download-filled",
180
+    "unicode": "\ue681"
181
+  },
182
+  {
183
+    "font_class": "email",
184
+    "unicode": "\ue69e"
185
+  },
186
+  {
187
+    "font_class": "email-filled",
188
+    "unicode": "\ue69a"
189
+  },
190
+  {
191
+    "font_class": "eye",
192
+    "unicode": "\ue651"
193
+  },
194
+  {
195
+    "font_class": "eye-filled",
196
+    "unicode": "\ue66a"
197
+  },
198
+  {
199
+    "font_class": "eye-slash",
200
+    "unicode": "\ue6b3"
201
+  },
202
+  {
203
+    "font_class": "eye-slash-filled",
204
+    "unicode": "\ue6b4"
205
+  },
206
+  {
207
+    "font_class": "fire",
208
+    "unicode": "\ue6a1"
209
+  },
210
+  {
211
+    "font_class": "fire-filled",
212
+    "unicode": "\ue6c5"
213
+  },
214
+  {
215
+    "font_class": "flag",
216
+    "unicode": "\ue65f"
217
+  },
218
+  {
219
+    "font_class": "flag-filled",
220
+    "unicode": "\ue660"
221
+  },
222
+  {
223
+    "font_class": "folder-add",
224
+    "unicode": "\ue6a9"
225
+  },
226
+  {
227
+    "font_class": "folder-add-filled",
228
+    "unicode": "\ue6c8"
229
+  },
230
+  {
231
+    "font_class": "font",
232
+    "unicode": "\ue6a3"
233
+  },
234
+  {
235
+    "font_class": "forward",
236
+    "unicode": "\ue6ba"
237
+  },
238
+  {
239
+    "font_class": "gear",
240
+    "unicode": "\ue664"
241
+  },
242
+  {
243
+    "font_class": "gear-filled",
244
+    "unicode": "\ue661"
245
+  },
246
+  {
247
+    "font_class": "gift",
248
+    "unicode": "\ue6a4"
249
+  },
250
+  {
251
+    "font_class": "gift-filled",
252
+    "unicode": "\ue6c4"
253
+  },
254
+  {
255
+    "font_class": "hand-down",
256
+    "unicode": "\ue63d"
257
+  },
258
+  {
259
+    "font_class": "hand-down-filled",
260
+    "unicode": "\ue63c"
261
+  },
262
+  {
263
+    "font_class": "hand-up",
264
+    "unicode": "\ue63f"
265
+  },
266
+  {
267
+    "font_class": "hand-up-filled",
268
+    "unicode": "\ue63e"
269
+  },
270
+  {
271
+    "font_class": "headphones",
272
+    "unicode": "\ue630"
273
+  },
274
+  {
275
+    "font_class": "heart",
276
+    "unicode": "\ue639"
277
+  },
278
+  {
279
+    "font_class": "heart-filled",
280
+    "unicode": "\ue641"
281
+  },
282
+  {
283
+    "font_class": "help",
284
+    "unicode": "\ue679"
285
+  },
286
+  {
287
+    "font_class": "help-filled",
288
+    "unicode": "\ue674"
289
+  },
290
+  {
291
+    "font_class": "home",
292
+    "unicode": "\ue662"
293
+  },
294
+  {
295
+    "font_class": "home-filled",
296
+    "unicode": "\ue663"
297
+  },
298
+  {
299
+    "font_class": "image",
300
+    "unicode": "\ue670"
301
+  },
302
+  {
303
+    "font_class": "image-filled",
304
+    "unicode": "\ue678"
305
+  },
306
+  {
307
+    "font_class": "images",
308
+    "unicode": "\ue650"
309
+  },
310
+  {
311
+    "font_class": "images-filled",
312
+    "unicode": "\ue64b"
313
+  },
314
+  {
315
+    "font_class": "info",
316
+    "unicode": "\ue669"
317
+  },
318
+  {
319
+    "font_class": "info-filled",
320
+    "unicode": "\ue649"
321
+  },
322
+  {
323
+    "font_class": "left",
324
+    "unicode": "\ue6b7"
325
+  },
326
+  {
327
+    "font_class": "link",
328
+    "unicode": "\ue6a5"
329
+  },
330
+  {
331
+    "font_class": "list",
332
+    "unicode": "\ue644"
333
+  },
334
+  {
335
+    "font_class": "location",
336
+    "unicode": "\ue6ae"
337
+  },
338
+  {
339
+    "font_class": "location-filled",
340
+    "unicode": "\ue6af"
341
+  },
342
+  {
343
+    "font_class": "locked",
344
+    "unicode": "\ue66b"
345
+  },
346
+  {
347
+    "font_class": "locked-filled",
348
+    "unicode": "\ue668"
349
+  },
350
+  {
351
+    "font_class": "loop",
352
+    "unicode": "\ue633"
353
+  },
354
+  {
355
+    "font_class": "mail-open",
356
+    "unicode": "\ue643"
357
+  },
358
+  {
359
+    "font_class": "mail-open-filled",
360
+    "unicode": "\ue63a"
361
+  },
362
+  {
363
+    "font_class": "map",
364
+    "unicode": "\ue667"
365
+  },
366
+  {
367
+    "font_class": "map-filled",
368
+    "unicode": "\ue666"
369
+  },
370
+  {
371
+    "font_class": "map-pin",
372
+    "unicode": "\ue6ad"
373
+  },
374
+  {
375
+    "font_class": "map-pin-ellipse",
376
+    "unicode": "\ue6ac"
377
+  },
378
+  {
379
+    "font_class": "medal",
380
+    "unicode": "\ue6a2"
381
+  },
382
+  {
383
+    "font_class": "medal-filled",
384
+    "unicode": "\ue6c3"
385
+  },
386
+  {
387
+    "font_class": "mic",
388
+    "unicode": "\ue671"
389
+  },
390
+  {
391
+    "font_class": "mic-filled",
392
+    "unicode": "\ue677"
393
+  },
394
+  {
395
+    "font_class": "micoff",
396
+    "unicode": "\ue67e"
397
+  },
398
+  {
399
+    "font_class": "micoff-filled",
400
+    "unicode": "\ue6b0"
401
+  },
402
+  {
403
+    "font_class": "minus",
404
+    "unicode": "\ue66f"
405
+  },
406
+  {
407
+    "font_class": "minus-filled",
408
+    "unicode": "\ue67d"
409
+  },
410
+  {
411
+    "font_class": "more",
412
+    "unicode": "\ue64d"
413
+  },
414
+  {
415
+    "font_class": "more-filled",
416
+    "unicode": "\ue64e"
417
+  },
418
+  {
419
+    "font_class": "navigate",
420
+    "unicode": "\ue66e"
421
+  },
422
+  {
423
+    "font_class": "navigate-filled",
424
+    "unicode": "\ue67a"
425
+  },
426
+  {
427
+    "font_class": "notification",
428
+    "unicode": "\ue6a6"
429
+  },
430
+  {
431
+    "font_class": "notification-filled",
432
+    "unicode": "\ue6c1"
433
+  },
434
+  {
435
+    "font_class": "paperclip",
436
+    "unicode": "\ue652"
437
+  },
438
+  {
439
+    "font_class": "paperplane",
440
+    "unicode": "\ue672"
441
+  },
442
+  {
443
+    "font_class": "paperplane-filled",
444
+    "unicode": "\ue675"
445
+  },
446
+  {
447
+    "font_class": "person",
448
+    "unicode": "\ue699"
449
+  },
450
+  {
451
+    "font_class": "person-filled",
452
+    "unicode": "\ue69d"
453
+  },
454
+  {
455
+    "font_class": "personadd",
456
+    "unicode": "\ue69f"
457
+  },
458
+  {
459
+    "font_class": "personadd-filled",
460
+    "unicode": "\ue698"
461
+  },
462
+  {
463
+    "font_class": "personadd-filled-copy",
464
+    "unicode": "\ue6d1"
465
+  },
466
+  {
467
+    "font_class": "phone",
468
+    "unicode": "\ue69c"
469
+  },
470
+  {
471
+    "font_class": "phone-filled",
472
+    "unicode": "\ue69b"
473
+  },
474
+  {
475
+    "font_class": "plus",
476
+    "unicode": "\ue676"
477
+  },
478
+  {
479
+    "font_class": "plus-filled",
480
+    "unicode": "\ue6c7"
481
+  },
482
+  {
483
+    "font_class": "plusempty",
484
+    "unicode": "\ue67b"
485
+  },
486
+  {
487
+    "font_class": "pulldown",
488
+    "unicode": "\ue632"
489
+  },
490
+  {
491
+    "font_class": "pyq",
492
+    "unicode": "\ue682"
493
+  },
494
+  {
495
+    "font_class": "qq",
496
+    "unicode": "\ue680"
497
+  },
498
+  {
499
+    "font_class": "redo",
500
+    "unicode": "\ue64a"
501
+  },
502
+  {
503
+    "font_class": "redo-filled",
504
+    "unicode": "\ue655"
505
+  },
506
+  {
507
+    "font_class": "refresh",
508
+    "unicode": "\ue657"
509
+  },
510
+  {
511
+    "font_class": "refresh-filled",
512
+    "unicode": "\ue656"
513
+  },
514
+  {
515
+    "font_class": "refreshempty",
516
+    "unicode": "\ue6bf"
517
+  },
518
+  {
519
+    "font_class": "reload",
520
+    "unicode": "\ue6b2"
521
+  },
522
+  {
523
+    "font_class": "right",
524
+    "unicode": "\ue6b5"
525
+  },
526
+  {
527
+    "font_class": "scan",
528
+    "unicode": "\ue62a"
529
+  },
530
+  {
531
+    "font_class": "search",
532
+    "unicode": "\ue654"
533
+  },
534
+  {
535
+    "font_class": "settings",
536
+    "unicode": "\ue653"
537
+  },
538
+  {
539
+    "font_class": "settings-filled",
540
+    "unicode": "\ue6ce"
541
+  },
542
+  {
543
+    "font_class": "shop",
544
+    "unicode": "\ue62f"
545
+  },
546
+  {
547
+    "font_class": "shop-filled",
548
+    "unicode": "\ue6cd"
549
+  },
550
+  {
551
+    "font_class": "smallcircle",
552
+    "unicode": "\ue67c"
553
+  },
554
+  {
555
+    "font_class": "smallcircle-filled",
556
+    "unicode": "\ue665"
557
+  },
558
+  {
559
+    "font_class": "sound",
560
+    "unicode": "\ue684"
561
+  },
562
+  {
563
+    "font_class": "sound-filled",
564
+    "unicode": "\ue686"
565
+  },
566
+  {
567
+    "font_class": "spinner-cycle",
568
+    "unicode": "\ue68a"
569
+  },
570
+  {
571
+    "font_class": "staff",
572
+    "unicode": "\ue6a7"
573
+  },
574
+  {
575
+    "font_class": "staff-filled",
576
+    "unicode": "\ue6cb"
577
+  },
578
+  {
579
+    "font_class": "star",
580
+    "unicode": "\ue688"
581
+  },
582
+  {
583
+    "font_class": "star-filled",
584
+    "unicode": "\ue68f"
585
+  },
586
+  {
587
+    "font_class": "starhalf",
588
+    "unicode": "\ue683"
589
+  },
590
+  {
591
+    "font_class": "trash",
592
+    "unicode": "\ue687"
593
+  },
594
+  {
595
+    "font_class": "trash-filled",
596
+    "unicode": "\ue685"
597
+  },
598
+  {
599
+    "font_class": "tune",
600
+    "unicode": "\ue6aa"
601
+  },
602
+  {
603
+    "font_class": "tune-filled",
604
+    "unicode": "\ue6ca"
605
+  },
606
+  {
607
+    "font_class": "undo",
608
+    "unicode": "\ue64f"
609
+  },
610
+  {
611
+    "font_class": "undo-filled",
612
+    "unicode": "\ue64c"
613
+  },
614
+  {
615
+    "font_class": "up",
616
+    "unicode": "\ue6b6"
617
+  },
618
+	{
619
+	  "font_class": "top",
620
+	  "unicode": "\ue6b6"
621
+	},
622
+  {
623
+    "font_class": "upload",
624
+    "unicode": "\ue690"
625
+  },
626
+  {
627
+    "font_class": "upload-filled",
628
+    "unicode": "\ue68e"
629
+  },
630
+  {
631
+    "font_class": "videocam",
632
+    "unicode": "\ue68c"
633
+  },
634
+  {
635
+    "font_class": "videocam-filled",
636
+    "unicode": "\ue689"
637
+  },
638
+  {
639
+    "font_class": "vip",
640
+    "unicode": "\ue6a8"
641
+  },
642
+  {
643
+    "font_class": "vip-filled",
644
+    "unicode": "\ue6c6"
645
+  },
646
+  {
647
+    "font_class": "wallet",
648
+    "unicode": "\ue6b1"
649
+  },
650
+  {
651
+    "font_class": "wallet-filled",
652
+    "unicode": "\ue6c2"
653
+  },
654
+  {
655
+    "font_class": "weibo",
656
+    "unicode": "\ue68b"
657
+  },
658
+  {
659
+    "font_class": "weixin",
660
+    "unicode": "\ue691"
661
+  }
662
+] as IconsDataItem[]
663
+
664
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 649 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js

@@ -0,0 +1,649 @@
1
+
2
+export const fontData = [
3
+  {
4
+    "font_class": "arrow-down",
5
+    "unicode": "\ue6be"
6
+  },
7
+  {
8
+    "font_class": "arrow-left",
9
+    "unicode": "\ue6bc"
10
+  },
11
+  {
12
+    "font_class": "arrow-right",
13
+    "unicode": "\ue6bb"
14
+  },
15
+  {
16
+    "font_class": "arrow-up",
17
+    "unicode": "\ue6bd"
18
+  },
19
+  {
20
+    "font_class": "auth",
21
+    "unicode": "\ue6ab"
22
+  },
23
+  {
24
+    "font_class": "auth-filled",
25
+    "unicode": "\ue6cc"
26
+  },
27
+  {
28
+    "font_class": "back",
29
+    "unicode": "\ue6b9"
30
+  },
31
+  {
32
+    "font_class": "bars",
33
+    "unicode": "\ue627"
34
+  },
35
+  {
36
+    "font_class": "calendar",
37
+    "unicode": "\ue6a0"
38
+  },
39
+  {
40
+    "font_class": "calendar-filled",
41
+    "unicode": "\ue6c0"
42
+  },
43
+  {
44
+    "font_class": "camera",
45
+    "unicode": "\ue65a"
46
+  },
47
+  {
48
+    "font_class": "camera-filled",
49
+    "unicode": "\ue658"
50
+  },
51
+  {
52
+    "font_class": "cart",
53
+    "unicode": "\ue631"
54
+  },
55
+  {
56
+    "font_class": "cart-filled",
57
+    "unicode": "\ue6d0"
58
+  },
59
+  {
60
+    "font_class": "chat",
61
+    "unicode": "\ue65d"
62
+  },
63
+  {
64
+    "font_class": "chat-filled",
65
+    "unicode": "\ue659"
66
+  },
67
+  {
68
+    "font_class": "chatboxes",
69
+    "unicode": "\ue696"
70
+  },
71
+  {
72
+    "font_class": "chatboxes-filled",
73
+    "unicode": "\ue692"
74
+  },
75
+  {
76
+    "font_class": "chatbubble",
77
+    "unicode": "\ue697"
78
+  },
79
+  {
80
+    "font_class": "chatbubble-filled",
81
+    "unicode": "\ue694"
82
+  },
83
+  {
84
+    "font_class": "checkbox",
85
+    "unicode": "\ue62b"
86
+  },
87
+  {
88
+    "font_class": "checkbox-filled",
89
+    "unicode": "\ue62c"
90
+  },
91
+  {
92
+    "font_class": "checkmarkempty",
93
+    "unicode": "\ue65c"
94
+  },
95
+  {
96
+    "font_class": "circle",
97
+    "unicode": "\ue65b"
98
+  },
99
+  {
100
+    "font_class": "circle-filled",
101
+    "unicode": "\ue65e"
102
+  },
103
+  {
104
+    "font_class": "clear",
105
+    "unicode": "\ue66d"
106
+  },
107
+  {
108
+    "font_class": "close",
109
+    "unicode": "\ue673"
110
+  },
111
+  {
112
+    "font_class": "closeempty",
113
+    "unicode": "\ue66c"
114
+  },
115
+  {
116
+    "font_class": "cloud-download",
117
+    "unicode": "\ue647"
118
+  },
119
+  {
120
+    "font_class": "cloud-download-filled",
121
+    "unicode": "\ue646"
122
+  },
123
+  {
124
+    "font_class": "cloud-upload",
125
+    "unicode": "\ue645"
126
+  },
127
+  {
128
+    "font_class": "cloud-upload-filled",
129
+    "unicode": "\ue648"
130
+  },
131
+  {
132
+    "font_class": "color",
133
+    "unicode": "\ue6cf"
134
+  },
135
+  {
136
+    "font_class": "color-filled",
137
+    "unicode": "\ue6c9"
138
+  },
139
+  {
140
+    "font_class": "compose",
141
+    "unicode": "\ue67f"
142
+  },
143
+  {
144
+    "font_class": "contact",
145
+    "unicode": "\ue693"
146
+  },
147
+  {
148
+    "font_class": "contact-filled",
149
+    "unicode": "\ue695"
150
+  },
151
+  {
152
+    "font_class": "down",
153
+    "unicode": "\ue6b8"
154
+  },
155
+	{
156
+	  "font_class": "bottom",
157
+	  "unicode": "\ue6b8"
158
+	},
159
+  {
160
+    "font_class": "download",
161
+    "unicode": "\ue68d"
162
+  },
163
+  {
164
+    "font_class": "download-filled",
165
+    "unicode": "\ue681"
166
+  },
167
+  {
168
+    "font_class": "email",
169
+    "unicode": "\ue69e"
170
+  },
171
+  {
172
+    "font_class": "email-filled",
173
+    "unicode": "\ue69a"
174
+  },
175
+  {
176
+    "font_class": "eye",
177
+    "unicode": "\ue651"
178
+  },
179
+  {
180
+    "font_class": "eye-filled",
181
+    "unicode": "\ue66a"
182
+  },
183
+  {
184
+    "font_class": "eye-slash",
185
+    "unicode": "\ue6b3"
186
+  },
187
+  {
188
+    "font_class": "eye-slash-filled",
189
+    "unicode": "\ue6b4"
190
+  },
191
+  {
192
+    "font_class": "fire",
193
+    "unicode": "\ue6a1"
194
+  },
195
+  {
196
+    "font_class": "fire-filled",
197
+    "unicode": "\ue6c5"
198
+  },
199
+  {
200
+    "font_class": "flag",
201
+    "unicode": "\ue65f"
202
+  },
203
+  {
204
+    "font_class": "flag-filled",
205
+    "unicode": "\ue660"
206
+  },
207
+  {
208
+    "font_class": "folder-add",
209
+    "unicode": "\ue6a9"
210
+  },
211
+  {
212
+    "font_class": "folder-add-filled",
213
+    "unicode": "\ue6c8"
214
+  },
215
+  {
216
+    "font_class": "font",
217
+    "unicode": "\ue6a3"
218
+  },
219
+  {
220
+    "font_class": "forward",
221
+    "unicode": "\ue6ba"
222
+  },
223
+  {
224
+    "font_class": "gear",
225
+    "unicode": "\ue664"
226
+  },
227
+  {
228
+    "font_class": "gear-filled",
229
+    "unicode": "\ue661"
230
+  },
231
+  {
232
+    "font_class": "gift",
233
+    "unicode": "\ue6a4"
234
+  },
235
+  {
236
+    "font_class": "gift-filled",
237
+    "unicode": "\ue6c4"
238
+  },
239
+  {
240
+    "font_class": "hand-down",
241
+    "unicode": "\ue63d"
242
+  },
243
+  {
244
+    "font_class": "hand-down-filled",
245
+    "unicode": "\ue63c"
246
+  },
247
+  {
248
+    "font_class": "hand-up",
249
+    "unicode": "\ue63f"
250
+  },
251
+  {
252
+    "font_class": "hand-up-filled",
253
+    "unicode": "\ue63e"
254
+  },
255
+  {
256
+    "font_class": "headphones",
257
+    "unicode": "\ue630"
258
+  },
259
+  {
260
+    "font_class": "heart",
261
+    "unicode": "\ue639"
262
+  },
263
+  {
264
+    "font_class": "heart-filled",
265
+    "unicode": "\ue641"
266
+  },
267
+  {
268
+    "font_class": "help",
269
+    "unicode": "\ue679"
270
+  },
271
+  {
272
+    "font_class": "help-filled",
273
+    "unicode": "\ue674"
274
+  },
275
+  {
276
+    "font_class": "home",
277
+    "unicode": "\ue662"
278
+  },
279
+  {
280
+    "font_class": "home-filled",
281
+    "unicode": "\ue663"
282
+  },
283
+  {
284
+    "font_class": "image",
285
+    "unicode": "\ue670"
286
+  },
287
+  {
288
+    "font_class": "image-filled",
289
+    "unicode": "\ue678"
290
+  },
291
+  {
292
+    "font_class": "images",
293
+    "unicode": "\ue650"
294
+  },
295
+  {
296
+    "font_class": "images-filled",
297
+    "unicode": "\ue64b"
298
+  },
299
+  {
300
+    "font_class": "info",
301
+    "unicode": "\ue669"
302
+  },
303
+  {
304
+    "font_class": "info-filled",
305
+    "unicode": "\ue649"
306
+  },
307
+  {
308
+    "font_class": "left",
309
+    "unicode": "\ue6b7"
310
+  },
311
+  {
312
+    "font_class": "link",
313
+    "unicode": "\ue6a5"
314
+  },
315
+  {
316
+    "font_class": "list",
317
+    "unicode": "\ue644"
318
+  },
319
+  {
320
+    "font_class": "location",
321
+    "unicode": "\ue6ae"
322
+  },
323
+  {
324
+    "font_class": "location-filled",
325
+    "unicode": "\ue6af"
326
+  },
327
+  {
328
+    "font_class": "locked",
329
+    "unicode": "\ue66b"
330
+  },
331
+  {
332
+    "font_class": "locked-filled",
333
+    "unicode": "\ue668"
334
+  },
335
+  {
336
+    "font_class": "loop",
337
+    "unicode": "\ue633"
338
+  },
339
+  {
340
+    "font_class": "mail-open",
341
+    "unicode": "\ue643"
342
+  },
343
+  {
344
+    "font_class": "mail-open-filled",
345
+    "unicode": "\ue63a"
346
+  },
347
+  {
348
+    "font_class": "map",
349
+    "unicode": "\ue667"
350
+  },
351
+  {
352
+    "font_class": "map-filled",
353
+    "unicode": "\ue666"
354
+  },
355
+  {
356
+    "font_class": "map-pin",
357
+    "unicode": "\ue6ad"
358
+  },
359
+  {
360
+    "font_class": "map-pin-ellipse",
361
+    "unicode": "\ue6ac"
362
+  },
363
+  {
364
+    "font_class": "medal",
365
+    "unicode": "\ue6a2"
366
+  },
367
+  {
368
+    "font_class": "medal-filled",
369
+    "unicode": "\ue6c3"
370
+  },
371
+  {
372
+    "font_class": "mic",
373
+    "unicode": "\ue671"
374
+  },
375
+  {
376
+    "font_class": "mic-filled",
377
+    "unicode": "\ue677"
378
+  },
379
+  {
380
+    "font_class": "micoff",
381
+    "unicode": "\ue67e"
382
+  },
383
+  {
384
+    "font_class": "micoff-filled",
385
+    "unicode": "\ue6b0"
386
+  },
387
+  {
388
+    "font_class": "minus",
389
+    "unicode": "\ue66f"
390
+  },
391
+  {
392
+    "font_class": "minus-filled",
393
+    "unicode": "\ue67d"
394
+  },
395
+  {
396
+    "font_class": "more",
397
+    "unicode": "\ue64d"
398
+  },
399
+  {
400
+    "font_class": "more-filled",
401
+    "unicode": "\ue64e"
402
+  },
403
+  {
404
+    "font_class": "navigate",
405
+    "unicode": "\ue66e"
406
+  },
407
+  {
408
+    "font_class": "navigate-filled",
409
+    "unicode": "\ue67a"
410
+  },
411
+  {
412
+    "font_class": "notification",
413
+    "unicode": "\ue6a6"
414
+  },
415
+  {
416
+    "font_class": "notification-filled",
417
+    "unicode": "\ue6c1"
418
+  },
419
+  {
420
+    "font_class": "paperclip",
421
+    "unicode": "\ue652"
422
+  },
423
+  {
424
+    "font_class": "paperplane",
425
+    "unicode": "\ue672"
426
+  },
427
+  {
428
+    "font_class": "paperplane-filled",
429
+    "unicode": "\ue675"
430
+  },
431
+  {
432
+    "font_class": "person",
433
+    "unicode": "\ue699"
434
+  },
435
+  {
436
+    "font_class": "person-filled",
437
+    "unicode": "\ue69d"
438
+  },
439
+  {
440
+    "font_class": "personadd",
441
+    "unicode": "\ue69f"
442
+  },
443
+  {
444
+    "font_class": "personadd-filled",
445
+    "unicode": "\ue698"
446
+  },
447
+  {
448
+    "font_class": "personadd-filled-copy",
449
+    "unicode": "\ue6d1"
450
+  },
451
+  {
452
+    "font_class": "phone",
453
+    "unicode": "\ue69c"
454
+  },
455
+  {
456
+    "font_class": "phone-filled",
457
+    "unicode": "\ue69b"
458
+  },
459
+  {
460
+    "font_class": "plus",
461
+    "unicode": "\ue676"
462
+  },
463
+  {
464
+    "font_class": "plus-filled",
465
+    "unicode": "\ue6c7"
466
+  },
467
+  {
468
+    "font_class": "plusempty",
469
+    "unicode": "\ue67b"
470
+  },
471
+  {
472
+    "font_class": "pulldown",
473
+    "unicode": "\ue632"
474
+  },
475
+  {
476
+    "font_class": "pyq",
477
+    "unicode": "\ue682"
478
+  },
479
+  {
480
+    "font_class": "qq",
481
+    "unicode": "\ue680"
482
+  },
483
+  {
484
+    "font_class": "redo",
485
+    "unicode": "\ue64a"
486
+  },
487
+  {
488
+    "font_class": "redo-filled",
489
+    "unicode": "\ue655"
490
+  },
491
+  {
492
+    "font_class": "refresh",
493
+    "unicode": "\ue657"
494
+  },
495
+  {
496
+    "font_class": "refresh-filled",
497
+    "unicode": "\ue656"
498
+  },
499
+  {
500
+    "font_class": "refreshempty",
501
+    "unicode": "\ue6bf"
502
+  },
503
+  {
504
+    "font_class": "reload",
505
+    "unicode": "\ue6b2"
506
+  },
507
+  {
508
+    "font_class": "right",
509
+    "unicode": "\ue6b5"
510
+  },
511
+  {
512
+    "font_class": "scan",
513
+    "unicode": "\ue62a"
514
+  },
515
+  {
516
+    "font_class": "search",
517
+    "unicode": "\ue654"
518
+  },
519
+  {
520
+    "font_class": "settings",
521
+    "unicode": "\ue653"
522
+  },
523
+  {
524
+    "font_class": "settings-filled",
525
+    "unicode": "\ue6ce"
526
+  },
527
+  {
528
+    "font_class": "shop",
529
+    "unicode": "\ue62f"
530
+  },
531
+  {
532
+    "font_class": "shop-filled",
533
+    "unicode": "\ue6cd"
534
+  },
535
+  {
536
+    "font_class": "smallcircle",
537
+    "unicode": "\ue67c"
538
+  },
539
+  {
540
+    "font_class": "smallcircle-filled",
541
+    "unicode": "\ue665"
542
+  },
543
+  {
544
+    "font_class": "sound",
545
+    "unicode": "\ue684"
546
+  },
547
+  {
548
+    "font_class": "sound-filled",
549
+    "unicode": "\ue686"
550
+  },
551
+  {
552
+    "font_class": "spinner-cycle",
553
+    "unicode": "\ue68a"
554
+  },
555
+  {
556
+    "font_class": "staff",
557
+    "unicode": "\ue6a7"
558
+  },
559
+  {
560
+    "font_class": "staff-filled",
561
+    "unicode": "\ue6cb"
562
+  },
563
+  {
564
+    "font_class": "star",
565
+    "unicode": "\ue688"
566
+  },
567
+  {
568
+    "font_class": "star-filled",
569
+    "unicode": "\ue68f"
570
+  },
571
+  {
572
+    "font_class": "starhalf",
573
+    "unicode": "\ue683"
574
+  },
575
+  {
576
+    "font_class": "trash",
577
+    "unicode": "\ue687"
578
+  },
579
+  {
580
+    "font_class": "trash-filled",
581
+    "unicode": "\ue685"
582
+  },
583
+  {
584
+    "font_class": "tune",
585
+    "unicode": "\ue6aa"
586
+  },
587
+  {
588
+    "font_class": "tune-filled",
589
+    "unicode": "\ue6ca"
590
+  },
591
+  {
592
+    "font_class": "undo",
593
+    "unicode": "\ue64f"
594
+  },
595
+  {
596
+    "font_class": "undo-filled",
597
+    "unicode": "\ue64c"
598
+  },
599
+  {
600
+    "font_class": "up",
601
+    "unicode": "\ue6b6"
602
+  },
603
+	{
604
+	  "font_class": "top",
605
+	  "unicode": "\ue6b6"
606
+	},
607
+  {
608
+    "font_class": "upload",
609
+    "unicode": "\ue690"
610
+  },
611
+  {
612
+    "font_class": "upload-filled",
613
+    "unicode": "\ue68e"
614
+  },
615
+  {
616
+    "font_class": "videocam",
617
+    "unicode": "\ue68c"
618
+  },
619
+  {
620
+    "font_class": "videocam-filled",
621
+    "unicode": "\ue689"
622
+  },
623
+  {
624
+    "font_class": "vip",
625
+    "unicode": "\ue6a8"
626
+  },
627
+  {
628
+    "font_class": "vip-filled",
629
+    "unicode": "\ue6c6"
630
+  },
631
+  {
632
+    "font_class": "wallet",
633
+    "unicode": "\ue6b1"
634
+  },
635
+  {
636
+    "font_class": "wallet-filled",
637
+    "unicode": "\ue6c2"
638
+  },
639
+  {
640
+    "font_class": "weibo",
641
+    "unicode": "\ue68b"
642
+  },
643
+  {
644
+    "font_class": "weixin",
645
+    "unicode": "\ue691"
646
+  }
647
+]
648
+
649
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 88 - 0
uni_modules/uni-icons/package.json

@@ -0,0 +1,88 @@
1
+{
2
+  "id": "uni-icons",
3
+  "displayName": "uni-icons 图标",
4
+  "version": "2.0.9",
5
+  "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "uniui",
9
+    "icon",
10
+    "图标"
11
+],
12
+  "repository": "https://github.com/dcloudio/uni-ui",
13
+  "engines": {
14
+    "HBuilderX": "^3.2.14"
15
+  },
16
+  "directories": {
17
+    "example": "../../temps/example_temps"
18
+  },
19
+"dcloudext": {
20
+    "sale": {
21
+      "regular": {
22
+        "price": "0.00"
23
+      },
24
+      "sourcecode": {
25
+        "price": "0.00"
26
+      }
27
+    },
28
+    "contact": {
29
+      "qq": ""
30
+    },
31
+    "declaration": {
32
+      "ads": "无",
33
+      "data": "无",
34
+      "permissions": "无"
35
+    },
36
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37
+    "type": "component-vue"
38
+  },
39
+  "uni_modules": {
40
+    "dependencies": ["uni-scss"],
41
+    "encrypt": [],
42
+    "platforms": {
43
+      "cloud": {
44
+        "tcb": "y",
45
+        "aliyun": "y"
46
+      },
47
+      "client": {
48
+        "App": {
49
+          "app-vue": "y",
50
+          "app-nvue": "y",
51
+          "app-uvue": "y"
52
+        },
53
+        "H5-mobile": {
54
+          "Safari": "y",
55
+          "Android Browser": "y",
56
+          "微信浏览器(Android)": "y",
57
+          "QQ浏览器(Android)": "y"
58
+        },
59
+        "H5-pc": {
60
+          "Chrome": "y",
61
+          "IE": "y",
62
+          "Edge": "y",
63
+          "Firefox": "y",
64
+          "Safari": "y"
65
+        },
66
+        "小程序": {
67
+          "微信": "y",
68
+          "阿里": "y",
69
+          "百度": "y",
70
+          "字节跳动": "y",
71
+          "QQ": "y",
72
+					"钉钉": "y",
73
+					"快手": "y",
74
+					"飞书": "y",
75
+					"京东": "y"
76
+        },
77
+        "快应用": {
78
+          "华为": "y",
79
+          "联盟": "y"
80
+        },
81
+        "Vue": {
82
+            "vue2": "y",
83
+            "vue3": "y"
84
+        }
85
+      }
86
+    }
87
+  }
88
+}

+ 8 - 0
uni_modules/uni-icons/readme.md

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

+ 90 - 0
uni_modules/uni-popup/changelog.md

@@ -0,0 +1,90 @@
1
+## 1.9.6(2025-01-08)
2
+- 修复 示例中过期图片地址
3
+## 1.9.5(2024-10-15)
4
+- 修复 微信小程序中的getSystemInfo警告
5
+## 1.9.2(2024-09-21)
6
+- 修复 uni-popup在android上的重复点击弹出位置不正确的bug
7
+## 1.9.1(2024-04-02)
8
+- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
9
+## 1.9.0(2024-03-28)
10
+- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
11
+## 1.8.9(2024-03-20)
12
+- 修复 uni-popup-dialog 数据输入时修正为双向绑定
13
+## 1.8.8(2024-02-20)
14
+- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
15
+## 1.8.7(2024-02-02)
16
+- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
17
+## 1.8.6(2024-01-30)
18
+- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
19
+## 1.8.5(2024-01-26)
20
+- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
21
+## 1.8.4(2023-11-15)
22
+- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
23
+## 1.8.3(2023-04-17)
24
+- 修复 uni-popup 重复打开时的 bug
25
+## 1.8.2(2023-02-02)
26
+- uni-popup-dialog 组件新增 inputType 属性
27
+## 1.8.1(2022-12-01)
28
+- 修复 nvue 下 v-show 报错
29
+## 1.8.0(2022-11-29)
30
+- 优化 主题样式
31
+## 1.7.9(2022-04-02)
32
+- 修复 弹出层内部无法滚动的bug
33
+## 1.7.8(2022-03-28)
34
+- 修复 小程序中高度错误的bug
35
+## 1.7.7(2022-03-17)
36
+- 修复 快速调用open出现问题的Bug
37
+## 1.7.6(2022-02-14)
38
+- 修复 safeArea 属性不能设置为false的bug
39
+## 1.7.5(2022-01-19)
40
+- 修复 isMaskClick 失效的bug
41
+## 1.7.4(2022-01-19)
42
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
43
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
44
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
45
+## 1.7.3(2022-01-13)
46
+- 修复 设置 safeArea 属性不生效的bug
47
+## 1.7.2(2021-11-26)
48
+- 优化 组件示例
49
+## 1.7.1(2021-11-26)
50
+- 修复 vuedoc 文字错误
51
+## 1.7.0(2021-11-19)
52
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
53
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
54
+## 1.6.2(2021-08-24)
55
+- 新增 支持国际化
56
+## 1.6.1(2021-07-30)
57
+- 优化 vue3下事件警告的问题
58
+## 1.6.0(2021-07-13)
59
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
60
+## 1.5.0(2021-06-23)
61
+- 新增 mask-click 遮罩层点击事件
62
+## 1.4.5(2021-06-22)
63
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
64
+## 1.4.4(2021-06-18)
65
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
66
+## 1.4.3(2021-06-08)
67
+- 修复 错误的 watch 字段
68
+- 修复 safeArea 属性不生效的问题
69
+- 修复 点击内容,再点击遮罩无法关闭的Bug
70
+## 1.4.2(2021-05-12)
71
+- 新增 组件示例地址
72
+## 1.4.1(2021-04-29)
73
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
74
+## 1.4.0 (2021-04-29)
75
+- 新增 type 属性的 left\right 值,支持左右弹出
76
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
77
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
78
+- 新增 safeArea 属性,是否适配底部安全区
79
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
80
+- 修复 App 端弹出等待的Bug
81
+- 优化 提升低配设备性能,优化动画卡顿问题
82
+- 优化 更简单的组件自定义方式
83
+## 1.2.9(2021-02-05)
84
+- 优化 组件引用关系,通过uni_modules引用组件
85
+## 1.2.8(2021-02-05)
86
+- 调整为uni_modules目录规范
87
+## 1.2.7(2021-02-05)
88
+- 调整为uni_modules目录规范
89
+- 新增 支持 PC 端
90
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端

+ 45 - 0
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js

@@ -0,0 +1,45 @@
1
+// #ifdef H5
2
+export default {
3
+  name: 'Keypress',
4
+  props: {
5
+    disable: {
6
+      type: Boolean,
7
+      default: false
8
+    }
9
+  },
10
+  mounted () {
11
+    const keyNames = {
12
+      esc: ['Esc', 'Escape'],
13
+      tab: 'Tab',
14
+      enter: 'Enter',
15
+      space: [' ', 'Spacebar'],
16
+      up: ['Up', 'ArrowUp'],
17
+      left: ['Left', 'ArrowLeft'],
18
+      right: ['Right', 'ArrowRight'],
19
+      down: ['Down', 'ArrowDown'],
20
+      delete: ['Backspace', 'Delete', 'Del']
21
+    }
22
+    const listener = ($event) => {
23
+      if (this.disable) {
24
+        return
25
+      }
26
+      const keyName = Object.keys(keyNames).find(key => {
27
+        const keyName = $event.key
28
+        const value = keyNames[key]
29
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
30
+      })
31
+      if (keyName) {
32
+        // 避免和其他按键事件冲突
33
+        setTimeout(() => {
34
+          this.$emit(keyName, {})
35
+        }, 0)
36
+      }
37
+    }
38
+    document.addEventListener('keyup', listener)
39
+    this.$once('hook:beforeDestroy', () => {
40
+      document.removeEventListener('keyup', listener)
41
+    })
42
+  },
43
+	render: () => {}
44
+}
45
+// #endif

+ 316 - 0
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -0,0 +1,316 @@
1
+<template>
2
+	<view class="uni-popup-dialog">
3
+		<view class="uni-dialog-title">
4
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
5
+		</view>
6
+		<view v-if="mode === 'base'" class="uni-dialog-content">
7
+			<slot>
8
+				<text class="uni-dialog-content-text">{{content}}</text>
9
+			</slot>
10
+		</view>
11
+		<view v-else class="uni-dialog-content">
12
+			<slot>
13
+				<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
14
+					:placeholder="placeholderText" :focus="focus">
15
+			</slot>
16
+		</view>
17
+		<view class="uni-dialog-button-group">
18
+			<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
19
+				<text class="uni-dialog-button-text">{{closeText}}</text>
20
+			</view>
21
+			<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
22
+				<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
23
+			</view>
24
+		</view>
25
+
26
+	</view>
27
+</template>
28
+
29
+<script>
30
+	import popup from '../uni-popup/popup.js'
31
+	import {
32
+		initVueI18n
33
+	} from '@dcloudio/uni-i18n'
34
+	import messages from '../uni-popup/i18n/index.js'
35
+	const {
36
+		t
37
+	} = initVueI18n(messages)
38
+	/**
39
+	 * PopUp 弹出层-对话框样式
40
+	 * @description 弹出层-对话框样式
41
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
42
+	 * @property {String} value input 模式下的默认值
43
+	 * @property {String} placeholder input 模式下输入提示
44
+	 * @property {Boolean} focus input模式下是否自动聚焦,默认为true
45
+	 * @property {String} type = [success|warning|info|error] 主题样式
46
+	 *  @value success 成功
47
+	 * 	@value warning 提示
48
+	 * 	@value info 消息
49
+	 * 	@value error 错误
50
+	 * @property {String} mode = [base|input] 模式、
51
+	 * 	@value base 基础对话框
52
+	 * 	@value input 可输入对话框
53
+	 * @showClose {Boolean} 是否显示关闭按钮
54
+	 * @property {String} content 对话框内容
55
+	 * @property {Boolean} beforeClose 是否拦截取消事件
56
+	 * @property {Number} maxlength 输入
57
+	 * @event {Function} confirm 点击确认按钮触发
58
+	 * @event {Function} close 点击取消按钮触发
59
+	 */
60
+
61
+	export default {
62
+		name: "uniPopupDialog",
63
+		mixins: [popup],
64
+		emits: ['confirm', 'close', 'update:modelValue', 'input'],
65
+		props: {
66
+			inputType: {
67
+				type: String,
68
+				default: 'text'
69
+			},
70
+			showClose: {
71
+				type: Boolean,
72
+				default: true
73
+			},
74
+			// #ifdef VUE2
75
+			value: {
76
+				type: [String, Number],
77
+				default: ''
78
+			},
79
+			// #endif
80
+			// #ifdef VUE3
81
+			modelValue: {
82
+				type: [Number, String],
83
+				default: ''
84
+			},
85
+			// #endif
86
+
87
+
88
+			placeholder: {
89
+				type: [String, Number],
90
+				default: ''
91
+			},
92
+			type: {
93
+				type: String,
94
+				default: 'error'
95
+			},
96
+			mode: {
97
+				type: String,
98
+				default: 'base'
99
+			},
100
+			title: {
101
+				type: String,
102
+				default: ''
103
+			},
104
+			content: {
105
+				type: String,
106
+				default: ''
107
+			},
108
+			beforeClose: {
109
+				type: Boolean,
110
+				default: false
111
+			},
112
+			cancelText: {
113
+				type: String,
114
+				default: ''
115
+			},
116
+			confirmText: {
117
+				type: String,
118
+				default: ''
119
+			},
120
+			maxlength: {
121
+				type: Number,
122
+				default: -1,
123
+			},
124
+			focus: {
125
+				type: Boolean,
126
+				default: true,
127
+			}
128
+		},
129
+		data() {
130
+			return {
131
+				dialogType: 'error',
132
+				val: ""
133
+			}
134
+		},
135
+		computed: {
136
+			okText() {
137
+				return this.confirmText || t("uni-popup.ok")
138
+			},
139
+			closeText() {
140
+				return this.cancelText || t("uni-popup.cancel")
141
+			},
142
+			placeholderText() {
143
+				return this.placeholder || t("uni-popup.placeholder")
144
+			},
145
+			titleText() {
146
+				return this.title || t("uni-popup.title")
147
+			}
148
+		},
149
+		watch: {
150
+			type(val) {
151
+				this.dialogType = val
152
+			},
153
+			mode(val) {
154
+				if (val === 'input') {
155
+					this.dialogType = 'info'
156
+				}
157
+			},
158
+			value(val) {
159
+				if (this.maxlength != -1 && this.mode === 'input') {
160
+					this.val = val.slice(0, this.maxlength);
161
+				} else {
162
+					this.val = val
163
+				}
164
+			},
165
+			val(val) {
166
+				// #ifdef VUE2
167
+				// TODO 兼容 vue2
168
+				this.$emit('input', val);
169
+				// #endif
170
+				// #ifdef VUE3
171
+				// TODO 兼容 vue3
172
+				this.$emit('update:modelValue', val);
173
+				// #endif
174
+			}
175
+		},
176
+		created() {
177
+			// 对话框遮罩不可点击
178
+			this.popup.disableMask()
179
+			// this.popup.closeMask()
180
+			if (this.mode === 'input') {
181
+				this.dialogType = 'info'
182
+				this.val = this.value;
183
+				// #ifdef VUE3
184
+				this.val = this.modelValue;
185
+				// #endif
186
+			} else {
187
+				this.dialogType = this.type
188
+			}
189
+		},
190
+		methods: {
191
+			/**
192
+			 * 点击确认按钮
193
+			 */
194
+			onOk() {
195
+				if (this.mode === 'input') {
196
+					this.$emit('confirm', this.val)
197
+				} else {
198
+					this.$emit('confirm')
199
+				}
200
+				if (this.beforeClose) return
201
+				this.popup.close()
202
+			},
203
+			/**
204
+			 * 点击取消按钮
205
+			 */
206
+			closeDialog() {
207
+				this.$emit('close')
208
+				if (this.beforeClose) return
209
+				this.popup.close()
210
+			},
211
+			close() {
212
+				this.popup.close()
213
+			}
214
+		}
215
+	}
216
+</script>
217
+
218
+<style lang="scss">
219
+	.uni-popup-dialog {
220
+		width: 300px;
221
+		border-radius: 11px;
222
+		background-color: #fff;
223
+	}
224
+
225
+	.uni-dialog-title {
226
+		/* #ifndef APP-NVUE */
227
+		display: flex;
228
+		/* #endif */
229
+		flex-direction: row;
230
+		justify-content: center;
231
+		padding-top: 25px;
232
+	}
233
+
234
+	.uni-dialog-title-text {
235
+		font-size: 16px;
236
+		font-weight: 500;
237
+	}
238
+
239
+	.uni-dialog-content {
240
+		/* #ifndef APP-NVUE */
241
+		display: flex;
242
+		/* #endif */
243
+		flex-direction: row;
244
+		justify-content: center;
245
+		align-items: center;
246
+		padding: 20px;
247
+	}
248
+
249
+	.uni-dialog-content-text {
250
+		font-size: 14px;
251
+		color: #6C6C6C;
252
+	}
253
+
254
+	.uni-dialog-button-group {
255
+		/* #ifndef APP-NVUE */
256
+		display: flex;
257
+		/* #endif */
258
+		flex-direction: row;
259
+		border-top-color: #f5f5f5;
260
+		border-top-style: solid;
261
+		border-top-width: 1px;
262
+	}
263
+
264
+	.uni-dialog-button {
265
+		/* #ifndef APP-NVUE */
266
+		display: flex;
267
+		/* #endif */
268
+
269
+		flex: 1;
270
+		flex-direction: row;
271
+		justify-content: center;
272
+		align-items: center;
273
+		height: 45px;
274
+	}
275
+
276
+	.uni-border-left {
277
+		border-left-color: #f0f0f0;
278
+		border-left-style: solid;
279
+		border-left-width: 1px;
280
+	}
281
+
282
+	.uni-dialog-button-text {
283
+		font-size: 16px;
284
+		color: #333;
285
+	}
286
+
287
+	.uni-button-color {
288
+		color: #007aff;
289
+	}
290
+
291
+	.uni-dialog-input {
292
+		flex: 1;
293
+		font-size: 14px;
294
+		border: 1px #eee solid;
295
+		height: 40px;
296
+		padding: 0 10px;
297
+		border-radius: 5px;
298
+		color: #555;
299
+	}
300
+
301
+	.uni-popup__success {
302
+		color: #4cd964;
303
+	}
304
+
305
+	.uni-popup__warn {
306
+		color: #f0ad4e;
307
+	}
308
+
309
+	.uni-popup__error {
310
+		color: #dd524d;
311
+	}
312
+
313
+	.uni-popup__info {
314
+		color: #909399;
315
+	}
316
+</style>

+ 143 - 0
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -0,0 +1,143 @@
1
+<template>
2
+	<view class="uni-popup-message">
3
+		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
4
+			<slot>
5
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
6
+			</slot>
7
+		</view>
8
+	</view>
9
+</template>
10
+
11
+<script>
12
+	import popup from '../uni-popup/popup.js'
13
+	/**
14
+	 * PopUp 弹出层-消息提示
15
+	 * @description 弹出层-消息提示
16
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
17
+	 * @property {String} type = [success|warning|info|error] 主题样式
18
+	 *  @value success 成功
19
+	 * 	@value warning 提示
20
+	 * 	@value info 消息
21
+	 * 	@value error 错误
22
+	 * @property {String} message 消息提示文字
23
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
24
+	 */
25
+
26
+	export default {
27
+		name: 'uniPopupMessage',
28
+		mixins:[popup],
29
+		props: {
30
+			/**
31
+			 * 主题 success/warning/info/error	  默认 success
32
+			 */
33
+			type: {
34
+				type: String,
35
+				default: 'success'
36
+			},
37
+			/**
38
+			 * 消息文字
39
+			 */
40
+			message: {
41
+				type: String,
42
+				default: ''
43
+			},
44
+			/**
45
+			 * 显示时间,设置为 0 则不会自动关闭
46
+			 */
47
+			duration: {
48
+				type: Number,
49
+				default: 3000
50
+			},
51
+			maskShow:{
52
+				type:Boolean,
53
+				default:false
54
+			}
55
+		},
56
+		data() {
57
+			return {}
58
+		},
59
+		created() {
60
+			this.popup.maskShow = this.maskShow
61
+			this.popup.messageChild = this
62
+		},
63
+		methods: {
64
+			timerClose(){
65
+				if(this.duration === 0) return
66
+				clearTimeout(this.timer) 
67
+				this.timer = setTimeout(()=>{
68
+					this.popup.close()
69
+				},this.duration)
70
+			}
71
+		}
72
+	}
73
+</script>
74
+<style lang="scss" >
75
+	.uni-popup-message {
76
+		/* #ifndef APP-NVUE */
77
+		display: flex;
78
+		/* #endif */
79
+		flex-direction: row;
80
+		justify-content: center;
81
+	}
82
+
83
+	.uni-popup-message__box {
84
+		background-color: #e1f3d8;
85
+		padding: 10px 15px;
86
+		border-color: #eee;
87
+		border-style: solid;
88
+		border-width: 1px;
89
+		flex: 1;
90
+	}
91
+
92
+	@media screen and (min-width: 500px) {
93
+		.fixforpc-width {
94
+			margin-top: 20px;
95
+			border-radius: 4px;
96
+			flex: none;
97
+			min-width: 380px;
98
+			/* #ifndef APP-NVUE */
99
+			max-width: 50%;
100
+			/* #endif */
101
+			/* #ifdef APP-NVUE */
102
+			max-width: 500px;
103
+			/* #endif */
104
+		}
105
+	}
106
+
107
+	.uni-popup-message-text {
108
+		font-size: 14px;
109
+		padding: 0;
110
+	}
111
+
112
+	.uni-popup__success {
113
+		background-color: #e1f3d8;
114
+	}
115
+
116
+	.uni-popup__success-text {
117
+		color: #67C23A;
118
+	}
119
+
120
+	.uni-popup__warn {
121
+		background-color: #faecd8;
122
+	}
123
+
124
+	.uni-popup__warn-text {
125
+		color: #E6A23C;
126
+	}
127
+
128
+	.uni-popup__error {
129
+		background-color: #fde2e2;
130
+	}
131
+
132
+	.uni-popup__error-text {
133
+		color: #F56C6C;
134
+	}
135
+
136
+	.uni-popup__info {
137
+		background-color: #F2F6FC;
138
+	}
139
+
140
+	.uni-popup__info-text {
141
+		color: #909399;
142
+	}
143
+</style>

+ 188 - 0
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue

@@ -0,0 +1,188 @@
1
+<template>
2
+	<view class="uni-popup-share">
3
+		<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
4
+		<view class="uni-share-content">
5
+			<view class="uni-share-content-box">
6
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
7
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
8
+					<text class="uni-share-text">{{item.text}}</text>
9
+				</view>
10
+
11
+			</view>
12
+		</view>
13
+		<view class="uni-share-button-box">
14
+			<button class="uni-share-button" @click="close">{{cancelText}}</button>
15
+		</view>
16
+	</view>
17
+</template>
18
+
19
+<script>
20
+	import popup from '../uni-popup/popup.js'
21
+	import {
22
+	initVueI18n
23
+	} from '@dcloudio/uni-i18n'
24
+	import messages from '../uni-popup/i18n/index.js'
25
+	const {	t	} = initVueI18n(messages)
26
+	export default {
27
+		name: 'UniPopupShare',
28
+		mixins:[popup],
29
+		emits:['select'],
30
+		props: {
31
+			title: {
32
+				type: String,
33
+				default: ''
34
+			},
35
+			beforeClose: {
36
+				type: Boolean,
37
+				default: false
38
+			}
39
+		},
40
+		data() {
41
+			return {
42
+				// TODO 替换为自己的图标
43
+				bottomData: [{
44
+						text: '微信',
45
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
46
+						name: 'wx'
47
+					},
48
+					{
49
+						text: '支付宝',
50
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
51
+						name: 'ali'
52
+					},
53
+					{
54
+						text: 'QQ',
55
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
56
+						name: 'qq'
57
+					},
58
+					{
59
+						text: '新浪',
60
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
61
+						name: 'sina'
62
+					},
63
+					// {
64
+					// 	text: '百度',
65
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
66
+					// 	name: 'copy'
67
+					// },
68
+					// {
69
+					// 	text: '其他',
70
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
71
+					// 	name: 'more'
72
+					// }
73
+				]
74
+			}
75
+		},
76
+		created() {},
77
+		computed: {
78
+			cancelText() {
79
+				return t("uni-popup.cancel")
80
+			},
81
+		shareTitleText() {
82
+				return this.title || t("uni-popup.shareTitle")
83
+			}
84
+		},
85
+		methods: {
86
+			/**
87
+			 * 选择内容
88
+			 */
89
+			select(item, index) {
90
+				this.$emit('select', {
91
+					item,
92
+					index
93
+				})
94
+				this.close()
95
+
96
+			},
97
+			/**
98
+			 * 关闭窗口
99
+			 */
100
+			close() {
101
+				if(this.beforeClose) return
102
+				this.popup.close()
103
+			}
104
+		}
105
+	}
106
+</script>
107
+<style lang="scss" >
108
+	.uni-popup-share {
109
+		background-color: #fff;
110
+		border-top-left-radius: 11px;
111
+		border-top-right-radius: 11px;
112
+	}
113
+	.uni-share-title {
114
+		/* #ifndef APP-NVUE */
115
+		display: flex;
116
+		/* #endif */
117
+		flex-direction: row;
118
+		align-items: center;
119
+		justify-content: center;
120
+		height: 40px;
121
+	}
122
+	.uni-share-title-text {
123
+		font-size: 14px;
124
+		color: #666;
125
+	}
126
+	.uni-share-content {
127
+		/* #ifndef APP-NVUE */
128
+		display: flex;
129
+		/* #endif */
130
+		flex-direction: row;
131
+		justify-content: center;
132
+		padding-top: 10px;
133
+	}
134
+
135
+	.uni-share-content-box {
136
+		/* #ifndef APP-NVUE */
137
+		display: flex;
138
+		/* #endif */
139
+		flex-direction: row;
140
+		flex-wrap: wrap;
141
+		width: 360px;
142
+	}
143
+
144
+	.uni-share-content-item {
145
+		width: 90px;
146
+		/* #ifndef APP-NVUE */
147
+		display: flex;
148
+		/* #endif */
149
+		flex-direction: column;
150
+		justify-content: center;
151
+		padding: 10px 0;
152
+		align-items: center;
153
+	}
154
+
155
+	.uni-share-content-item:active {
156
+		background-color: #f5f5f5;
157
+	}
158
+
159
+	.uni-share-image {
160
+		width: 30px;
161
+		height: 30px;
162
+	}
163
+
164
+	.uni-share-text {
165
+		margin-top: 10px;
166
+		font-size: 14px;
167
+		color: #3B4144;
168
+	}
169
+
170
+	.uni-share-button-box {
171
+		/* #ifndef APP-NVUE */
172
+		display: flex;
173
+		/* #endif */
174
+		flex-direction: row;
175
+		padding: 10px 15px;
176
+	}
177
+
178
+	.uni-share-button {
179
+		flex: 1;
180
+		border-radius: 50px;
181
+		color: #666;
182
+		font-size: 16px;
183
+	}
184
+
185
+	.uni-share-button::after {
186
+		border-radius: 50px;
187
+	}
188
+</style>

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -0,0 +1,7 @@
1
+{
2
+	"uni-popup.cancel": "cancel",
3
+	"uni-popup.ok": "ok",
4
+	"uni-popup.placeholder": "pleace enter",
5
+	"uni-popup.title": "Hint",
6
+	"uni-popup.shareTitle": "Share to"
7
+}

+ 8 - 0
uni_modules/uni-popup/components/uni-popup/i18n/index.js

@@ -0,0 +1,8 @@
1
+import en from './en.json'
2
+import zhHans from './zh-Hans.json'
3
+import zhHant from './zh-Hant.json'
4
+export default {
5
+	en,
6
+	'zh-Hans': zhHans,
7
+	'zh-Hant': zhHant
8
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json

@@ -0,0 +1,7 @@
1
+{
2
+	"uni-popup.cancel": "取消",
3
+	"uni-popup.ok": "确定",
4
+	"uni-popup.placeholder": "请输入",
5
+		"uni-popup.title": "提示",
6
+		"uni-popup.shareTitle": "分享到"
7
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json

@@ -0,0 +1,7 @@
1
+{
2
+	"uni-popup.cancel": "取消",
3
+	"uni-popup.ok": "確定",
4
+	"uni-popup.placeholder": "請輸入",
5
+	"uni-popup.title": "提示",
6
+	"uni-popup.shareTitle": "分享到"
7
+}

+ 45 - 0
uni_modules/uni-popup/components/uni-popup/keypress.js

@@ -0,0 +1,45 @@
1
+// #ifdef H5
2
+export default {
3
+  name: 'Keypress',
4
+  props: {
5
+    disable: {
6
+      type: Boolean,
7
+      default: false
8
+    }
9
+  },
10
+  mounted () {
11
+    const keyNames = {
12
+      esc: ['Esc', 'Escape'],
13
+      tab: 'Tab',
14
+      enter: 'Enter',
15
+      space: [' ', 'Spacebar'],
16
+      up: ['Up', 'ArrowUp'],
17
+      left: ['Left', 'ArrowLeft'],
18
+      right: ['Right', 'ArrowRight'],
19
+      down: ['Down', 'ArrowDown'],
20
+      delete: ['Backspace', 'Delete', 'Del']
21
+    }
22
+    const listener = ($event) => {
23
+      if (this.disable) {
24
+        return
25
+      }
26
+      const keyName = Object.keys(keyNames).find(key => {
27
+        const keyName = $event.key
28
+        const value = keyNames[key]
29
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
30
+      })
31
+      if (keyName) {
32
+        // 避免和其他按键事件冲突
33
+        setTimeout(() => {
34
+          this.$emit(keyName, {})
35
+        }, 0)
36
+      }
37
+    }
38
+    document.addEventListener('keyup', listener)
39
+    // this.$once('hook:beforeDestroy', () => {
40
+    //   document.removeEventListener('keyup', listener)
41
+    // })
42
+  },
43
+	render: () => {}
44
+}
45
+// #endif

+ 26 - 0
uni_modules/uni-popup/components/uni-popup/popup.js

@@ -0,0 +1,26 @@
1
+
2
+export default {
3
+	data() {
4
+		return {
5
+			
6
+		}
7
+	},
8
+	created(){
9
+		this.popup = this.getParent()
10
+	},
11
+	methods:{
12
+		/**
13
+		 * 获取父元素实例
14
+		 */
15
+		getParent(name = 'uniPopup') {
16
+			let parent = this.$parent;
17
+			let parentName = parent.$options.name;
18
+			while (parentName !== name) {
19
+				parent = parent.$parent;
20
+				if (!parent) return false
21
+				parentName = parent.$options.name;
22
+			}
23
+			return parent;
24
+		},
25
+	}
26
+}

+ 90 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue

@@ -0,0 +1,90 @@
1
+<template>
2
+  <view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
3
+    <view @click.stop>
4
+      <slot></slot>
5
+    </view>
6
+  </view>
7
+</template>
8
+
9
+<script>
10
+  type CloseCallBack = ()=> void;
11
+  let closeCallBack:CloseCallBack = () :void => {};
12
+  export default {
13
+    emits:["close","clickMask"],
14
+    data() {
15
+      return {
16
+        isShow:false,
17
+        isOpen:false
18
+      }
19
+    },
20
+    props: {
21
+      maskClick: {
22
+        type: Boolean,
23
+        default: true
24
+      },
25
+    },
26
+    watch: {
27
+      // 设置show = true 时,如果没有 open 需要设置为 open
28
+      isShow:{
29
+        handler(isShow) {
30
+          // console.log("isShow",isShow)
31
+          if(isShow && this.isOpen == false){
32
+            this.isOpen = true
33
+          }
34
+        },
35
+        immediate:true
36
+      },
37
+      // 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
38
+      isOpen:{
39
+        handler(isOpen) {
40
+          // console.log("isOpen",isOpen)
41
+          if(isOpen && this.isShow == false){
42
+            this.isShow = true
43
+          }
44
+        },
45
+        immediate:true
46
+      }
47
+    },
48
+    methods:{
49
+      open(){
50
+        // ...funs : CloseCallBack[]
51
+        // if(funs.length > 0){
52
+        //   closeCallBack = funs[0]
53
+        // }
54
+        this.isOpen = true;
55
+      },
56
+      clickMask(){
57
+        if(this.maskClick == true){
58
+          this.$emit('clickMask')
59
+          this.close()
60
+        }
61
+      },
62
+      close(): void{
63
+        this.isOpen = false;
64
+        this.$emit('close')
65
+        closeCallBack()
66
+      },
67
+      hiden(){
68
+        this.isShow = false
69
+      },
70
+      show(){
71
+        this.isShow = true
72
+      }
73
+    }
74
+  }
75
+</script>
76
+
77
+<style>
78
+.popup-root {
79
+  position: fixed;
80
+  top: 0;
81
+  left: 0;
82
+  width: 750rpx;
83
+  height: 100%;
84
+  flex: 1;
85
+  background-color: rgba(0, 0, 0, 0.3);
86
+  justify-content: center;
87
+  align-items: center;
88
+  z-index: 99;
89
+}
90
+</style>

+ 518 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -0,0 +1,518 @@
1
+<template>
2
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
3
+		<view @touchstart="touchstart">
4
+			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
5
+				:duration="duration" :show="showTrans" @click="onTap" />
6
+			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
7
+				:show="showTrans" @click="onTap">
8
+				<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
9
+					<slot />
10
+				</view>
11
+			</uni-transition>
12
+		</view>
13
+		<!-- #ifdef H5 -->
14
+		<keypress v-if="maskShow" @esc="onTap" />
15
+		<!-- #endif -->
16
+	</view>
17
+</template>
18
+
19
+<script>
20
+	// #ifdef H5
21
+	import keypress from './keypress.js'
22
+	// #endif
23
+
24
+	/**
25
+	 * PopUp 弹出层
26
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
27
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
28
+	 * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
29
+	 * 	@value top 顶部弹出
30
+	 * 	@value center 中间弹出
31
+	 * 	@value bottom 底部弹出
32
+	 * 	@value left		左侧弹出
33
+	 * 	@value right  右侧弹出
34
+	 * 	@value message 消息提示
35
+	 * 	@value dialog 对话框
36
+	 * 	@value share 底部分享示例
37
+	 * @property {Boolean} animation = [true|false] 是否开启动画
38
+	 * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
39
+	 * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
40
+	 * @property {String}  backgroundColor 主窗口背景色
41
+	 * @property {String}  maskBackgroundColor 蒙版颜色
42
+	 * @property {String}  borderRadius 设置圆角(左上、右上、右下和左下) 示例:"10px 10px 10px 10px"
43
+	 * @property {Boolean} safeArea		   是否适配底部安全区
44
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
45
+	 * @event {Function} maskClick 点击遮罩触发
46
+	 */
47
+
48
+	export default {
49
+		name: 'uniPopup',
50
+		components: {
51
+			// #ifdef H5
52
+			keypress
53
+			// #endif
54
+		},
55
+		emits: ['change', 'maskClick'],
56
+		props: {
57
+			// 开启动画
58
+			animation: {
59
+				type: Boolean,
60
+				default: true
61
+			},
62
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
63
+			// message: 消息提示 ; dialog : 对话框
64
+			type: {
65
+				type: String,
66
+				default: 'center'
67
+			},
68
+			// maskClick
69
+			isMaskClick: {
70
+				type: Boolean,
71
+				default: null
72
+			},
73
+			// TODO 2 个版本后废弃属性 ,使用 isMaskClick
74
+			maskClick: {
75
+				type: Boolean,
76
+				default: null
77
+			},
78
+			backgroundColor: {
79
+				type: String,
80
+				default: 'none'
81
+			},
82
+			safeArea: {
83
+				type: Boolean,
84
+				default: true
85
+			},
86
+			maskBackgroundColor: {
87
+				type: String,
88
+				default: 'rgba(0, 0, 0, 0.4)'
89
+			},
90
+			borderRadius:{
91
+				type: String,
92
+			}
93
+		},
94
+
95
+		watch: {
96
+			/**
97
+			 * 监听type类型
98
+			 */
99
+			type: {
100
+				handler: function(type) {
101
+					if (!this.config[type]) return
102
+					this[this.config[type]](true)
103
+				},
104
+				immediate: true
105
+			},
106
+			isDesktop: {
107
+				handler: function(newVal) {
108
+					if (!this.config[newVal]) return
109
+					this[this.config[this.type]](true)
110
+				},
111
+				immediate: true
112
+			},
113
+			/**
114
+			 * 监听遮罩是否可点击
115
+			 * @param {Object} val
116
+			 */
117
+			maskClick: {
118
+				handler: function(val) {
119
+					this.mkclick = val
120
+				},
121
+				immediate: true
122
+			},
123
+			isMaskClick: {
124
+				handler: function(val) {
125
+					this.mkclick = val
126
+				},
127
+				immediate: true
128
+			},
129
+			// H5 下禁止底部滚动
130
+			showPopup(show) {
131
+				// #ifdef H5
132
+				// fix by mehaotian 处理 h5 滚动穿透的问题
133
+				document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
134
+				// #endif
135
+			}
136
+		},
137
+		data() {
138
+			return {
139
+				duration: 300,
140
+				ani: [],
141
+				showPopup: false,
142
+				showTrans: false,
143
+				popupWidth: 0,
144
+				popupHeight: 0,
145
+				config: {
146
+					top: 'top',
147
+					bottom: 'bottom',
148
+					center: 'center',
149
+					left: 'left',
150
+					right: 'right',
151
+					message: 'top',
152
+					dialog: 'center',
153
+					share: 'bottom'
154
+				},
155
+				maskClass: {
156
+					position: 'fixed',
157
+					bottom: 0,
158
+					top: 0,
159
+					left: 0,
160
+					right: 0,
161
+					backgroundColor: 'rgba(0, 0, 0, 0.4)'
162
+				},
163
+				transClass: {
164
+					backgroundColor: 'transparent',
165
+					borderRadius: this.borderRadius || "0",
166
+					position: 'fixed',
167
+					left: 0,
168
+					right: 0
169
+				},
170
+				maskShow: true,
171
+				mkclick: true,
172
+				popupstyle: 'top'
173
+			}
174
+		},
175
+		computed: {
176
+			getStyles() {
177
+				let res = { backgroundColor: this.bg };
178
+				if (this.borderRadius || "0") {
179
+					res = Object.assign(res, { borderRadius: this.borderRadius })
180
+				}
181
+				return res;
182
+			},
183
+			isDesktop() {
184
+				return this.popupWidth >= 500 && this.popupHeight >= 500
185
+			},
186
+			bg() {
187
+				if (this.backgroundColor === '' || this.backgroundColor === 'none') {
188
+					return 'transparent'
189
+				}
190
+				return this.backgroundColor
191
+			}
192
+		},
193
+		mounted() {
194
+			const fixSize = () => {
195
+				// #ifdef MP-WEIXIN
196
+				const {
197
+					windowWidth,
198
+					windowHeight,
199
+					windowTop,
200
+					safeArea,
201
+					screenHeight,
202
+					safeAreaInsets
203
+				} = uni.getWindowInfo()
204
+				// #endif
205
+				// #ifndef MP-WEIXIN
206
+				const {
207
+					windowWidth,
208
+					windowHeight,
209
+					windowTop,
210
+					safeArea,
211
+					screenHeight,
212
+					safeAreaInsets
213
+				} = uni.getSystemInfoSync()
214
+				// #endif
215
+				this.popupWidth = windowWidth
216
+				this.popupHeight = windowHeight + (windowTop || 0)
217
+				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
218
+				if (safeArea && this.safeArea) {
219
+					// #ifdef MP-WEIXIN
220
+					this.safeAreaInsets = screenHeight - safeArea.bottom
221
+					// #endif
222
+					// #ifndef MP-WEIXIN
223
+					this.safeAreaInsets = safeAreaInsets.bottom
224
+					// #endif
225
+				} else {
226
+					this.safeAreaInsets = 0
227
+				}
228
+			}
229
+			fixSize()
230
+			// #ifdef H5
231
+			// window.addEventListener('resize', fixSize)
232
+			// this.$once('hook:beforeDestroy', () => {
233
+			// 	window.removeEventListener('resize', fixSize)
234
+			// })
235
+			// #endif
236
+		},
237
+		// #ifndef VUE3
238
+		// TODO vue2
239
+		destroyed() {
240
+			this.setH5Visible()
241
+		},
242
+		// #endif
243
+		// #ifdef VUE3
244
+		// TODO vue3
245
+		unmounted() {
246
+			this.setH5Visible()
247
+		},
248
+		// #endif
249
+		activated() {
250
+   	  this.setH5Visible(!this.showPopup);
251
+    },
252
+    deactivated() {
253
+      this.setH5Visible(true);
254
+    },
255
+		created() {
256
+			// this.mkclick =  this.isMaskClick || this.maskClick
257
+			if (this.isMaskClick === null && this.maskClick === null) {
258
+				this.mkclick = true
259
+			} else {
260
+				this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
261
+			}
262
+			if (this.animation) {
263
+				this.duration = 300
264
+			} else {
265
+				this.duration = 0
266
+			}
267
+			// TODO 处理 message 组件生命周期异常的问题
268
+			this.messageChild = null
269
+			// TODO 解决头条冒泡的问题
270
+			this.clearPropagation = false
271
+			this.maskClass.backgroundColor = this.maskBackgroundColor
272
+		},
273
+		methods: {
274
+			setH5Visible(visible = true) {
275
+				// #ifdef H5
276
+				// fix by mehaotian 处理 h5 滚动穿透的问题
277
+				document.getElementsByTagName('body')[0].style.overflow =  visible ? "visible" : "hidden";
278
+				// #endif
279
+			},
280
+			/**
281
+			 * 公用方法,不显示遮罩层
282
+			 */
283
+			closeMask() {
284
+				this.maskShow = false
285
+			},
286
+			/**
287
+			 * 公用方法,遮罩层禁止点击
288
+			 */
289
+			disableMask() {
290
+				this.mkclick = false
291
+			},
292
+			// TODO nvue 取消冒泡
293
+			clear(e) {
294
+				// #ifndef APP-NVUE
295
+				e.stopPropagation()
296
+				// #endif
297
+				this.clearPropagation = true
298
+			},
299
+
300
+			open(direction) {
301
+				// fix by mehaotian 处理快速打开关闭的情况
302
+				if (this.showPopup) {
303
+					return
304
+				}
305
+				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
306
+				if (!(direction && innerType.indexOf(direction) !== -1)) {
307
+					direction = this.type
308
+				}
309
+				if (!this.config[direction]) {
310
+					console.error('缺少类型:', direction)
311
+					return
312
+				}
313
+				this[this.config[direction]]()
314
+				this.$emit('change', {
315
+					show: true,
316
+					type: direction
317
+				})
318
+			},
319
+			close(type) {
320
+				this.showTrans = false
321
+				this.$emit('change', {
322
+					show: false,
323
+					type: this.type
324
+				})
325
+				clearTimeout(this.timer)
326
+				// // 自定义关闭事件
327
+				// this.customOpen && this.customClose()
328
+				this.timer = setTimeout(() => {
329
+					this.showPopup = false
330
+				}, 300)
331
+			},
332
+			// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
333
+			touchstart() {
334
+				this.clearPropagation = false
335
+			},
336
+
337
+			onTap() {
338
+				if (this.clearPropagation) {
339
+					// fix by mehaotian 兼容 nvue
340
+					this.clearPropagation = false
341
+					return
342
+				}
343
+				this.$emit('maskClick')
344
+				if (!this.mkclick) return
345
+				this.close()
346
+			},
347
+			/**
348
+			 * 顶部弹出样式处理
349
+			 */
350
+			top(type) {
351
+				this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
352
+				this.ani = ['slide-top']
353
+				this.transClass = {
354
+					position: 'fixed',
355
+					left: 0,
356
+					right: 0,
357
+					backgroundColor: this.bg,
358
+					borderRadius:this.borderRadius || "0"
359
+				}
360
+				// TODO 兼容 type 属性 ,后续会废弃
361
+				if (type) return
362
+				this.showPopup = true
363
+				this.showTrans = true
364
+				this.$nextTick(() => {
365
+					this.showPoptrans()
366
+					if (this.messageChild && this.type === 'message') {
367
+						this.messageChild.timerClose()
368
+					}
369
+				})
370
+			},
371
+			/**
372
+			 * 底部弹出样式处理
373
+			 */
374
+			bottom(type) {
375
+				this.popupstyle = 'bottom'
376
+				this.ani = ['slide-bottom']
377
+				this.transClass = {
378
+					position: 'fixed',
379
+					left: 0,
380
+					right: 0,
381
+					bottom: 0,
382
+					paddingBottom: this.safeAreaInsets + 'px',
383
+					backgroundColor: this.bg,
384
+					borderRadius:this.borderRadius || "0",
385
+				}
386
+				// TODO 兼容 type 属性 ,后续会废弃
387
+				if (type) return
388
+				this.showPoptrans()
389
+			},
390
+			/**
391
+			 * 中间弹出样式处理
392
+			 */
393
+			center(type) {
394
+				this.popupstyle = 'center'
395
+				//微信小程序下,组合动画会出现文字向上闪动问题,再此做特殊处理
396
+				// #ifdef MP-WEIXIN
397
+					this.ani = ['fade']
398
+				// #endif
399
+				// #ifndef MP-WEIXIN
400
+					this.ani = ['zoom-out', 'fade']
401
+				// #endif
402
+				this.transClass = {
403
+					position: 'fixed',
404
+					/* #ifndef APP-NVUE */
405
+					display: 'flex',
406
+					flexDirection: 'column',
407
+					/* #endif */
408
+					bottom: 0,
409
+					left: 0,
410
+					right: 0,
411
+					top: 0,
412
+					justifyContent: 'center',
413
+					alignItems: 'center',
414
+					borderRadius:this.borderRadius || "0"
415
+				}
416
+				// TODO 兼容 type 属性 ,后续会废弃
417
+				if (type) return
418
+				this.showPoptrans()
419
+			},
420
+			left(type) {
421
+				this.popupstyle = 'left'
422
+				this.ani = ['slide-left']
423
+				this.transClass = {
424
+					position: 'fixed',
425
+					left: 0,
426
+					bottom: 0,
427
+					top: 0,
428
+					backgroundColor: this.bg,
429
+					borderRadius:this.borderRadius || "0",
430
+					/* #ifndef APP-NVUE */
431
+					display: 'flex',
432
+					flexDirection: 'column'
433
+					/* #endif */
434
+				}
435
+				// TODO 兼容 type 属性 ,后续会废弃
436
+				if (type) return
437
+				this.showPoptrans()
438
+			},
439
+			right(type) {
440
+				this.popupstyle = 'right'
441
+				this.ani = ['slide-right']
442
+				this.transClass = {
443
+					position: 'fixed',
444
+					bottom: 0,
445
+					right: 0,
446
+					top: 0,
447
+					backgroundColor: this.bg,
448
+					borderRadius:this.borderRadius || "0",
449
+					/* #ifndef APP-NVUE */
450
+					display: 'flex',
451
+					flexDirection: 'column'
452
+					/* #endif */
453
+				}
454
+				// TODO 兼容 type 属性 ,后续会废弃
455
+				if (type) return
456
+				this.showPoptrans()
457
+			},
458
+			showPoptrans(){
459
+				this.$nextTick(()=>{
460
+					this.showPopup = true
461
+					this.showTrans = true
462
+				})
463
+			}
464
+		}
465
+	}
466
+</script>
467
+<style lang="scss">
468
+	.uni-popup {
469
+		position: fixed;
470
+		/* #ifndef APP-NVUE */
471
+		z-index: 99;
472
+
473
+		/* #endif */
474
+		&.top,
475
+		&.left,
476
+		&.right {
477
+			/* #ifdef H5 */
478
+			top: var(--window-top);
479
+			/* #endif */
480
+			/* #ifndef H5 */
481
+			top: 0;
482
+			/* #endif */
483
+		}
484
+
485
+		.uni-popup__wrapper {
486
+			/* #ifndef APP-NVUE */
487
+			display: block;
488
+			/* #endif */
489
+			position: relative;
490
+
491
+			/* iphonex 等安全区设置,底部安全区适配 */
492
+			/* #ifndef APP-NVUE */
493
+			// padding-bottom: constant(safe-area-inset-bottom);
494
+			// padding-bottom: env(safe-area-inset-bottom);
495
+			/* #endif */
496
+			&.left,
497
+			&.right {
498
+				/* #ifdef H5 */
499
+				padding-top: var(--window-top);
500
+				/* #endif */
501
+				/* #ifndef H5 */
502
+				padding-top: 0;
503
+				/* #endif */
504
+				flex: 1;
505
+			}
506
+		}
507
+	}
508
+
509
+	.fixforpc-z-index {
510
+		/* #ifndef APP-NVUE */
511
+		z-index: 999;
512
+		/* #endif */
513
+	}
514
+
515
+	.fixforpc-top {
516
+		top: 0;
517
+	}
518
+</style>

+ 90 - 0
uni_modules/uni-popup/package.json

@@ -0,0 +1,90 @@
1
+{
2
+	"id": "uni-popup",
3
+	"displayName": "uni-popup 弹出层",
4
+	"version": "1.9.6",
5
+	"description": " Popup 组件,提供常用的弹层",
6
+	"keywords": [
7
+        "uni-ui",
8
+        "弹出层",
9
+        "弹窗",
10
+        "popup",
11
+        "弹框"
12
+    ],
13
+	"repository": "https://github.com/dcloudio/uni-ui",
14
+	"engines": {
15
+		"HBuilderX": ""
16
+	},
17
+	"directories": {
18
+		"example": "../../temps/example_temps"
19
+	},
20
+    "dcloudext": {
21
+        "sale": {
22
+			"regular": {
23
+				"price": "0.00"
24
+			},
25
+			"sourcecode": {
26
+				"price": "0.00"
27
+			}
28
+		},
29
+		"contact": {
30
+			"qq": ""
31
+		},
32
+		"declaration": {
33
+			"ads": "无",
34
+			"data": "无",
35
+			"permissions": "无"
36
+		},
37
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
38
+        "type": "component-vue"
39
+	},
40
+	"uni_modules": {
41
+		"dependencies": [
42
+			"uni-scss",
43
+			"uni-transition"
44
+		],
45
+		"encrypt": [],
46
+		"platforms": {
47
+			"cloud": {
48
+				"tcb": "y",
49
+                "aliyun": "y",
50
+                "alipay": "n"
51
+			},
52
+			"client": {
53
+				"App": {
54
+                    "app-vue": "y",
55
+                    "app-nvue": "y",
56
+                    "app-harmony": "u",
57
+                    "app-uvue": "u"
58
+                },
59
+				"H5-mobile": {
60
+					"Safari": "y",
61
+					"Android Browser": "y",
62
+					"微信浏览器(Android)": "y",
63
+					"QQ浏览器(Android)": "y"
64
+				},
65
+				"H5-pc": {
66
+					"Chrome": "y",
67
+					"IE": "y",
68
+					"Edge": "y",
69
+					"Firefox": "y",
70
+					"Safari": "y"
71
+				},
72
+				"小程序": {
73
+					"微信": "y",
74
+					"阿里": "y",
75
+					"百度": "y",
76
+					"字节跳动": "y",
77
+					"QQ": "y"
78
+				},
79
+				"快应用": {
80
+					"华为": "u",
81
+					"联盟": "u"
82
+                },
83
+                "Vue": {
84
+                    "vue2": "y",
85
+                    "vue3": "y"
86
+                }
87
+			}
88
+		}
89
+	}
90
+}

+ 17 - 0
uni_modules/uni-popup/readme.md

@@ -0,0 +1,17 @@
1
+
2
+
3
+## Popup 弹出层
4
+> **组件名:uni-popup**
5
+> 代码块: `uPopup`
6
+> 关联组件:`uni-transition`
7
+
8
+
9
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
10
+
11
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
12
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
13
+
14
+
15
+
16
+
17
+

+ 8 - 0
uni_modules/uni-scss/changelog.md

@@ -0,0 +1,8 @@
1
+## 1.0.3(2022-01-21)
2
+- 优化 组件示例
3
+## 1.0.2(2021-11-22)
4
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
5
+## 1.0.1(2021-11-22)
6
+- 修复 vue3中scss语法兼容问题
7
+## 1.0.0(2021-11-18)
8
+- init

+ 1 - 0
uni_modules/uni-scss/index.scss

@@ -0,0 +1 @@
1
+@import './styles/index.scss';

+ 82 - 0
uni_modules/uni-scss/package.json

@@ -0,0 +1,82 @@
1
+{
2
+  "id": "uni-scss",
3
+  "displayName": "uni-scss 辅助样式",
4
+  "version": "1.0.3",
5
+  "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
6
+  "keywords": [
7
+    "uni-scss",
8
+    "uni-ui",
9
+    "辅助样式"
10
+],
11
+  "repository": "https://github.com/dcloudio/uni-ui",
12
+  "engines": {
13
+    "HBuilderX": "^3.1.0"
14
+  },
15
+  "dcloudext": {
16
+    "category": [
17
+        "JS SDK",
18
+        "通用 SDK"
19
+    ],
20
+    "sale": {
21
+      "regular": {
22
+        "price": "0.00"
23
+      },
24
+      "sourcecode": {
25
+        "price": "0.00"
26
+      }
27
+    },
28
+    "contact": {
29
+      "qq": ""
30
+    },
31
+    "declaration": {
32
+      "ads": "无",
33
+      "data": "无",
34
+      "permissions": "无"
35
+    },
36
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
37
+  },
38
+  "uni_modules": {
39
+    "dependencies": [],
40
+    "encrypt": [],
41
+    "platforms": {
42
+      "cloud": {
43
+        "tcb": "y",
44
+        "aliyun": "y"
45
+      },
46
+      "client": {
47
+        "App": {
48
+          "app-vue": "y",
49
+          "app-nvue": "u"
50
+        },
51
+        "H5-mobile": {
52
+          "Safari": "y",
53
+          "Android Browser": "y",
54
+          "微信浏览器(Android)": "y",
55
+          "QQ浏览器(Android)": "y"
56
+        },
57
+        "H5-pc": {
58
+          "Chrome": "y",
59
+          "IE": "y",
60
+          "Edge": "y",
61
+          "Firefox": "y",
62
+          "Safari": "y"
63
+        },
64
+        "小程序": {
65
+          "微信": "y",
66
+          "阿里": "y",
67
+          "百度": "y",
68
+          "字节跳动": "y",
69
+          "QQ": "y"
70
+        },
71
+        "快应用": {
72
+          "华为": "n",
73
+          "联盟": "n"
74
+        },
75
+        "Vue": {
76
+            "vue2": "y",
77
+            "vue3": "y"
78
+        }
79
+      }
80
+    }
81
+  }
82
+}

+ 4 - 0
uni_modules/uni-scss/readme.md

@@ -0,0 +1,4 @@
1
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
2
+
3
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
4
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 7 - 0
uni_modules/uni-scss/styles/index.scss

@@ -0,0 +1,7 @@
1
+@import './setting/_variables.scss';
2
+@import './setting/_border.scss';
3
+@import './setting/_color.scss';
4
+@import './setting/_space.scss';
5
+@import './setting/_radius.scss';
6
+@import './setting/_text.scss';
7
+@import './setting/_styles.scss';

+ 3 - 0
uni_modules/uni-scss/styles/setting/_border.scss

@@ -0,0 +1,3 @@
1
+.uni-border {
2
+	border: 1px $uni-border-1 solid;
3
+}

+ 66 - 0
uni_modules/uni-scss/styles/setting/_color.scss

@@ -0,0 +1,66 @@
1
+
2
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
3
+// @mixin get-styles($k,$c) {
4
+// 	@if $k == size or $k == weight{
5
+// 		font-#{$k}:#{$c}
6
+// 	}@else{
7
+// 		#{$k}:#{$c}
8
+// 	}
9
+// }
10
+$uni-ui-color:(
11
+	// 主色
12
+	primary: $uni-primary,
13
+	primary-disable: $uni-primary-disable,
14
+	primary-light: $uni-primary-light,
15
+	// 辅助色
16
+	success: $uni-success,
17
+	success-disable: $uni-success-disable,
18
+	success-light: $uni-success-light,
19
+	warning: $uni-warning,
20
+	warning-disable: $uni-warning-disable,
21
+	warning-light: $uni-warning-light,
22
+	error: $uni-error,
23
+	error-disable: $uni-error-disable,
24
+	error-light: $uni-error-light,
25
+	info: $uni-info,
26
+	info-disable: $uni-info-disable,
27
+	info-light: $uni-info-light,
28
+	// 中性色
29
+	main-color: $uni-main-color,
30
+	base-color: $uni-base-color,
31
+	secondary-color: $uni-secondary-color,
32
+	extra-color: $uni-extra-color,
33
+	// 背景色
34
+	bg-color: $uni-bg-color,
35
+	// 边框颜色
36
+	border-1: $uni-border-1,
37
+	border-2: $uni-border-2,
38
+	border-3: $uni-border-3,
39
+	border-4: $uni-border-4,
40
+	// 黑色
41
+	black:$uni-black,
42
+	// 白色
43
+	white:$uni-white,
44
+	// 透明
45
+	transparent:$uni-transparent
46
+) !default;
47
+@each $key, $child in $uni-ui-color {
48
+	.uni-#{"" + $key} {
49
+		color: $child;
50
+	}
51
+	.uni-#{"" + $key}-bg {
52
+		background-color: $child;
53
+	}
54
+}
55
+.uni-shadow-sm {
56
+	box-shadow: $uni-shadow-sm;
57
+}
58
+.uni-shadow-base {
59
+	box-shadow: $uni-shadow-base;
60
+}
61
+.uni-shadow-lg {
62
+	box-shadow: $uni-shadow-lg;
63
+}
64
+.uni-mask {
65
+	background-color:$uni-mask;
66
+}

+ 55 - 0
uni_modules/uni-scss/styles/setting/_radius.scss

@@ -0,0 +1,55 @@
1
+@mixin radius($r,$d:null ,$important: false){
2
+  $radius-value:map-get($uni-radius, $r) if($important, !important, null);
3
+  // Key exists within the $uni-radius variable
4
+  @if (map-has-key($uni-radius, $r) and  $d){
5
+		@if $d == t {
6
+				border-top-left-radius:$radius-value;
7
+				border-top-right-radius:$radius-value;
8
+		}@else if $d == r {
9
+				border-top-right-radius:$radius-value;
10
+				border-bottom-right-radius:$radius-value;
11
+		}@else if $d == b {
12
+				border-bottom-left-radius:$radius-value;
13
+				border-bottom-right-radius:$radius-value;
14
+		}@else if $d == l {
15
+				border-top-left-radius:$radius-value;
16
+				border-bottom-left-radius:$radius-value;
17
+		}@else if $d == tl {
18
+				border-top-left-radius:$radius-value;
19
+		}@else if $d == tr {
20
+				border-top-right-radius:$radius-value;
21
+		}@else if $d == br {
22
+				border-bottom-right-radius:$radius-value;
23
+		}@else if $d == bl {
24
+				border-bottom-left-radius:$radius-value;
25
+		}
26
+  }@else{
27
+		border-radius:$radius-value;
28
+  }
29
+}
30
+
31
+@each $key, $child in $uni-radius {
32
+	@if($key){
33
+		.uni-radius-#{"" + $key} {
34
+				@include radius($key)
35
+		}
36
+	}@else{
37
+		.uni-radius {
38
+				@include radius($key)
39
+		}
40
+	}
41
+}
42
+
43
+@each $direction in t, r, b, l,tl, tr, br, bl {
44
+	@each $key, $child in $uni-radius {
45
+		@if($key){
46
+			.uni-radius-#{"" + $direction}-#{"" + $key} {
47
+				@include radius($key,$direction,false)
48
+			}
49
+		}@else{
50
+			.uni-radius-#{$direction} {
51
+				@include radius($key,$direction,false)
52
+			}
53
+		}
54
+	}
55
+}

+ 56 - 0
uni_modules/uni-scss/styles/setting/_space.scss

@@ -0,0 +1,56 @@
1
+
2
+@mixin fn($space,$direction,$size,$n) {
3
+	@if $n {
4
+		#{$space}-#{$direction}: #{$size*$uni-space-root}px
5
+	} @else {
6
+		 #{$space}-#{$direction}: #{-$size*$uni-space-root}px
7
+	}
8
+}
9
+@mixin get-styles($direction,$i,$space,$n){
10
+	@if $direction == t {
11
+		@include fn($space, top,$i,$n);
12
+	} 
13
+	@if $direction == r {
14
+		@include fn($space, right,$i,$n);
15
+	} 
16
+	@if $direction == b {
17
+		@include fn($space, bottom,$i,$n);
18
+	} 
19
+	@if $direction == l {
20
+	 @include fn($space, left,$i,$n);
21
+	} 
22
+	@if $direction == x {
23
+		@include fn($space, left,$i,$n);
24
+		@include fn($space, right,$i,$n);
25
+	} 
26
+	@if $direction == y {
27
+		@include fn($space, top,$i,$n);
28
+		@include fn($space, bottom,$i,$n);
29
+	} 
30
+	@if $direction == a {
31
+		@if $n {
32
+			#{$space}:#{$i*$uni-space-root}px;
33
+		} @else {
34
+			#{$space}:#{-$i*$uni-space-root}px;
35
+		}
36
+	} 
37
+}
38
+
39
+@each $orientation in m,p {
40
+	$space: margin;
41
+	@if $orientation == m {
42
+		$space: margin;
43
+	} @else {
44
+		$space: padding;
45
+	}
46
+	@for $i from 0 through 16 {
47
+		@each $direction in t, r, b, l, x, y, a {
48
+			.uni-#{$orientation}#{$direction}-#{$i} { 
49
+				@include  get-styles($direction,$i,$space,true);
50
+			} 
51
+			.uni-#{$orientation}#{$direction}-n#{$i} { 
52
+				@include  get-styles($direction,$i,$space,false);
53
+			}
54
+		}
55
+	}
56
+}

+ 167 - 0
uni_modules/uni-scss/styles/setting/_styles.scss

@@ -0,0 +1,167 @@
1
+/* #ifndef APP-NVUE */
2
+
3
+$-color-white:#fff;
4
+$-color-black:#000;
5
+@mixin base-style($color) {
6
+	color: #fff;
7
+	background-color: $color;
8
+	border-color: mix($-color-black, $color, 8%);
9
+	&:not([hover-class]):active {
10
+		background: mix($-color-black, $color, 10%);
11
+		border-color: mix($-color-black, $color, 20%);
12
+		color: $-color-white;
13
+		outline: none;
14
+	}
15
+}
16
+@mixin is-color($color) {
17
+	@include base-style($color);
18
+	&[loading] {
19
+		@include base-style($color);
20
+		&::before {
21
+			margin-right:5px;
22
+		}
23
+	}
24
+	&[disabled] {
25
+	  &,
26
+		&[loading],
27
+	  &:not([hover-class]):active {
28
+	    color: $-color-white;
29
+			border-color: mix(darken($color,10%), $-color-white);
30
+	    background-color: mix($color, $-color-white);
31
+	  }
32
+	}
33
+
34
+}
35
+@mixin base-plain-style($color) {
36
+	color:$color;
37
+	background-color: mix($-color-white, $color, 90%);
38
+	border-color: mix($-color-white, $color, 70%);
39
+	&:not([hover-class]):active {
40
+	  background: mix($-color-white, $color, 80%);
41
+	  color: $color;
42
+	  outline: none;
43
+		border-color: mix($-color-white, $color, 50%);
44
+	}
45
+}
46
+@mixin is-plain($color){
47
+	&[plain] {
48
+		@include base-plain-style($color);
49
+		&[loading] {
50
+			@include base-plain-style($color);
51
+			&::before {
52
+				margin-right:5px;
53
+			}
54
+		}
55
+		&[disabled] {
56
+		  &,
57
+		  &:active {
58
+		    color: mix($-color-white, $color, 40%);
59
+		    background-color: mix($-color-white, $color, 90%);
60
+				border-color: mix($-color-white, $color, 80%);
61
+		  }
62
+		}
63
+	}
64
+}
65
+
66
+
67
+.uni-btn {
68
+	margin: 5px;
69
+	color: #393939;
70
+	border:1px solid #ccc;
71
+	font-size: 16px;
72
+	font-weight: 200;
73
+	background-color: #F9F9F9;
74
+	// TODO 暂时处理边框隐藏一边的问题
75
+	overflow: visible;
76
+	&::after{
77
+		border: none;
78
+	}
79
+
80
+	&:not([type]),&[type=default] {
81
+		color: #999;
82
+		&[loading] {
83
+			background: none;
84
+			&::before {
85
+				margin-right:5px;
86
+			}
87
+		}
88
+
89
+
90
+
91
+		&[disabled]{
92
+			color: mix($-color-white, #999, 60%);
93
+		  &,
94
+			&[loading],
95
+		  &:active {
96
+				color: mix($-color-white, #999, 60%);
97
+		    background-color: mix($-color-white,$-color-black , 98%);
98
+				border-color: mix($-color-white,  #999, 85%);
99
+		  }
100
+		}
101
+
102
+		&[plain] {
103
+			color: #999;
104
+			background: none;
105
+			border-color: $uni-border-1;
106
+			&:not([hover-class]):active {
107
+				background: none;
108
+			  color: mix($-color-white, $-color-black, 80%);
109
+				border-color: mix($-color-white, $-color-black, 90%);
110
+			  outline: none;
111
+			}
112
+			&[disabled]{
113
+			  &,
114
+				&[loading],
115
+			  &:active {
116
+			    background: none;
117
+					color: mix($-color-white, #999, 60%);
118
+					border-color: mix($-color-white,  #999, 85%);
119
+			  }
120
+			}
121
+		}
122
+	}
123
+
124
+	&:not([hover-class]):active {
125
+	  color: mix($-color-white, $-color-black, 50%);
126
+	}
127
+
128
+	&[size=mini] {
129
+		font-size: 16px;
130
+		font-weight: 200;
131
+		border-radius: 8px;
132
+	}
133
+
134
+
135
+
136
+	&.uni-btn-small {
137
+		font-size: 14px;
138
+	}
139
+	&.uni-btn-mini {
140
+		font-size: 12px;
141
+	}
142
+
143
+	&.uni-btn-radius {
144
+		border-radius: 999px;
145
+	}
146
+	&[type=primary] {
147
+		@include is-color($uni-primary);
148
+		@include is-plain($uni-primary)
149
+	}
150
+	&[type=success] {
151
+		@include is-color($uni-success);
152
+		@include is-plain($uni-success)
153
+	}
154
+	&[type=error] {
155
+		@include is-color($uni-error);
156
+		@include is-plain($uni-error)
157
+	}
158
+	&[type=warning] {
159
+		@include is-color($uni-warning);
160
+		@include is-plain($uni-warning)
161
+	}
162
+	&[type=info] {
163
+		@include is-color($uni-info);
164
+		@include is-plain($uni-info)
165
+	}
166
+}
167
+/* #endif */

+ 24 - 0
uni_modules/uni-scss/styles/setting/_text.scss

@@ -0,0 +1,24 @@
1
+@mixin get-styles($k,$c) {
2
+	@if $k == size or $k == weight{
3
+		font-#{$k}:#{$c}
4
+	}@else{
5
+		#{$k}:#{$c}
6
+	}
7
+}
8
+
9
+@each $key, $child in $uni-headings {
10
+	/* #ifndef APP-NVUE */
11
+	.uni-#{$key} {
12
+		@each $k, $c in $child {
13
+			@include get-styles($k,$c)
14
+		}
15
+	}
16
+	/* #endif */
17
+	/* #ifdef APP-NVUE */
18
+	.container .uni-#{$key} {
19
+		@each $k, $c in $child {
20
+			@include get-styles($k,$c)
21
+		}
22
+	}
23
+	/* #endif */
24
+}

+ 146 - 0
uni_modules/uni-scss/styles/setting/_variables.scss

@@ -0,0 +1,146 @@
1
+// @use "sass:math";
2
+@import  '../tools/functions.scss';
3
+// 间距基础倍数
4
+$uni-space-root: 2 !default;
5
+// 边框半径默认值
6
+$uni-radius-root:5px !default;
7
+$uni-radius: () !default;
8
+// 边框半径断点
9
+$uni-radius: map-deep-merge(
10
+  (
11
+    0: 0,
12
+		// TODO 当前版本暂时不支持 sm 属性
13
+    // 'sm': math.div($uni-radius-root, 2),
14
+    null: $uni-radius-root,
15
+    'lg': $uni-radius-root * 2,
16
+    'xl': $uni-radius-root * 6,
17
+    'pill': 9999px,
18
+    'circle': 50%
19
+  ),
20
+  $uni-radius
21
+);
22
+// 字体家族
23
+$body-font-family: 'Roboto', sans-serif !default;
24
+// 文本
25
+$heading-font-family: $body-font-family !default;
26
+$uni-headings: () !default;
27
+$letterSpacing: -0.01562em;
28
+$uni-headings: map-deep-merge(
29
+  (
30
+    'h1': (
31
+      size: 32px,
32
+			weight: 300,
33
+			line-height: 50px,
34
+			// letter-spacing:-0.01562em
35
+    ),
36
+    'h2': (
37
+      size: 28px,
38
+      weight: 300,
39
+      line-height: 40px,
40
+      // letter-spacing: -0.00833em
41
+    ),
42
+    'h3': (
43
+      size: 24px,
44
+      weight: 400,
45
+      line-height: 32px,
46
+      // letter-spacing: normal
47
+    ),
48
+    'h4': (
49
+      size: 20px,
50
+      weight: 400,
51
+      line-height: 30px,
52
+      // letter-spacing: 0.00735em
53
+    ),
54
+    'h5': (
55
+      size: 16px,
56
+      weight: 400,
57
+      line-height: 24px,
58
+      // letter-spacing: normal
59
+    ),
60
+    'h6': (
61
+      size: 14px,
62
+      weight: 500,
63
+      line-height: 18px,
64
+      // letter-spacing: 0.0125em
65
+    ),
66
+    'subtitle': (
67
+      size: 12px,
68
+      weight: 400,
69
+      line-height: 20px,
70
+      // letter-spacing: 0.00937em
71
+    ),
72
+    'body': (
73
+      font-size: 14px,
74
+			font-weight: 400,
75
+			line-height: 22px,
76
+			// letter-spacing: 0.03125em
77
+    ),
78
+    'caption': (
79
+      'size': 12px,
80
+      'weight': 400,
81
+      'line-height': 20px,
82
+      // 'letter-spacing': 0.03333em,
83
+      // 'text-transform': false
84
+    )
85
+  ),
86
+  $uni-headings
87
+);
88
+
89
+
90
+
91
+// 主色
92
+$uni-primary: #2979ff !default;
93
+$uni-primary-disable:lighten($uni-primary,20%) !default;
94
+$uni-primary-light: lighten($uni-primary,25%) !default;
95
+
96
+// 辅助色
97
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
98
+$uni-success: #18bc37 !default;
99
+$uni-success-disable:lighten($uni-success,20%) !default;
100
+$uni-success-light: lighten($uni-success,25%) !default;
101
+
102
+$uni-warning: #f3a73f !default;
103
+$uni-warning-disable:lighten($uni-warning,20%) !default;
104
+$uni-warning-light: lighten($uni-warning,25%) !default;
105
+
106
+$uni-error: #e43d33 !default;
107
+$uni-error-disable:lighten($uni-error,20%) !default;
108
+$uni-error-light: lighten($uni-error,25%) !default;
109
+
110
+$uni-info: #8f939c !default;
111
+$uni-info-disable:lighten($uni-info,20%) !default;
112
+$uni-info-light: lighten($uni-info,25%) !default;
113
+
114
+// 中性色
115
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
116
+$uni-main-color: #3a3a3a !default; 			// 主要文字
117
+$uni-base-color: #6a6a6a !default;			// 常规文字
118
+$uni-secondary-color: #909399 !default;	// 次要文字
119
+$uni-extra-color: #c7c7c7 !default;			// 辅助说明
120
+
121
+// 边框颜色
122
+$uni-border-1: #F0F0F0 !default;
123
+$uni-border-2: #EDEDED !default;
124
+$uni-border-3: #DCDCDC !default;
125
+$uni-border-4: #B9B9B9 !default;
126
+
127
+// 常规色
128
+$uni-black: #000000 !default;
129
+$uni-white: #ffffff !default;
130
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
131
+
132
+// 背景色
133
+$uni-bg-color: #f7f7f7 !default;
134
+
135
+/* 水平间距 */
136
+$uni-spacing-sm: 8px !default;
137
+$uni-spacing-base: 15px !default;
138
+$uni-spacing-lg: 30px !default;
139
+
140
+// 阴影
141
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
142
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
143
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
144
+
145
+// 蒙版
146
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;

+ 19 - 0
uni_modules/uni-scss/styles/tools/functions.scss

@@ -0,0 +1,19 @@
1
+// 合并 map
2
+@function map-deep-merge($parent-map, $child-map){
3
+	$result: $parent-map;
4
+	@each $key, $child in $child-map {
5
+		$parent-has-key: map-has-key($result, $key);
6
+		$parent-value: map-get($result, $key);
7
+		$parent-type: type-of($parent-value);
8
+		$child-type: type-of($child);
9
+		$parent-is-map: $parent-type == map;
10
+		$child-is-map: $child-type == map;
11
+			
12
+		@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
13
+			$result: map-merge($result, ( $key: $child ));
14
+		}@else {
15
+			$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
16
+		}
17
+	}
18
+	@return $result;
19
+};

+ 31 - 0
uni_modules/uni-scss/theme.scss

@@ -0,0 +1,31 @@
1
+// 间距基础倍数
2
+$uni-space-root: 2;
3
+// 边框半径默认值
4
+$uni-radius-root:5px;
5
+// 主色
6
+$uni-primary: #2979ff;
7
+// 辅助色
8
+$uni-success: #4cd964;
9
+// 警告色
10
+$uni-warning: #f0ad4e;
11
+// 错误色
12
+$uni-error: #dd524d;
13
+// 描述色
14
+$uni-info: #909399;
15
+// 中性色
16
+$uni-main-color: #303133;
17
+$uni-base-color: #606266;
18
+$uni-secondary-color: #909399;
19
+$uni-extra-color: #C0C4CC;
20
+// 背景色
21
+$uni-bg-color: #f5f5f5;
22
+// 边框颜色
23
+$uni-border-1: #DCDFE6;
24
+$uni-border-2: #E4E7ED;
25
+$uni-border-3: #EBEEF5;
26
+$uni-border-4: #F2F6FC;
27
+
28
+// 常规色
29
+$uni-black: #000000;
30
+$uni-white: #ffffff;
31
+$uni-transparent: rgba($color: #000000, $alpha: 0);

+ 62 - 0
uni_modules/uni-scss/variables.scss

@@ -0,0 +1,62 @@
1
+@import './styles/setting/_variables.scss';
2
+// 间距基础倍数
3
+$uni-space-root: 2;
4
+// 边框半径默认值
5
+$uni-radius-root:5px;
6
+
7
+// 主色
8
+$uni-primary: #2979ff;
9
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
10
+$uni-primary-light: mix(#fff,$uni-primary,80%);
11
+
12
+// 辅助色
13
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
14
+$uni-success: #18bc37;
15
+$uni-success-disable:mix(#fff,$uni-success,50%);
16
+$uni-success-light: mix(#fff,$uni-success,80%);
17
+
18
+$uni-warning: #f3a73f;
19
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
20
+$uni-warning-light: mix(#fff,$uni-warning,80%);
21
+
22
+$uni-error: #e43d33;
23
+$uni-error-disable:mix(#fff,$uni-error,50%);
24
+$uni-error-light: mix(#fff,$uni-error,80%);
25
+
26
+$uni-info: #8f939c;
27
+$uni-info-disable:mix(#fff,$uni-info,50%);
28
+$uni-info-light: mix(#fff,$uni-info,80%);
29
+
30
+// 中性色
31
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
32
+$uni-main-color: #3a3a3a; 			// 主要文字
33
+$uni-base-color: #6a6a6a;			// 常规文字
34
+$uni-secondary-color: #909399;	// 次要文字
35
+$uni-extra-color: #c7c7c7;			// 辅助说明
36
+
37
+// 边框颜色
38
+$uni-border-1: #F0F0F0;
39
+$uni-border-2: #EDEDED;
40
+$uni-border-3: #DCDCDC;
41
+$uni-border-4: #B9B9B9;
42
+
43
+// 常规色
44
+$uni-black: #000000;
45
+$uni-white: #ffffff;
46
+$uni-transparent: rgba($color: #000000, $alpha: 0);
47
+
48
+// 背景色
49
+$uni-bg-color: #f7f7f7;
50
+
51
+/* 水平间距 */
52
+$uni-spacing-sm: 8px;
53
+$uni-spacing-base: 15px;
54
+$uni-spacing-lg: 30px;
55
+
56
+// 阴影
57
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
58
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
59
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
60
+
61
+// 蒙版
62
+$uni-mask: rgba($color: #000000, $alpha: 0.4);

+ 2 - 0
uni_modules/uni-section/changelog.md

@@ -0,0 +1,2 @@
1
+## 0.0.1(2022-07-22)
2
+- 初始化

+ 167 - 0
uni_modules/uni-section/components/uni-section/uni-section.vue

@@ -0,0 +1,167 @@
1
+<template>
2
+	<view class="uni-section">
3
+		<view class="uni-section-header" @click="onClick">
4
+				<view class="uni-section-header__decoration" v-if="type" :class="type" />
5
+        <slot v-else name="decoration"></slot>
6
+
7
+        <view class="uni-section-header__content">
8
+          <text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
9
+          <text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
10
+        </view>
11
+
12
+        <view class="uni-section-header__slot-right">
13
+          <slot name="right"></slot>
14
+        </view>
15
+		</view>
16
+
17
+		<view class="uni-section-content" :style="{padding: _padding}">
18
+			<slot />
19
+		</view>
20
+	</view>
21
+</template>
22
+
23
+<script>
24
+
25
+	/**
26
+	 * Section 标题栏
27
+	 * @description 标题栏
28
+	 * @property {String} type = [line|circle|square] 标题装饰类型
29
+	 * 	@value line 竖线
30
+	 * 	@value circle 圆形
31
+	 * 	@value square 正方形
32
+	 * @property {String} title 主标题
33
+	 * @property {String} titleFontSize 主标题字体大小
34
+	 * @property {String} titleColor 主标题字体颜色
35
+	 * @property {String} subTitle 副标题
36
+	 * @property {String} subTitleFontSize 副标题字体大小
37
+	 * @property {String} subTitleColor 副标题字体颜色
38
+	 * @property {String} padding 默认插槽 padding
39
+	 */
40
+
41
+	export default {
42
+		name: 'UniSection',
43
+    emits:['click'],
44
+		props: {
45
+			type: {
46
+				type: String,
47
+				default: ''
48
+			},
49
+			title: {
50
+				type: String,
51
+				required: true,
52
+				default: ''
53
+			},
54
+      titleFontSize: {
55
+        type: String,
56
+        default: '14px'
57
+      },
58
+			titleColor:{
59
+				type: String,
60
+				default: '#333'
61
+			},
62
+			subTitle: {
63
+				type: String,
64
+				default: ''
65
+			},
66
+      subTitleFontSize: {
67
+        type: String,
68
+        default: '12px'
69
+      },
70
+      subTitleColor: {
71
+        type: String,
72
+        default: '#999'
73
+      },
74
+			padding: {
75
+				type: [Boolean, String],
76
+				default: false
77
+			}
78
+		},
79
+    computed:{
80
+      _padding(){
81
+        if(typeof this.padding === 'string'){
82
+          return this.padding
83
+        }
84
+
85
+        return this.padding?'10px':''
86
+      }
87
+    },
88
+		watch: {
89
+			title(newVal) {
90
+				if (uni.report && newVal !== '') {
91
+					uni.report('title', newVal)
92
+				}
93
+			}
94
+		},
95
+    methods: {
96
+			onClick() {
97
+				this.$emit('click')
98
+			}
99
+		}
100
+	}
101
+</script>
102
+<style lang="scss" >
103
+	$uni-primary: #2979ff !default;
104
+
105
+	.uni-section {
106
+		background-color: #fff;
107
+    .uni-section-header {
108
+      position: relative;
109
+      /* #ifndef APP-NVUE */
110
+      display: flex;
111
+      /* #endif */
112
+      flex-direction: row;
113
+      align-items: center;
114
+      padding: 12px 10px;
115
+      font-weight: normal;
116
+
117
+      &__decoration{
118
+        margin-right: 6px;
119
+        background-color: $uni-primary;
120
+        &.line {
121
+          width: 4px;
122
+          height: 12px;
123
+          border-radius: 10px;
124
+        }
125
+
126
+        &.circle {
127
+          width: 8px;
128
+          height: 8px;
129
+          border-top-right-radius: 50px;
130
+          border-top-left-radius: 50px;
131
+          border-bottom-left-radius: 50px;
132
+          border-bottom-right-radius: 50px;
133
+        }
134
+
135
+        &.square {
136
+          width: 8px;
137
+          height: 8px;
138
+        }
139
+      }
140
+
141
+      &__content {
142
+        /* #ifndef APP-NVUE */
143
+        display: flex;
144
+        /* #endif */
145
+        flex-direction: column;
146
+        flex: 1;
147
+        color: #333;
148
+
149
+        .distraction {
150
+          flex-direction: row;
151
+          align-items: center;
152
+        }
153
+        &-sub {
154
+          margin-top: 2px;
155
+        }
156
+      }
157
+
158
+      &__slot-right{
159
+        font-size: 14px;
160
+      }
161
+    }
162
+
163
+    .uni-section-content{
164
+      font-size: 14px;
165
+    }
166
+	}
167
+</style>

+ 87 - 0
uni_modules/uni-section/package.json

@@ -0,0 +1,87 @@
1
+{
2
+  "id": "uni-section",
3
+  "displayName": "uni-section 标题栏",
4
+  "version": "0.0.1",
5
+  "description": "标题栏组件",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "uniui",
9
+    "标题栏"
10
+],
11
+  "repository": "https://github.com/dcloudio/uni-ui",
12
+  "engines": {
13
+    "HBuilderX": ""
14
+  },
15
+  "directories": {
16
+    "example": "../../temps/example_temps"
17
+  },
18
+  "dcloudext": {
19
+    "category": [
20
+      "前端组件",
21
+      "通用组件"
22
+    ],
23
+    "sale": {
24
+      "regular": {
25
+        "price": "0.00"
26
+      },
27
+      "sourcecode": {
28
+        "price": "0.00"
29
+      }
30
+    },
31
+    "contact": {
32
+      "qq": ""
33
+    },
34
+    "declaration": {
35
+      "ads": "无",
36
+      "data": "无",
37
+      "permissions": "无"
38
+    },
39
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
40
+  },
41
+  "uni_modules": {
42
+    "dependencies": [
43
+      "uni-scss"
44
+    ],
45
+    "encrypt": [],
46
+    "platforms": {
47
+      "cloud": {
48
+        "tcb": "y",
49
+        "aliyun": "y"
50
+      },
51
+      "client": {
52
+        "App": {
53
+          "app-vue": "y",
54
+          "app-nvue": "y"
55
+        },
56
+        "H5-mobile": {
57
+          "Safari": "y",
58
+          "Android Browser": "y",
59
+          "微信浏览器(Android)": "y",
60
+          "QQ浏览器(Android)": "y"
61
+        },
62
+        "H5-pc": {
63
+          "Chrome": "y",
64
+          "IE": "y",
65
+          "Edge": "y",
66
+          "Firefox": "y",
67
+          "Safari": "y"
68
+        },
69
+        "小程序": {
70
+          "微信": "y",
71
+          "阿里": "y",
72
+          "百度": "y",
73
+          "字节跳动": "y",
74
+          "QQ": "y"
75
+        },
76
+        "快应用": {
77
+          "华为": "u",
78
+          "联盟": "u"
79
+        },
80
+        "Vue": {
81
+            "vue2": "y",
82
+            "vue3": "y"
83
+        }
84
+      }
85
+    }
86
+  }
87
+}

+ 8 - 0
uni_modules/uni-section/readme.md

@@ -0,0 +1,8 @@
1
+## Section 标题栏
2
+> **组件名:uni-section**
3
+> 代码块: `uSection`
4
+
5
+uni-section 组件主要用于文章、列表详情等标题展示
6
+
7
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section)
8
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839

+ 24 - 0
uni_modules/uni-transition/changelog.md

@@ -0,0 +1,24 @@
1
+## 1.3.3(2024-04-23)
2
+- 修复 当元素会受变量影响自动隐藏的bug
3
+## 1.3.2(2023-05-04)
4
+- 修复 NVUE 平台报错的问题
5
+## 1.3.1(2021-11-23)
6
+- 修复 init 方法初始化问题
7
+## 1.3.0(2021-11-19)
8
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
9
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
10
+## 1.2.1(2021-09-27)
11
+- 修复 init 方法不生效的 Bug
12
+## 1.2.0(2021-07-30)
13
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
14
+## 1.1.1(2021-05-12)
15
+- 新增 示例地址
16
+- 修复 示例项目缺少组件的 Bug
17
+## 1.1.0(2021-04-22)
18
+- 新增 通过方法自定义动画
19
+- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
20
+- 优化 动画触发逻辑,使动画更流畅
21
+- 优化 支持单独的动画类型
22
+- 优化 文档示例
23
+## 1.0.2(2021-02-05)
24
+- 调整为 uni_modules 目录规范

+ 131 - 0
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -0,0 +1,131 @@
1
+// const defaultOption = {
2
+// 	duration: 300,
3
+// 	timingFunction: 'linear',
4
+// 	delay: 0,
5
+// 	transformOrigin: '50% 50% 0'
6
+// }
7
+// #ifdef APP-NVUE
8
+const nvueAnimation = uni.requireNativePlugin('animation')
9
+// #endif
10
+class MPAnimation {
11
+	constructor(options, _this) {
12
+		this.options = options
13
+		// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
14
+		this.animation = uni.createAnimation({
15
+			...options
16
+		})
17
+		this.currentStepAnimates = {}
18
+		this.next = 0
19
+		this.$ = _this
20
+
21
+	}
22
+
23
+	_nvuePushAnimates(type, args) {
24
+		let aniObj = this.currentStepAnimates[this.next]
25
+		let styles = {}
26
+		if (!aniObj) {
27
+			styles = {
28
+				styles: {},
29
+				config: {}
30
+			}
31
+		} else {
32
+			styles = aniObj
33
+		}
34
+		if (animateTypes1.includes(type)) {
35
+			if (!styles.styles.transform) {
36
+				styles.styles.transform = ''
37
+			}
38
+			let unit = ''
39
+			if(type === 'rotate'){
40
+				unit = 'deg'
41
+			}
42
+			styles.styles.transform += `${type}(${args+unit}) `
43
+		} else {
44
+			styles.styles[type] = `${args}`
45
+		}
46
+		this.currentStepAnimates[this.next] = styles
47
+	}
48
+	_animateRun(styles = {}, config = {}) {
49
+		let ref = this.$.$refs['ani'].ref
50
+		if (!ref) return
51
+		return new Promise((resolve, reject) => {
52
+			nvueAnimation.transition(ref, {
53
+				styles,
54
+				...config
55
+			}, res => {
56
+				resolve()
57
+			})
58
+		})
59
+	}
60
+
61
+	_nvueNextAnimate(animates, step = 0, fn) {
62
+		let obj = animates[step]
63
+		if (obj) {
64
+			let {
65
+				styles,
66
+				config
67
+			} = obj
68
+			this._animateRun(styles, config).then(() => {
69
+				step += 1
70
+				this._nvueNextAnimate(animates, step, fn)
71
+			})
72
+		} else {
73
+			this.currentStepAnimates = {}
74
+			typeof fn === 'function' && fn()
75
+			this.isEnd = true
76
+		}
77
+	}
78
+
79
+	step(config = {}) {
80
+		// #ifndef APP-NVUE
81
+		this.animation.step(config)
82
+		// #endif
83
+		// #ifdef APP-NVUE
84
+		this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
85
+		this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
86
+		this.next++
87
+		// #endif
88
+		return this
89
+	}
90
+
91
+	run(fn) {
92
+		// #ifndef APP-NVUE
93
+		this.$.animationData = this.animation.export()
94
+		this.$.timer = setTimeout(() => {
95
+			typeof fn === 'function' && fn()
96
+		}, this.$.durationTime)
97
+		// #endif
98
+		// #ifdef APP-NVUE
99
+		this.isEnd = false
100
+		let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
101
+		if(!ref) return
102
+		this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
103
+		this.next = 0
104
+		// #endif
105
+	}
106
+}
107
+
108
+
109
+const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
110
+	'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
111
+	'translateZ'
112
+]
113
+const animateTypes2 = ['opacity', 'backgroundColor']
114
+const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
115
+animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
116
+	MPAnimation.prototype[type] = function(...args) {
117
+		// #ifndef APP-NVUE
118
+		this.animation[type](...args)
119
+		// #endif
120
+		// #ifdef APP-NVUE
121
+		this._nvuePushAnimates(type, args)
122
+		// #endif
123
+		return this
124
+	}
125
+})
126
+
127
+export function createAnimation(option, _this) {
128
+	if(!_this) return
129
+	clearTimeout(_this.timer)
130
+	return new MPAnimation(option, _this)
131
+}

+ 286 - 0
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -0,0 +1,286 @@
1
+<template>
2
+  <!-- #ifndef APP-NVUE -->
3
+  <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
4
+  <!-- #endif -->
5
+  <!-- #ifdef APP-NVUE -->
6
+  <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
7
+  <!-- #endif -->
8
+</template>
9
+
10
+<script>
11
+import { createAnimation } from './createAnimation'
12
+
13
+/**
14
+ * Transition 过渡动画
15
+ * @description 简单过渡动画组件
16
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=985
17
+ * @property {Boolean} show = [false|true] 控制组件显示或隐藏
18
+ * @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
19
+ *  @value fade 渐隐渐出过渡
20
+ *  @value slide-top 由上至下过渡
21
+ *  @value slide-right 由右至左过渡
22
+ *  @value slide-bottom 由下至上过渡
23
+ *  @value slide-left 由左至右过渡
24
+ *  @value zoom-in 由小到大过渡
25
+ *  @value zoom-out 由大到小过渡
26
+ * @property {Number} duration 过渡动画持续时间
27
+ * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
28
+ */
29
+export default {
30
+	name: 'uniTransition',
31
+	emits:['click','change'],
32
+	props: {
33
+		show: {
34
+			type: Boolean,
35
+			default: false
36
+		},
37
+		modeClass: {
38
+			type: [Array, String],
39
+			default() {
40
+				return 'fade'
41
+			}
42
+		},
43
+		duration: {
44
+			type: Number,
45
+			default: 300
46
+		},
47
+		styles: {
48
+			type: Object,
49
+			default() {
50
+				return {}
51
+			}
52
+		},
53
+		customClass:{
54
+			type: String,
55
+			default: ''
56
+		},
57
+		onceRender:{
58
+			type:Boolean,
59
+			default:false
60
+		},
61
+	},
62
+	data() {
63
+		return {
64
+			isShow: false,
65
+			transform: '',
66
+			opacity: 1,
67
+			animationData: {},
68
+			durationTime: 300,
69
+			config: {}
70
+		}
71
+	},
72
+	watch: {
73
+		show: {
74
+			handler(newVal) {
75
+				if (newVal) {
76
+					this.open()
77
+				} else {
78
+					// 避免上来就执行 close,导致动画错乱
79
+					if (this.isShow) {
80
+						this.close()
81
+					}
82
+				}
83
+			},
84
+			immediate: true
85
+		}
86
+	},
87
+	computed: {
88
+		// 生成样式数据
89
+		stylesObject() {
90
+			let styles = {
91
+				...this.styles,
92
+				'transition-duration': this.duration / 1000 + 's'
93
+			}
94
+			let transform = ''
95
+			for (let i in styles) {
96
+				let line = this.toLine(i)
97
+				transform += line + ':' + styles[i] + ';'
98
+			}
99
+			return transform
100
+		},
101
+		// 初始化动画条件
102
+		transformStyles() {
103
+			return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject
104
+		}
105
+	},
106
+	created() {
107
+		// 动画默认配置
108
+		this.config = {
109
+			duration: this.duration,
110
+			timingFunction: 'ease',
111
+			transformOrigin: '50% 50%',
112
+			delay: 0
113
+		}
114
+		this.durationTime = this.duration
115
+	},
116
+	methods: {
117
+		/**
118
+		 *  ref 触发 初始化动画
119
+		 */
120
+		init(obj = {}) {
121
+			if (obj.duration) {
122
+				this.durationTime = obj.duration
123
+			}
124
+			this.animation = createAnimation(Object.assign(this.config, obj),this)
125
+		},
126
+		/**
127
+		 * 点击组件触发回调
128
+		 */
129
+		onClick() {
130
+			this.$emit('click', {
131
+				detail: this.isShow
132
+			})
133
+		},
134
+		/**
135
+		 * ref 触发 动画分组
136
+		 * @param {Object} obj
137
+		 */
138
+		step(obj, config = {}) {
139
+			if (!this.animation) return
140
+			for (let i in obj) {
141
+				try {
142
+					if(typeof obj[i] === 'object'){
143
+						this.animation[i](...obj[i])
144
+					}else{
145
+						this.animation[i](obj[i])
146
+					}
147
+				} catch (e) {
148
+					console.error(`方法 ${i} 不存在`)
149
+				}
150
+			}
151
+			this.animation.step(config)
152
+			return this
153
+		},
154
+		/**
155
+		 *  ref 触发 执行动画
156
+		 */
157
+		run(fn) {
158
+			if (!this.animation) return
159
+			this.animation.run(fn)
160
+		},
161
+		// 开始过度动画
162
+		open() {
163
+			clearTimeout(this.timer)
164
+			this.transform = ''
165
+			this.isShow = true
166
+			let { opacity, transform } = this.styleInit(false)
167
+			if (typeof opacity !== 'undefined') {
168
+				this.opacity = opacity
169
+			}
170
+			this.transform = transform
171
+			// 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
172
+			this.$nextTick(() => {
173
+				// TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
174
+				this.timer = setTimeout(() => {
175
+					this.animation = createAnimation(this.config, this)
176
+					this.tranfromInit(false).step()
177
+					this.animation.run()
178
+					this.$emit('change', {
179
+						detail: this.isShow
180
+					})
181
+				}, 20)
182
+			})
183
+		},
184
+		// 关闭过度动画
185
+		close(type) {
186
+			if (!this.animation) return
187
+			this.tranfromInit(true)
188
+				.step()
189
+				.run(() => {
190
+					this.isShow = false
191
+					this.animationData = null
192
+					this.animation = null
193
+					let { opacity, transform } = this.styleInit(false)
194
+					this.opacity = opacity || 1
195
+					this.transform = transform
196
+					this.$emit('change', {
197
+						detail: this.isShow
198
+					})
199
+				})
200
+		},
201
+		// 处理动画开始前的默认样式
202
+		styleInit(type) {
203
+			let styles = {
204
+				transform: ''
205
+			}
206
+			let buildStyle = (type, mode) => {
207
+				if (mode === 'fade') {
208
+					styles.opacity = this.animationType(type)[mode]
209
+				} else {
210
+					styles.transform += this.animationType(type)[mode] + ' '
211
+				}
212
+			}
213
+			if (typeof this.modeClass === 'string') {
214
+				buildStyle(type, this.modeClass)
215
+			} else {
216
+				this.modeClass.forEach(mode => {
217
+					buildStyle(type, mode)
218
+				})
219
+			}
220
+			return styles
221
+		},
222
+		// 处理内置组合动画
223
+		tranfromInit(type) {
224
+			let buildTranfrom = (type, mode) => {
225
+				let aniNum = null
226
+				if (mode === 'fade') {
227
+					aniNum = type ? 0 : 1
228
+				} else {
229
+					aniNum = type ? '-100%' : '0'
230
+					if (mode === 'zoom-in') {
231
+						aniNum = type ? 0.8 : 1
232
+					}
233
+					if (mode === 'zoom-out') {
234
+						aniNum = type ? 1.2 : 1
235
+					}
236
+					if (mode === 'slide-right') {
237
+						aniNum = type ? '100%' : '0'
238
+					}
239
+					if (mode === 'slide-bottom') {
240
+						aniNum = type ? '100%' : '0'
241
+					}
242
+				}
243
+				this.animation[this.animationMode()[mode]](aniNum)
244
+			}
245
+			if (typeof this.modeClass === 'string') {
246
+				buildTranfrom(type, this.modeClass)
247
+			} else {
248
+				this.modeClass.forEach(mode => {
249
+					buildTranfrom(type, mode)
250
+				})
251
+			}
252
+
253
+			return this.animation
254
+		},
255
+		animationType(type) {
256
+			return {
257
+				fade: type ? 0 : 1,
258
+				'slide-top': `translateY(${type ? '0' : '-100%'})`,
259
+				'slide-right': `translateX(${type ? '0' : '100%'})`,
260
+				'slide-bottom': `translateY(${type ? '0' : '100%'})`,
261
+				'slide-left': `translateX(${type ? '0' : '-100%'})`,
262
+				'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
263
+				'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
264
+			}
265
+		},
266
+		// 内置动画类型与实际动画对应字典
267
+		animationMode() {
268
+			return {
269
+				fade: 'opacity',
270
+				'slide-top': 'translateY',
271
+				'slide-right': 'translateX',
272
+				'slide-bottom': 'translateY',
273
+				'slide-left': 'translateX',
274
+				'zoom-in': 'scale',
275
+				'zoom-out': 'scale'
276
+			}
277
+		},
278
+		// 驼峰转中横线
279
+		toLine(name) {
280
+			return name.replace(/([A-Z])/g, '-$1').toLowerCase()
281
+		}
282
+	}
283
+}
284
+</script>
285
+
286
+<style></style>

+ 85 - 0
uni_modules/uni-transition/package.json

@@ -0,0 +1,85 @@
1
+{
2
+  "id": "uni-transition",
3
+  "displayName": "uni-transition 过渡动画",
4
+  "version": "1.3.3",
5
+  "description": "元素的简单过渡动画",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "uniui",
9
+    "动画",
10
+    "过渡",
11
+    "过渡动画"
12
+],
13
+  "repository": "https://github.com/dcloudio/uni-ui",
14
+  "engines": {
15
+    "HBuilderX": ""
16
+  },
17
+  "directories": {
18
+    "example": "../../temps/example_temps"
19
+  },
20
+"dcloudext": {
21
+    "sale": {
22
+      "regular": {
23
+        "price": "0.00"
24
+      },
25
+      "sourcecode": {
26
+        "price": "0.00"
27
+      }
28
+    },
29
+    "contact": {
30
+      "qq": ""
31
+    },
32
+    "declaration": {
33
+      "ads": "无",
34
+      "data": "无",
35
+      "permissions": "无"
36
+    },
37
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
38
+    "type": "component-vue"
39
+  },
40
+  "uni_modules": {
41
+    "dependencies": ["uni-scss"],
42
+    "encrypt": [],
43
+    "platforms": {
44
+      "cloud": {
45
+        "tcb": "y",
46
+        "aliyun": "y",
47
+        "alipay": "n"
48
+      },
49
+      "client": {
50
+        "App": {
51
+          "app-vue": "y",
52
+          "app-nvue": "y"
53
+        },
54
+        "H5-mobile": {
55
+          "Safari": "y",
56
+          "Android Browser": "y",
57
+          "微信浏览器(Android)": "y",
58
+          "QQ浏览器(Android)": "y"
59
+        },
60
+        "H5-pc": {
61
+          "Chrome": "y",
62
+          "IE": "y",
63
+          "Edge": "y",
64
+          "Firefox": "y",
65
+          "Safari": "y"
66
+        },
67
+        "小程序": {
68
+          "微信": "y",
69
+          "阿里": "y",
70
+          "百度": "y",
71
+          "字节跳动": "y",
72
+          "QQ": "y"
73
+        },
74
+        "快应用": {
75
+          "华为": "u",
76
+          "联盟": "u"
77
+        },
78
+        "Vue": {
79
+            "vue2": "y",
80
+            "vue3": "y"
81
+        }
82
+      }
83
+    }
84
+  }
85
+}

+ 11 - 0
uni_modules/uni-transition/readme.md

@@ -0,0 +1,11 @@
1
+
2
+
3
+## Transition 过渡动画
4
+> **组件名:uni-transition**
5
+> 代码块: `uTransition`
6
+
7
+
8
+元素过渡动画
9
+
10
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
11
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 8 - 0
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -0,0 +1,8 @@
1
+{
2
+  "hash": "b9c934e7",
3
+  "configHash": "7dcfc34d",
4
+  "lockfileHash": "372a1faa",
5
+  "browserHash": "783b5654",
6
+  "optimized": {},
7
+  "chunks": {}
8
+}

+ 3 - 0
unpackage/dist/cache/.vite/deps/package.json

@@ -0,0 +1,3 @@
1
+{
2
+  "type": "module"
3
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/components/TopDownPopup/TopDownPopup.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/clockIn/clockIn.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/daixjgk/daixjgk.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/home/home.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/popup/popup.js.map


+ 1 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/pages/warehouseInfo/warehouseInfo.js.map

@@ -0,0 +1 @@
1
+{"version":3,"names":["wx","createPage","warehouseInfo","MiniProgramPage"],"sources":["cGFnZXMvd2FyZWhvdXNlSW5mby93YXJlaG91c2VJbmZvLnZ1ZQ"],"sourcesContent":["import MiniProgramPage from 'D:/project/交割库/jgk-project/pages/warehouseInfo/warehouseInfo.vue'\nwx.createPage(MiniProgramPage)"],"mappings":";;;;AACAA,EAAA,CAAGC,UAAA,CAAWC,aAAA,CAAeC,eAAA","ignoreList":[]}

+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin-devtools/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.js.map


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff