html
<div class="table-main" id="table" :class="{fixed:fixed}"></div>
js
document.addEventListen...
yekong
4年前 (2021-04-08)
喜欢
引入高度地图
<script
type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=4287...
yekong
4年前 (2021-04-07)
喜欢
在路由中的meta.requiresAuth添加参数来判断是否需要登录才可以访问
const routes = [
{
path: '/Login',
name: 'Login',
component: () =>...
yekong
4年前 (2021-04-05)
喜欢
在axios拦截器里进行配置
if (router.history.current.fullPath) {
router.push({path: '/reg/login', query: {url:router.history.cu...
yekong
4年前 (2021-04-02)
喜欢
html
<echartitem></echartitem>
js
<script>
Vue.component('echartitem', {
props: ['echartitem'...
yekong
4年前 (2021-03-29)
喜欢
安装依赖
npm i JSONbig --save
在axios.create添加
const service = axios.create({
baseURL: devIp + '', // 测试IP
timeout: 100000, // r...
yekong
4年前 (2021-03-16)
喜欢
两种方式来解决:
后端处理,将这个较长的数值类型,改完字符串类型
前端引入第三方包jsonbig来处理这个长数值精度丢失问题
import JSONBIG from 'json-bigint'
// 默认配置 转换响应数据
axios.defaults.tr...
yekong
4年前 (2021-03-16)
喜欢
安装脚手架
npm i -g @vue/cli
创建项目
vue create vue3project
手动配置选择
Manually select features
通过空格选择自己需要的配置
创建vue3项目就选择3.x
创建并运行后的效果
...
yekong
4年前 (2021-03-09)
喜欢
vue 使用npm run serve项目运行报错
Cannot find module 'vue-loader-v16/package.json'
将npm改为yarn安装依赖和运行搞定
yarn serve
...
yekong
4年前 (2021-03-03)
喜欢
导入echarts时用:
import echarts from 'echarts'
出现 “Cannot read property ‘init’ of undefined” 报错,改成
import * as echarts from 'echar...
yekong
4年前 (2021-02-07)
喜欢