Python私教張大鵬 Vue3整合AntDesignVue之文本組件

案例:展示標題

核心代碼:

<a-typography><a-typography-title>Introduction</a-typography-title>
</a-typography>

vue3示例:

<template><a-typography><a-typography-title>這是一個標題</a-typography-title></a-typography>
</template>

在這里插入圖片描述

案例:展示段落

核心代碼:

<template><a-typography><a-typography-title>美國新聞稿發布-華爾街日報</a-typography-title><a-typography-paragraph>媒體介紹:華爾街日報(The Wall Street Journal)于1889年創刊,是美國付費發行量最大的財經報紙,其發行量超過200萬份。該報出版于美國紐約,主要報道財經新聞,側重金融商業報道,其影響力巨大。《華爾街日報》的讀者大多為政治、經濟、教育和醫學界人士、金融大亨和經營管理人員以及股票市場的投資者。</a-typography-paragraph></a-typography>

vue3示例:

<template><a-typography><a-typography-title>美國新聞稿發布-華爾街日報</a-typography-title><a-typography-paragraph>媒體介紹:華爾街日報(The Wall StreetJournal)于1889年創刊,是美國付費發行量最大的財經報紙,其發行量超過200萬份。該報出版于美國紐約,主要報道財經新聞,側重金融商業報道,其影響力巨大。《華爾街日報》的讀者大多為政治、經濟、教育和醫學界人士、金融大亨和經營管理人員以及股票市場的投資者。</a-typography-paragraph><a-typography-paragraph>該報出版亞洲版(1976年)、歐洲版(1983年)、網絡版(1996年)等,覆蓋面廣泛且歷史悠久,其讀者每天超2000萬人。《華爾街日報》是美國的高端報紙,讀者群的平均家庭年收入達15萬美元。針對不同的用戶群體有不同的營銷策略,為忠實用戶推出專業并具有深度的優質新聞內容,為潛在用戶提供免費內容資源,獨家新聞采取收費。</a-typography-paragraph></a-typography>
</template>

在這里插入圖片描述

案例:展示重要內容

核心代碼:

<a-typography-text strong>uniform the user interface specs for internal background projects, lower the unnecessarycost of design differences and implementation and liberate the resources of design andfront-end development.
</a-typography-text>

vue3示例:

<template><a-typography><a-typography-title>美國新聞稿發布-華爾街日報</a-typography-title><a-typography-paragraph>媒體介紹:華爾街日報(The Wall StreetJournal)于1889年創刊,是美國付費發行量最大的財經報紙,其發行量超過200萬份。該報出版于美國紐約,主要報道財經新聞,側重金融商業報道,其影響力巨大。《華爾街日報》的讀者大多為政治、經濟、教育和醫學界人士、金融大亨和經營管理人員以及股票市場的投資者。</a-typography-paragraph><a-typography-text strong>該報出版亞洲版(1976年)、歐洲版(1983年)、網絡版(1996年)等,覆蓋面廣泛且歷史悠久,其讀者每天超2000萬人。《華爾街日報》是美國的高端報紙,讀者群的平均家庭年收入達15萬美元。針對不同的用戶群體有不同的營銷策略,為忠實用戶推出專業并具有深度的優質新聞內容,為潛在用戶提供免費內容資源,獨家新聞采取收費。</a-typography-text></a-typography>
</template>

在這里插入圖片描述

案例:展示二級標題

核心代碼:

<a-typography-title :level="2">Guidelines and Resources</a-typography-title>

vue3示例:

