首页 > 编程语言 >ruby实战手册(13)-vue 3(4)

ruby实战手册(13)-vue 3(4)

时间:2023-10-26 23:46:48浏览次数:38  
标签:13 vue const ref ruby 3.3 createApp message Ruby

目录

全局构建

  • 1
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>learn js</title>
    <base href="/">
    <link href="styles/style.css" rel="stylesheet" />
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>

<div id="hello">{{ message }}
<p id="ruby-info">We are pleased to announce the release of Ruby 3.3.0-preview1. Ruby 3.3 adds a new pure-Ruby JIT compiler named RJIT, uses Lrama as a parser generator, and many performance improvements especially YJIT.</p>
</div>

<script>
    const { createApp, ref } = Vue

    createApp({
      setup() {
        const message = ref('你好,vue3!')
        return {
          message
        }
      }
    }).mount('#hello')
</script>

</body>
</html>

#hello{
  font:  italic small-caps bold  16px/2 cursive;
  color: rgb(214, 122, 127);
}
#ruby-info{
  font:  small-caps  16px/2 cursive;
  color: green;
}

image
-2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>learn js</title>
    <base href="/">
    <link href="styles/style.css" rel="stylesheet" />
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>

<div id="hello">
    <p>{{ message }}</p>
    <p>{{timeStr}}</p>

<p id="ruby-info">We are pleased to announce the release of Ruby 3.3.0-preview1. Ruby 3.3 adds a new pure-Ruby JIT compiler named RJIT, uses Lrama as a parser generator, and many performance improvements especially YJIT.</p>
</div>

<script>
    const { createApp, ref } = Vue

    createApp({
      setup() {
        const message = ref('你好,vue3!')
        const timeStr= ref(Date())
        return {
          message,timeStr
        }
      }
    }).mount('#hello')
</script>

</body>
</html>

image

标签:13,vue,const,ref,ruby,3.3,createApp,message,Ruby
From: https://www.cnblogs.com/waterruby/p/17790773.html

相关文章

  • OpenTiny Vue 3.11.0 发布:增加富文本、ColorPicker等4个新组件,迎来了贡献者大爆发!
    你好,我是Kagol。非常高兴跟大家宣布,2023年10月24日,OpenTinyVue发布了v3.11.0......
  • vue打印浏览器页面功能的两种实现方法
    目录方法一:通过npm安装插件方法二:手动下载插件到本地总结推荐使用方法二方法一:通过npm安装插件1,安装npminstallvue-print-nb--save2,引入安装好以后在main.js文件中引入1importPrintfrom'vue-print-nb'Vue.use(Print);//注册3,现在......
  • 2023-2024 20231313《计算机基础与程序设计》第五周学习总结
    2023-202420231313《计算机基础与程序设计》第五周学习总结作业速达作业课程班级链接作业要求计算机基础与程序设计第五周学习总结作业内容计算机科学概论第6章、《C语言程序设计》第4章并完成云班课测试————>Pep/9虚拟机、机器语言与汇编语言、算法与伪......
  • vuex 的数据丢失如何处理?
    方法一:存储在LocalStorage、SessionStorage、IndexDB等。这些都是浏览器的API,可以将数据存储在硬盘上,做持久化存储。在初始化state数据的时候,从localStorage中获取:state={userInfo:localStorage.getItem('userInfo')}由于localStorage不是响应式的,需要手......
  • Vue入门到放弃之旅今日开启第二篇
    绑定class样式、渲染、vue监视、收集表单数据P26-P39Class与Style的理解+用法条件渲染(v-show、v-if)还在持续性更新ing,明天见·····如果有正在学习的同学,需要练习过程中的代码实例和笔记私信我发你,祝你在学习前端的路上BUG满满!!在BUG才会成长!还是希望能对你有所帮助,那怕一点......
  • vue处理文件流实现上传下载
    1.文件流转base64axios({method:"post",url:"************",responseType:"blob",//必须将返回数据格式更改为blob格式}).then(res=>{//处理返回的文件流数据转为blob对象letblob=......
  • 问题:vue3 使用 vite 构建的项目打包后无法打开index.html文件,或者显示一片空白
    一、问题描述项目build之后,点击dist文件中的index.html文件,打开是空白,提示以下信息。二、产生原因及解决方法1.文件路径不对vite默认根目录"/",file://…访问需要基于index.html的路径,需要再vit.config.js中进行以下配置2.跨域问题vite构建打包后,默认启用ESModule,跨module......
  • vue中实现上传 ,下载功能
    上传功能(包括上传图片,上传文件)使用element组件库https://element.eleme.cn/#/zh-CN/component/upload<el-upload class="avatar-uploader":disabled="isUpload"action="":show-file-list="false":before-upload="beforeUplo......
  • Vue3 子组件修改父组件传过来的值
    Vue3子组件修改父组件传过来的值1、在父组件中,找到引用的子组件,在引用中加入v-model例如:子组件是demo,需要穿的值为num这个有个温馨提示,(v-model+冒号+需要穿的值)这个v-model可以写多个<demov-model:num="num"></demo>//例如可以写多个需要修改多个传入的值<demov-mo......
  • Vue localStorage 将数据存为数组
    VuelocalStorage将数据存为数组要把表单数据存成数组形式,在另一个页面通过v-for渲染展示,因为拥有同一个key值,在每次更新表单数据时都会发生数据覆盖现象。vartemplist=JSON.parse(localStorage.getItem("msgBody")||"[]");templist.push(this.msgBody);......