笔记:代码与笔记上传

This commit is contained in:
NANAN 2025-03-03 15:21:07 +08:00
parent 4f8e580fcf
commit e09eea0964
25 changed files with 40 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

View File

@ -0,0 +1,38 @@
<template>
<h3>计算属性的应用</h3>
<div>
<p>数组元素为{{ arrayNumber }}</p>
<p>数组中最大数为{{ maxNumber }}</p>
<!-- <p>数组中最大数为{{maxNumber}}</p> -->
<p>
<span>方法数组中最小数为{{ min }}</span
><button v-on:click="findMinNumber()">求最小值</button>
</p>
<p>函数数组中最小数为{{ minNumber() }}</p>
<!-- <p>函数数组中最小数为{{minNumber()}}</p> -->
<p>原来message:{{ message }}</p>
<p>函数处理后{{ message.split(" ").reverse() }}</p>
</div>
</template>
<script setup lang='ts'>
import { log } from "console";
import { computed, ref } from "vue";
const arrayNumber = ref([3000, -2000, 1308, 278, 225, 556, 1110]);
const min = ref(0);
const message = ref("The Progressive JavaScript Framework");
const maxNumber = computed(() => {
console.log("maxNumber");
console.log(arrayNumber);
return Math.max(...arrayNumber.value);
});
const minNumber = () => {
console.log("minNumber");
return Math.min(...arrayNumber.value);
};
const findMinNumber = () => {
console.log("findMinNumber");
min.value = Math.min(...arrayNumber.value);
};
</script>
<style scoped>
</style>

View File

@ -1,9 +1,9 @@
import './assets/main.css'
import { createApp } from 'vue'
import Vue2_1 from './Vue2_1.vue'
import Vue2_4 from './Vue2_4.vue'
const app = createApp(Vue2_1)
const app = createApp(Vue2_4)
app.use(app);