border-update.uvue 640 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<template>
	<!-- #ifdef APP -->
	<scroll-view style="flex:1">
	<!-- #endif -->
		<view>
			<button @click="handleUpdate">点击更新border样式</button>
			<view class="border-view" :style="borderStyle"></view>
		</view>
	<!-- #ifdef APP -->
	</scroll-view>
	<!-- #endif -->
</template>

<script setup>
	let borderStyle = ref("border:3px solid red;")
	const handleUpdate = () => {
		borderStyle.value = "border:7px solid red;"
18 19 20 21 22 23 24 25 26
	}

  const jest_border_update = ()=>{
    handleUpdate()
  }

  defineExpose({
    jest_border_update
  })
27 28 29 30 31 32 33 34
</script>

<style>
	.border-view {
		width: 150px;
		height: 150px;
	}
</style>