commit fde5919d994f4675d665475055c036104c3ad1ea
Author: 大师兄法号随缘 <18862253202@qq.com>
Date: Fri Sep 19 17:42:11 2025 +0800
初始化提交
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..14c93c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,337 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- Backup*.rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
\ No newline at end of file
diff --git a/电子展板.sln b/电子展板.sln
new file mode 100644
index 0000000..e3b3817
--- /dev/null
+++ b/电子展板.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.14.36511.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "电子展板", "电子展板\电子展板.csproj", "{0D003941-6CC3-41AA-8B16-779D3299E44B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0D003941-6CC3-41AA-8B16-779D3299E44B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0D003941-6CC3-41AA-8B16-779D3299E44B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0D003941-6CC3-41AA-8B16-779D3299E44B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0D003941-6CC3-41AA-8B16-779D3299E44B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D5F6089E-4C64-4CD0-8C37-1646F4B47447}
+ EndGlobalSection
+EndGlobal
diff --git a/电子展板/App.xaml b/电子展板/App.xaml
new file mode 100644
index 0000000..eb80146
--- /dev/null
+++ b/电子展板/App.xaml
@@ -0,0 +1,13 @@
+
' + message.replace('%icon', '') + '
'; + + // create the message container + this.viewport = document.createElement('div'); + this.viewport.className = 'ath-viewport'; + if (this.options.modal) { + this.viewport.className += ' ath-modal'; + } + if (this.options.mandatory) { + this.viewport.className += ' ath-mandatory'; + } + this.viewport.style.position = 'absolute'; + + // create the actual message element + this.element = document.createElement('div'); + this.element.className = 'ath-container ath-' + ath.OS + ' ath-' + ath.OS + (ath.OSVersion + '').substr(0, 1) + ' ath-' + (ath.isTablet ? 'tablet' : 'phone'); + this.element.style.cssText = '-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0s;-webkit-transition-timing-function:ease-out;transition-property:transform,opacity;transition-duration:0s;transition-timing-function:ease-out;'; + this.element.style.webkitTransform = 'translate3d(0,-' + window.innerHeight + 'px,0)'; + this.element.style.transform = 'translate3d(0,-' + window.innerHeight + 'px,0)'; + + // add the application icon + if (this.options.icon && this.applicationIcon) { + this.element.className += ' ath-icon'; + this.img = document.createElement('img'); + this.img.className = 'ath-application-icon'; + this.img.addEventListener('load', this, false); + this.img.addEventListener('error', this, false); + + this.img.src = this.applicationIcon.href; + this.element.appendChild(this.img); + } + + this.element.innerHTML += message; + + // we are not ready to show, place the message out of sight + this.viewport.style.left = '-99999em'; + + // attach all elements to the DOM + this.viewport.appendChild(this.element); + this.container.appendChild(this.viewport); + + // if we don't have to wait for an image to load, show the message right away + if (this.img) { + this.doLog("Add to homescreen: not displaying callout because waiting for img to load"); + } else { + this._delayedShow(); + } + }, + + _delayedShow: function(e) { + setTimeout(this._show.bind(this), this.options.startDelay * 1000 + 500); + }, + + _show: function() { + var that = this; + + // update the viewport size and orientation + this.updateViewport(); + + // reposition/resize the message on orientation change + window.addEventListener('resize', this, false); + window.addEventListener('scroll', this, false); + window.addEventListener('orientationchange', this, false); + + if (this.options.modal) { + // lock any other interaction + document.addEventListener('touchmove', this, true); + } + + // Enable closing after 1 second + if (!this.options.mandatory) { + setTimeout(function() { + that.element.addEventListener('click', that, true); + }, 1000); + } + + // kick the animation + setTimeout(function() { + that.element.style.webkitTransitionDuration = '1.2s'; + that.element.style.transitionDuration = '1.2s'; + that.element.style.webkitTransform = 'translate3d(0,0,0)'; + that.element.style.transform = 'translate3d(0,0,0)'; + }, 0); + + // set the destroy timer + if (this.options.lifespan) { + this.removeTimer = setTimeout(this.remove.bind(this), this.options.lifespan * 1000); + } + + // fire the custom onShow event + if (this.options.onShow) { + this.options.onShow.call(this); + } + }, + + remove: function() { + clearTimeout(this.removeTimer); + + // clear up the event listeners + if (this.img) { + this.img.removeEventListener('load', this, false); + this.img.removeEventListener('error', this, false); + } + + window.removeEventListener('resize', this, false); + window.removeEventListener('scroll', this, false); + window.removeEventListener('orientationchange', this, false); + document.removeEventListener('touchmove', this, true); + this.element.removeEventListener('click', this, true); + + // remove the message element on transition end + this.element.addEventListener('transitionend', this, false); + this.element.addEventListener('webkitTransitionEnd', this, false); + this.element.addEventListener('MSTransitionEnd', this, false); + + // start the fade out animation + this.element.style.webkitTransitionDuration = '0.3s'; + this.element.style.opacity = '0'; + }, + + _removeElements: function() { + this.element.removeEventListener('transitionend', this, false); + this.element.removeEventListener('webkitTransitionEnd', this, false); + this.element.removeEventListener('MSTransitionEnd', this, false); + + // remove the message from the DOM + this.container.removeChild(this.viewport); + + this.shown = false; + + // fire the custom onRemove event + if (this.options.onRemove) { + this.options.onRemove.call(this); + } + }, + + updateViewport: function() { + if (!this.shown) { + return; + } + + this.viewport.style.width = window.innerWidth + 'px'; + this.viewport.style.height = window.innerHeight + 'px'; + this.viewport.style.left = window.scrollX + 'px'; + this.viewport.style.top = window.scrollY + 'px'; + + var clientWidth = document.documentElement.clientWidth; + + this.orientation = clientWidth > document.documentElement.clientHeight ? 'landscape' : 'portrait'; + + var screenWidth = ath.OS == 'ios' ? this.orientation == 'portrait' ? screen.width : screen.height : screen.width; + this.scale = screen.width > clientWidth ? 1 : screenWidth / window.innerWidth; + + this.element.style.fontSize = this.options.fontSize / this.scale + 'px'; + }, + + resize: function() { + clearTimeout(this.resizeTimer); + this.resizeTimer = setTimeout(this.updateViewport.bind(this), 100); + }, + + updateSession: function() { + if (ath.hasLocalStorage === false) { + return; + } + + if (localStorage) { + localStorage.setItem(this.options.appID, JSON.stringify(this.session)); + } + }, + + clearSession: function() { + this.session = _defaultSession; + this.updateSession(); + }, + + getItem: function(item) { + try { + if (!localStorage) { + throw new Error('localStorage is not defined'); + } + + return localStorage.getItem(item); + } catch (e) { + // Preventing exception for some browsers when fetching localStorage key + ath.hasLocalStorage = false; + } + }, + + optOut: function() { + this.session.optedout = true; + this.updateSession(); + }, + + optIn: function() { + this.session.optedout = false; + this.updateSession(); + }, + + clearDisplayCount: function() { + this.session.displayCount = 0; + this.updateSession(); + }, + + _preventDefault: function(e) { + e.preventDefault(); + e.stopPropagation(); + } + }; + + // utility + function _extend(target, obj) { + for (var i in obj) { + target[i] = obj[i]; + } + + return target; + } + + function _removeToken() { + if (document.location.hash == '#ath') { + history.replaceState('', window.document.title, document.location.href.split('#')[0]); + } + + if (_reSmartURL.test(document.location.href)) { + history.replaceState('', window.document.title, document.location.href.replace(_reSmartURL, '$1')); + } + + if (_reQueryString.test(document.location.search)) { + history.replaceState('', window.document.title, document.location.href.replace(_reQueryString, '$2')); + } + } + + /* jshint +W101, +W106 */ + + ath.VERSION = '3.2.2'; + + module.exports = UI.addToHomescreen = ath; + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var $ = __webpack_require__(1); + var UI = __webpack_require__(2); + + /** + * @via https://github.com/Minwe/bootstrap/blob/master/js/alert.js + * @copyright Copyright 2013 Twitter, Inc. + * @license Apache 2.0 + */ + + // Alert Class + // NOTE: removeElement option is unavailable now + var Alert = function(element, options) { + var _this = this; + this.options = $.extend({}, Alert.DEFAULTS, options); + this.$element = $(element); + + this.$element + .addClass('am-fade am-in') + .on('click.alert.amui', '.am-close', function() { + _this.close(); + }); + }; + + Alert.DEFAULTS = { + removeElement: true + }; + + Alert.prototype.close = function() { + var $element = this.$element; + + $element.trigger('close.alert.amui').removeClass('am-in'); + + function processAlert() { + $element.trigger('closed.alert.amui').remove(); + } + + UI.support.transition && $element.hasClass('am-fade') ? + $element + .one(UI.support.transition.end, processAlert) + .emulateTransitionEnd(200) : + processAlert(); + }; + + // plugin + UI.plugin('alert', Alert); + + // Init code + $(document).on('click.alert.amui.data-api', '[data-am-alert]', function(e) { + var $target = $(e.target); + $target.is('.am-close') && $(this).alert('close'); + }); + + module.exports = Alert; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var $ = __webpack_require__(1); + var UI = __webpack_require__(2); + + /** + * @via https://github.com/twbs/bootstrap/blob/master/js/button.js + * @copyright (c) 2011-2014 Twitter, Inc + * @license The MIT License + */ + + var Button = function(element, options) { + this.$element = $(element); + this.options = $.extend({}, Button.DEFAULTS, options); + this.isLoading = false; + this.hasSpinner = false; + }; + + Button.DEFAULTS = { + loadingText: 'loading...', + disabledClassName: 'am-disabled', + activeClassName: 'am-active', + spinner: undefined + }; + + Button.prototype.setState = function(state, stateText) { + var $element = this.$element; + var disabled = 'disabled'; + var data = $element.data(); + var options = this.options; + var val = $element.is('input') ? 'val' : 'html'; + var stateClassName = 'am-btn-' + state + ' ' + options.disabledClassName; + + state += 'Text'; + + if (!options.resetText) { + options.resetText = $element[val](); + } + + // add spinner for element with html() + if (UI.support.animation && options.spinner && + val === 'html' && !this.hasSpinner) { + options.loadingText = '' + options.loadingText; + + this.hasSpinner = true; + } + + stateText = stateText || + (data[state] === undefined ? options[state] : data[state]); + + $element[val](stateText); + + // push to event loop to allow forms to submit + setTimeout($.proxy(function() { + // TODO: add stateClass for other states + if (state === 'loadingText') { + $element.addClass(stateClassName).attr(disabled, disabled); + this.isLoading = true; + } else if (this.isLoading) { + $element.removeClass(stateClassName).removeAttr(disabled); + this.isLoading = false; + } + }, this), 0); + }; + + Button.prototype.toggle = function() { + var changed = true; + var $element = this.$element; + var $parent = this.$element.parent('[class*="am-btn-group"]'); + var activeClassName = Button.DEFAULTS.activeClassName; + + if ($parent.length) { + var $input = this.$element.find('input'); + + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && $element.hasClass(activeClassName)) { + changed = false; + } else { + $parent.find('.' + activeClassName).removeClass(activeClassName); + } + } + + if (changed) { + $input.prop('checked', + !$element.hasClass(activeClassName)).trigger('change'); + } + } + + if (changed) { + $element.toggleClass(activeClassName); + if (!$element.hasClass(activeClassName)) { + $element.blur(); + } + } + }; + + UI.plugin('button', Button, { + dataOptions: 'data-am-loading', + methodCall: function(args, instance) { + if (args[0] === 'toggle') { + instance.toggle(); + } else if (typeof args[0] === 'string') { + instance.setState.apply(instance, args); + } + } + }); + + // Init code + $(document).on('click.button.amui.data-api', '[data-am-button]', function(e) { + e.preventDefault(); + var $btn = $(e.target); + + if (!$btn.hasClass('am-btn')) { + $btn = $btn.closest('.am-btn'); + } + + $btn.button('toggle'); + }); + + UI.ready(function(context) { + $('[data-am-loading]', context).button(); + + // resolves #866 + $('[data-am-button]', context).find('input:checked').each(function() { + $(this).parent('label').addClass(Button.DEFAULTS.activeClassName); + }); + }); + + module.exports = UI.button = Button; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var $ = __webpack_require__(1); + var UI = __webpack_require__(2); + + /** + * @via https://github.com/twbs/bootstrap/blob/master/js/collapse.js + * @copyright (c) 2011-2014 Twitter, Inc + * @license The MIT License + */ + + var Collapse = function(element, options) { + this.$element = $(element); + this.options = $.extend({}, Collapse.DEFAULTS, options); + this.transitioning = null; + + if (this.options.parent) { + this.$parent = $(this.options.parent); + } + + if (this.options.toggle) { + this.toggle(); + } + }; + + Collapse.DEFAULTS = { + toggle: true + }; + + Collapse.prototype.open = function() { + if (this.transitioning || this.$element.hasClass('am-in')) { + return; + } + + var startEvent = $.Event('open.collapse.amui'); + this.$element.trigger(startEvent); + + if (startEvent.isDefaultPrevented()) { + return; + } + + var actives = this.$parent && this.$parent.find('> .am-panel > .am-in'); + + if (actives && actives.length) { + var hasData = actives.data('amui.collapse'); + + if (hasData && hasData.transitioning) { + return; + } + + Plugin.call(actives, 'close'); + + hasData || actives.data('amui.collapse', null); + } + + this.$element + .removeClass('am-collapse') + .addClass('am-collapsing').height(0); + + this.transitioning = 1; + + var complete = function() { + this.$element + .removeClass('am-collapsing') + .addClass('am-collapse am-in') + .height('') + .trigger('opened.collapse.amui'); + this.transitioning = 0; + }; + + if (!UI.support.transition) { + return complete.call(this); + } + + var scrollHeight = this.$element[0].scrollHeight; + + this.$element + .one(UI.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(300) + .css({height: scrollHeight}); // 当折叠的容器有 padding 时,如果用 height() 只能设置内容的宽度 + }; + + Collapse.prototype.close = function() { + if (this.transitioning || !this.$element.hasClass('am-in')) { + return; + } + + var startEvent = $.Event('close.collapse.amui'); + this.$element.trigger(startEvent); + + if (startEvent.isDefaultPrevented()) { + return; + } + + this.$element.height(this.$element.height()).redraw(); + + this.$element.addClass('am-collapsing'). + removeClass('am-collapse am-in'); + + this.transitioning = 1; + + var complete = function() { + this.transitioning = 0; + this.$element + .trigger('closed.collapse.amui') + .removeClass('am-collapsing') + .addClass('am-collapse'); + // css({height: '0'}); + }; + + if (!UI.support.transition) { + return complete.call(this); + } + + this.$element.height(0) + .one(UI.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(300); + }; + + Collapse.prototype.toggle = function() { + this[this.$element.hasClass('am-in') ? 'close' : 'open'](); + }; + + // Collapse Plugin + function Plugin(option) { + return this.each(function() { + var $this = $(this); + var data = $this.data('amui.collapse'); + var options = $.extend({}, Collapse.DEFAULTS, + UI.utils.options($this.attr('data-am-collapse')), + typeof option == 'object' && option); + + if (!data && options.toggle && option === 'open') { + option = !option; + } + + if (!data) { + $this.data('amui.collapse', (data = new Collapse(this, options))); + } + + if (typeof option == 'string') { + data[option](); + } + }); + } + + $.fn.collapse = Plugin; + + // Init code + $(document).on('click.collapse.amui.data-api', '[data-am-collapse]', + function(e) { + var href; + var $this = $(this); + var options = UI.utils.options($this.attr('data-am-collapse')); + var target = options.target || + e.preventDefault() || + (href = $this.attr('href')) && + href.replace(/.*(?=#[^\s]+$)/, ''); + var $target = $(target); + var data = $target.data('amui.collapse'); + var option = data ? 'toggle' : options; + var parent = options.parent; + var $parent = parent && $(parent); + + if (!data || !data.transitioning) { + if ($parent) { + // '[data-am-collapse*="{parent: \'' + parent + '"] + $parent.find('[data-am-collapse]').not($this).addClass('am-collapsed'); + } + + $this[$target.hasClass('am-in') ? + 'addClass' : 'removeClass']('am-collapsed'); + } + + Plugin.call($target, option); + }); + + module.exports = UI.collapse = Collapse; + + // TODO: 更好的 target 选择方式 + // 折叠的容器必须没有 border/padding 才能正常处理,否则动画会有一些小问题 + // 寻找更好的未知高度 transition 动画解决方案,max-height 之类的就算了 + + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var $ = __webpack_require__(1); + var UI = __webpack_require__(2); + var $doc = $(document); + + /** + * bootstrap-datepicker.js + * @via http://www.eyecon.ro/bootstrap-datepicker + * @license http://www.apache.org/licenses/LICENSE-2.0 + */ + var Datepicker = function(element, options) { + this.$element = $(element); + this.options = $.extend({}, Datepicker.DEFAULTS, options); + this.format = DPGlobal.parseFormat(this.options.format); + + this.$element.data('date', this.options.date); + this.language = this.getLocale(this.options.locale); + this.theme = this.options.theme; + this.$picker = $(DPGlobal.template).appendTo('body').on({ + click: $.proxy(this.click, this) + // mousedown: $.proxy(this.mousedown, this) + }); + + this.isInput = this.$element.is('input'); + this.component = this.$element.is('.am-datepicker-date') ? + this.$element.find('.am-datepicker-add-on') : false; + + if (this.isInput) { + this.$element.on({ + 'click.datepicker.amui': $.proxy(this.open, this), + // blur: $.proxy(this.close, this), + 'keyup.datepicker.amui': $.proxy(this.update, this) + }); + } else { + if (this.component) { + this.component.on('click.datepicker.amui', $.proxy(this.open, this)); + } else { + this.$element.on('click.datepicker.amui', $.proxy(this.open, this)); + } + } + + this.minViewMode = this.options.minViewMode; + + if (typeof this.minViewMode === 'string') { + switch (this.minViewMode) { + case 'months': + this.minViewMode = 1; + break; + case 'years': + this.minViewMode = 2; + break; + default: + this.minViewMode = 0; + break; + } + } + + this.viewMode = this.options.viewMode; + + if (typeof this.viewMode === 'string') { + switch (this.viewMode) { + case 'months': + this.viewMode = 1; + break; + case 'years': + this.viewMode = 2; + break; + default: + this.viewMode = 0; + break; + } + } + + this.startViewMode = this.viewMode; + this.weekStart = ((this.options.weekStart || + Datepicker.locales[this.language].weekStart || 0) % 7); + this.weekEnd = ((this.weekStart + 6) % 7); + this.onRender = this.options.onRender; + + this.setTheme(); + this.fillDow(); + this.fillMonths(); + this.update(); + this.showMode(); + }; + + Datepicker.DEFAULTS = { + locale: 'zh_CN', + format: 'yyyy-mm-dd', + weekStart: undefined, + viewMode: 0, + minViewMode: 0, + date: '', + theme: '', + autoClose: 1, + onRender: function(date) { + return ''; + } + }; + + Datepicker.prototype.open = function(e) { + this.$picker.show(); + this.height = this.component ? + this.component.outerHeight() : this.$element.outerHeight(); + + this.place(); + $(window).on('resize.datepicker.amui', $.proxy(this.place, this)); + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + var that = this; + $doc.on('mousedown.datapicker.amui touchstart.datepicker.amui', function(ev) { + if ($(ev.target).closest('.am-datepicker').length === 0) { + that.close(); + } + }); + this.$element.trigger({ + type: 'open.datepicker.amui', + date: this.date + }); + }; + + Datepicker.prototype.close = function() { + this.$picker.hide(); + $(window).off('resize.datepicker.amui', this.place); + this.viewMode = this.startViewMode; + this.showMode(); + if (!this.isInput) { + $(document).off('mousedown.datapicker.amui touchstart.datepicker.amui', + this.close); + } + // this.set(); + this.$element.trigger({ + type: 'close.datepicker.amui', + date: this.date + }); + }; + + Datepicker.prototype.set = function() { + var formatted = DPGlobal.formatDate(this.date, this.format); + var $input; + + if (!this.isInput) { + if (this.component) { + $input = this.$element.find('input').attr('value', formatted); + } + + this.$element.data('date', formatted); + } else { + $input = this.$element.attr('value', formatted); + } + + // fixes https://github.com/amazeui/amazeui/issues/711 + $input && $input.trigger('change'); + }; + + Datepicker.prototype.setValue = function(newDate) { + if (typeof newDate === 'string') { + this.date = DPGlobal.parseDate(newDate, this.format); + } else { + this.date = new Date(newDate); + } + this.set(); + + this.viewDate = new Date(this.date.getFullYear(), + this.date.getMonth(), 1, 0, 0, 0, 0); + + this.fill(); + }; + + Datepicker.prototype.place = function() { + var offset = this.component ? + this.component.offset() : this.$element.offset(); + var $width = this.component ? + this.component.width() : this.$element.width(); + var top = offset.top + this.height; + var left = offset.left; + var right = $doc.width() - offset.left - $width; + var isOutView = this.isOutView(); + + this.$picker.removeClass('am-datepicker-right'); + this.$picker.removeClass('am-datepicker-up'); + + if ($doc.width() > 640) { + if (isOutView.outRight) { + this.$picker.addClass('am-datepicker-right'); + this.$picker.css({ + top: top, + left: 'auto', + right: right + }); + return; + } + if (isOutView.outBottom) { + this.$picker.addClass('am-datepicker-up'); + top = offset.top - this.$picker.outerHeight(true); + } + } else { + left = 0; + } + + this.$picker.css({ + top: top, + left: left + }); + }; + + Datepicker.prototype.update = function(newDate) { + this.date = DPGlobal.parseDate( + typeof newDate === 'string' ? newDate : (this.isInput ? + this.$element.prop('value') : this.$element.data('date')), + this.format + ); + this.viewDate = new Date(this.date.getFullYear(), + this.date.getMonth(), 1, 0, 0, 0, 0); + this.fill(); + }; + + // Days of week + Datepicker.prototype.fillDow = function() { + var dowCount = this.weekStart; + var html = '"+u.time[t]+"
\s*$/g;function Rt(e,t){return x(e,"table")&&x(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function It(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Wt(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ft(e,t){var n,r,i,o;if(1===t.nodeType){if(m.hasData(e)&&(o=m.get(e).events))for(i in m.remove(t,"handle events"),o)for(n=0,r=o[i].length;n \u65e0\u5339\u914d\u9879 '+(t||"")+"'+function(){var e=a.length,t=1,i="";if(0
",success:function(e){var t=e.find(".layui-layer-title").children(),i=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var e=h(this),t=e.index();e.addClass(o).siblings().removeClass(o),i.eq(t).show().siblings().hide(),"function"==typeof n.change&&n.change(t)}),"function"==typeof s&&s(e)}},n))},v.photos=function(n,e,a){var s={};if((n=h.extend(!0,{toolbar:!0,footer:!0},n)).photos){var t=!("string"==typeof n.photos||n.photos instanceof h),i=t?n.photos:{},o=i.data||[],r=i.start||0,l=n.success;if(s.imgIndex=1+(0|r),n.img=n.img||"img",delete n.success,t){if(0===o.length)return v.msg("\u6ca1\u6709\u56fe\u7247")}else{var c=h(n.photos),d=function(){o=[],c.find(n.img).each(function(e){var t=h(this);t.attr("layer-index",e),o.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(d(),e||c.on("click",n.img,function(){d();var e=h(this).attr("layer-index");v.photos(h.extend(n,{photos:{start:e,data:o,tab:n.tab},full:n.full}),!0)}),!e)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=o.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>o.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){var t;s.end||(t=e.keyCode,e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&v.close(s.index))},s.tabimg=function(e){if(!(o.length<=1))return i.start=s.imgIndex-1,v.close(s.index),v.photos(n,!0,e)},s.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},s.image={},s.getTransform=function(e){var t=[],i=e.rotate,n=e.scaleX,e=e.scale;return s.isNumber(i)&&0!==i&&t.push("rotate("+i+"deg)"),s.isNumber(n)&&1!==n&&t.push("scaleX("+n+")"),s.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},s.event=function(e,i,n){var a,o;s.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),h(document).on("keyup",s.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=h(this);switch(e.attr("toolbar-event")){case"rotate":s.image.rotate=((s.image.rotate||0)+Number(e.attr("data-option")))%360,s.imgElem.css({transform:s.getTransform(s.image)});break;case"scalex":s.image.scaleX=-1===s.image.scaleX?1:-1,s.imgElem.css({transform:s.getTransform(s.image)});break;case"zoom":var t=Number(e.attr("data-option"));s.image.scale=(s.image.scale||1)+t,t<0&&s.image.scale<0-t&&(s.image.scale=0-t),s.imgElem.css({transform:s.getTransform(s.image)});break;case"reset":s.image.scaleX=1,s.image.scale=1,s.image.rotate=0,s.imgElem.css({transform:"none"});break;case"close":v.close(i)}n.offset(),n.auto(i)}),s.main.on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,i=s.main.find('[toolbar-event="zoom"]');(0'+(t=['
\u662f\u5426\u7ee7\u7eed\u67e5\u770b\u4e0b\u4e00\u5f20\uff1f",{time:3e4,btn:["\u4e0b\u4e00\u5f20","\u4e0d\u770b\u4e86"],yes:function(){1"),"parent"===l?(a.append(u(t,i[s.children])),o.append(a)):o.append(u(t,i[s.children]))),r.append(o))}),r},t=['
")),g(i.index,e.responseText,e),l(i.index),t(i.file)}};"function"==typeof f.progress&&(e.xhr=function(){var e=F.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var t;e.lengthComputable&&(t=Math.floor(e.loaded/e.total*100),f.progress(t,(f.item||f.elem)[0],e,i.index))}),e}),F.ajax(e)};f.unified?i({unified:!0,index:0}):layui.each(r,function(e,t){i({index:e,file:t})})},p=function(){var n=F("#"+E);u.elemFile.parent().submit(),clearInterval(D.timer),D.timer=setInterval(function(){var e,t=n.contents().find("body");try{e=t.text()}catch(i){u.msg(s["cross-domain"]),clearInterval(D.timer),g()}e&&(clearInterval(D.timer),t.html(""),m(0,e))},30)},h=function(e){if("json"===f.force&&"object"!=typeof e)try{return{status:"CONVERTED",data:JSON.parse(e)}}catch(t){return u.msg(s["data-format-error"]),{status:"FORMAT_ERROR",data:{}}}return{status:"DO_NOTHING",data:{}}},m=function(e,t){u.elemFile.next("."+L).remove(),l.value="";var i=h(t);switch(i.status){case"CONVERTED":t=i.data;break;case"FORMAT_ERROR":return}"function"==typeof f.done&&f.done(t,e||0,function(e){u.upload(e)})},g=function(e,t,i){f.auto&&(l.value="");var n=h(t);switch(n.status){case"CONVERTED":t=n.data;break;case"FORMAT_ERROR":return}"function"==typeof f.error&&f.error(e||0,function(e){u.upload(e)},t,i)},v=f.exts,y=(n=[],layui.each(e||u.chooseFiles,function(e,t){n.push(t.name)}),n),x={preview:function(e){u.preview(e)},upload:function(e,t){var i={};i[e]=t,u.upload(i)},pushFile:function(){return u.files=u.files||{},layui.each(u.chooseFiles,function(e,t){u.files[e]=t}),u.files},resetFile:function(e,t,i){t=new File([t],i);u.files=u.files||{},u.files[e]=t},getChooseFiles:function(){return u.chooseFiles}},b={file:"\u6587\u4ef6",images:"\u56fe\u7247",video:"\u89c6\u9891",audio:"\u97f3\u9891"}[f.accept]||"\u6587\u4ef6",y=0===y.length?l.value.match(/[^\/\\]+\..+/g)||[]:y;if(0!==y.length){switch(f.accept){case"file":layui.each(y,function(e,t){if(v&&!RegExp(".\\.("+v+")$","i").test(escape(t)))return i=!0});break;case"video":layui.each(y,function(e,t){if(!RegExp(".\\.("+(v||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(t)))return i=!0});break;case"audio":layui.each(y,function(e,t){if(!RegExp(".\\.("+(v||"mp3|wav|mid")+")$","i").test(escape(t)))return i=!0});break;default:layui.each(y,function(e,t){if(!RegExp(".\\.("+(v||"jpg|png|gif|bmp|jpeg|svg|webp")+")$","i").test(escape(t)))return i=!0})}if(i)return u.msg(s["check-error"]||"\u9009\u62e9\u7684"+b+"\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),l.value="";if("choose"!==t&&!f.auto||(f.choose&&f.choose(x),"choose"!==t)){if(u.fileLength=(a=0,b=c(),layui.each(b,function(){a++}),a),f.number&&u.fileLength>f.number)return u.msg("function"==typeof s["limit-number"]?s["limit-number"](f,u.fileLength):"\u540c\u65f6\u6700\u591a\u53ea\u80fd\u4e0a\u4f20: "+f.number+" \u4e2a\u6587\u4ef6
\u60a8\u5f53\u524d\u5df2\u7ecf\u9009\u62e9\u4e86: "+u.fileLength+" \u4e2a\u6587\u4ef6");if(0',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","
"].join("")},a=['","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",' ","{{# }); }}","","',' ",e.fixed?"{{# }; }}":"","{{# }); }}","',"","
"].join(""),B=[,"{{# if(d.data.toolbar){ }}",'','
"," ',""+i.join("")+" "),h.push(""+d.join("")+" "),p.push(""+r.join("")+" "))}),{trs:y,trs_fixed:h,trs_fixed_r:p}},k.getTrHtml=function(e,t){e=C(e);return e.getTrHtml(t,null,e.page)},n.prototype.renderData=function(e){var a=this,i=a.config,t=e.res,l=e.curr,n=a.count=e.count,o=e.sort,d=t[i.response.dataName]||[],t=t[i.response.totalRowName],r=[],c=[],s=[],u=function(){if(!o&&a.sortKey)return a.sort({field:a.sortKey.field,type:a.sortKey.sort,pull:!0,reloadType:e.type});a.getTrHtml(d,o,l,{trs:r,trs_fixed:c,trs_fixed_r:s}),"fixed"===i.scrollPos&&"reloadData"===e.type||a.layBody.scrollTop(0),"reset"===i.scrollPos&&a.layBody.scrollLeft(0),a.layMain.find("."+h).remove(),a.layMain.find("tbody").html(r.join("")),a.layFixLeft.find("tbody").html(c.join("")),a.layFixRight.find("tbody").html(s.join("")),a.syncCheckAll(),a.renderForm(),a.fullSize(),a.haveInit?a.scrollPatch():setTimeout(function(){a.scrollPatch()},50),a.haveInit=!0,g.close(a.tipsIndex)};return k.cache[a.key]=d,a.layTotal[0==d.length?"addClass":"removeClass"](y),a.layPage[i.page||i.pagebar?"removeClass":"addClass"](W),a.layPage.find(P)[!i.page||0==n||0===d.length&&1==l?"addClass":"removeClass"](y),0===d.length?a.errorView(i.text.none):(a.layFixLeft.removeClass(W),o?u():(u(),a.renderTotal(d,t),a.layTotal&&a.layTotal.removeClass(W),void(i.page&&(i.page=f.extend({elem:"layui-table-page"+i.index,count:n,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(a.page=e.curr,i.limit=e.limit,a.pullData(e.curr))}},i.page),i.page.count=n,p.render(i.page)))))},k.renderData=function(e){e=C(e);e&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},n.prototype.renderTotal=function(e,o){var d,r=this,c=r.config,s={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||r.eachCols(function(e,t){var e=t.field||e,a=i[e];t.totalRow&&(s[e]=(s[e]||0)+(parseFloat(a)||0))})}),r.dataTotal=[],d=[],r.eachCols(function(e,t){var e=t.field||e,a=o&&o[t.field],i="totalRowDecimals"in t?t.totalRowDecimals:2,i=s[e]?parseFloat(s[e]||0).toFixed(i):"",i=(n=t.totalRowText||"",(l={LAY_COL:t})[e]=i,l=t.totalRow&&T.call(r,{item3:t,content:i,tplData:l})||n,a||l),l="string"==typeof(n=t.totalRow||c.totalRow)?m(n).render(f.extend({TOTAL_NUMS:a||s[e],TOTAL_ROW:o||{},LAY_COL:t},t)):i,n=(t.field&&r.dataTotal.push({field:t.field,total:f("',' "].join(""));d.push(n)}),e=r.layTotal.find(".layui-table-patch"),r.layTotal.find("tbody").html(""+d.join("")+(e.length?e.get(0).outerHTML:"")+" "))},n.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},n.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");i.render(e,t)},n.prototype.renderFormByElem=function(a){layui.each(["input","select"],function(e,t){i.render(a.find(t))})},n.prototype.syncCheckAll=function(){var a,e=this,i=e.config,t=e.layHeader.find('input[name="layTableCheckbox"]'),l=k.checkStatus(e.key);t[0]&&(a=l.isAll,e.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=a)}),t.prop({checked:l.isAll,indeterminate:!l.isAll&&l.data.length}))},n.prototype.setRowActive=function(e,t,a){this.config;e=this.layBody.find('tr[data-index="'+e+'"]');if(t=t||"layui-table-click",a)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},n.prototype.setRowChecked=function(i){var a,e,l,t,n,o,d,r=this,c=r.config,s="all"===i.index,u="array"===layui.type(i.index),y=s||u;c.tree&&c.tree.view||y&&(r.layBox.addClass(O),"radio"===i.type)||(u&&(a={},layui.each(i.index,function(e,t){a[t]=!0}),i.index=a),e=r.layBody.children(".layui-table").children("tbody"),d=y?"tr":'tr[data-index="'+i.index+'"]',d=e.children(d),e=s?d:d.filter(u?function(){var e=f(this).data("index");return i.index[e]}:'[data-index="'+i.index+'"]'),i=f.extend({type:"checkbox"},i),l=k.cache[r.key],t="checked"in i,n=function(e){return"radio"===i.type||(t?i.checked:!e)},e.each(function(){var e=f(this),t=e.attr("data-index"),a=l[t];t&&"array"!==layui.type(a)&&!a[c.disabledName]&&(a=a[c.checkName]=n(e.hasClass(A)),e.toggleClass(A,!!a),"radio"===i.type)&&(o=t,e.siblings().removeClass(A))}),o&&layui.each(l,function(e,t){Number(o)!==Number(e)&&delete t[c.checkName]}),d=(u=(s=e.children("td").children(".layui-table-cell").children('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[i.type]||"checkbox")+'"]:not(:disabled)')).last()).closest(I),("radio"===i.type&&d.hasClass(W)?s.first():s).prop("checked",n(u.prop("checked"))),r.syncCheckAll(),y&&setTimeout(function(){r.layBox.removeClass(O)},100))},n.prototype.sort=function(l){var e,t=this,a={},i=t.config,n=i.elem.attr("lay-filter"),o=k.cache[t.key];"string"==typeof(l=l||{}).field&&(d=l.field,t.layHeader.find("th").each(function(e,t){var a=f(this),i=a.data("field");if(i===l.field)return l.field=a,d=i,!1}));try{var d=d||l.field.data("field"),r=l.field.data("key");if(t.sortKey&&!l.pull&&d===t.sortKey.field&&l.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+r).find(L);t.layHeader.find("th").find(L).removeAttr("lay-sort"),c.attr("lay-sort",l.type||null),t.layFixed.find("th")}catch(s){b.error("Table modules: sort field '"+d+"' not matched")}t.sortKey={field:d,sort:l.type},i.autoSort&&("asc"===l.type?e=layui.sort(o,d,null,!0):"desc"===l.type?e=layui.sort(o,d,!0,!0):(e=layui.sort(o,k.config.initIndexName,null,!0),delete t.sortKey,delete i.initSort)),a[i.response.dataName]=e||o,t.renderData({res:a,curr:t.page,count:t.count,sort:!0,type:l.reloadType}),l.fromEvent&&(i.initSort={field:d,type:l.type},layui.event.call(l.field,R,"sort("+n+")",f.extend({config:i},i.initSort)))},n.prototype.loading=function(e){this.config.loading&&this.layBox.find(".layui-table-init").toggleClass(W,!e)},n.prototype.cssRules=function(t,a){var e=this.elem.children("style")[0];r.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return a(e),!0})},n.prototype.fullSize=function(){var e,a,i=this,t=i.config,l=t.height;i.fullHeightGap?(l=d.height()-i.fullHeightGap)<135&&(l=135):i.parentDiv&&i.parentHeightGap?(l=f(i.parentDiv).height()-i.parentHeightGap)<135&&(l=135):i.customHeightFunc&&(l=i.customHeightFunc())<135&&(l=135),1'),i=p(''),layui.each(t.header,function(e,t){t=n.renderHeaderItem(t);a.append(t)}),layui.each(t.body,function(e,t){t=n.renderBodyItem(t);i.append(t)}),n.elemView.append(a).append(i),t.elem.html(n.elemView)):n.renderClose(),"array"===layui.type(t.body)&&"string"==typeof t.body[0]&&(n.documentElem=p(document),n.bodyElem=t.body.concat()),n.data());"index"in t&&e.index!=t.index?n.change(n.findHeaderItem(t.index),!0):-1===e.index&&n.change(n.findHeaderItem(0),!0),n.roll("auto"),t.elem.hasClass(C.CONST.CLASS_HIDEV)&&t.elem.removeClass(C.CONST.CLASS_HIDEV),"function"==typeof t.afterRender&&t.afterRender(e),layui.event.call(t.elem[0],C.CONST.MOD_NAME,"afterRender("+t.id+")",e)},events:function(){var e,t=this,a=t.config,i=t.getContainer(),n=C.CONST.MOD_NAME,i=(t.documentElem?i.header:a).elem,a=a.trigger+(".lay_"+n+"_trigger"),n=t.documentElem?t.headerElem[1]:t.headerElem.join("");i.off(a).on(a,n,function(){t.change(p(this))}),r.onresize||(p(window).on("resize",function(){clearTimeout(e),e=setTimeout(function(){layui.each(C.cache.id,function(e){e=C.getInst(e);e&&e.roll("init")})},50)}),r.onresize=!0)}}),r={},t=C.Class;t.prototype.add=function(e){var t,a,i=this,n=(i.config,i.getContainer()),r=i.renderHeaderItem(e),d=i.renderBodyItem(e),o=i.data();e=p.extend({active:!0},e),/(before|after)/.test(e.mode)?(a=(t=e.hasOwnProperty("index"))?i.findHeaderItem(e.index):o.thisHeaderItem,t=t?i.findBodyItem(e.index):o.thisHeaderItem,a[e.mode](r),t[e.mode](d)):(a={prepend:"prepend",append:"append"}[e.mode||"append"]||"append",n.header.elem[a](r),n.body.elem[a](d)),e.active?i.change(r,!0):i.roll("auto"),"function"==typeof e.done&&e.done(p.extend(o,{headerItem:r,bodyItem:d}))},t.prototype.close=function(e,t){if(e&&e[0]){var a=this,i=a.config,n=e.attr("lay-id"),r=e.index();if("false"!==e.attr("lay-closable")){var d=a.data();if(!t)if(!1===layui.event.call(e[0],C.CONST.MOD_NAME,"beforeClose("+i.id+")",p.extend(d,{index:r})))return;e.hasClass(C.CONST.CLASS_THIS)&&(e.next()[0]?a.change(e.next(),!0):e.prev()[0]&&a.change(e.prev(),!0)),a.findBodyItem(n||r).remove(),e.remove(),a.roll("auto",r);d=a.data();layui.event.call(d.thisHeaderItem[0],C.CONST.MOD_NAME,"afterClose("+i.id+")",d)}}},t.prototype.closeMult=function(i,e){var n=this,t=n.config,a=n.getContainer(),r=n.data(),d=a.header.items,a=(a.body.items,'[lay-closable="false"]'),o=(e=e===undefined?r.index:e,n.findHeaderItem(e)),l=(n.findBodyItem(e),o.index()),r=("false"!==r.thisHeaderItem.attr("lay-closable")&&("all"!==i&&i?e!==r.index&&n.change(o,!0):(e=d.filter(":gt("+r.index+")"+a).eq(0),o=p(d.filter(":lt("+r.index+")"+a).get().reverse()).eq(0),e[0]?n.change(e,!0):o[0]&&n.change(o,!0))),d.each(function(e){var t=p(this),a=t.attr("lay-id"),a=n.findBodyItem(a||e);"false"!==t.attr("lay-closable")&&("other"===i&&e!==l||"right"===i&&l
',"
',(n=[],layui.each(e.elemItem,function(e){n.push("")}),n.join("")),"
"].join(""));i.elem.attr("lay-indicator",i.indicator),i.elem.find("."+d)[0]&&i.elem.find("."+d).remove(),1"),i=1;i<=a.length;i++){var n='
",a.text&&(t+=''+a.value+"");var s=a.elem,o=s.next("."+c.ELEM);o[0]&&o.remove(),e.elemTemplate=u(t),a.span=e.elemTemplate.next("span"),a.setText&&a.setText(a.value),s.html(e.elemTemplate),s.addClass("layui-inline"),a.readonly||e.action()},extendsInstance:function(){var a=this,l=a.config;return{setvalue:function(e){l.value=e,a.render()}}}}),c=l.CONST;l.Class.prototype.action=function(){var n=this.config,t=this.elemTemplate,i=t.find("i").width(),l=t.children("li");l.each(function(e){var a=e+1,l=u(this);l.on("click",function(e){n.value=a,n.half&&e.pageX-u(this).offset().left<=i/2&&(n.value=n.value-.5),n.text&&t.next("span").text(n.value),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value)}),l.on("mousemove",function(e){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+a+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&e.pageX-u(this).offset().left<=i/2&&l.children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)}),l.on("mouseleave",function(){t.find("i").each(function(){u(this).addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF)}),t.find("i:lt("+Math.floor(n.value)+")").each(function(){u(this).addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE)}),n.half&&parseInt(n.value)!==n.value&&t.children("li:eq("+Math.floor(n.value)+")").children("i").addClass(c.ICON_RATE_HALF).removeClass(c.ICON_SOLID_RATE)})}),a.touchSwipe(t,{onTouchMove:function(e,a){var i;Date.now()-a.timeStart<=200||(a=e.touches[0].pageX,e=t.width()/n.length,a=(a-t.offset().left)/e,(i=(i=(e=a%1)<=.5&&n.half?.5+(a-e):Math.ceil(a))>n.length?n.length:i)<0&&(i=0),l.each(function(e){var a=u(this).children("i"),l=Math.ceil(i)-e==1,t=Math.ceil(i)>e,e=i-e==.5;t?(a.addClass(c.ICON_RATE_SOLID).removeClass(c.ICON_HALF_RATE),n.half&&e&&a.addClass(c.ICON_RATE_HALF).removeClass(c.ICON_RATE_SOLID)):a.addClass(c.ICON_RATE).removeClass(c.ICON_SOLID_HALF),a.toggleClass("layui-rate-hover",l)}),n.value=i,n.text&&t.next("span").text(n.value),n.setText&&n.setText(n.value))},onTouchEnd:function(e,a){Date.now()-a.timeStart<=200||(t.find("i").removeClass("layui-rate-hover"),n.choose&&n.choose(n.value),n.setText&&n.setText(n.value))}})},e(c.MOD_NAME,l)});layui.define("jquery",function(o){"use strict";var w=layui.$,l=function(o){};l.prototype.load=function(o){var i,n,r,l,c,m,e,t,a,f,s,u,p,d,y,g=this,h=0,v=w((o=o||{}).elem);if(v[0])return c=w(o.scrollElem||document),m="mb"in o?o.mb:50,e=!("isAuto"in o)||o.isAuto,t=o.moreText||"\u52a0\u8f7d\u66f4\u591a",a=o.end||"\u6ca1\u6709\u66f4\u591a\u4e86",f="top"===(o.direction||"bottom"),g._cleanup(v,c),s=o.scrollElem&&o.scrollElem!==document,p=w('"),v.find(".layui-flow-more")[0]||v[f?"prepend":"append"](p),d=function(o,l){var e=s?c.prop("scrollHeight"):document.documentElement.scrollHeight,t=c.scrollTop();o=w(o),p[f?"after":"before"](o),(l=0==l||null)?p.html(a):p.find("a").html(u),n=l,i=null,r&&r(),f&&(o=s?c.prop("scrollHeight"):document.documentElement.scrollHeight,1===h?c.scrollTop(o):1'),o.addClass((E=["layui-code-view layui-border-box"],l.wordWrap||E.push("layui-code-nowrap"),E.join(" "))),(C=l.theme||l.skin)&&(o.removeClass("layui-code-theme-dark layui-code-theme-light"),o.addClass("layui-code-theme-"+C)),l.highlighter&&o.addClass([l.highlighter,"language-"+l.lang,"layui-code-hl"].join(" ")),f=w(l.encode?D.escape(n(a)):a),h=f.lines,o.html(p.html(f.html)),l.ln&&o.append(''),l.height&&p.css("max-height",l.height),l.codeStyle=[l.style,l.codeStyle].join(""),l.codeStyle&&p.attr("style",function(e,t){return(t||"")+l.codeStyle}),v=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,t){e.style["padding-left"]=t+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,t){e.style.width=t+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,t){e.style.width=t+"px"}}],m=lay.style({target:o[0],id:"DF-code-"+d,text:x.map(x.map(v,function(e){return e.selector}),function(e,t){return['.layui-code-view[lay-code-index="'+d+'"]',e].join(" ")}).join("")}),L=function b(){var e,i;return l.ln&&(e=Math.floor(h.length/100),i=p.children("."+A.ELEM_LINE).last().children("."+A.ELEM_LINE_NUM).outerWidth(),o.addClass(A.ELEM_LN_MODE),e)&&A.LINE_RAW_WIDTH>(json);
+ }
+
+
+ ///