vue.js 使用npm创建项目记录(windows) 前端

安装node.js http://nodejs.cn/ 安装以后 win+r cmd 命令行里运行npm -v 如果有版本号则安装成功

安装cnpm 淘宝地址,增加速度 npm install -g cnpm --registry=https://registry.npm.taobao.org

安装vue-cli cnpm install -g @vue/cli

安装webpack cnpm install -g webpack

安装完成后,cmd命令行进入D盘 运行 vue ui 进入浏览器 新建项目即可 http://localhost:8000


杨佳乐 发布于  2024-4-30 11:19 

uniapp 取消顶部导航栏 前端

打开根目录pages.json文件

主要增加app-plus 中的titlenview 配置,其他配置保存不变

"globalStyle": {
    "app-plus": {
    "titleNView": false
     }
},

杨佳乐 发布于  2024-4-30 11:18 

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()],
}),
],
}

})


杨佳乐 发布于  2024-4-30 11:17 

uniapp 中使用uni-ui无法设置输入框高度问题 前端

页面中使用uni-ui 的form组件,普通设置无法设置input框的高度

vue2中使用以下方式设置,增加/deep/用来穿透作用域样式

/deep/ .uni-easyinput__content-input{

    height: 96rpx;

}

vue3中使用以下方式设置

::deep .uni-easyinput__content-input{

    height: 96rpx;

}

杨佳乐 发布于  2024-4-30 11:17 

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;
}

杨佳乐 发布于  2024-4-30 11:16