Skip to content

webpack bootstrap搭建 #61

@zhan2016

Description

@zhan2016

安装配置bootstrap

https://stevenwestmoreland.com/2018/01/how-to-include-bootstrap-in-your-project-with-webpack.html
引入jquery插件:
https://blog.csdn.net/yiifaa/article/details/51916560
配置webpack-dev-server
https://www.cnblogs.com/xuehaoyue/p/6410095.html
使用fancyTree插件
https://github.com/mar10/fancytree/blob/master/demo/ajax-tree-local.json
注意使用到特定的extension,要引入特定的js

// Import LESS or CSS:
import 'jquery.fancytree/dist/skin-lion/ui.fancytree.less'
const $ = require('jquery');
const fancytree = require('jquery.fancytree');
require('jquery.fancytree/dist/modules/jquery.fancytree.edit');
require('jquery.fancytree/dist/modules/jquery.fancytree.filter');
require('jquery.fancytree/dist/modules/jquery.fancytree.glyph')   ///需要引入glyph,因为下面的extensions用到!

$(function(){
    // Initialize Fancytree
    $("#tree").fancytree({
        extensions: ["glyph"],
        checkbox: true,
        selectMode: 3,
        glyph: {
            preset: "awesome4",
            map: {}
        },
        source: {url: "ajax-tree-products.json", debugDelay: 1000},
        // source: {url: "ajax-tree-taxonomy.json", debugDelay: 1000},
        lazyLoad: function(event, ctx) {
            ctx.result = {url: "ajax-sub2.json", debugDelay: 1000};
        }
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions