笔记:代码与笔记上传
BIN
3.3/Snapshots/2025-3-3 14-21-58.JPG
Normal file
After Width: | Height: | Size: 201 KiB |
BIN
3.3/Snapshots/2025-3-3 14-22-6.JPG
Normal file
After Width: | Height: | Size: 202 KiB |
BIN
3.3/Snapshots/2025-3-3 14-23-40.JPG
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
3.3/Snapshots/2025-3-3 14-23-7.JPG
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
3.3/Snapshots/2025-3-3 14-24-11.JPG
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
3.3/Snapshots/2025-3-3 14-25-11.JPG
Normal file
After Width: | Height: | Size: 271 KiB |
BIN
3.3/Snapshots/2025-3-3 14-25-2.JPG
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
3.3/Snapshots/2025-3-3 14-25-5.JPG
Normal file
After Width: | Height: | Size: 218 KiB |
BIN
3.3/Snapshots/2025-3-3 14-25-7.JPG
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
3.3/Snapshots/2025-3-3 14-29-8.JPG
Normal file
After Width: | Height: | Size: 109 KiB |
BIN
3.3/Snapshots/2025-3-3 14-30-18.JPG
Normal file
After Width: | Height: | Size: 169 KiB |
BIN
3.3/Snapshots/2025-3-3 14-31-51.JPG
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
3.3/Snapshots/2025-3-3 14-32-43.JPG
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
3.3/Snapshots/2025-3-3 14-34-22.JPG
Normal file
After Width: | Height: | Size: 162 KiB |
BIN
3.3/Snapshots/2025-3-3 14-34-50.JPG
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
3.3/Snapshots/2025-3-3 14-36-31.JPG
Normal file
After Width: | Height: | Size: 159 KiB |
BIN
3.3/Snapshots/2025-3-3 15-10-29.JPG
Normal file
After Width: | Height: | Size: 206 KiB |
BIN
3.3/Snapshots/2025-3-3 15-11-57.JPG
Normal file
After Width: | Height: | Size: 221 KiB |
BIN
3.3/Snapshots/2025-3-3 15-15-31.JPG
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
3.3/Snapshots/2025-3-3 15-17-41.JPG
Normal file
After Width: | Height: | Size: 206 KiB |
BIN
3.3/Snapshots/2025-3-3 15-2-38.JPG
Normal file
After Width: | Height: | Size: 301 KiB |
BIN
3.3/Snapshots/2025-3-3 15-5-9.JPG
Normal file
After Width: | Height: | Size: 255 KiB |
BIN
3.3/Snapshots/2025-3-3 15-8-31.JPG
Normal file
After Width: | Height: | Size: 200 KiB |
38
3.3/Vue3Proj/vue-project/src/Vue2_4.vue
Normal 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>
|
@ -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);
|
||||
|
||||
|