Sun Jul 23 07:10:00 CST 2023 inscode

上级 6679d104
<script setup> <script setup>
import GameChart from './components/GameChart.vue' import GameChart from './components/GameChart.vue'
import SearchGrade from './components/SearchGrade.vue' import SearchGrade from './components/SearchGrade.vue'
import { reactive, onMounted } from 'vue'; import { reactive, onBeforeMount } from 'vue';
const state = reactive({ const state = reactive({
current: '新星赛道选手信息可视化' current: '新星赛道选手信息可视化'
}) })
onMounted(() => { onBeforeMount(() => {
const href = window.location.href const href = window.location.href
const data = {} const data = {}
const urlArray = href.split('?') const urlArray = href.split('?')
...@@ -17,6 +17,7 @@ onMounted(() => { ...@@ -17,6 +17,7 @@ onMounted(() => {
const value = itemArray[1] const value = itemArray[1]
data[key] = value data[key] = value
}) })
console.log('urlArray',urlArray)
if (data['type'] = 'csdn_game') { if (data['type'] = 'csdn_game') {
state.current = '新星赛道选手信息可视化' state.current = '新星赛道选手信息可视化'
} }
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
<div style="display: flex"> <div style="display: flex">
<div> 请作者喝杯茶(点击放大图片):</div> <div> 请作者喝杯茶(点击放大图片):</div>
<div> <div>
<a-image :height="70" :width="50" src="https://yongma16.xyz/staticFile/common/img/wx-pay.jpg" /> <a-image :height="70" :width="50" src="https://yongma16.xyz/staticFile/common/img/wx-pay.jpg" ref="imgRef" />
</div> </div>
</div> </div>
</div> </div>
...@@ -25,6 +24,19 @@ ...@@ -25,6 +24,19 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {ref,onMounted} from 'vue'
const imgRef=ref(null)
onMounted(()=>{
console.log('imgRef',imgRef)
try{
if(imgRef&&imgRef.value){
imgRef.value.click()
}
}
catch(e){
console.log(e)
}
})
</script> </script>
<style> <style>
.csdn-img { .csdn-img {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册