随笔分类 - vue.js
摘要:开发Dapp流程 1.vue前端生成项目, 写好前端页面 2.安装truffle npm install -g truffle npm install -g ethereumjs-testrpc 3.下载ganache软件 https://www.trufflesuite.com/ganache#
阅读全文
摘要:.component-upload-wrapper { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; flex-flow: wrap; .fil
阅读全文
摘要:// 获取文件名作为全局组件名 // const getFileName = (str: string): string => { return str.replace(/(.*\/)*([^.]+).*/gi, '$2'); }; // 注册全局组件 // export function regi
阅读全文
摘要:1.定义方法名 options.detail = '测试'; /** * 自定义事件, websoketCreate接收 */ const event = new CustomEvent('watchWebsocket', options); window.dispatchEvent(event);
阅读全文
摘要:module.exports = { env: { browser: true, }, extends: ['eslint:recommended', 'plugin:vue/essential', 'plugin:@typescript-eslint/recommended'], parserOp
阅读全文
摘要:{ // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is u
阅读全文
摘要:有些业务需要在 vue 中打开新窗口,通常有两种方式: 1. <router-link>标签 <router-link tag="a" target="_blank" :to="{name:'ArticleDetail',params:{id:0}}">新增文章</router-link> 其中,
阅读全文
摘要:var getLanguage = { language: { 'zh-CN': 'zh_CN', 'zh-HK': 'zh_TW', 'zh-TW': 'zh_TW', 'en-US': 'en_US', 'ko-KR': 'ko_KR', 'ja-JP': 'ja_JP', 'ru-RU': '
阅读全文
摘要:1.vue文件 <template> <div class="alipayOrWxpay-wrapper"> </div> </template> <script> import alipayOrWxpay from './alipayOrWxpay' export default { ...ali
阅读全文
摘要:var detectBack = { initialize: function() { //监听 hashchange 事件 window.addEventListener('hashchange', function() { //为当前导航页附加一个 tag this.history.replac
阅读全文
摘要:1.根目录.chcpenv { "content_url": "http://106.13.216.173:5636/hotpush", "config_url": "http://106.13.216.173:5636/hotpush/chcp.json" } // 线上 { "content_u
阅读全文
摘要:'use strict'; /** * 动态设置环境host.js的地址 * hostUrl => host.js路径 * process.env.npm_config_argv => 返回 {"remain":[],"cooked":["run","dev"],"original":["run",
阅读全文
摘要:当前有个需求:页面相互跳转中,在上一个页面(A页面)结束时使用$emit给父组件传值重置某些数据,在下一个页面(B页面)加载的时候也会给父组件传值给数据赋值。 我的做法是在A中使用 beforeDestroy() 在页面摧毁之前向父页面发送重置的信号,在B页面的 created() 方法中给父页面发
阅读全文
摘要:env: { browser: true, jquery: true }, rules: { // 强制有分号 semi: ['error', 'always'], // 逗号 "comma-dangle": [0, "never"], //函数定义时括号前面要不要有空格 'space-before
阅读全文
摘要:1.安装 Prettier插件 Prettier - Code formatter 2.在setting.json配置里 "prettier.useEditorConfig": false, "prettier.semi": true, // 是否带分号 "prettier.singleQuote"
阅读全文
摘要:/** * 页面刷新导航保持高亮 */ menuList() { let path = this.$route.matched[2].path this.navList.forEach((e, i) => { if (path.indexOf(e.query.path) != -1) { this.
阅读全文
摘要:1. 首先得在极光注册开发者帐号: 附上极光官网连接https: //www.jiguang.cn/2. 创建好帐号后点进进入极光开发者服务》》 创建应用3. 创建好应用会生成一个AppKey(后面需要), 到这里还没完, 切记点击下方的完成推送设置按钮4. 点击后在推送设置里填写应用包名, 一定要
阅读全文
摘要:<template> <div class="common_conponents common_conponents_base_input"> <div class="input_item_wrap" v-if="property.type 'text' || property.type 'pass
阅读全文
摘要:import share from './index.vue' export default { install: (Vue) => { Vue.prototype.$share = (options) => { // 1.创建构造器,定义好提示信息的模板 const instance = Vue.extend(share); // 2.创建实例,挂载到文档以后的地方 let currentSha
阅读全文
摘要:1.cordova 的安桌动画cordova plugin add cordova-plugin-lottie-splashscreenhttps://github.com/timbru31/cordova-plugin-lottie-splashscreen 一.安装androidXcordova
阅读全文