首页
关于
留言
友情链接
推荐
粽子SHOP
Search
1
粽子SHOP即时到账 微信插件(MyWechat)
5,574 阅读
2
PS人像美颜插件 DR5.0增强版 一键人像磨皮/美白/高低频
4,925 阅读
3
Windows Navicat Premium16.3.2 免安装 绿色汉化版
4,358 阅读
4
彩虹聚合登录API源码/上元二开 QQ互联分发
3,639 阅读
5
LayuiTable导出所有数据,无需修改后端代码
2,759 阅读
程序源码
PHP源码
HTML源码
精品程序
易语言源码
Python源码
活动资讯
技术分享
实用代码
实用工具
学习笔记
PHP笔记
前端笔记
uniapp
Python
逆向
docker
Dify
thinkPHP
登录
Search
标签搜索
python
docker
typescript
swoole
thinkphp6
php
R语言
composer
composer命令
tp6
tp中间件
vue
node.js
粽子shop
thinkSwoole
微信监控
dify
timi
王者荣耀
王者荣耀ios扫码
烂掉的ay
累计撰写
109
篇文章
累计收到
1,267
条评论
首页
栏目
程序源码
PHP源码
HTML源码
精品程序
易语言源码
Python源码
活动资讯
技术分享
实用代码
实用工具
学习笔记
PHP笔记
前端笔记
uniapp
Python
逆向
docker
Dify
thinkPHP
页面
关于
留言
友情链接
推荐
粽子SHOP
搜索到
109
篇与
EN
的结果
2022-10-21
tsc 在vscode中无法运行
{mtitle title=" 问题描述 "/}操作系统:windows在cmd中可执行在vscode中报错{mtitle title=" 解决方案 "/}以管理员身份运行 PowerShell,并执行命令set-ExecutionPolicy RemoteSigned将PowerShell的执行策略更改为RemoteSigned具体步骤如下:① 使用 win+x 快捷键,会出现如下弹窗,鼠标左键单击Windows PowerShell 即可打开shell.② 运行 set-ExecutionPolicy RemoteSigned 命令,在询问更改执行策略的时候选择敲Y或者A③ 运行 get-ExecutionPolicy 命令,可看到脚本的执行策略已被更改为 RemoteSigned ④ 回到vscode的终端,输入命令 tsc -v 不再报错,也可对ts文件进行编译。 {mtitle title=" 产生原因 "/}PowerShell的默认执行策略是 Restricted,它禁止运行任何脚本和配置文件。故需更改PowerShell的设置来解决刚遇到的问题转自:https://blog.csdn.net/Jadon_z/article/details/126754604
2022年10月21日
1,076 阅读
0 评论
1 点赞
2022-09-04
vue前端开发笔记6 - 路由 - 切换路由/页面
创建 views/Home.vue创建 views/User.vue在App.vue中放置以下代码<router-link to="/"> <el-button>主页</el-button> </router-link> <router-link to="/User"> <el-button>用户</el-button> </router-link> <router-view></router-view>在router/index.js中添加路由配置const routes = [ { path:"/", name:'Home', //component: Home, component: () => import('../views/Home.vue') }, { path:"/User", name:'User', component: () => import('../views/User.vue') } ]{dotted startColor="#ff6c6c" endColor="#1989fa"/}{mtitle title="效果"/}{x} 主页 (默认或点击主页按钮) :展示 views/Home.vue 中的内容 {x} 用户 (点击用户按钮): 展示 views/user.vue 中的内容
2022年09月04日
582 阅读
0 评论
1 点赞
2022-09-04
vue前端开发笔记5 - 路由的安装与基本使用
1.安装引入npm i vue-router@3.2.0 @3.2.0 表示指定版本2.在mian.js中引入import Vue from 'vue' import App from './App.vue' import {Button} from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; import router from '../router'; Vue.use(Button); Vue.config.productionTip = false new Vue({ router, render: h => h(App), }).$mount('#app') 如图3.在router/index.js中写配置import Vue from 'vue' import VueRouter from 'vue-router' //import Home from '../views/Home.vue' Vue.use(VueRouter) const routes = [ { path:"/", name:'Home', //component: Home, component: () => import('../views/Home.vue') } ] const router = new VueRouter({ mode:'history', routes }) export default router如图:4.在App.vue中引入router-view<router-view></router-view> {x} 访问首页,会出现 views/Home.vue 中的内容<router-view></router-view> 内容会随 浏览器路由 在 router/index.js 中 routes 匹配对应的页面如图:【常见问题】router-view不显示内容怎么办?{x} 检查 router/index.js 中的 const routes = [{}] { } 不要写成 const routers = [{}] {x} 是routes而不是routers
2022年09月04日
446 阅读
0 评论
0 点赞
2022-09-04
vue前端开发笔记4 - 组件按需引入
按需引入的优势:缩小打包之后的文件体积安装插件npm install babel-plugin-component -D修改配置文件 ( babel.config.js )module.exports = { presets: [ '@vue/cli-plugin-babel/preset' ], "plugins": [ [ "component", { "libraryName": "element-ui", "styleLibraryName": "theme-chalk" } ] ] } 修改引入import {Button} from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; Vue.use(Button);如图:
2022年09月04日
405 阅读
0 评论
0 点赞
2022-09-04
vue前端开发笔记3 - 安装elementUI
此次安装基于vue2安装element-UInpm i element-ui -S在mian.js中引入UIimport ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; Vue.use(ElementUI);如图:使用element-ui组件<template> <div class="hello"> <h1>{{ msg }}</h1> <el-row> <el-button>默认按钮</el-button> <el-button type="primary">主要按钮</el-button> <el-button type="success">成功按钮</el-button> <el-button type="info">信息按钮</el-button> <el-button type="warning">警告按钮</el-button> <el-button type="danger">危险按钮</el-button> </el-row> </div> </template>如图:
2022年09月04日
435 阅读
0 评论
0 点赞
2022-09-04
vue前端开发笔记2 - 创建项目
创建项目1.在终端执行 vue create demo 2.选择vue版本 vue2 或 vue3 3.创建成功运行项目切换到项目的目录 cd demo 运行项目 npm run serve报错解决错误: error:0308010C:digital envelope routines::unsupported解决: export NODE_OPTIONS=--openssl-legacy-provider 或更换node版本产生原因: *V17版本中最近发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响.在node.js V17以前一些可以正常运行的的应用程序,但是在 V17 版本可能会抛出异常*
2022年09月04日
439 阅读
0 评论
0 点赞
2022-09-04
vue前端开发笔记1 - 安装与配置
环境检查下载地址 https://nodejs.org/en/#download检查版本 node -v npm -v 重新安装 (安装到全局,从npm获取最新版本安装)npm install npm -g 卸载 npm uninstall查看/设置 当前仓库源npm config get registry 临时使用 npm --registry https://registry.npm.taobao.org install express 永久使用 npm config set registry https://registry.npm.taobao.org 或者 npm config set registry https://registry.npm.taobao.org -global 或者 npm use taobao 强制清理npm的缓存 npm cache clear --force安装cnpmnpm install -g cnpm --registry=https://registry.npm.taobao.org 查看版本 cpnm -v vue -V yarn
2022年09月04日
408 阅读
0 评论
0 点赞
2022-07-26
LayuiTable导出所有数据,无需修改后端代码
layui table自带的导出功能仅导出单页的数据,搜索一番之后发现大部分都是通过另外发送ajax请求,让后端进行处理,或是生成excel下载链接,或是后端返回所有数据然后用table.exportFile导出。其实可以利用render,设置limit为总数量实现数据重新加载并导出。方法可行,并不推荐。var tableDataCount = 0; table.render({ elem: '#datatab' ,url: '...数据接口' ,skin:'line' ,even:true ,method:'post' ,limit:20 ,title:'数据' ,height:'full-60' // ,size:'lg' ,cols: [[ {field:'id', width:80, title: 'ID', sort: true}, {field:'name',minWidth:'100', title: '姓名'}, ]] ,page: true , done: function(res, curr, count){ tableDataCount = count;//记录所有数据数量 } }); //在html中设置一个导出全部的按钮,事件: table.reload('datatab',{ page: 1, limit:tableDataCount //加载所有数据 ,where: {where} ,done:function (){ //导出所有数据 table.exportFile("datatab",false,"xls"); //恢复数据分页显示 table.reload('datatab',{ page: 1, limit:20 ,where: {where} ,done:function (res, curr, count){ tableDataCount = count; } }) } })
2022年07月26日
2,759 阅读
14 评论
1 点赞
2022-07-19
生成文字头像(图片)PHP代码,根据姓名昵称生成专属头像
添加用户之后,根据用户名或者姓名的首个字符生成默认的头像,如图: /** * 生成默认头像 ay * @param $text * @return false|string */ public static function createAvatar($text = "阿"){ $randBg = [ ['31','38','35'], ['199','210','212'], ['34','162','195'], ['27','167','132'], ['236','43','36'], ['222','118','34'] ]; $bg = $randBg[ array_rand($randBg)]; //随机获取背景 $image = imagecreate(200,200); //创建画布 $color = imagecolorallocate($image,$bg[0],$bg[1],$bg[2]); //为画布分配颜色 imagefilledrectangle($image, 0, 0, 199, 199, $color); //填充颜色到背景 $fontSize = 90; //字体大小 $font_file = public_path('static/common/fonts')."FZDeSHJW_506L.TTF"; //字体文件 * 修改成自己的字体路径 $pos = ImageTTFBBox($fontSize,0,$font_file,$text);// 计算字符的宽高 获得字体初始的8个相对位置 // 居中公式 (画布宽 - 字体的宽度)/ 2 - 字体初始位置的偏移量 $left_x = intval((200 - abs($pos[2] - $pos[0])) / 2 - abs($pos[0])); $left_y = intval((200 - abs($pos[5] - $pos[3])) / 2 + abs($pos[5])); $color2 = imagecolorallocate($image,255,255,255); //为字体分配颜色 imagefttext($image,$fontSize,0,$left_x,$left_y,$color2,$font_file,$text); //填充文案到画布里 $fileName = 'Avatar_'.time().'.png'; //文件名称,避免重复生成 $localFilePath = public_path('static/tmp/avatar').$fileName;//本地存储路径 * 修改成自己存放文件的路径 imagepng($image,$localFilePath);//生成图像并保持本地 if(file_exists($localFilePath)){ return '/static/tmp/avatar/'.$fileName; }else{ return null; } }
2022年07月19日
1,664 阅读
0 评论
2 点赞
2022-07-03
thinkphp6 异常处理Exception,自定义异常处理,错误页面
{mtitle title="自定义异常捕获"/}{ } 在 app 下创建 BaseException.php 文件,继承 Exception { } 在 app 下的 ExceptionHandle.php 文件中,添加该异常机制处理逻辑{ } 在控制器中抛出异常{ } 运行结果{dotted startColor="#ff6c6c" endColor="#1989fa"/}{mtitle title="异常处理接管"/}{ } 在 app/admin/ 下创建 exception 文件夹,并创建 Error.php 文件{ } 在 app/admin/ 下创建 provider.php 文件,绑定自定义异常处理handle类{ } 在 admin 应用下的异常都有 Error.php 处理{ } 测试结果{dotted startColor="#ff6c6c" endColor="#1989fa"/}{mtitle title="自定义错误页面"/}{ } 在 app/tpl 下创建模版文件 think_exception_error.tpl { } 在 config/app.php 中配置模版文件路径{ } 在 Base.php 中创建 error() 方法{ } 在 Index.php 控制器中继承 Base 并使用 error() 方法{ } 执行结果
2022年07月03日
1,059 阅读
0 评论
1 点赞
1
...
8
9
10
11