decorview.uvue 786 字节
Newer Older
杜庆泉's avatar
杜庆泉 已提交
1 2 3
<template>
	<view>
		<page-head title="DecorView示例" accordion></page-head>
Y
yurj26 已提交
4 5 6
        
        <button @click="testAddToDecorView">添加TextView至视图顶层</button>
        <button @click="testRemoveToDecorView">移除视图顶层的TextView</button>
杜庆泉's avatar
杜庆泉 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
			
	</view>
</template>

<script>
	import {
		addViewToDecorView,
		removeViewToDecorView
	} from "../../../uni_modules/uts-advance";
	
	export default {
		data() {
			return {
				title: 'UTS进阶示例',
			}
		},
	
		methods: {

			/**
			 * 测试添加View实例至顶层容器
			 */
			testAddToDecorView: function() {
				addViewToDecorView();
			},
			/**
			 * 测试移除顶层容器的View实例
			 */
			testRemoveToDecorView: function() {
				removeViewToDecorView();
			}
	
	
		}
	}
</script>

<style>
</style>