访问页面,如果需要登录后才可以访问,则弹出确认框提示是否跳转。使用element-ui的MessageBox进行提示。
代码
import Vue from 'vue'
import Router from 'vue-router'
import {MessageBox} fr...
3年前 (2022-05-21)
喜欢
处理前数据
0,1,2
处理后数据
发送电子档、邮寄纸质档、现场领取
代码
/**
* @Author: 858834013@qq.com
* @Name: transactManner
* @Date: 2022-02-27
* @Desc:
*/
<template...
3年前 (2022-05-20)
喜欢
登录页面有个要求,根据接口返回的数据依次判断类型,1-4,有1就先跳转到1,依次进行判断,一开始用的是if的判断形式,在做代码精简时,又想到了用循环的方式forEach。类型少的时候用if和forEach都可以,当类型多的时候,forEach代码要更精简一些。
if
if (th...
3年前 (2022-05-20)
喜欢
vue3 安装使用postcss-pxtorem
vue.config.js
module.exports = {
css: {
loaderOptions: {
postcss: {
exclude...
3年前 (2022-05-19)
喜欢
安装依赖
npm i postcss-pxtorem@5.1.1 -D
配置postcss.config.js
module.exports = {
plugins: {
autoprefixer: {},
'postcss-pxtorem': {
...
3年前 (2022-05-19)
喜欢
是postcss-pxtorem版本太高了
降到5.1.1就可以正常运行了
"postcss-pxtorem": "^5.1.1",
安装依赖
cnpm i postcss-pxtorem@5.1.1 -D
...
3年前 (2022-05-19)
喜欢
微信小程序涉及到用户信息收集的地方,都需要同意协议,每次都要手动写一遍,好麻烦,干脆封装成一个小组件,直接复用好了。
使用
<agreement :select.sync="select"></agreement>
验证
if (!...
3年前 (2022-05-18)
喜欢
使用
<getRole :roleId="userInfo.userRoleId"></getRole>
组件代码
/**
* @Author: 858834013@qq.com
* @Name: getRole
* @Date: 2...
3年前 (2022-05-18)
喜欢
使用到的组件
uniapp uview 滑动显示删除按钮
html
<u-swipe-action>
<u-swipe-action-item @click="getDelete($event,item)" :key='inde...
3年前 (2022-05-18)
喜欢
代码
<input confirm-type="search" @confirm="getdata" type="text" v-model="data.KeyWord" placeholde...
3年前 (2022-05-17)
喜欢