<template><a-typography><a-typography-title>美國新聞稿發布-華爾街日報</a-typography-title><a-typography-title :level="2">二級標題</a-typography-title><a-typography-paragraph>媒體介紹:華爾街日報(The Wall StreetJournal)于1889年創刊,是美國付費發行量最大的財經報紙,其發行量超過200萬份。該報出版于美國紐約,主要報道財經新聞,側重金融商業報道,其影響力巨大。《華爾街日報》的讀者大多為政治、經濟、教育和醫學界人士、金融大亨和經營管理人員以及股票市場的投資者。</a-typography-paragraph><a-typography-title :level="2">二級標題</a-typography-title><a-typography-paragraph>該報出版亞洲版(1976年)、歐洲版(1983年)、網絡版(1996年)等,覆蓋面廣泛且歷史悠久,其讀者每天超2000萬人。《華爾街日報》是美國的高端報紙,讀者群的平均家庭年收入達15萬美元。針對不同的用戶群體有不同的營銷策略,為忠實用戶推出專業并具有深度的優質新聞內容,為潛在用戶提供免費內容資源,獨家新聞采取收費。</a-typography-paragraph></a-typography>
</template>

在這里插入圖片描述

案例:展示代碼片段

核心代碼:

<a-typography-text code>Sketch</a-typography-text>

vue3示例:

<template><a-typography><a-typography-title>Python代碼片段</a-typography-title><a-typography-text code>def add(a, b):return a + bprint(add(11, 22))</a-typography-text></a-typography>
</template>

在這里插入圖片描述

案例:展示鏈接

核心代碼:

<a-typography-link href="/docs/resources">Resource Download</a-typography-link>

vue3示例:

<template><a-typography><a-typography-title>友情鏈接</a-typography-title><a-typography-paragraph>參考鏈接:<a-typography-link href="http://www.baidu.com">百度</a-typography-link><a-typography-link href="https://www.sohu.com/">搜狐</a-typography-link><a-typography-link href="https://www.sina.com/">新浪</a-typography-link></a-typography-paragraph></a-typography>
</template>

在這里插入圖片描述

案例:展示鍵盤快捷鍵

核心代碼:

<a-typography-text keyboard>Esc</a-typography-text>

vue3示例:

<template><a-typography><a-typography-title>常用快捷鍵</a-typography-title><a-typography-paragraph><a-typography-text keyboard>ctrl + c</a-typography-text><a-typography-text>復制</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text keyboard>ctrl + v</a-typography-text><a-typography-text>粘貼</a-typography-text></a-typography-paragraph></a-typography>
</template>
<script setup lang="ts">
</script>

在這里插入圖片描述

案例:超過一行變省略號

核心代碼:

<a-typography-paragraph:ellipsis="ellipsis"content=" Ant Design, a design language for background applications, is refined by Ant UED Team. AntDesign, a design language for background applications, is refined by Ant UED Team. AntDesign, a design language for background applications, is refined by Ant UED Team. AntDesign, a design language for background applications, is refined by Ant UED Team. AntDesign, a design language for background applications, is refined by Ant UED Team. AntDesign, a design language for background applications, is refined by Ant UED Team."/>

vue3示例:

<template><a-typography><a-typography-title>超過一行變省略號</a-typography-title><a-typography-paragraph ellipsis>該報出版亞洲版(1976年)、歐洲版(1983年)、網絡版(1996年)等,覆蓋面廣泛且歷史悠久,其讀者每天超2000萬人。《華爾街日報》是美國的高端報紙,讀者群的平均家庭年收入達15萬美元。針對不同的用戶群體有不同的營銷策略,為忠實用戶推出專業并具有深度的優質新聞內容,為潛在用戶提供免費內容資源,獨家新聞采取收費。</a-typography-paragraph></a-typography>
</template>

在這里插入圖片描述

案例:段落可編輯

核心代碼:

<a-typography-paragraph v-model:content="editableStr" editable />

vue3示例:

<script setup="">
import {ref} from "vue";const msg = ref("可編輯的文本,不信你試試")
</script>
<template><a-typography><a-typography-title>可編輯的文本</a-typography-title><a-typography-paragraph v-model:content="msg" editable></a-typography-paragraph></a-typography>
</template>
<style scoped></style>

在這里插入圖片描述

案例:段落可復制

核心代碼:

<a-typography-paragraph :copyable="{ tooltip: false }">Hide Copy tooltips.
</a-typography-paragraph>

vue3示例:

