Jelajahi Sumber

Merge branch 'master' of http://git.lcpcp.cc/root/uni-app

sys 3 tahun lalu
induk
melakukan
0f22739d71

+ 1 - 1
common/router/router.js

@@ -8,7 +8,7 @@ const router = createRouter({
     routes: [...ROUTES]
 });
 //全局路由前置守卫
-const whiteList = ['/','/pages/index/index']
+const whiteList = ['/','/pages/index/index','/pages/text/index']
 
 router.beforeEach((to, from, next) => {
     let token = to.query.token;

+ 89 - 25
components/en-utils/en-blank.vue

@@ -1,36 +1,100 @@
 <template>
-  <view class="box">
-
-  </view>
+	<view class="blank-page" v-if="showBlank">
+		<view class="blank-img-box">
+			<slot name="blankImg">
+				<image src="../static/img/blank-box.svg" class="blank-img"></image>
+			</slot>
+		</view>
+		<view class="blank-text">
+			<text>{{message}}</text>
+		</view>
+		<view class="blank-button" @click="btnClick" v-if="showButton">
+			<slot name="button">
+				<view class="default-button">
+					{{buttonText}}
+				</view>
+			</slot>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-  name: 'en-blank',
-  props: {
-
-  },
-  data() {
-    return {
-
-    }
-  },
-  components: {
+	/**
+	 * 组件根据文档定位至最中部分,层级为 2
+	 * 背景并非全部覆盖,请根据需求显示隐藏
+	 * 自定义图片的时候需要自己写尺寸
+	 * */
+	export default {
+		props: {
+			showBlank: {
+				type: Boolean,
+				default: true
+			},
+			message: {
+				type: String,
+				default: '暂无信息!!'
+			},
+			buttonText: {
+				type: String,
+				default: '按钮文字'
+			},
+			showButton: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
 
-  },
-  mounted() {
-
-  },
-  watch: {
+			}
+		},
+		methods: {
+			btnClick() {
+				this.$emit('btnClick')
+			}
+		},
+	}
+</script>
 
-  },
-  methods: {
+<style scoped lang="scss">
+	.blank-page {
+		width: 100vw;
+		padding-top: 200rpx;
+		z-index: 2;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
 
-  }
+	.blank-img-box {
+		display: flex;
+		justify-content: center;
+		width: 100%;
+	}
 
-}
-</script>
+	.blank-img {
+		display: block;
+		width: 193px;
+		height: 131px;
+	}
 
-<style lang="scss" scoped>
+	.blank-text {
+		margin-top: 5px;
+		margin-bottom: 32px;
+		text{
+			font-size: 14px;
+			color: #AAAAAA;
+		}
+	}
 
+	.default-button {
+		width: 160px;
+		height: 44px;
+		background: rgb(52, 137, 255);
+		box-shadow: 0px 2px 3px rgba(52, 137, 255, 0.29);
+		border-radius: 22px;
+		color: #fff;
+		line-height: 44px;
+		text-align: center;
+	}
 </style>

+ 198 - 0
components/static/img/blank-box.svg

@@ -0,0 +1,198 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="386" height="261.57" viewBox="0 0 386 261.57">
+  <defs>
+    <style>
+      .cls-1 {
+        fill: #fff;
+        stroke: #707070;
+        opacity: 0;
+      }
+
+      .cls-2 {
+        fill: url(#linear-gradient);
+      }
+
+      .cls-3 {
+        fill: url(#linear-gradient-2);
+      }
+
+      .cls-4 {
+        fill: url(#linear-gradient-4);
+      }
+
+      .cls-5 {
+        fill: #74b0f9;
+      }
+
+      .cls-6 {
+        fill: #77b2fa;
+      }
+
+      .cls-7 {
+        fill: url(#linear-gradient-6);
+      }
+
+      .cls-8 {
+        fill: url(#linear-gradient-7);
+      }
+
+      .cls-9 {
+        fill: url(#linear-gradient-8);
+      }
+
+      .cls-10 {
+        fill: url(#linear-gradient-9);
+      }
+
+      .cls-11 {
+        fill: #a9d1fe;
+      }
+
+      .cls-12 {
+        fill: url(#linear-gradient-10);
+      }
+
+      .cls-13, .cls-17 {
+        fill: none;
+      }
+
+      .cls-13 {
+        stroke: #c4deff;
+        stroke-linecap: round;
+        stroke-miterlimit: 10;
+        stroke-width: 2px;
+        stroke-dasharray: 6;
+      }
+
+      .cls-14 {
+        fill: #8bbbf8;
+      }
+
+      .cls-15 {
+        fill: #649fe7;
+      }
+
+      .cls-16 {
+        stroke: none;
+      }
+
+      .cls-18 {
+        filter: url(#路径_233);
+      }
+
+      .cls-19 {
+        filter: url(#路径_232);
+      }
+
+      .cls-20 {
+        filter: url(#路径_231);
+      }
+
+      .cls-21 {
+        filter: url(#路径_230);
+      }
+    </style>
+    <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="0.872" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#add2ff"/>
+      <stop offset="1" stop-color="#a9cffd" stop-opacity="0"/>
+      <stop offset="1" stop-color="#bbd8fb" stop-opacity="0"/>
+    </linearGradient>
+    <linearGradient id="linear-gradient-2" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#c9e0fc"/>
+      <stop offset="1" stop-color="#f0f2f6" stop-opacity="0.745"/>
+    </linearGradient>
+    <linearGradient id="linear-gradient-4" x1="0.527" y1="0.081" x2="0.478" y2="1.073" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#cbe1fc"/>
+      <stop offset="1" stop-color="#f0f2f6"/>
+    </linearGradient>
+    <linearGradient id="linear-gradient-6" x1="1" y1="-0.149" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#7cb3f6"/>
+      <stop offset="1" stop-color="#5ba0f6"/>
+    </linearGradient>
+    <linearGradient id="linear-gradient-7" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#78b4fd"/>
+      <stop offset="1" stop-color="#519af4"/>
+    </linearGradient>
+    <linearGradient id="linear-gradient-8" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#9ec9fc"/>
+      <stop offset="1" stop-color="#77b2f9"/>
+    </linearGradient>
+    <filter id="路径_230" x="108.315" y="103.784" width="83.731" height="120.119" filterUnits="userSpaceOnUse">
+      <feOffset dy="3" input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="3" result="blur"/>
+      <feFlood flood-color="#bdd7f4"/>
+      <feComposite operator="in" in2="blur"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+    <linearGradient id="linear-gradient-9" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#a5cdfe"/>
+      <stop offset="1" stop-color="#a5cdfe"/>
+    </linearGradient>
+    <filter id="路径_231" x="171.928" y="105.196" width="109.17" height="118.707" filterUnits="userSpaceOnUse">
+      <feOffset dy="3" input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="3" result="blur-2"/>
+      <feFlood flood-color="#bdd7f4"/>
+      <feComposite operator="in" in2="blur-2"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+    <filter id="路径_232" x="173.046" y="105.196" width="118.721" height="83.025" filterUnits="userSpaceOnUse">
+      <feOffset dx="-1" dy="3" input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="3" result="blur-3"/>
+      <feFlood flood-color="#5fa3f3"/>
+      <feComposite operator="in" in2="blur-3"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+    <linearGradient id="linear-gradient-10" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+      <stop offset="0" stop-color="#aacfff"/>
+      <stop offset="1" stop-color="#96c5ff"/>
+    </linearGradient>
+    <filter id="路径_233" x="87.111" y="103.784" width="104.935" height="77.364" filterUnits="userSpaceOnUse">
+      <feOffset dy="3" input="SourceAlpha"/>
+      <feGaussianBlur stdDeviation="3" result="blur-4"/>
+      <feFlood flood-color="#5294e5"/>
+      <feComposite operator="in" in2="blur-4"/>
+      <feComposite in="SourceGraphic"/>
+    </filter>
+  </defs>
+  <g id="组_61318" data-name="组 61318" transform="translate(-182 -501.43)">
+    <g id="组_9256" data-name="组 9256" transform="translate(13 203)">
+      <g id="矩形_3883" data-name="矩形 3883" class="cls-1" transform="translate(169 320)">
+        <rect class="cls-16" width="386" height="240"/>
+        <rect class="cls-17" x="0.5" y="0.5" width="385" height="239"/>
+      </g>
+      <path id="减去_3" data-name="减去 3" class="cls-2" d="M7565.395-1364h-294a71.953,71.953,0,0,1,4.728-18.924,83.272,83.272,0,0,1,9.66-17.542,102.912,102.912,0,0,1,14.075-15.809A128.163,128.163,0,0,1,7317.83-1430c27.377-17.413,63.091-27,100.563-27s73.188,9.59,100.564,27a128.139,128.139,0,0,1,17.974,13.723,102.855,102.855,0,0,1,14.075,15.809,83.288,83.288,0,0,1,9.66,17.542,71.955,71.955,0,0,1,4.728,18.922Z" transform="translate(-7056.395 1920)"/>
+      <path id="联合_24" data-name="联合 24" class="cls-3" d="M7267.247-1416A13.246,13.246,0,0,1,7254-1429.246a13.246,13.246,0,0,1,13.247-13.245h2.014A16.116,16.116,0,0,1,7285.316-1457a16.116,16.116,0,0,1,16.057,14.509h1.38A13.246,13.246,0,0,1,7316-1429.246,13.246,13.246,0,0,1,7302.753-1416Z" transform="translate(-7020 1786)"/>
+      <path id="联合_25" data-name="联合 25" class="cls-3" d="M7266.4-1418.616a12.4,12.4,0,0,1-12.4-12.4,12.4,12.4,0,0,1,12.4-12.4h1.875A15.081,15.081,0,0,1,7283.3-1457a15.081,15.081,0,0,1,15.021,13.581h1.283a12.4,12.4,0,0,1,12.4,12.4,12.4,12.4,0,0,1-12.4,12.4Z" transform="translate(-6780.001 1855.309)"/>
+      <g id="组_9252" data-name="组 9252" transform="translate(2 6)">
+        <path id="路径_223" data-name="路径 223" class="cls-4" d="M211.8,1300.035a10.286,10.286,0,0,0,1.519-5.382,10.4,10.4,0,0,0-20.7-1.418H192.5a7.527,7.527,0,1,0,6.611,11.167,13.26,13.26,0,0,0,1.474.458,8.442,8.442,0,1,0,11.167-4.757Z" transform="translate(45.653 -807.197)"/>
+        <path id="路径_224" data-name="路径 224" class="cls-5" d="M203.157,1298.645a1.2,1.2,0,0,0-1.6.514l-1.429,2.781V1297.8a1.117,1.117,0,0,0-2.233,0v5.17l-1.977-1.977a.79.79,0,1,0-1.117,1.117l2.97,2.982a.6.6,0,0,0,.112.067V1323.5a1.117,1.117,0,1,0,2.233,0v-16.416l3.54-6.89a1.2,1.2,0,0,0-.5-1.552Z" transform="translate(46.771 -805.74)"/>
+      </g>
+      <g id="组_9253" data-name="组 9253" transform="translate(227.388 3)">
+        <path id="路径_223-2" data-name="路径 223" class="cls-4" d="M211.8,1300.035a10.286,10.286,0,0,0,1.519-5.382,10.4,10.4,0,0,0-20.7-1.418H192.5a7.527,7.527,0,1,0,6.611,11.167,13.26,13.26,0,0,0,1.474.458,8.442,8.442,0,1,0,11.167-4.757Z" transform="translate(45.653 -807.197)"/>
+        <path id="路径_224-2" data-name="路径 224" class="cls-6" d="M203.157,1298.645a1.2,1.2,0,0,0-1.6.514l-1.429,2.781V1297.8a1.117,1.117,0,0,0-2.233,0v5.17l-1.977-1.977a.79.79,0,1,0-1.117,1.117l2.97,2.982a.6.6,0,0,0,.112.067V1323.5a1.117,1.117,0,1,0,2.233,0v-16.416l3.54-6.89a1.2,1.2,0,0,0-.5-1.552Z" transform="translate(46.771 -805.74)"/>
+      </g>
+    </g>
+    <g id="组_9259" data-name="组 9259" transform="translate(15.875 -370.604)">
+      <path id="路径_228" data-name="路径 228" class="cls-7" d="M236.4,1259.961l71.032-18.021-7.419,46.99Z" transform="translate(49.158 -278.142)"/>
+      <path id="路径_229" data-name="路径 229" class="cls-8" d="M368.949,1261.373,282.36,1288.93l7.419-46.99Z" transform="translate(66.811 -278.142)"/>
+      <g class="cls-21" transform="matrix(1, 0, 0, 1, 166.13, 872.03)">
+        <path id="路径_230-2" data-name="路径 230" class="cls-9" d="M298.483,1357.078l2.118-73.149-63.613-28.969L234.87,1332Z" transform="translate(-117.56 -1145.18)"/>
+      </g>
+      <g class="cls-20" transform="matrix(1, 0, 0, 1, 166.13, 872.03)">
+        <path id="路径_231-2" data-name="路径 231" class="cls-10" d="M372,1330.541l-91.17,26.146,2.118-73.149,86.589-27.557Z" transform="translate(-99.9 -1144.78)"/>
+      </g>
+      <g class="cls-19" transform="matrix(1, 0, 0, 1, 166.13, 872.03)">
+        <path id="路径_232-2" data-name="路径 232" class="cls-11" d="M383.081,1287.427,291.55,1321l-9.19-37.467,86.589-27.557Z" transform="translate(-99.31 -1144.78)"/>
+      </g>
+      <g class="cls-18" transform="matrix(1, 0, 0, 1, 166.13, 872.03)">
+        <path id="路径_233-2" data-name="路径 233" class="cls-12" d="M280.519,1314.324l25.966-30.395-63.613-28.969-23.322,29.675Z" transform="translate(-123.44 -1145.18)"/>
+      </g>
+    </g>
+    <g id="组_9260" data-name="组 9260" transform="translate(34.754 -372)">
+      <path id="路径_7574" data-name="路径 7574" class="cls-13" d="M83.744,31.84s-23.622,20.76-12.3,27.3S95.074,38.1,59,51.23c-37.344,13.59-26.395,49.551-26.395,49.551" transform="translate(299.227 886.821)"/>
+      <g id="组_9257" data-name="组 9257" transform="matrix(0.848, -0.53, 0.53, 0.848, -421.584, 345.67)">
+        <path id="多边形_6" data-name="多边形 6" class="cls-14" d="M18.167,0,36.334,35.649H0Z" transform="translate(427.315 889.339) rotate(90)"/>
+        <path id="路径_7576" data-name="路径 7576" class="cls-15" d="M-7096.332,2115.121l34.155-11.9-29.676,19.017,2.659,4.965-12.738,5.395Z" transform="matrix(0.875, 0.485, -0.485, 0.875, 7623.655, 2491.219)"/>
+      </g>
+    </g>
+  </g>
+</svg>

+ 7 - 1
pages.json

@@ -3,7 +3,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": "首页演示"
 			}
 		},
 		{
@@ -11,6 +11,12 @@
 			"style": {
 				"navigationBarTitleText": "登陆"
 			}
+		},
+		{
+			"path": "pages/text/index",
+			"style": {
+				"navigationBarTitleText": "列表演示"
+			}
 		}
 	],
 

+ 13 - 7
pages/index/index.vue

@@ -9,7 +9,9 @@
     <enSwitch v-model="status"  label="状态试" ></enSwitch>
     <enTextarea v-model="content" label="个人简介"></enTextarea>
     <enDate v-model="birthday" type="datetime" label="生日生日"></enDate>
-
+	
+	
+	<view class="" @click="toList()">进入列表演示</view>
   </view>
 
 </template>
@@ -72,12 +74,16 @@
 
 		},
 		methods: {
-      getCode(){
-        console.log('---------------------asdsa')
-        this.text='abc'
-        this.$refs.enSendObj.setCodeNum()
-      },
-
+		  getCode(){
+			console.log('---------------------asdsa')
+			this.text='abc'
+			this.$refs.enSendObj.setCodeNum()
+		  },
+			toList(){
+				uni.navigateTo({
+					url:'/pages/text/index'
+				})
+			},
 
 		},
 	}

+ 20 - 0
pages/text/index.vue

@@ -0,0 +1,20 @@
+<template>
+	<view>
+		<Nav title="列表组件演示"></Nav>
+		<Black></Black>
+	</view>
+</template>
+
+<script>
+	import Black from '@/components/en-utils/en-blank.vue'
+	
+	export default {
+		components:{
+			Black,
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+
+</style>