DeepSeek 助力 Vue 開發:打造絲滑的單選按鈕(Radio Button)

前言:哈嘍,大家好,今天給大家分享一篇文章!并提供具體代碼幫助大家深入理解,徹底掌握!創作不易,如果能幫助到大家或者給大家一些靈感和啟發,歡迎收藏+關注哦 💕

共同探索軟件研發!敬請關注【寶碼香車】
關注描述

csdngif標識

目錄

  • DeepSeek 助力 Vue 開發:打造絲滑的單選按鈕(Radio Button)
    • 📚前言
    • 📚頁面效果
    • 📚指令輸入
      • 定義屬性
        • 1. 基礎屬性
        • 2. 狀態屬性
        • 3. 樣式屬性
        • 4. 分組屬性
      • 定義事件
        • 1. 選中事件
        • 2. 點擊事件
      • 其他
        • 1. 兼容性
        • 2. 可訪問性
        • 3. 樣式定制
        • 4. 錯誤處理
        • 5. 文檔和示例
    • 📚think
      • 📘組件代碼
    • 📚代碼測試
    • 📚測試代碼正常跑通,附其他基本代碼
      • 📘編寫路由 src\router\index.js
      • 📘編寫展示入口 src\App.vue
    • 📚頁面效果
    • 📚相關文章


📚📗📕📘📖🕮💡📝🗂???🛠?💻🚀🎉🏗?🌐🖼?🔗📊👉🔖??🌟🔐??·正文開始??·🎥😊🎓📩😺🌈🤝🤖📜📋🔍?🧰?📄📢📈 🙋0??1??2??3??4??5??6??7??8??9??🔟🆗*??#??

DeepSeek 助力 Vue 開發:打造絲滑的單選按鈕(Radio Button)

📚前言

在全球 AI 市場,DeepSeek 憑借其創新的技術和獨特的優勢,迅速贏得了市場份額,打破了原有的市場格局。許多企業開始重新評估自身的 AI 戰略,加大對 AI 技術的研發投入,以應對 DeepSeek 帶來的競爭壓力。同時,DeepSeek 的開源策略也促進了全球 AI 社區的發展,吸引了更多的開發者和企業參與到 AI 技術的創新和應用中,推動了全球 AI 市場的繁榮。

在大語言模型的發展浪潮中,DeepSeek 雖取得了顯著成就,但也面臨著諸多技術挑戰。

算力需求是首要難題。隨著模型規模的不斷擴大,對算力的要求呈指數級增長。以 DeepSeek-V3 為例,其總參數達 6710 億,如此龐大的模型在訓練過程中需要消耗大量的計算資源。訓練這樣的大模型需要強大的計算集群支持,而構建和維護這樣的計算集群不僅成本高昂,還面臨著技術難題。算力瓶頸不僅限制了模型的訓練速度和效率,也增加了研發成本和時間。在實際訓練中,由于算力不足,可能會導致訓練時間延長,無法及時迭代模型,從而影響產品的競爭力。

📚頁面效果

頁面效果

📚指令輸入

已經創建好了一個基于Vue3的組合式API的項目(Composition API),并能正常運行起來,請幫我用 Vue3的組合式API(Composition API) 生成一個 單選按鈕(Radio Button) 的功能組件,所有代碼都保存在components/RadioButton 下的文件夾中。功能組件的script標簽中只有setup屬性,使用普通 JavaScript 實現,不使用TypeScript。
功能要有,如下屬性:

定義屬性

1. 基礎屬性
  • value:用于綁定單選按鈕的值,當單選按鈕被選中時,該值會被傳遞出去。通常與父組件中的 v-model 配合使用,實現雙向數據綁定。
  • label:顯示在單選按鈕旁邊的文本標簽,用于提示用戶該單選按鈕的含義。
2. 狀態屬性
  • checked:用于控制單選按鈕是否被選中。可以是布爾值,也可以與某個值進行比較來確定是否選中。
  • disabled:布爾類型,用于禁用單選按鈕,使其不可點擊。
