Element-ui Drawer抽屜按需引入基礎使用
更新時間:2023年07月06日 11:46:22 作者:菜園前端
這篇文章主要為大家介紹了Element-ui Drawer抽屜按需引入基礎使用,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
Element-ui Drawer 抽屜
展示另外一種彈窗效果
按需引入方式
如果是完整引入可跳過此步驟
import Vue from 'vue' import { Drawer } from 'element-ui' import 'element-ui/lib/theme-chalk/base.css' import 'element-ui/lib/theme-chalk/drawer.css' Vue.use(Drawer)
基礎使用
<template> <div> <el-radio-group v-model="direction"> <el-radio label="ltr">從左往右開</el-radio> <el-radio label="rtl">從右往左開</el-radio> <el-radio label="ttb">從上往下開</el-radio> <el-radio label="btt">從下往上開</el-radio> </el-radio-group> <el-button @click="drawer = true" type="primary" style="margin-left: 16px;"> 點我打開 </el-button> <el-drawer title="我是標題" :visible.sync="drawer" :direction="direction"> <span>我來啦!</span> </el-drawer> </div> </template> <script> export default { data() { return { drawer: false, direction: 'rtl' } } } </script>
Drawer Attributes
以上就是Element-ui Drawer抽屜按需引入基礎使用的詳細內(nèi)容,更多關于Element-ui Drawer抽屜的資料請關注腳本之家其它相關文章!