nommpp 2 лет назад
Родитель
Сommit
7484351271

Разница между файлами не показана из-за своего большого размера
+ 490 - 371
pages/device/detail.vue


BIN
static/images/device/closed.png


BIN
static/images/device/locked.png


BIN
static/images/device/opened.png


BIN
static/images/device/unlocked.png


+ 27 - 27
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue

@@ -3,16 +3,16 @@
 		<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
 		<view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}" :style="{width:drawerWidth+'px'}">
 			<slot />
-		</view>
-		<!-- #ifdef H5 -->
-		<keypress @esc="close('mask')" />
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress @esc="close('mask')" />
 		<!-- #endif -->
 	</view>
 </template>
 
-<script>
-	// #ifdef H5
-	import keypress from './keypress.js'
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
 	// #endif
 	/**
 	 * Drawer 抽屉
@@ -22,16 +22,16 @@
 	 * @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
 	 * @property {Boolean} mode = [left | right] Drawer 滑出位置
 	 * 	@value left 从左侧滑出
-	 * 	@value right 从右侧侧滑出
+	 * 	@value right 从右侧侧滑出
 	 * @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
 	 * @event {Function} close 组件关闭时触发事件
 	 */
 	export default {
-		name: 'UniDrawer',
-		components: {
-			// #ifdef H5
-			keypress
-			// #endif
+		name: 'UniDrawer',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
 		},
 		emits:['change'],
 		props: {
@@ -48,13 +48,13 @@
 			mask: {
 				type: Boolean,
 				default: true
-			},
-			/**
-			 * 遮罩是否可点击关闭
-			 */
-			maskClick:{
-				type: Boolean,
-				default: true
+			},
+			/**
+			 * 遮罩是否可点击关闭
+			 */
+			maskClick:{
+				type: Boolean,
+				default: true
 			},
 			/**
 			 * 抽屉宽度
@@ -74,20 +74,20 @@
 			}
 		},
 		created() {
-			// #ifndef APP-NVUE
+			// #ifndef APP-NVUE
 			this.drawerWidth = this.width
 			// #endif
 			this.rightMode = this.mode === 'right'
 		},
-		methods: {
+		methods: {
 			clear(){},
-			close(type) {
-				// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
+			close(type) {
+				// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
 				if((type === 'mask' && !this.maskClick) || !this.visibleSync) return
 				this._change('showDrawer', 'visibleSync', false)
 			},
-			open() {
-				// fixed by mehaotian 处理重复点击打开的事件
+			open() {
+				// fixed by mehaotian 处理重复点击打开的事件
 				if(this.visibleSync) return
 				this._change('visibleSync', 'showDrawer', true)
 			},
@@ -105,7 +105,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
 	// 抽屉宽度
 	$drawer-width: 220px;
@@ -180,4 +180,4 @@
 		/* #endif */
 		opacity: 1;
 	}
-</style>
+</style>