个人遇到的技术摘要

常见的注释标记符

*@author 作者
*@classname 类名
*@deprecated 描述
*@see 参考
*@param 参数
*@return 返回值
*@exception 或 @throws 可能抛出的异常
*@date 日期
*@version 版本
例如以下
在这里插入图片描述

微信小程序 出现图片拉伸的解决方法:

	在当前页面增加以下标签属性 或者在App.Vue 页面添加 即可解决全部页面图片拉伸的问题
	image {
		height: 0;
	}

Ant design Pro 中引入外部文件

如果只是单页面需要引用 则可以通过创建标签的方式

在该页

如果全局都需要引入 则需在pages下的document.ejs 文件中直接添加script即可

新版更改Mysql 密码

 alter user 'root'@'localhost' identified by  '123';
这样会将密码更改为 123

旧版更改mysql 密码

set password for root@localhost = password('123');

在UniApp 中使用TailWind

  • 动态导入样式( 只要使用了才会导入代码包 避免小程序体积过大)
    在tailWind.config.js中 purge 下加入
    	enabled: true,
    
    完整代码如下
    const plugin = require('tailwindcss/plugin')
    
    const isH5 = process.env.UNI_PLATFORM === 'h5'
    
    module.exports = {
      darkMode: 'class',
      purge: {
    	enabled: true,
        content: ['./src/**/*.vue', './src/**/*.wxml'],
      },
      corePlugins: [
        isH5 ? 'preflight' : 'container',
        'alignContent',
        'alignItems',
        'backgroundColor',
        'backgroundPosition',
        'backgroundRepeat',
        'backgroundSize',
        'borderColor',
        'borderRadius',
        'borderStyle',
        'borderWidth',
        'boxSizing',
        'clear',
        'display',
        'fill',
        'flex',
        'flexDirection',
        'flexGrow',
        'flexShrink',
        'flexWrap',
        'fontSize',
        'fontWeight',
        'height',
        'inset',
        'justifyItems',
        'justifyContent',
        'lineHeight',
        'margin',
        'maxHeight',
        'maxWidth',
        'minHeight',
        'minWidth',
        'objectFit',
        'objectPosition',
        'opacity',
        'overflow',
        'position',
        'padding',
        'placeholderColor',
        'placeholderOpacity',
        'rotate',
        'scale',
        'tableLayout',
        'textAlign',
        'textColor',
        'textDecoration',
        'textOverflow',
        'textTransform',
        'transform',
        'transformOrigin',
        'transitionDelay',
        'transitionDuration',
        'transitionProperty',
        'transitionTimingFunction',
        'translate',
        'userSelect',
        'verticalAlign',
        'visibility',
        'whitespace',
        'width',
        'wordBreak',
        'zIndex'
      ],
      variants: {
        accessibility: [],
        alignContent: [],
        alignItems: [],
        alignSelf: [],
        appearance: [],
        backgroundAttachment: [],
        backgroundColor: ['dark', 'active', 'disabled'],
        backgroundPosition: [],
        backgroundRepeat: [],
        backgroundSize: [],
        borderCollapse: [],
        borderColor: [],
        borderRadius: [],
        borderStyle: [],
        borderWidth: [],
        boxShadow: [],
        cursor: [],
        display: [],
        fill: [],
        flex: [],
        flexDirection: [],
        flexGrow: [],
        flexShrink: [],
        flexWrap: [],
        float: [],
        fontFamily: [],
        fontSize: [],
        fontSmoothing: [],
        fontStyle: [],
        fontWeight: [],
        height: [],
        inset: [],
        justifyContent: [],
        letterSpacing: [],
        lineHeight: [],
        listStylePosition: [],
        listStyleType: [],
        margin: [],
        maxHeight: [],
        maxWidth: [],
        minHeight: [],
        minWidth: [],
        objectFit: [],
        objectPosition: [],
        opacity: ['disabled'],
        order: [],
        outline: [],
        overflow: [],
        padding: [],
        placeholderColor: [],
        pointerEvents: [],
        position: [],
        resize: [],
        stroke: [],
        tableLayout: [],
        textAlign: [],
        textColor: ['dark', 'active'],
        textDecoration: [],
        textTransform: [],
        userSelect: [],
        verticalAlign: [],
        visibility: [],
        whitespace: [],
        width: [],
        wordBreak: [],
        zIndex: [],
      },
      theme: {
        screens: false,
        spacing: {
          px: '1px',
          0: '0px',
          '0_5': '0.125rem',
          1: '0.25rem',
          '1_5': '0.375rem',
          2: '0.5rem',
          '2_5': '0.625rem',
          3: '0.75rem',
          '3_5': '0.875rem',
          4: '1rem',
          5: '1.25rem',
          6: '1.5rem',
          7: '1.75rem',
          8: '2rem',
          9: '2.25rem',
          10: '2.5rem',
          11: '2.75rem',
          12: '3rem',
          14: '3.5rem',
          16: '4rem',
          20: '5rem',
          24: '6rem',
          28: '7rem',
          32: '8rem',
          36: '9rem',
          40: '10rem',
          44: '11rem',
          48: '12rem',
          52: '13rem',
          56: '14rem',
          60: '15rem',
          64: '16rem',
          72: '18rem',
          80: '20rem',
          96: '24rem',
        },
        fontSize: {
          xs: ['0.75rem', { lineHeight: '1rem' }],
          sm: ['0.875rem', { lineHeight: '1.25rem' }],
          base: ['1rem', { lineHeight: '1.5rem' }],
          lg: ['1.125rem', { lineHeight: '1.75rem' }],
          xl: ['1.25rem', { lineHeight: '1.75rem' }],
          '2xl': ['1.5rem', { lineHeight: '2rem' }],
          '3xl': ['1.875rem', { lineHeight: '2.25rem' }],
          '4xl': ['2.25rem', { lineHeight: '2.5rem' }],
          '5xl': ['3rem', { lineHeight: '1' }],
          '6xl': ['3.75rem', { lineHeight: '1' }],
          '7xl': ['4.5rem', { lineHeight: '1' }],
          '8xl': ['6rem', { lineHeight: '1' }],
          '9xl': ['8rem', { lineHeight: '1' }],
        },
        minHeight: {
          0: '0upx',
          full: '100%',
          screen: '100vh',
        },
        outline: {
          none: ['4upx solid transparent', '4upx'],
          white: ['4upx dotted white', '4upx'],
          black: ['4upx dotted black', '4upx'],
        },
        extend: {},
      },
      plugins: [
        plugin(function ({ addComponents }) {
          const testComponents = {
            '.shadow': {
              boxShadow:
                '0 2upx 6upx 0 rgba(0, 0, 0, 0.1), 0 2upx 4upx 0 rgba(0, 0, 0, 0.06)',
            },
          }
          addComponents(testComponents)
        })
      ],
    }
    

    样式重命名后是无法动态导入的 要么关闭动态导入 要么就将需要的样式文件手动复制进项目中

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值