3. 樣式屬性
  • size:用于設置單選按鈕的大小,例如 smallmediumlarge 等,方便統一調整組件的外觀。
  • color:設置單選按鈕的顏色,以滿足不同的設計需求。
4. 分組屬性
  • name:用于將多個單選按鈕歸為一組,同一組內的單選按鈕只能有一個被選中。類似于原生 HTML 中 input[type="radio"]name 屬性。

定義事件

1. 選中事件
  • change:當單選按鈕的選中狀態發生改變時觸發,通常會傳遞當前選中的值給父組件,方便父組件進行相應的處理。
2. 點擊事件
  • click:當用戶點擊單選按鈕時觸發,可用于一些額外的交互邏輯,如統計點擊次數等。

其他

1. 兼容性
  • 確保組件在不同瀏覽器和設備上有良好的兼容性,特別是在處理焦點、鍵盤導航等方面。
2. 可訪問性
  • 遵循可訪問性標準,為單選按鈕添加適當的 aria-labelaria-labelledby 屬性,方便屏幕閱讀器等輔助設備識別。
3. 樣式定制
  • 提供一些 CSS 類名或插槽,方便用戶自定義單選按鈕的樣式,以適應不同的設計風格。
4. 錯誤處理
  • 在組件內部對傳入的屬性進行驗證,當傳入無效屬性時給出明確的錯誤提示,方便開發者調試。
5. 文檔和示例
  • 編寫詳細的文檔,說明組件的使用方法、屬性和事件的含義,并提供一些示例代碼,幫助其他開發者快速上手。

你有更好的建議也可以添加,要注明。組件定義好后給出5個及以上的調用示例。
下面是現有目錄
vueAndDeepseek/
├── src/ # 源代碼目錄
│ ├── assets/ # 靜態資源
│ │ ├── base.css
│ │ ├── main.css
│ │ └── logo.svg
│ ├── components/ # 組件目錄
│ │ ├── HelloWorld.vue
│ │ ├── TheWelcome.vue
│ │ ├── WelcomeItem.vue
│ │ ├── Progress/
│ │ │ └── Progress.vue
│ │ ├── Accordion/
│ │ ├── BackToTop/
│ │ ├── Card/
│ │ ├── InfiniteScroll/
│ │ ├── Notification/
│ │ ├── Timeline/
│ │ ├── Switch/
│ │ ├── Tabs/
│ │ ├── Sidebar/
│ │ ├── Breadcrumbs/
│ │ ├── MasonryLayout/
│ │ ├── Rating/
│ │ ├── ColorPicker/
│ │ ├── RightClickMenu/
│ │ ├── RangePicker/
│ │ ├── Navbar/
│ │ ├── FormValidation/
│ │ ├── CopyToClipboard/
│ │ ├── ClickAnimations/
│ │ ├── ThumbnailList/
│ │ ├── KeyboardShortcuts/
│ │ ├── CommentSystem/
│ │ ├── QRCode/
│ │ ├── RadioButton/
│ │ ├── DatePicker/
│ │ └── icons/
│ ├── router/ # 路由配置
│ │ └── index.js
│ ├── stores/ # Pinia 狀態管理
│ │ └── counter.js
│ ├── views/ # 頁面組件
│ │ ├── ProgressView.vue
│ │ ├── TabsView.vue
│ │ ├── SwitchView.vue
│ │ ├── TimelineView.vue
│ │ ├── NotificationView.vue
│ │ ├── CardView.vue
│ │ ├── InfiniteScrollView.vue
│ │ ├── BackToTopView.vue
│ │ ├── AccordionView.vue
│ │ ├── SidebarView.vue
│ │ ├── BreadcrumbsView.vue
│ │ ├── MasonryLayoutView.vue
│ │ ├── RatingView.vue
│ │ ├── ColorPickerView.vue
│ │ ├── RightClickMenuView.vue
│ │ ├── RangePickerView.vue
│ │ ├── NavbarView.vue
│ │ ├── FormValidationView.vue
│ │ ├── CopyToClipboardView.vue
│ │ ├── ClickAnimationsView.vue
│ │ ├── ThumbnailListView.vue
│ │ ├── KeyboardShortcutsView.vue
│ │ ├── CommentSystemView.vue
│ │ ├── QRCodeView.vue
│ │ ├── RadioButtonView.vue
│ │ ├── DatePickerView.vue
│ │ └── AboutView.vue
│ ├── App.vue # 根組件
│ └── main.js # 應用入口
├── public/ # 公共資源目錄
├── index.html # HTML 模板
├── package.json # 項目配置
├── vite.config.js # Vite 配置
└── node_modules/ # 依賴包目錄

