![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/libs/absol-acomp/demo/ |
Upload File : |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Multicheck</title> <script src="../dist/absol-acomp.js?<?php echo stat('../dist/absol-acomp.js')['mtime'];?>"></script> </head> <body> <style> body { min-width: 80vh; } </style> <script> var listDataAsync = fetch('./demo_tree_list_with_icon.js').then(function (res) { return res.text(); }).then(function (text) { var module = {exports: {}}; var factor = new Function('module', 'exports', text + '\nreturn module.exports;'); return factor(module, module.exports); }); listDataAsync.then(function (items) { var _ = absol._; var $ = absol.$; var items2 = JSON.parse(JSON.stringify(items)); items2.forEach(function visit(item) { item.isLeaf = item.icon.class.indexOf('mdi-account') >= 0; if (item.items) { item.items.forEach(visit); } }); // var box = _({ // tag: 'multichecktreeleafbox', // props: { // items: items2, // enableSearch: true, // values:[-17, -18] // }, // on: { // change: function (event) { // console.log(this.values) // // this.value = event.item.value; // // console.log(event) // // // } // } // }).addTo(document.body); // var bt = _('<button>TARGET</button>').addTo(document.body); // box.followTarget = bt; // box.viewToSelected(); var menu = _({ tag: 'multichecktreeleafmenu', props: { items: items2, enableSearch: true, values: [-17, -18] }, on: { change: function () { absol.require('snackbar').show('change : ' + this.values.join(', ')); } } }).addTo(document.body); var menu1 = _({ tag: 'multichecktreeleafmenu', props: { items: items2, enableSearch: true, values: [-17, -18], disabled: true }, on: { change: function () { absol.require('snackbar').show('change : ' + this.values.join(', ')); } } }).addTo(document.body); _({ tag: 'pre', style: {background: '#eef'}, child: { tag: 'code', child: {text: 'items = ' + absol.generateJSVariable(items)} } }).addTo(document.body); }); </script> </body> </html>