原创 Three.js TypeError:Cannot read property 'elements' of undefined

記錄初次接觸Three.js時遇到的一個bug 當爲一個幾何體設置一張圖片作爲紋理(皮膚)的時候,最開始我是這樣寫的 var texture = new Three.TextureLoader(); texture.load('../.

原创 在vue項目中動態的引用本地圖片

<img src="xxxxxx/xx/xx.jpg"/> 這是一般寫法,但是隻能引用相對路徑下的圖片 如果引用的是本地絕對路徑的圖片,一般需要使用require()方式,當然require()也適用於相對路徑 <img src="r

原创 weex 項目環境配置

首先需要的環境: 1:Node.js  2:Git 3:jdk 4:Android Studio 5:android 模擬器 詳細過程: 首先下載安裝Node 和Git,Git 下載完成之後就可以使用npm了,根據習慣可以轉淘寶鏡像,在終

原创 axios 同時執行多個請求 axios.all

handleClick1 (data) { return this.$http({ method: 'post', url: 'xxxxx', data: data })

原创 在Vue 中,將base64圖片轉爲File文件類型

base64ToFile(urlData, fileName) { let arr = urlData.split(','); let mime = arr[0].match(/:(.*?);/)[1];

原创 在Vue 中調用控件中的方法,報錯:Error calling method on NPObject

控件加載成功,調用幾個控件中的方法,其他幾個方法都調用成功,只有一個方法調用失敗 原因在於在失敗的方法中所用到的變量有爲null 的值,導致方法調用失敗

原创 uni-app 倒計時組件

<template> <view class="page" :style="{color: fontColor}"> <view class="title" v-if="!isStart"> 距離開始: </view>

原创 vue/cli 3 配置多個代理服務器

在與src同級目錄新建vue.config.js vue.config.js module.exports = { publicPath: '/', outputDir: 'dist', asset

原创 自己寫的 uni-app 的日期選擇器

HTML部分  <view class="uni-list-cell"> <view class="uni-list-cell-left">選擇時間</view> <view class="uni-list-cell-db">