vue
普通网友
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vue注册组件
<template> <view> <scroll-view :scroll-into-view="'ss'+current" scroll-x="true" style="background-color: #007AFF;padding-top: 20px;"> <view class="tabs"> <text :id="'ss'+index" @click="chooseTab(index)" :class="{cur:cur原创 2021-05-05 21:05:22 · 133 阅读 · 0 评论 -
动态class写法
动态class写法 <template> <view style="display: flex;justify-content: center;"> <image :class="{'animate__animated animate__slideInDown':showAi}" src="../../static/uni.png" mode="" style="width: 100px;height: 100px;"></image>原创 2021-05-03 23:42:54 · 526 阅读 · 0 评论 -
外部浏览器 解决跨域
外部浏览器 解决跨域 项目的根目录中, 创建 vue.config.js // vue.config.js module.exports = { devServer:{ proxy:{ // 所有请求的开头是 /api 的, 自动代理成 target 指定的路径 '/api':{ target: 'https://m.douyu.com/api', pathRewrite: { // 默认: 例如 /api/room/list, 代理会转化为: //原创 2021-04-29 22:44:44 · 662 阅读 · 0 评论 -
一个简单的实现“加载更多“的demo
<template> <view class=""> <uni-list> <uni-list-item v-for="(item,index) in data.list" :key="index" title=""> <view slot="header"> <image :src="item.roomSrc" style="width: 250rpx;height: 150rpx;" mode=""&g原创 2021-04-25 17:17:05 · 171 阅读 · 0 评论 -
前端的两种时间处理方法
两种时间处理方法 1.js定义函数 定义一个函数,将后台获取到的数据传入,time为获取到的时间 //定义一个函数,将后台获取到的数据传入,time为获取到的时间 transTime(time){ const date = new Date(time * 1) return `${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()}` }, uniapp中,card组件中,note代表时间,item.pubTime为后台的原创 2021-04-23 19:02:04 · 1218 阅读 · 0 评论 -
vue的axios两种导入方法
1.在main.js中设置 (1)首先在npm中安装模块 npm install vue-axios --save (2)安装成功后在main.js中引用 `` import Vue from ‘vue’ import axios from ‘axios’ Vue.prototype.$axios = axios //全局注册 Vue.prototype.qs = qs **2.Vue.use()** (1)首先在npm中安装模块 npm install vue-axios --save (2原创 2021-04-17 22:33:43 · 8170 阅读 · 1 评论
分享