1. <nobr id="easjo"><address id="easjo"></address></nobr>

      <track id="easjo"><source id="easjo"></source></track>
      1. 
        

      2. <bdo id="easjo"><optgroup id="easjo"></optgroup></bdo>
      3. <track id="easjo"><source id="easjo"><em id="easjo"></em></source></track><option id="easjo"><span id="easjo"><em id="easjo"></em></span></option>
          貴州做網站公司
          貴州做網站公司~專業!靠譜!
          10年網站模板開發經驗,熟悉國內外開源網站程序,包括DEDECMS,WordPress,ZBlog,Discuz! 等網站程序,可為您提供網站建設,網站克隆,仿站,網頁設計,網站制作,網站推廣優化等服務。我們專注高端營銷型網站,企業官網,集團官網,自適應網站,手機網站,網絡營銷,網站優化,網站服務器環境搭建以及托管運維等。為客戶提供一站式網站解決方案?。?!

          ElementUI

          來源:互聯網轉載 時間:2024-01-29 07:51:44

          VUEUI組件庫

          ElementUI 餓了么團隊開發的PC端的vue組件庫。

          MintUI 餓了么團隊開發的移動端的vue組件庫。

          VantUI 有贊團隊開發的移動端的vue組件庫。

          ElementUI

          餓了么團隊開發的PC端的vue組件庫。

          搭建ElemmentUI基礎環境(基于腳手架)

          新建腳手架項目。# 找一個空目錄   day01/demo vue create ele_pro# 依次選擇Manally select Features   手動選擇Choose Vue Version  -- Babel -- Router 去掉 Lintter2.X是否使用history模式?   YesIn package.json是否把當前配置作為以后創建項目時的預設配置?   No在新項目中通過npm命令安裝ElementUI。# 進入項目目錄后執行安裝命令cd ele_pronpm i element-ui -S安裝完成后,將會在node_modules中出現element-ui文件夾。還會在package.json中的dependencies配置項中出現element-ui。在腳手架項目main.js中, 配置ElementUI。import ElementUI from 'element-ui';import 'element-ui/lib/theme-chalk/index.css';Vue.use(ElementUI);

            

          開始使用。需求:訪問http://localhost:8080/button, 可以看到Button.vue頁面。新建vue頁面: src/views/Button.vue,按照文檔編寫elementUI中的Button組件。<!-- src/views/Button.vue --><template>  <p>    <el-row>      <el-button>默認按鈕</el-button>      <el-button type="primary">主要按鈕</el-button>      <el-button type="success">成功按鈕</el-button>      <el-button type="info">信息按鈕</el-button>      <el-button type="warning">警告按鈕</el-button>      <el-button type="danger">危險按鈕</el-button>    </el-row>  </p></template>配置路由,router/index.js,目的是為了告訴vue, 當客戶端訪問/button時,頁面中需要顯示Button.vue中定義的內容。import Button from '../views/Button.vue'const routes = [  {    path: '/button',    component: Button  },]

            

          思考

          ElementUI經常用于編寫什么類型的PC網站?

          前臺交互型 后臺管理型

          Navmenu組件

          navmenu組件用于實現導航。其基本結構為:

          <el-menu mode="horizontal">       <el-menu-item>導航1</el-menu-item>    <el-menu-item>導航2</el-menu-item>    <el-menu-item>導航3</el-menu-item>    <el-menu-item>導航4</el-menu-item></el-menu>

            

          案例:訪問http://localhost:8080/nav 看到導航示例效果。

          1. 新建Nav.vue,編寫導航內容。

          2. 配置路由。 指定 /navNav.vue之間的映射關系。

          設置導航的默認選中項

          <el-menu mode="horizontal" default-active="2">       <el-menu-item index="1">導航1</el-menu-item>    <el-menu-item index="2">組件</el-menu-item>    <el-menu-item index="3">導航3</el-menu-item>    <el-menu-item index="4">導航4</el-menu-item></el-menu>

            

          設置導航的下拉子菜單

          <el-menu mode="horizontal" default-active="2">       <el-menu-item index="1">導航1</el-menu-item>    <el-menu-item index="2">組件</el-menu-item>    <el-submenu index="3">主題        <el-menu-item index="ayh">暗夜黑</el-menu-item>        <el-menu-item index="qkl">秋褲藍</el-menu-item>    </el-submenu>    <el-menu-item index="4">導航4</el-menu-item></el-menu>

            

          設置側邊欄導航(垂直方向)

          <el-menu mode="vertical" default-active="2">       <el-menu-item index="1">導航1</el-menu-item>    <el-menu-item index="2">組件</el-menu-item>    <el-menu-item index="3">主題</el-menu-item>    <el-menu-item index="4">導航4</el-menu-item></el-menu>

            

          如何修改組件庫中組件的默認樣式

          找這個組件文檔是不是給了一個屬性可以控制該樣式,如果有就用屬性來設置樣式,不要自己瞎編。<el-menu active-text-color="#f00"  ... ></el-menu>如果文檔中沒有給出控制該樣式的屬性,需要檢查Element,看一下需要修改的樣式的類名,編寫style標簽 或 內聯樣式 修改相應樣式。<el-menu  style="width:200px"></el-menu>?<style scoped>.mymenu { border-right: none; }</style>檢查需要修改的組件的類名,在頁面的style中重寫該樣式,若樣式優先級沒有組件的高,則添加 !important。絕招:去掉style標簽中的scoped。<style scoped>.el-menu { border-right: none !important; }</style>

            

          ElementUI的經典布局系統

          用于布局的容器組件,方便快速搭建頁面的基本結構:<el-container>:外層容器。當子元素中包含 <el-header> 或 <el-footer> 時,全部子元素會垂直上下排列,否則會水平左右排列。<el-header>:頂欄容器。<el-aside>:側邊欄容器。<el-main>:主要區域容器。<el-footer>:底欄容器。案例:實現頁面布局結構:Header、Aside、Main、Footer。新建頁面 views/Container.vue頁面。 編寫布局。配置路由。 /container <----> Container.vue

            

          案例:實現ElementUI官網的基本布局結構

          實現步驟:

          1. 新建Component.vue。 搭建header、aside、Main布局系統。

          2. 配置路由。 /component <---> Component.vue

          3. header中放置水平導航, 在aside中放置垂直導航,main中自定義。

          4. 微調頁面的布局效果。

          案例:實現ElementUI官網的基本布局結構

          實現步驟:

          新建Component.vue。 搭建header、aside、Main布局系統。配置路由。 /component <---> Component.vue在header中放置水平導航, 在aside中放置垂直導航,main中自定義。微調頁面的布局效果。

            

          基于嵌套路由實現main區域內容的動態顯示

          嵌套路由的設計:

          /component/button     組件頁面中顯示Button的內容/component/container  組件頁面中顯示Container的內容/component/icon       組件頁面中顯示Icon的內容

            

          實現思路:

          準備3個組件頁面: Button.vue Container.vue Icon.vue。在Component.vue的main的部分,添加router-view組件。<el-main >    <router-view />  <!-- 二級路由 --></el-main>配置router/index.js,在/component路由下配置嵌套路由children配置項。{     path: '/component',    component: Component,    // 重定向  當直接訪問/component時, 將會自動跳轉到    // "/component/button"    redirect: '/component/button',     children: [{      path: 'button',      component: Button    },{      path: 'container',       component: Container    },{      path: 'icon',       component: Icon    }] },
          1. 打開瀏覽器,在請求資源路徑中,通過請求路徑訪問這3個地址。

          2. 開啟側邊欄導航的"路由模式",修改每個itemindex即可以實現點擊跳轉。

          3. 配置/component的重定向, 避免bug。

          標簽:elemment-

          網絡推廣與網站優化公司(網絡優化與推廣專家)作為數字營銷領域的核心服務提供方,其價值在于通過技術手段與策略規劃幫助企業提升線上曝光度、用戶轉化率及品牌影響力。這...

          在當今數字化時代,公司網站已成為企業展示形象、傳遞信息和開展業務的重要平臺。然而,對于許多公司來說,網站建設的價格是一個關鍵考量因素。本文將圍繞“公司網站建設價...

          在當今的數字化時代,企業網站已成為企業展示形象、吸引客戶和開展業務的重要平臺。然而,對于許多中小企業來說,高昂的網站建設費用可能會成為其發展的瓶頸。幸運的是,隨...

          使用Ghost32軟件備份與還原系統操作教程?1. 安裝ghost后,打開“程序”中的“一鍵ghost”,以后就不需要操作了。耐心等待(包括電腦自動重啟),它會自動備份你的系統盤?;謴鸵惨粯?。當ghost打開時,它將自動恢復而不需要(也不需要)干預。2. 備份過程中確保計算機正常。3. 備份系統后,當您啟動計算機時,計算機會讓您選擇要進入的系統(XP或ghost,默認為XP),因此當計算機無法進入...

          蘋果14控制面板怎么設置?關于一個蘋果14進入控制面板怎么系統設置的具體分析不勝感激:1、在“監控中心”中快速調整設置里和應用廣泛,請從電腦屏幕左上角向下輕掃。然后點擊iphonexs的右上方,往下滑動顯示屏。2、是需要注意啊,iphonexs呼出總控室,是從顯示屏左上角迅速下滑,不是后邊或右面。如果是從顯示屏左上方或者后面下降狀態依然是通知到中心比較,這點需注意啊下。蘋果返回鍵怎么設置?htc手...

          oppo小布里可以領積分的地方?首先我們打開OPPO自帶的軟件商店,每天簽到。2.每天簽到。建議每天簽名,這樣積分會最高;簽到1~2天,5分;3~4天,7分;5~6天,9分;7天或以上,10分...1.然后在軟件商店的搜索框里,尋找OPPO官方可以簽到積分的軟件。接下來就是列出所有可以登錄的軟件,這是我的寶貝。2.找到后下載,每日簽到。比如軟件:智能家居目前,OPPO官方只需登錄即可獲得積分的軟件...

          TOP
          国产初高中生视频在线观看|亚洲一区中文|久久亚洲欧美国产精品|黄色网站入口免费进人
          1. <nobr id="easjo"><address id="easjo"></address></nobr>

              <track id="easjo"><source id="easjo"></source></track>
              1. 
                

              2. <bdo id="easjo"><optgroup id="easjo"></optgroup></bdo>
              3. <track id="easjo"><source id="easjo"><em id="easjo"></em></source></track><option id="easjo"><span id="easjo"><em id="easjo"></em></span></option>