uniapp 取消顶部导航栏 前端
打开根目录pages.json文件
主要增加app-plus 中的titlenview 配置,其他配置保存不变
"globalStyle": {
"app-plus": {
"titleNView": false
}
},
uniapp 中使用uni-ui无法设置输入框高度问题 前端
页面中使用uni-ui 的form组件,普通设置无法设置input框的高度
vue2中使用以下方式设置,增加/deep/用来穿透作用域样式
/deep/ .uni-easyinput__content-input{
height: 96rpx;
}
vue3中使用以下方式设置
::deep .uni-easyinput__content-input{
height: 96rpx;
}
vue3 按需使用element-plus报错 前端
unplugin-vue-components unplugin-auto-import 版本,进行降级
修改vue.config.js配置
const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack:{
plugins: [
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
}
})
PHP 递归生成子级数据 PHP
public function doMobileWenzhang_cbt(){
global $_GPC,$_W;
$wzid=$_GPC['wzid'];
$wzinfo=pdo_get('huoban_wenzhang',array('id'=>$wzid));
//递归查询下级访问用户
$list=pdo_fetchall("select * from ".tablename('huoban_readers')." where `zhuafanum`=1 and wzid={$wzid} ");
foreach ($list as $k=>$v){
$list[$k]['childs']=$this->cbt_dgsj($v['openid'],$v['wzid']);
}
echo "<pre/>";
var_dump($list);die;
echo json_encode(array('list'=>$list));
}
function cbt_dgsj($openid,$wzid){
//echo "1<br/>";
//echo "<pre/>";
$xjlist=pdo_fetchall("select * from ".tablename('huoban_readers')." where fromuser='{$openid}' and wzid={$wzid} ");
//var_dump($xjlist);
if(!empty($xjlist)){
foreach ($xjlist as $k=>$v){
//var_dump($xjlist);
$res=$this->cbt_dgsj($v['openid'],$v['wzid']);
$xjlist[$k]['childs']=$res;
}
/*echo "1<br/><pre/>";
var_dump($xjlist);*/
return $xjlist;
}
//var_dump($list);die;
return $xjlist;
}
PHP 文件写入数组 PHP
文件写入函数
file_put_contents(file,data,mode,context)
参数 描述 file 必需。规定要写入数据的文件。如果文件不存在,则创建一个新文件。 data 可选。规定要写入文件的数据。可以是字符串、数组或数据流。 mode 可选。规定如何打开/写入文件。可能的值: FILE_USE_INCLUDE_PATH、FILE_APPEND、LOCK_EX 。context可选。规定文件句柄的环境。 context 是一套可以修改流的行为的选项。若使用 null,则忽略。
$arr = array(
'name'=>'张三'
)
$str = var_export($arr,TRUE);
file_put_contents($filename,$str);