var where = {};
var FORM_QUERY_ID = "lay-form-submit"; // form seach ElementId


layui.use(["index", "api"], function () {
  var $ = layui.$,
    table = layui.table,
    element = layui.element;
  // clipboard1
  var btn = document.getElementById('btn');
  var clipboard1 = new ClipboardJS(btn)
  clipboard1.on('success', function (e) {
    console.log('clipboard2 success:', e);
  });
  clipboard1.on('error', function (e) {
    console.log('clipboard2 error:', e);
  });

  // clipboard2
  var btns = document.querySelectorAll('button');
  var clipboard2 = new ClipboardJS(btns);
  clipboard2.on('success', function (e) {
    console.log('clipboard2 success:', e);
  });
  clipboard2.on('error', function (e) {
    console.log('clipboard2 error:', e);
  });

  // clipboard3
  var clipboard3 = new ClipboardJS('.selector-constructor');
  clipboard3.on('success', function (e) {
    console.log('clipboard3 success:', e);
  });
  clipboard3.on('error', function (e) {
    console.log('clipboard3 success:', e);
  });


  // clipboard4
  var clipboard4 = new ClipboardJS('.target-btn', {
    target: function () {
      return document.querySelector('.target-text');
    }
  });
  clipboard4.on('success', function (e) {
    console.log('clipboard4 success:', e);
  });
  clipboard4.on('error', function (e) {
    console.log('clipboard4 success:', e);
  });

  // clipboard5
  var clipboard5 = new ClipboardJS('.text-btn', {
    text: function () {
      return 'to be or not to be';
    }
  });
  clipboard5.on('success', function (e) {
    console.log('clipboard5 success:', e);
  });
  clipboard5.on('error', function (e) {
    console.log('clipboard5 success:', e);
  });

  // clipboard6
  var clipboard6 = new ClipboardJS('.div-btn');
  clipboard6.on('success', function (e) {
    console.log('clipboard6 success:', e);
  });
  clipboard6.on('error', function (e) {
    console.log('clipboard6 success:', e);
  });

  // clipboard7
  var clipboard7 = new ClipboardJS('.target-input-btn');
  clipboard7.on('success', function (e) {
    console.log('clipboard7 success:', e);
  });
  clipboard7.on('error', function (e) {
    console.log('clipboard7 success:', e);
  });

  // clipboard8
  var clipboard8 = new ClipboardJS('.target-textarea-btn');
  clipboard8.on('success', function (e) {
    console.log('clipboard8 success:', e);
  });
  clipboard8.on('error', function (e) {
    console.log('clipboard8 success:', e);
  });

});