VScode前端快速开发的设置及模板

使用VScode开发有一段时间了,现在记录一下自己的一些开发经验和快速开发的设置。黑喂狗~
在这里插入图片描述
在这里插入图片描述
这是我的个人配置,大家可以个性化

{
    "workbench.colorTheme": "Monokai",
    "luaide.scriptRoots": [
        "${workspaceRoot}"
    ],
    "explorer.confirmDelete": false,
    "luaide.automaticDownloadingDebugFile": true,
    "diffEditor.ignoreTrimWhitespace": false,
    
    // 全局变量颜色
    "luaide.golbalFieldColor": "#FFFF00",

    // 全局方法颜色
    "luaide.golbalFunColor": "#DD00FF",
    "editor.minimap.enabled": true,
    "workbench.statusBar.visible": false,
    "workbench.activityBar.visible": true,
    "window.menuBarVisibility": "default",
    "files.exclude": {
      "**/.git": true,
      "**/.svn": true,
      "**/.hg": true,
      "**/CVS": true,
      "**/.DS_Store": true,
      "**/*.meta":true
    },
    "luaide.apiType": "cocos2dx",
    // luaide 模板文件夹
    "luaide.luaTemplatesDir": "${workspaceRoot}/../temp",
    // luaide 宏变量申明
    "luaide.macroList": [
        {
            "name" : "author",
            "value" : "XQP"
        }
    ],
    "editor.wordWrap": "on",
    "window.zoomLevel": 0,
    "diffEditor.renderSideBySide": true,
}

下面是我的快速开发模板

--[[ 
    @filename:  {fileBasenameNoExtension}
    @Author:    {author}
    @Data:      {time}
    @最好的代码从来不用补丁,最好的工作,从来不用加班!
]]--

local {fileBasenameNoExtension} = class("{fileBasenameNoExtension}",cc.load("mvc").UiViewBase)
--local temp = import(".temp")
{fileBasenameNoExtension}.isNeedDoLayerOut = true
{fileBasenameNoExtension}.RESOURCE_FILENAME = "{fileBasenameNoExtension}.csb"
{fileBasenameNoExtension}.RESOURCE_BINDING = {
	["Image_bg"] = {["varname"] = "Image_bg"}
}

--[[
    @desc 方法初始化
    author:    {author}
    time:{time}
    @_callback: 方法参数
    return 
]]
function {fileBasenameNoExtension}:onCreate(_callback)
    local closeBtn = self.Image_bg:getChildByName("btn_close")
    closeBtn:onCustomTouch(handler(self, self.touchEvent))
end

--[[
    @desc touch 初始化
    author:    {author}
    time:{time}
    --@sender: closeBtn
    return 
]]
function {fileBasenameNoExtension}:touchEvent(sender)
    if sender:getName() == "btn_close" then
        self:removeFromParent()
    end
end

--[[
    @desc {fileBasenameNoExtension} 进入函数
    author:    {author}
    time:{time}
    return 
]]
function {fileBasenameNoExtension}:onEnter()
	
end

--[[
    @desc {fileBasenameNoExtension} 退出函数
    author:    {author}
    time:{time}
    return 
]]
function {fileBasenameNoExtension}:onExit()
	
end


return {fileBasenameNoExtension}
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值