<script setup="">
import {ref} from "vue";const msg=ref("可編輯的文本")
</script>
<template>
<a-typography><a-typography-title>可復制的文本</a-typography-title><a-typography-paragraph copyable>這個文本可以被復制,不信你試試</a-typography-paragraph><a-typography-paragraph v-model:content="msg" editable/>
</a-typography>
</template>
<style scoped></style>

在這里插入圖片描述

案例:文本樣式

核心代碼:

<template><a-space direction="vertical"><a-typography-text>Ant Design Vue (default)</a-typography-text><a-typography-text type="secondary">Ant Design Vue (secondary)</a-typography-text><a-typography-text type="success">Ant Design Vue (success)</a-typography-text><a-typography-text type="warning">Ant Design Vue (warning)</a-typography-text><a-typography-text type="danger">Ant Design Vue (danger)</a-typography-text><a-typography-text disabled>Ant Design Vue (disabled)</a-typography-text><a-typography-text mark>Ant Design Vue (mark)</a-typography-text><a-typography-text code>Ant Design Vue (code)</a-typography-text><a-typography-text keyboard>Ant Design Vue (keyboard)</a-typography-text><a-typography-text underline>Ant Design Vue (underline)</a-typography-text><a-typography-text delete>Ant Design Vue (delete)</a-typography-text><a-typography-text strong>Ant Design Vue (strong)</a-typography-text><a-typography-link href="https://antdv.com" target="_blank">Ant Design Vue (Link)</a-typography-link></a-space>
</template>

vue3示例:

<script setup="">
</script>
<template><a-typography><a-typography-title>文本樣式</a-typography-title><a-typography-paragraph><a-typography-text>默認樣式</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text type="secondary">secondary 樣式</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text type="warning">warning 樣式</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text type="success">success 樣式</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text type="danger">danger 樣式</a-typography-text></a-typography-paragraph></a-typography>
</template>
<style scoped></style>

在這里插入圖片描述

案例:文本劃線

核心代碼:

<a-typography-text underline>Ant Design Vue (underline)</a-typography-text>
<a-typography-text delete>Ant Design Vue (delete)</a-typography-text>

vue3示例:

<script setup="">
</script>
<template><a-typography><a-typography-title>文本下劃線和中劃線</a-typography-title><a-typography-paragraph><a-typography-text underline>下劃線</a-typography-text></a-typography-paragraph><a-typography-paragraph><a-typography-text delete>中劃線,刪除線</a-typography-text></a-typography-paragraph></a-typography>
</template>
<style scoped></style>

在這里插入圖片描述

案例:文本高亮

核心代碼:

<a-typography-text mark>Ant Design Vue (mark)</a-typography-text>

vue3示例:

<script setup="">
</script>
<template><a-typography><a-typography-title>文本高亮</a-typography-title><a-typography-paragraph>該報出版亞洲版(1976年)、歐洲版(1983年)、網絡版(1996年)等,覆蓋面廣泛且歷史悠久,其讀者每天超2000萬人。<a-typography-text mark>《華爾街日報》是美國的高端報紙</a-typography-text>,讀者群的平均家庭年收入達15萬美元。針對不同的用戶群體有不同的營銷策略,為忠實用戶推出專業并具有深度的優質新聞內容,為潛在用戶提供免費內容資源,獨家新聞采取收費。</a-typography-paragraph></a-typography>
</template>
<style scoped></style>

在這里插入圖片描述

API

Typography.Text

參數說明類型默認值版本
code添加代碼樣式booleanfalse
content(v-model)當使用 ellipsis 或 editable 時,使用 content 代替 childrenstring-
copyable是否可拷貝,為對象時可進行各種自定義boolean | copyablefalsecopyable
delete添加刪除線樣式booleanfalse
disabled禁用文本booleanfalse
editable是否可編輯,為對象時可對編輯進行控制boolean | editablefalseeditable
ellipsis自動溢出省略booleanfalse
keyboard添加鍵盤樣式booleanfalse
mark添加標記樣式booleanfalse
strong是否加粗booleanfalse
type文本類型secondarysuccesswarning
underline添加下劃線樣式booleanfalse

Typography.Title

