排名
1
文章数
15030
总访问量
216.3万
粉丝数
30
评论数
120
input type file 限制上传图片和视频<input type="file" id="fileInput" multiple accept="image/*,video/*" />
各种限制上传的类型1、<input text="file" accept=".csv" /> cvs格式
2、<input text="file" accept="applic...
<el-dialog v-model="DialogVisible" :destroy-on-close="true">
<el-table :data="" :show-header="false" max-height="350">
</el-table>
</el-dialog>
核心代码就是::destroy-on-close="true"
在Vue3中,nextTick的使用方式与Vue2有所不同。在Vue2中,我们通常使用this.$nextTick()来调用nextTick API,而在Vue3中,用法如下:
import { onMounted, ref, nextTick } from 'vue';
update(){
console.log('需要执行的方法')
}
nextTick(() => {
up...
sqlsugar in多字段版本>=5.1.4.67-preview04
List<OrderItem> list=xxx;
db.Queryable<OrderItem>().Where(it => list.Any(s => s.Id == it.Id && s.Name == it.Name))
//也可以用动态表达式拼OR实现
他生成的sql不是 in (a,b)这种,其实想一下他in的不是一个而是一个集合,所...
原因是:当 nodejs 升级到17+版本以后,开始支持 OpenSSL 3.0,而 OpenSSL 3.0 对各种摘要算法做了更严格的限制,可能会导致一些程序运行错误。
简单的解决方法在命令后面加上环境变量设置即可。
原来的配置:
"scripts": {
"serve": "vue-cli-service serve",
"...
记录一下备忘
<view v-for="(item,index) in dataList" :key="index">
{{item.fileName}}
</view>
执行sql后有一个导出结果就可以选择导出excel
注意一般要执行后才会执行这个菜单,而且好像导出一次后这个菜单会变白,不晓得是不是我这边这个工具的问题。最好把你想要导出的sql单独开一个查询窗口执行后点击导出结果,可以避免sql太多操作错乱了
EF非跟踪查询加上AsNoTracking即可,如下:
// 使用非跟踪查询的方式
List<UserDetails> getUserDetails = _userDetailsRepository.AsNoTracking().ToList();
可以解决一些已经存在上下文的错误,比如出现报错:cannot be tracked because another instance with the same key value for {'Id'} i...
需要先创建格式类:namespace WY.JBLand.API.MyResults
{
public class DateTimeConverters : JsonConverter<DateTime>
{
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return DateTime.TryP...
代码如下
// 解析出生日期
string birthdayStr = idCard.Substring(6, 8);
DateTime birthday = DateTime.ParseExact(birthdayStr, "yyyyMMdd", null);
创建一个中间件实现图片防盗链简单的就是直接判断Referer
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace TNBLOG.Img.MyMiddleware
{
pub...
组件编译到微信小程序没有生成WXSS文件,H5与APP可以正常显示,小程序不行!
解决:不需要引用,去除页面中的import这一引用代码,所有将恢复正常!注释掉不生效组件的引用即可
<script>
// import liySelect from "../../components/liy-select/liy-select.vue"
</script>
[TOC]带有setup()的组合API - context.emit父组件组件
<my-childe ref="RefChilde" @closePopup="closeClassRankingPopup"></my-childe>
子组件组件
setup(props, context) {
function handleClose() {
context.emit('closeClassRankingPopup', 参数);
}...
显示加载框
//显示加载框
uni.showLoading({
title: '加载中'
});
隐藏加载框
//隐藏加载框
uni.hideLoading();
可以使用showToast,代码如下:
uni.showToast({
title:"上传成功!",
duration:2000
})
官网文档:https://uniapp.dcloud.net.cn/api/ui/prompt.html#showtoast
基本用法:在uniapp中,我们可以使用uni.previewImage()API对图片进行预览,具体使用方法如下:
uni.previewImage({
urls: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
current: 0
});
其中,urls参数为一个字符串数组,表示需要预览的图片数组;current参数...
代码如下:
document.cookie="key=value;domain=.cqzuxia.com"
还可以设置path=/;expires=等
<template>
<view class="container">
666
</view>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
const state = reactive({
imgList: ['https://img1.baidu.com/it/u=2749857666,40...