实习日记 6/16 边缘云首页等页面绘制

目标:

1、绘制边缘云三个页面的大体结构(配置路由?功能不明确)

2、研究权限管理,菜单权限,按钮权限、以及想一下不同权限页面的按钮功能不同如何实现。或者什么的了解一点新东西,然后练一下,加在项目里面

3、看看公司项目里面封装的东西=>为什么封装、好处、怎么自己封装。找一个有意思的自己学会实现然后就可以自己设置、然后项目里也可以写亮点了,欸嘿

4、对然后力扣螺旋矩阵

开干

1、√

看公司项目路由跳转用的是$router.replace

用push和repalce的区别:

$router.push()本质是向history栈中添加一个路由(看起来是切换,实际是添加history记录)

$router.replace()替换路由,没有历史记录,点击返回会跳转到上上个页面

路由也可以通过跳转的时候传递参数:(之前练过,又有点忘啦!打屁)

  tiaozhuan () {
      console.log(this.$msg)
      this.$router.push('/seconed')  // this.$router.push('path') 
    },
    tiaozhuan1 () {
      this.$router.push({   // this.$router.push('name') 
        name: `Seconed`, //一定要写name,params必须用name来识别路径 
        params: {
          name: this.name,  //刷新页面的话路径会被清空
        }
      })
    },
    tiaozhuan2 () {
      this.$router.push({
        name: `Seconed`,
        query: {
          name: this.name,
        }
      })
    },
    tiaozhuan3 () {
      this.$router.push(`/seconed/${this.name}`)
    },

就是把左侧菜单当作路由跳转链接,左侧菜单可以设置属性,然后我在index上面写的跳转路径

router是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转

然后我主页写好了样式,main写的路由占位符,然后把要跳转页面的路径设置为home页的children们,如果不设置为孩子,新开路径,原有页面样式就用不了,变成新页面。这个想想怎么弄?就是新页面但也能用之前设置的基本样式和结构?

2、实现权限管理

明天做

3、算是实现了基本的,后面可以自己封装组件试一下!https://segmentfault.com/a/1190000009506097 //看这篇文章学习一下

bug:

1、这里只能改变我自己写的盒子,用了element-ui的组件实现不了

2、样式用文件引入没解决 (解决啦,可以实现,开始是样式的类没写对)

 <div class="nav" id="head">  //想要更改颜色的盒子设置初始样式和id值
      边缘云后台管理系统
//然后我用了按钮弹出对话框在里面有单选按钮,然后点击确定提交
 SubmitColor (val) {
      if (val === '1') {
       // console.log('选中蓝色')
       this.color='blue';
       document.getElementById('head').setAttribute('class',this.color)
      }else{
            this.color='pink';
       document.getElementById('head').setAttribute('class',this.color)
      }
      this.dialogVisible = false
    },

//这里我是直接把样式卸载一个页面,我看有把样式单独写一个页面然后引入,但是我写了却没有用,明天问一下师傅咋回事?
.nav {
  position: relative;
  background-color: rgb(139, 136, 136);
  font-size: 30px;
}
.blue{
     position: relative;
        background-color: rgb(49, 125, 240);
         font-size: 30px;
}
.pink{
   position: relative;
  background-color: rgb(238, 190, 190);
  font-size: 30px;
}
//引入css样式表的形式

//在main.js里面引入样式文件
import "@/assets/theme.scss"

//theme.scss
.nav {
    position: relative;
    background-color: rgb(139, 136, 136);
    font-size: 30px;
}
.blue{
    font-size: 30px;
    position: relative;
    background-color: rgb(49, 125, 240);
}
.pink{
    font-size: 30px;
    position: relative;
      background-color: rgb(231, 161, 161);
}

setAttribute() 这个方法用来拿对象

setAttribute() 方法用于创建或改变某个新属性。

当使用`e.Graphics`对象绘制Pdf页面内容时,您可以使用System.Drawing.Graphics类的各种方法来进行绘制。以下是一些常见的绘制操作示例: ```csharp printDoc.PrintPage += (sender, e) => { PdfDocument pdfDoc = PdfReader.Open(pdfFilePath, PdfDocumentOpenMode.Import); PdfPage page = pdfDoc.Pages[e.PageNumber - 1]; XGraphics graphics = XGraphics.FromGraphics(e.Graphics, e.PageBounds); XFont font = new XFont("Arial", 12); XStringFormat format = new XStringFormat(); // 绘制文本 graphics.DrawString("Hello, World!", font, XBrushes.Black, new XRect(50, 50, 200, 20), format); // 绘制图像 XImage image = XImage.FromFile("path/to/your/image.jpg"); graphics.DrawImage(image, new XRect(100, 100, 200, 200)); // 绘制线条 XPen pen = new XPen(XColors.Red, 2); graphics.DrawLine(pen, 50, 250, 250, 250); // 绘制矩形 XBrush brush = new XSolidBrush(XColors.Blue); graphics.DrawRectangle(pen, brush, new XRect(100, 300, 150, 100)); // 绘制其他图形和效果 // ... graphics.Dispose(); }; ``` 在上述示例中,我们创建了一个`XGraphics`对象,它基于`e.Graphics`和页面边界(`e.PageBounds`)进行绘制。然后,我们使用各种方法和对象来进行绘制操作。例如,使用`DrawString`方法绘制文本,使用`DrawImage`方法绘制图像,使用`DrawLine`方法绘制线条,使用`DrawRectangle`方法绘制矩形等。 请注意,绘制操作的具体方式和效果取决于您的需求以及所使用的Pdf页面内容。根据实际情况,您可能需要调整坐标、大小、颜色、字体等参数来实现所需的绘制效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值