參數說明類型默認值版本
code添加代碼樣式booleanfalse
content(v-model)當使用 ellipsis 或 editable 時,使用 content 代替 childrenstring-
copyable是否可拷貝,為對象時可進行各種自定義boolean | copyablefalsecopyable
delete添加刪除線樣式booleanfalse
disabled禁用文本booleanfalse
editable是否可編輯,為對象時可對編輯進行控制boolean | editablefalseeditable
ellipsis自動溢出省略,為對象時可設置省略行數、是否可展開、添加后綴等boolean | ellipsisfalseellipsis
level重要程度,相當于 h1h2h3h4h5number: 1, 2, 3, 4, 51
mark添加標記樣式booleanfalse
type文本類型secondarysuccesswarning
underline添加下劃線樣式booleanfalse

Typography.Paragraph

參數說明類型默認值版本
code添加代碼樣式booleanfalse
content(v-model)當使用 ellipsis 或 editable 時,使用 content 代替 childrenstring-
copyable是否可拷貝,為對象時可進行各種自定義boolean | copyablefalsecopyable
delete添加刪除線樣式booleanfalse
disabled禁用文本booleanfalse
editable是否可編輯,為對象時可對編輯進行控制boolean | editablefalseeditable
ellipsis自動溢出省略,為對象時可設置省略行數、是否可展開、添加后綴等boolean | ellipsisfalseellipsis
mark添加標記樣式booleanfalse
strong是否加粗booleanfalse
type文本類型secondarysuccesswarning
underline添加下劃線樣式booleanfalse

slots

名稱說明參數默認值版本
copyableIcon自定義拷貝圖標{ copied: boolean }copied ? <CheckOutlined /> : <CopyOutlined />
copyableTooltip自定義提示文案,當 copyable.tooltip = false 時關閉{ copied: boolean }copied ? '復制成功' : '復制'
editableIcon自定義編輯圖標-
editableTooltip自定義提示文本,當 editable.tooltip = false 時關閉-編輯
ellipsisSymbol自定義展開描述文案--
ellipsisTooltip省略時,展示提示信息--
enterEnterIcon在編輯段中自定義“enter”圖標{className: string}<EnterOutlined />3.0

copyable

 {text: string,onCopy: function(event),tooltip: false,}
參數說明類型默認值版本
text拷貝到剪切板里的文本string-
tooltip是否展示提示文本booleantrue
onCopy拷貝成功的回調函數function-

editable

  {tooltip: boolean,editing: boolean,maxlength: number,autoSize: boolean | { minRows: number, maxRows: number },onStart: function,onChange: function(string),onCancel: function,onEnd: function,triggerType: ('icon' | 'text')[],}
參數說明類型默認值版本
autoSize自動 resize 文本域boolean | { minRows: number, maxRows: number }-
editing控制是否是編輯中狀態booleanfalse
maxlength編輯中文本域最大長度number-
tooltip是否展示提示文本booleantrue
triggerType編輯模式觸發器類型,圖標、文本或者兩者都設置(不設置圖標作為觸發器時它會隱藏)Array<icontext>[icon]
onCancel按 ESC 退出編輯狀態時觸發function-
onChange文本域編輯時觸發function(event)-
onEnd按 ENTER 結束編輯狀態時觸發function-
onStart進入編輯中狀態時觸發function-

ellipsis

  {rows: number,expandable: boolean,suffix: string,symbol: string,tooltip: boolean,onExpand: function(event),onEllipsis: function(ellipsis),}
參數說明類型默認值版本
expandable是否可展開boolean-
rows最多顯示的行數number-
suffix自定義省略內容后綴string-
symbol自定義展開描述文案string展開
tooltip省略時,展示提示信息boolean | string-
onEllipsis觸發省略時的回調function(ellipsis)-
onExpand點擊展開時的回調function(event)-

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

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

相關文章

HTTP請求過程

HTTP&#xff08;超文本傳輸協議&#xff09;請求過程是客戶端&#xff08;通常是瀏覽器&#xff09;與服務器之間通信的方式&#xff0c;用于從服務器請求資源&#xff08;如網頁、圖片、視頻等&#xff09;。以下是HTTP請求的基本步驟&#xff1a; 建立TCP連接&#xff1a; 如…

