<!--内嵌引入--> <script type="text/javascript"> alert("内嵌引入"); alert("这是第二句"); </script> <!--JS外部引入--> <script src="demo01.js" type="text/javascript"></sc ...
分类:
Web程序 时间:
2021-01-14 10:59:00
阅读次数:
0
一、如果在创建Vue@3.0项目的时候没有选择sass则需要安装 npm install -D sass-loader node-sass 二、创建.scss样式文件 在 src/assets/sass 文件夹下创建 index.scss 文件 三、配置根目录下面vue.config.js: 如果需 ...
分类:
其他好文 时间:
2021-01-14 10:51:15
阅读次数:
0
空心文本 <canvas id="myCanvas" width="300" height="100"></canvas> // canvas绘制空心文本 var canvas = document.getElementById('myCanvas'); var ctx = canvas.getCo ...
分类:
Web程序 时间:
2021-01-14 10:41:40
阅读次数:
0
效果图: <!--联系我们开始 --> <div class="linkus container "> <div class="linkUsCon cl"> <div class="bd fl"> <div class="lines"> <span>姓名:</span> <input type="t ...
分类:
Web程序 时间:
2021-01-14 10:40:24
阅读次数:
0
parseInt('') NaN parseInt(null) NaN parseInt(undefined) NaN parseInt('asdfa') NaN parseInt('123') 123 parseInt('asd12') NaN // 转换后只保留前面数字 parseInt('12 ...
分类:
Web程序 时间:
2021-01-14 10:34:36
阅读次数:
0
html: <div v-for="item in lunBoArray" :key="item.id"> <img style="height: 100%;width: 100%" :src="item.url"/> </div> js--data 绑定数据 lunBoArray:[{ url:r ...
分类:
其他好文 时间:
2021-01-14 10:33:45
阅读次数:
0
在vue中默认router-link进入页面组件都是不缓存的。对于数据不会更新的页面。可以使用keep-alive来缓存以提高性能。 在项目src/router/index.js中。对于需要缓存的路由加meta中加上keepAlive: true 1 export default new Route ...
分类:
其他好文 时间:
2021-01-14 10:31:16
阅读次数:
0
Vuex的作用 组件通信(兄弟组件) 跨页面通信 Vuex使用 创建vuex实例 vuex项目初始化后,src目录会多一个store/index.js,里面会进行vuex的初始化 import Vue from 'vue'import Vuex from 'vuex';?Vue.use(Vuex)? ...
分类:
其他好文 时间:
2021-01-13 11:35:25
阅读次数:
0
<!-- 引入自己封装的 Ajax文件 测试下怎么用 --> <script src="myAjax.js"></script> <script> window.addEventListener('load', function() { var btn = document.querySelecto ...
分类:
Web程序 时间:
2021-01-13 11:30:00
阅读次数:
0
1.前端页面 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <script src="/test/js/jquery-1.10.2.js" type="te ...
分类:
Web程序 时间:
2021-01-13 11:15:56
阅读次数:
0