📚think

📘組件代碼

根據你的需求,我幫你創建了 RadioButton 組件,以下是具體實現:

components/RadioButton/RadioButton.vue

<template><label class="radio-container":class="[`radio--${size}`,{ 'is-disabled': disabled }]"><inputtype="radio"class="radio-input":checked="isChecked":disabled="disabled":value="value":name="name"@change="handleChange"@click="handleClick":aria-label="ariaLabel"><span class="radio-checkmark":style="checkmarkStyle"></span><span class="radio-label">{{ label }}</span></label>
</template><script setup>
import { computed } from 'vue';const props = defineProps({modelValue: { type: [String, Number, Boolean], required: true },value: { type: [String, Number, Boolean], required: true },label: { type: String, default: '' },checked: { type: Boolean, default: false },disabled: { type: Boolean, default: false },size: { type: String, default: 'medium',validator: (v) => ['small', 'medium', 'large'].includes(v) },color: { type: String, default: '#3b82f6' },name: { type: String, default: '' },ariaLabel: { type: String, default: '' }
});const emit = defineEmits(['update:modelValue', 'change', 'click']);const isChecked = computed(() => props.modelValue !== undefined ? props.modelValue === props.value : props.checked
);const checkmarkStyle = computed(() => ({borderColor: props.color,backgroundColor: isChecked.value ? props.color : 'transparent'
}));const handleChange = (e) => {if (props.disabled) return;emit('update:modelValue', props.value);emit('change', props.value);
};const handleClick = (e) => {if (props.disabled) return;emit('click', e);
};
</script><style scoped>
.radio-container {display: inline-flex;align-items: center;cursor: pointer;user-select: none;margin-right: 16px;
}.radio-input {position: absolute;opacity: 0;height: 0;width: 0;
}.radio-checkmark {position: relative;display: inline-block;width: 18px;height: 18px;border: 2px solid #ccc;border-radius: 50%;margin-right: 8px;transition: all 0.2s ease;
}.radio-checkmark::after {content: "";position: absolute;display: none;top: 3px;left: 3px;width: 8px;height: 8px;border-radius: 50%;background: white;
}.radio-input:checked ~ .radio-checkmark::after {display: block;
}.radio-input:focus-visible ~ .radio-checkmark {box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}/* 尺寸 */
.radio--small .radio-checkmark {width: 16px;height: 16px;
}
.radio--small .radio-checkmark::after {width: 6px;height: 6px;
}.radio--large .radio-checkmark {width: 20px;height: 20px;
}
.radio--large .radio-checkmark::after {width: 10px;height: 10px;
}/* 禁用狀態 */
.is-disabled {opacity: 0.6;cursor: not-allowed;
}
</style>

以下是5個使用示例:

  1. 基礎用法
<template><div><RadioButton v-model="selected" value="apple" label="蘋果" /><RadioButtonv-model="selected"value="banana"label="香蕉"/></div>
</template><script setup>
import { ref } from 'vue';
import RadioButton from '@/components/RadioButton/RadioButton.vue';const selected = ref('apple');
</script>
  1. 禁用狀態
<RadioButtonv-model="selected"value="disabled"label="禁用選項"disabled
/>
  1. 自定義顏色和尺寸
<RadioButtonv-model="selected"value="custom"label="自定義樣式"color="#ff4757"size="large"
/>
  1. 分組使用
<template><div><h3>選擇性別</h3><RadioButtonv-model="gender"value="male"label=""name="gender"/><RadioButtonv-model="gender"value="female"label=""name="gender"/></div>
</template><script setup>
import { ref } from 'vue';const gender = ref('male');
</script>
  1. 事件處理