【K8s】專題四(6):Kubernetes 控制器之 Job

以下內容均來自個人筆記并重新梳理&#xff0c;如有錯誤歡迎指正&#xff01;如果對您有幫助&#xff0c;煩請點贊、關注、轉發&#xff01;歡迎掃碼關注個人公眾號&#xff01; 目錄 一、基本介紹 二、工作原理 三、相關特性 四、資源清單&#xff08;示例&#xff09; 五…

C語言經典習題20

一編寫一個函數用于計算高于平均分的人數 編寫一個函數int fun(float s[],int n)&#xff0c;用于計算高于平均分的人數&#xff0c;并作為函數值返回&#xff0c;其中數組s中存放n位學生的成績。再編寫一個主函數&#xff0c;從鍵盤輸入一批分數&#xff08;用-1來結束輸入&a…

電路分析答疑 1

三要素法求解的時候&#xff0c; 電容先求U&#xff0c;再利用求導求I 電感先求I&#xff0c;再利用求導求U 若I的頭上沒有點點&#xff0c;那就是求有效值 疊加定理&#xff0c;不要忘記 若電流值或者電壓值已經給出來了&#xff0c;那就說明這一定是直流電。 在畫畫圈的時候…

數據庫(25)——多表關系介紹

在項目開發中&#xff0c;進行數據庫表結構設計時&#xff0c;會根據業務需求及業務模塊之間的關系&#xff0c;分析并設計表結構&#xff0c;各個表之間的結構基本上分為三種&#xff1a;一對多&#xff0c;多對多&#xff0c;一對一。 一對多 例如&#xff0c;一個學校可以有…

Mac修改Mysql8.0密碼

轉載請標明出處&#xff1a;http://blog.csdn.net/donkor_/article/details/139392605 文章目錄 前言修改密碼Step1:修改my.conf文件Step2:添加配置skip-grant-tablesStep3:重啟mysql服務Step4:進入mysqlStep5:刷新權限Step6:修改密碼Step7:再次刷新權限Step8:刪除/注釋 skip-…

DNS域名

DNS域名 DNS是域名系統的簡稱 域名和ip地址之間的映射關系 互聯網中&#xff0c;ip地址是通信的唯一標識 訪問網站&#xff0c;域名&#xff0c;ip地址不好記&#xff0c;域名朗朗上口&#xff0c;好記。 域名解析的目的就是為了實現&#xff0c;訪問域名就等于訪問ip地址…

【Python】 獲取當前日期的Python代碼解析與應用

標題&#xff1a;Python中獲取當前日期的簡單指南 基本原理 在Python中&#xff0c;獲取當前日期是一個常見的需求&#xff0c;尤其是在處理日志、數據記錄和時間相關的任務時。Python提供了多種方式來獲取和處理日期和時間&#xff0c;其中最常用的模塊是datetime。datetime…

多客陪玩系統-開源陪玩系統平臺源碼-支持游戲線上陪玩家政線下預約等多場景應用支持H5+小程序+APP

多客陪玩系統-開源陪玩系統平臺源碼-支持游戲線上陪玩家政按摩線下預約等多場景應用支持H5小程序APP 軟件架構 前端&#xff1a;Uniapp-vue2.0 后端&#xff1a;Thinkphp6 前后端分離 前端支持&#xff1a; H5小程序雙端APP&#xff08;安卓蘋果&#xff09; 安裝教程 【商業…

學習VUE3——組件(一)

組件注冊 分為全局注冊和局部注冊兩種。 全局注冊&#xff1a; 在main.js或main.ts中&#xff0c;使用 Vue 應用實例的 .component() 方法&#xff0c;讓組件在當前 Vue 應用中全局可用。 import { createApp } from vue import MyComponent from ./App.vueconst app crea…

11、“十四五”大數據產業發展規劃

