原创 動態添加js 在sources中顯示
在js文件中頂部添加 //# sourceURL=exportquestionnaire.js
原创 以節點爲目標滑動頁面
document.getElementById("re_" + reply.id).scrollIntoView({behavior: "smooth", block: "center"}); 參考:https://developer
原创 谷歌瀏覽器滾動條設置
::-webkit-scrollbar { /* 血槽寬度 */ width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { /* 拖動條 */ background-
原创 vue-html5-editor中initHTMLEditor.js 文件配置
export default { // 全局組件名稱,使用new VueHtml5Editor(options)時該選項無效 // global component name name: "vue-html5-editor
原创 只能在微信瀏覽器打開
function is_weixin(){ var ua = navigator.userAgent.toLowerCase(); //判斷瀏覽器的類型 if(ua.match(/MicroMessenger/i)=="
原创 手機號正則替換 中間4位爲****
var reg = /^(\d{3})\d{4}(\d{4})$/; var a = 18731230865; a = a.replace(reg, '$1****$2');
原创 vue中使用layui
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" /> <script src="https://www
原创 彈出層可以滾動 禁止底層滾動
document.querySelector('.outer').addEventListener('touchmove', function (event) { $("body").scrollTop(0)
原创 vue 高德地圖使用
在 index.html 中引入 <script src="https://webapi.amap.com/maps?v=1.4.15&key=祕鑰"></script> 在 vue.config.js 中 添加 configur
原创 vue-html5-editor 使用
安裝 npm install vue-html5-editor 在main.js中 import VueHtml5Editor from 'vue-html5-editor' import '../src/assets/cs
原创 小程序 自定義組件使用總結
根目錄 新建component 文件夾 新建文件夾 名字爲自己要寫的組件 右鍵文件夾 新建 Component .wxss與.wxml 與 頁面相同 .json { "component": true, //聲明爲組件
原创 char f2的坑
寫柱狀圖可以左右滑動時 1.根據示例 寫了代碼後 發現沒有 scrollBar() interaction() 方法 搜索後發現需要這樣寫 const F2 = require('@antv/f2/lib/index') c
原创 css樣式重置
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0
原创 公衆號 vue使用f2 總結
安裝 npm install @antv/f2 --save 引入 import F2 from "@antv/f2";; html <canvas :id="f2id"></canvas> js this
原创 小程序使用 f2 總結
使用 npm 模塊 在小程序根目錄中 npm init 初始化 npm install @antv/f2-canvas 加載模塊 在微信開發者工具中 菜單欄>工具>構建npm (要先加載模塊然後再構建) 在要使用圖表的頁面