<template><RadioButtonv-model="selected"value="event"label="帶事件選項"@change="handleChange"@click="handleClick"/>
</template><script setup>
const handleChange = (value) => {console.log('選中值變化:', value);
};const handleClick = (event) => {console.log('點擊事件:', event);
};
</script>

額外建議:

  1. 鍵盤導航支持:已通過原生 input 實現,支持 Space 鍵切換
  2. 焦點樣式:使用 :focus-visible 偽類實現了可見焦點環
  3. 過渡動畫:為 checkmark 添加了過渡動畫提升體驗
  4. 顏色對比度:自動生成的內圈白色確保與自定義顏色形成足夠對比
  5. 響應式設計:使用 em 單位保證在不同字號下的顯示一致性

組件特性:

  • 支持完全鍵盤操作
  • 自動處理 ARIA 屬性
  • 支持按需樣式覆蓋
  • 內置基礎尺寸規范
  • 通過原生 input 實現最佳兼容性
  • 自動處理瀏覽器默認樣式覆蓋

📚代碼測試

正常

📚測試代碼正常跑通,附其他基本代碼

  • 添加路由
  • 頁面展示入口

📘編寫路由 src\router\index.js

\router\index.js

import { createRouter, createWebHistory } from 'vue-router'
import RightClickMenuView from '../views/RightClickMenuView.vue'
import RangePickerView from '../views/RangePickerView.vue'const router = createRouter({history: createWebHistory(import.meta.env.BASE_URL),routes: [{path: '/',name: 'progress',component:  () => import('../views/ProgressView.vue'),},{path: '/tabs',name: 'tabs',// route level code-splitting// this generates a separate chunk (About.[hash].js) for this route// which is lazy-loaded when the route is visited.// 標簽頁(Tabs)component: () => import('../views/TabsView.vue'),},{path: '/accordion',name: 'accordion',// 折疊面板(Accordion)component: () => import('../views/AccordionView.vue'),},{path: '/timeline',name: 'timeline',// 時間線(Timeline)component: () => import('../views/TimelineView.vue'),},{path: '/backToTop',name: 'backToTop',component: () => import('../views/BackToTopView.vue')},{path: '/notification',name: 'notification',component: () => import('../views/NotificationView.vue')},{path: '/card',name: 'card',component: () => import('../views/CardView.vue')},{path: '/infiniteScroll',name: 'infiniteScroll',component: () => import('../views/InfiniteScrollView.vue')},{path: '/switch',name: 'switch',component: () => import('../views/SwitchView.vue')},{path: '/sidebar',name: 'sidebar',component: () => import('../views/SidebarView.vue')},{path: '/breadcrumbs',name: 'breadcrumbs',component: () => import('../views/BreadcrumbsView.vue')},{path: '/masonryLayout',name: 'masonryLayout',component: () => import('../views/MasonryLayoutView.vue')},{path: '/rating',name: 'rating',component: () => import('../views/RatingView.vue')},{path: '/datePicker',name: 'datePicker',component: () => import('../views/DatePickerView.vue')},{path: '/colorPicker',name: 'colorPicker',component: () => import('../views/ColorPickerView.vue')},{path: '/rightClickMenu',name: 'rightClickMenu',component: RightClickMenuView},{path: '/rangePicker',name: 'rangePicker',component: () => import('../views/RangePickerView.vue')},{path: '/navbar',name: 'navbar',component: () => import('../views/NavbarView.vue')},{path: '/formValidation',name: 'formValidation',component: () => import('../views/FormValidationView.vue')},{path: '/copyToClipboard',name: 'copyToClipboard',component: () => import('../views/CopyToClipboardView.vue')},{path: '/clickAnimations',name: 'clickAnimations',component: () => import('../views/ClickAnimationsView.vue')},{path: '/thumbnailList',name: 'thumbnailList',component: () => import('../views/ThumbnailListView.vue')},{path: '/keyboardShortcuts',name: 'keyboardShortcuts',component: () => import('../views/KeyboardShortcutsView.vue')},{path: '/commentSystem',name: 'commentSystem',component: () => import('../views/CommentSystemView.vue')},{path: '/qRCode',name: 'qRCode',component: () => import('../views/QRCodeView.vue')},{path: '/radioButton',name: 'radioButton',component: () => import('../views/RadioButtonView.vue')}],
})export default router

📘編寫展示入口 src\App.vue

 src\App.vue

<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script><template><header><img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" /><div class="wrapper"><HelloWorld msg="You did it!" /><nav><RouterLink to="/">Progress</RouterLink><RouterLink to="/tabs">Tabs</RouterLink><RouterLink to="/accordion">Accordion</RouterLink><RouterLink to="/timeline">Timeline</RouterLink><RouterLink to="/backToTop">BackToTop</RouterLink><RouterLink to="/notification">Notification</RouterLink><RouterLink to="/card">Card</RouterLink><RouterLink to="/infiniteScroll">InfiniteScroll</RouterLink><RouterLink to="/switch">Switch</RouterLink><RouterLink to="/sidebar">Sidebar</RouterLink><RouterLink to="/breadcrumbs">Breadcrumbs</RouterLink><RouterLink to="/masonryLayout">MasonryLayout</RouterLink><RouterLink to="/rating">Rating</RouterLink><RouterLink to="/datePicker">DatePicker</RouterLink><RouterLink to="/colorPicker">ColorPicker</RouterLink><RouterLink to="/rightClickMenu">RightClickMenu</RouterLink><RouterLink to="/rangePicker">RangePicker</RouterLink><RouterLink to="/navbar">Navbar</RouterLink><RouterLink to="/formValidation">FormValidation</RouterLink><RouterLink to="/copyToClipboard">CopyToClipboard</RouterLink><RouterLink to="/clickAnimations">ClickAnimations</RouterLink><RouterLink to="/thumbnailList">ThumbnailList</RouterLink><RouterLink to="/keyboardShortcuts">KeyboardShortcuts</RouterLink><RouterLink to="/commentSystem">CommentSystem</RouterLink><RouterLink to="/qRCode">QRCode</RouterLink><RouterLink to="/radioButton">RadioButton</RouterLink></nav></div></header><RouterView />
</template><style scoped>
header {line-height: 1.5;max-height: 100vh;
}.logo {display: block;margin: 0 auto 2rem;
}nav {width: 100%;font-size: 12px;text-align: center;margin-top: 2rem;
}nav a.router-link-exact-active {color: var(--color-text);
}nav a.router-link-exact-active:hover {background-color: transparent;
}nav a {display: inline-block;padding: 0 1rem;border-left: 1px solid var(--color-border);
}nav a:first-of-type {border: 0;
}@media (min-width: 1024px) {header {display: flex;place-items: center;padding-right: calc(var(--section-gap) / 2);}.logo {margin: 0 2rem 0 0;}header .wrapper {display: flex;place-items: flex-start;flex-wrap: wrap;}nav {text-align: left;margin-left: -1rem;font-size: 1rem;padding: 1rem 0;margin-top: 1rem;}
}
</style>

📚頁面效果

頁面效果

📚相關文章

?

———— 相 關 文 章 ————

?

  1. 0基礎3步部署自己的DeepSeek安裝步驟

  2. DeepSeek 助力 Vue 開發:打造絲滑的步驟條(Step bar)https://blog.csdn.net/qq_33650655/article/details/145560497

  3. DeepSeek 助力 Vue 開發:打造絲滑的進度條(Progress Bar)https://blog.csdn.net/qq_33650655/article/details/145577034

  4. 自己部署 DeepSeek 助力 Vue 開發:打造絲滑的標簽頁(Tabs)https://blog.csdn.net/qq_33650655/article/details/145587999

  5. 自己部署 DeepSeek 助力 Vue 開發:打造絲滑的折疊面板(Accordion)https://blog.csdn.net/qq_33650655/article/details/145590404

  6. 自己部署 DeepSeek 助力 Vue 開發:打造絲滑的時間線(Timeline )https://blog.csdn.net/qq_33650655/article/details/145597372

  7. DeepSeek 助力 Vue 開發:打造絲滑的返回頂部按鈕(Back to Top)https://blog.csdn.net/qq_33650655/article/details/145615550

  8. DeepSeek 助力 Vue 開發:打造絲滑的通知欄(Notification Bar)https://blog.csdn.net/qq_33650655/article/details/145620055

  9. DeepSeek 助力 Vue 開發:打造絲滑的卡片(Card)https://blog.csdn.net/qq_33650655/article/details/145634564

  10. DeepSeek 助力 Vue 開發:打造絲滑的無限滾動(Infinite Scroll)https://blog.csdn.net/qq_33650655/article/details/145638452

  11. DeepSeek 助力 Vue 開發:打造絲滑的開關切換(Switch)https://blog.csdn.net/qq_33650655/article/details/145644151

  12. DeepSeek 助力 Vue 開發:打造絲滑的側邊欄(Sidebar)https://blog.csdn.net/qq_33650655/article/details/145654204

  13. DeepSeek 助力 Vue 開發:打造絲滑的面包屑導航(Breadcrumbs)https://blog.csdn.net/qq_33650655/article/details/145656895

  14. DeepSeek 助力 Vue 開發:打造絲滑的瀑布流布局(Masonry Layout)https://blog.csdn.net/qq_33650655/article/details/145663699

  15. DeepSeek 助力 Vue 開發:打造絲滑的評分組件(Rating)https://blog.csdn.net/qq_33650655/article/details/145664576

  16. DeepSeek 助力 Vue 開發:打造絲滑的日期選擇器(Date Picker),未使用第三方插件 https://blog.csdn.net/qq_33650655/article/details/145673279

  17. DeepSeek 助力 Vue 開發:打造絲滑的顏色選擇器(Color Picker)https://blog.csdn.net/qq_33650655/article/details/145689522

  18. DeepSeek 助力 Vue 開發:打造絲滑的右鍵菜單(RightClickMenu)https://blog.csdn.net/qq_33650655/article/details/145706658

  19. DeepSeek 助力 Vue 開發:打造絲滑的范圍選擇器(Range Picker)https://blog.csdn.net/qq_33650655/article/details/145713572

  20. DeepSeek 助力 Vue 開發:打造絲滑的導航欄(Navbar)https://blog.csdn.net/qq_33650655/article/details/145732421

  21. DeepSeek 助力 Vue 開發:打造絲滑的表單驗證(Form Validation)https://blog.csdn.net/qq_33650655/article/details/145735582

  22. DeepSeek 助力 Vue 開發:打造絲滑的復制到剪貼板(Copy to Clipboard)https://blog.csdn.net/qq_33650655/article/details/145739569

  23. DeepSeek 助力 Vue 開發:打造絲滑的點擊動畫(Click Animations)https://blog.csdn.net/qq_33650655/article/details/145766184

  24. DeepSeek 助力 Vue 開發:打造絲滑的縮略圖列表(Thumbnail List)https://blog.csdn.net/qq_33650655/article/details/145776679

  25. DeepSeek 助力 Vue 開發:打造絲滑的 鍵盤快捷鍵(Keyboard Shortcuts) https://blog.csdn.net/qq_33650655/article/details/145780227

  26. DeepSeek 助力 Vue 開發:打造絲滑的評論系統(Comment System)https://blog.csdn.net/qq_33650655/article/details/145781104

  27. DeepSeek 助力 Vue 開發:打造絲滑的二維碼生成(QR Code)https://blog.csdn.net/qq_33650655/article/details/145797928

到此這篇文章就介紹到這了,更多精彩內容請關注本人以前的文章或繼續瀏覽下面的文章,創作不易,如果能幫助到大家,希望大家多多支持寶碼香車~💕,若轉載本文,一定注明本文鏈接。


整理不易,點贊關注寶碼香車

更多專欄訂閱推薦:
👍 html+css+js 絢麗效果
💕 vue
?? Electron
?? js
📝 字符串
?? 時間對象(Date())操作

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/70649.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/70649.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/70649.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

美顏相機1.0

項目開發步驟 1 界面開發 美顏相機界面構成&#xff1a; 標題 尺寸 關閉方式 位置 可視化 2 創建主函數調用界面方法 3 添加兩個面板 一個是按鈕面板一個是圖片面板 用JPanel 4 添加按鈕到按鈕面吧【注意&#xff1a;此時要用初始化按鈕面板的方法initBtnPanel 并且將按鈕添…

openharmony中hdf框架的驅動消息機制的實現原理

openharmony中hdf框架的驅動消息機制的實現原理 在分析hdf框架時發現繞來繞去的&#xff0c;整體梳理畫了一遍流程圖&#xff0c;發現還是有點模糊甚至不清楚如何使用的&#xff0c;詳細的每個點都去剖析細節又過于消耗時間&#xff0c;所以有時間便從功能應用的角度一塊塊的去…

leaflet實現歷史軌跡播放效果

效果圖如下&#xff1a; 效果實現&#xff1a; 1、添加完整軌跡線&#xff0c;藍色的 this.echoLine L.polyline(points, { weight: 8 }).addTo(this.map) 2、添加實時軌跡線&#xff0c;初始狀態置空 this.realEchoLine L.polyline([], { weight: 12, color: "#FF9…

JAVAEE一>Spring IoC和DI詳解

目錄 Spring容器說明&#xff1a;Ioc容器優勢&#xff1a;DI介紹&#xff1a;從Spring獲取對象&#xff1a;獲取對象的方法&#xff1a;關于上下文的概念&#xff1a; Controller注解&#xff08;控制層&#xff1a;接收參數并響應&#xff09;&#xff1a;Service注解&#xf…

(四)趣學設計模式 之 原型模式!

目錄 一、 啥是原型模式&#xff1f;二、 為什么要用原型模式&#xff1f;三、 原型模式怎么實現&#xff1f;四、 原型模式的應用場景五、 原型模式的優點和缺點六、 總結 &#x1f31f;我的其他文章也講解的比較有趣&#x1f601;&#xff0c;如果喜歡博主的講解方式&#xf…

完美解決:.vmx 配置文件是由 VMware 產品創建,但該產品與此版 VMware Workstation 不兼容

參考文章&#xff1a;該產品與此版 VMware Workstation 不兼容&#xff0c;因此無法使用 問題描述 當嘗試使用 VMware Workstation 打開別人的虛擬機時&#xff0c;可能會遇到以下報錯&#xff1a; 此問題常見于以下場景&#xff1a; 從其他 VMware 版本&#xff08;如 ESX…

Linux——安裝Git的方法

安裝Git的命令&#xff1a; yum -y install git查看Git的版本&#xff1a; git --version

編程小白沖Kaggle每日打卡(13)--kaggle學堂:<機器學習簡介>基礎數據探索

Kaggle官方課程鏈接&#xff1a;Basic Data Exploration 本專欄旨在Kaggle官方課程的漢化&#xff0c;讓大家更方便地看懂。 Basic Data Exploration 加載并理解您的數據。 使用Pandas熟悉您的數據 任何機器學習項目的第一步都是熟悉數據。您將使用Pandas庫進行此操作。Pand…

從零開始的網站搭建(以照片/文本/視頻信息通信網站為例)

本文面向已經有一些編程基礎&#xff08;會至少一門編程語言&#xff0c;比如python&#xff09;&#xff0c;但是沒有搭建過web應用的人群&#xff0c;會寫得盡量細致。重點介紹流程和部署云端的步驟&#xff0c;具體javascript代碼怎么寫之類的&#xff0c;這里不會涉及。 搭…

【Java項目】基于SpringBoot的【高校校園點餐系統】

【Java項目】基于SpringBoot的【高校校園點餐系統】 技術簡介&#xff1a;采用Java技術、MySQL數據庫、B/S結構實現。 系統簡介&#xff1a;高校校園點餐系統是一個面向高校師生的在線點餐平臺&#xff0c;主要分為前臺和后臺兩大模塊。前臺功能模塊包括&#xff08;1&#xff…

Django check_password原理

check_password 是 Django 提供的一個用于密碼校驗的函數&#xff0c;它的工作原理是基于密碼哈希算法的特性。 Django 的 make_password 函數在生成密碼哈希時&#xff0c;會使用一個隨機的 salt&#xff08;鹽值&#xff09;。這個 salt 會與密碼一起進行哈希運算&#xff0…

Vulnhun靶機-kioptix level 4-sql注入萬能密碼拿到權限ssh連接利用mysql-udf漏洞提權

目錄 一、環境搭建信息收集掃描ip掃描開放端口掃描版本服務信息指紋探測目錄掃描 二、Web滲透sql注入 三、提權UDF提權修改權限 一、環境搭建 然后選擇靶機所在文件夾 信息收集 本靶機ip和攻擊機ip 攻擊機&#xff1a;192.168.108.130 靶機&#xff1a;192.168.108.141 掃描…

PHP 會話(Session)實現用戶登陸功能

Cookie是一種在客戶端和服務器之間傳遞數據的機制。它是由服務器發送給客戶端的小型文本文件&#xff0c;保存在客戶端的瀏覽器中。每當瀏覽器向同一服務器發送請求時&#xff0c;它會自動將相關的Cookie信息包含在請求中&#xff0c;以便服務器可以使用這些信息來提供個性化的…

PAT 甲級 1090 Highest Price in Supply Chain

構造一個二維數組 v &#xff0c;v[i] 存放指向 i 的所有元素。 構造隊列 q 存放每個待讀取的節點。 構造數組 high 存放每個節點的高度&#xff08;第幾級經銷商&#xff09; #include<iostream> #include<queue> #include<cmath> using namespace std; …

DeepSeek掘金——SpringBoot 調用 DeepSeek API 快速實現應用開發

Spring Boot 實現 DeepSeek API 調用 1. 項目依賴 在 pom.xml 中添加以下依賴: <dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-webflux</artifactId></dependency>&l…

算法——數學建模的十大常用算法

數學建模的十大常用算法在數學建模競賽和實際問題解決中起著至關重要的作用。以下是這些算法的具體信息、應用場景以及部分算法的C語言代碼示例&#xff08;由于篇幅限制&#xff0c;這里只給出部分算法的簡要代碼或思路&#xff0c;實際應用中可能需要根據具體問題進行調整和擴…

推薦幾款SpringBoot項目手腳架

作為程序員、一般需要搭建項目手腳架時、都會去Gitee或Github上去找、但是由于Github在國內并不穩定、所以就只能去Gitee去上查找。 不同語言檢索方式不一樣、但是也類似。 Gitee WEB應用開發 / 后臺管理框架 芋道源碼 ELADMIN 后臺管理系統 一個基于 Spring Boot 2.7.1…

智能自動化新紀元:AI與UiPath RPA的協同應用場景與技術實踐

智能自動化新紀元&#xff1a;AI與UiPath RPA的協同應用場景與技術實踐 引言 在數字化轉型的浪潮中&#xff0c;企業對于自動化技術的需求已從簡單的任務執行轉向更復雜的智能決策。傳統RPA&#xff08;Robotic Process Automation&#xff09;通過模擬人類操作處理重復性任務…

數據結構:動態數組vector

vector 是 C 標準庫的動態數組。 在C語言中一般初學者會使用malloc&#xff0c;int[n]等方式來創建靜態數組&#xff0c;但是這種方式繁瑣且容易出錯。我們做算法題一般使用動態數組vector&#xff0c; 并且在刷題網站的題目給的輸入一般也是vector類型。 示例&#xff1a;vect…

基于深度學習的信號濾波:創新技術與應用挑戰

一、引言 1.1 研究背景 隨著科技的不斷發展&#xff0c;信號處理領域面臨著越來越復雜的挑戰。在眾多信號處理技術中&#xff0c;基于深度學習的信號濾波技術逐漸嶄露頭角&#xff0c;成為研究的熱點。 基于深度學習的信號濾波在信號處理領域具有至關重要的地位。如今&#…