數據是新時代重要的生產要素, 是國家基礎性戰略資源。 大數據是數據的集合, 以容量大、 類型多、 速度快、 精度準、 價值高為主要特征, 是推動經濟轉型發展的新動力,是提升政府治理能力的新途徑, 是重塑國家競爭優勢的新機遇。 大數據產業是以數據生成、 采集、 存儲、 加…

QT C++ QTableWidget 表格合并 setSpan 簡單例子

這里說的合并指的是單元格&#xff0c;不是表頭。span的意思是跨度、寬度、范圍。 setSpan函數需要設定行、列、行跨幾格&#xff0c;列跨幾格。 //函數原型如下 void QTableView::setSpan(int row, i nt column, 、 int rowSpanCount,/*行跨過的格數*/ int columnSpanCount…

【算法無用系列】電影推薦——余弦相似度計算用戶相似度原理

【算法無用系列】通過余弦相似度計算電影、用戶相似度 話不多說&#xff0c;本文通過電影推薦系統中&#xff0c;基于余弦相似度算法計算出用戶相似和電影相似原理。希望可以幫助一些代碼不懂的同學一些思路。 記錄用戶電影評分數據 一般情況來說&#xff0c;會根據用戶的行為…

什么是數字化轉型?

作者&#xff1a; 峽山老曹 數字神化 ”企業如何實現數字化轉型“是擺在現代企業面前一個無法回避的問題&#xff0c;數字化轉型的重要性不容忽視&#xff0c;它不僅是企業適應數字化時代的必然要求&#xff0c;更是提升競爭力、實現可持續發展的關鍵。隨著科技的飛速發展和市場…

學會spring boot 的這些技巧,編程瞬間變得簡單了,效率也提高了!

在Spring Boot應用中,斷言主要用于測試環境中驗證代碼行為是否符合預期。雖然Spring Boot自身不直接包含斷言庫,但通常我們會使用JUnit(一個廣泛應用于Java的單元測試框架)來進行測試,其中包含了豐富的斷言方法來幫助我們進行各種條件驗證。下面通過一些具體的示例來詳細說…

二叉樹的層序遍歷-力扣

本題是二叉樹的層序遍歷&#xff0c;通過一個隊列來控制遍歷的節點&#xff0c;二叉樹每層的節點和上一層入隊的節點個數是相同的&#xff0c;根據這一點編寫循環條件。 /*** Definition for a binary tree node.* struct TreeNode {* int val;* TreeNode *left;* …

八、C語言:操作符詳解

一、移位操作符 1.1左移操作 左邊丟棄&#xff0c;右邊補0 1.2右移操作 算數右移&#xff1a;右邊丟棄&#xff0c;左邊補原符號位 邏輯右移&#xff1a;右邊丟棄&#xff0c;左邊補0 int main() {int a -1;int b a >> 1;printf("b%d\n",b);return 0; } 原碼…

【Linux進程篇】Linux進程管理應用——虛假的shell腳本

W...Y的主頁 &#x1f60a; 代碼倉庫分享&#x1f495; 前言&#xff1a;我們已經了解了進程的工作原理&#xff0c;并且學習了進程創建、進程終止、進程等待以及進程程序替換。為了更好的鞏固這些知識&#xff0c;我們可以創建一個簡易的shell命令行。 目錄 做一個簡易的s…

GAT1399協議分析(六)--校時

一、官方消息定義 DeviceIDType &#xff1a;GA/T1400.1,采集設備、 卡口點位、 采集系統、分析系統、視圖庫、應用平臺等設備編碼規則 TimeCorrectModeType&#xff1a; dateTime時間格式&#xff1a; TimeZone&#xff1a;時區&#xff0c;GAT1400里面沒有找到具體內容&…

臥式攪拌機:一鍵自動稱重輕松搞定

在現代化工業生產中&#xff0c;G效、精準的設備是提高生產效率、降低生產成本。近年來&#xff0c;臥式攪拌機一鍵自動稱重包裝機的出現&#xff0c;無疑為眾多行業帶來了變革。這種集攪拌、稱重、包裝于一體的智能化設備&#xff0c;以其G效、便捷、精準的特點&#xff0c;迅…