From 73e1aebd33edba16684bfa9011049c757a6fca82 Mon Sep 17 00:00:00 2001 From: mengxiong10 <15623530290@163.com> Date: Thu, 21 Nov 2019 12:39:52 +0800 Subject: [PATCH] Deploy updates --- example.5a85632e.js | 2812 ++++++++++++++++++++++++++++++++++++++++++ example.f6d53ba2.css | 269 ++++ index.html | 7 +- 3 files changed, 3085 insertions(+), 3 deletions(-) create mode 100644 example.5a85632e.js create mode 100644 example.f6d53ba2.css diff --git a/example.5a85632e.js b/example.5a85632e.js new file mode 100644 index 0000000..cfdee6c --- /dev/null +++ b/example.5a85632e.js @@ -0,0 +1,2812 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles +parcelRequire = (function (modules, cache, entry, globalName) { + // Save the require from previous bundle to this closure if any + var previousRequire = typeof parcelRequire === 'function' && parcelRequire; + var nodeRequire = typeof require === 'function' && require; + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = typeof parcelRequire === 'function' && parcelRequire; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = cache[name] = new newRequire.Module(name); + + modules[name][0].call(module.exports, localRequire, module, module.exports, this); + } + + return cache[name].exports; + + function localRequire(x){ + return newRequire(localRequire.resolve(x)); + } + + function resolve(x){ + return modules[name][1][x] || x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [function (require, module) { + module.exports = exports; + }, {}]; + }; + + var error; + for (var i = 0; i < entry.length; i++) { + try { + newRequire(entry[i]); + } catch (e) { + // Save first error but execute all entries + if (!error) { + error = e; + } + } + } + + if (entry.length) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(entry[entry.length - 1]); + + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(function () { + return mainExports; + }); + + // \n" +}, { + id: 'ValueType', + component: _ValueType.default, + code: "\n\n\n" +}, { + id: 'Range', + component: _Range.default, + code: "\n\n\n" +}, { + id: 'HideSeconds', + component: _HideSeconds.default, + code: "\n\n\n" +}, { + id: 'MinuteStep', + component: _MinuteStep.default, + code: "\n\n\n" +}, { + id: 'FixedTimeList', + component: _FixedTimeList.default, + code: "\n\n\n" +}, { + id: 'DisabledDateTime', + component: _DisabledDateTime.default, + code: "\n\n\n" +}, { + id: 'Disabled', + component: _Disabled.default, + code: "\n\n\n" +}, { + id: 'Shortcut', + component: _Shortcut.default, + code: "\n\n\n" +}, { + id: 'ControlTimePanel', + component: _ControlTimePanel.default, + code: "\n\n\n" +}, { + id: 'ControlOpen', + component: _ControlOpen.default, + code: "\n\n\n" +}]; + +function transformMd(text) { + var array = text.split(/\n(?=/); + return result && result[1].trim(); + }; + + var getTitleAndDescription = function getTitleAndDescription(s) { + var result = s.match(/(.*?)<\/h\d>/); + if (!result) return null; + var title = result[1]; + var description = s.slice(result[0].length + result.index); + return { + title: title.trim().replace(/&/g, '&'), + description: description.trim() + }; + }; + + var result = {}; + array.forEach(function (str) { + var id = getId(str); + + if (id) { + result[id] = getTitleAndDescription(str); + } + }); + return result; +} + +var docMap = { + en: transformMd(_en.default), + 'zh-cn': transformMd(_zhCn.default) +}; +var App = { + name: 'App', + props: { + changeLocale: { + type: Function, + default: function _default() { + return ''; + } + } + }, + data: function data() { + return { + lang: 'en', + hackReset: true, + currentId: this.getCurrentId() + }; + }, + mounted: function mounted() { + var _this = this; + + window.onhashchange = function () { + _this.currentId = _this.getCurrentId(); + }; + + if (this.currentId) { + document.getElementById(this.currentId).scrollIntoView(); + } + }, + methods: { + getCurrentId: function getCurrentId() { + return location.hash.slice(1); + }, + handleChangeLocale: function handleChangeLocale() { + var _this2 = this; + + var lang = this.lang === 'en' ? 'zh-cn' : 'en'; + this.lang = lang; + this.changeLocale(lang); + this.hackReset = false; + this.$nextTick(function () { + _this2.hackReset = true; + }); + } + }, + render: function render(h) { + var _this3 = this; + + var doc = docMap[this.lang] || docMap.en; + var menus = components.map(function (item) { + return _objectSpread({ + id: item.id + }, doc[item.id]); + }); + return h(_container.default, { + "attrs": { + "menus": menus + } + }, [h("div", { + "style": { + textAlign: 'right' + } + }, [h("a", { + "style": "margin-right: 10px", + "class": "mx-btn-text mx-btn", + "attrs": { + "href": "https://github.com/mengxiong10/vue2-datepicker", + "target": "_blank" + } + }, ["GitHub"]), h("button", { + "on": { + "click": this.handleChangeLocale + }, + "class": "mx-btn" + }, [this.lang === 'en' ? '中文' : 'English'])]), this.hackReset && components.map(function (item) { + var component = item.component, + id = item.id, + code = item.code; + + var props = _objectSpread({ + id: id, + code: code, + active: id === _this3.currentId + }, doc[id]); + + return h(_card.default, { + "props": _objectSpread({}, props) + }, [h(component)]); + })]); + } +}; +var _default = App; +exports.default = _default; +},{"fs":"rDCW","./helper/container.vue":"exOZ","./helper/card.vue":"K2WH","./demo/Basic.vue":"F4k5","./demo/ValueType.vue":"MAVg","./demo/Range.vue":"vssy","./demo/DisabledDateTime.vue":"tBXd","./demo/Shortcut.vue":"U8rn","./demo/ControlTimePanel.vue":"jkBQ","./demo/ControlOpen.vue":"hLWH","./demo/HideSeconds.vue":"P315","./demo/MinuteStep.vue":"WCZR","./demo/FixedTimeList.vue":"hxWp","./demo/Disabled.vue":"TYGO","./en.md":"yxg7","./zh-cn.md":"u7Vb"}],"Focm":[function(require,module,exports) { +"use strict"; + +var _app = _interopRequireDefault(require("./app")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +window.DatePicker.locale('en'); +new window.Vue({ + render: function render(h) { + return h(_app.default, { + props: { + changeLocale: window.DatePicker.locale + } + }); + } +}).$mount('#app'); +},{"./app":"A2T1"}],"FheM":[function(require,module,exports) { +var bundleURL = null; + +function getBundleURLCached() { + if (!bundleURL) { + bundleURL = getBundleURL(); + } + + return bundleURL; +} + +function getBundleURL() { + // Attempt to find the URL of the current script and use that as the base URL + try { + throw new Error(); + } catch (err) { + var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g); + + if (matches) { + return getBaseURL(matches[0]); + } + } + + return '/'; +} + +function getBaseURL(url) { + return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/'; +} + +exports.getBundleURL = getBundleURLCached; +exports.getBaseURL = getBaseURL; +},{}],"TUK3":[function(require,module,exports) { +var getBundleURL = require('./bundle-url').getBundleURL; + +function loadBundlesLazy(bundles) { + if (!Array.isArray(bundles)) { + bundles = [bundles]; + } + + var id = bundles[bundles.length - 1]; + + try { + return Promise.resolve(require(id)); + } catch (err) { + if (err.code === 'MODULE_NOT_FOUND') { + return new LazyPromise(function (resolve, reject) { + loadBundles(bundles.slice(0, -1)).then(function () { + return require(id); + }).then(resolve, reject); + }); + } + + throw err; + } +} + +function loadBundles(bundles) { + return Promise.all(bundles.map(loadBundle)); +} + +var bundleLoaders = {}; + +function registerBundleLoader(type, loader) { + bundleLoaders[type] = loader; +} + +module.exports = exports = loadBundlesLazy; +exports.load = loadBundles; +exports.register = registerBundleLoader; +var bundles = {}; + +function loadBundle(bundle) { + var id; + + if (Array.isArray(bundle)) { + id = bundle[1]; + bundle = bundle[0]; + } + + if (bundles[bundle]) { + return bundles[bundle]; + } + + var type = (bundle.substring(bundle.lastIndexOf('.') + 1, bundle.length) || bundle).toLowerCase(); + var bundleLoader = bundleLoaders[type]; + + if (bundleLoader) { + return bundles[bundle] = bundleLoader(getBundleURL() + bundle).then(function (resolved) { + if (resolved) { + module.bundle.register(id, resolved); + } + + return resolved; + }).catch(function (e) { + delete bundles[bundle]; + throw e; + }); + } +} + +function LazyPromise(executor) { + this.executor = executor; + this.promise = null; +} + +LazyPromise.prototype.then = function (onSuccess, onError) { + if (this.promise === null) this.promise = new Promise(this.executor); + return this.promise.then(onSuccess, onError); +}; + +LazyPromise.prototype.catch = function (onError) { + if (this.promise === null) this.promise = new Promise(this.executor); + return this.promise.catch(onError); +}; +},{"./bundle-url":"FheM"}],"A3BY":[function(require,module,exports) { +module.exports = function loadHTMLBundle(bundle) { + return fetch(bundle).then(function (res) { + return res.text(); + }); +}; +},{}],0:[function(require,module,exports) { +var b=require("TUK3");b.register("html",require("A3BY"));b.load([["en.41eb6cda.html","yxg7"],["zh-cn.27351eac.html","u7Vb"]]).then(function(){require("Focm");}); +},{}]},{},[0], null) \ No newline at end of file diff --git a/example.f6d53ba2.css b/example.f6d53ba2.css new file mode 100644 index 0000000..c5cfc0a --- /dev/null +++ b/example.f6d53ba2.css @@ -0,0 +1,269 @@ +html, +body { + height: 100%; +} + +body { + overflow: hidden; +} + +.container { + display: flex; + height: 100%; +} + +@media screen and (max-width: 800px) { + .sidebar { + display: none; + } +} +.sidebar { + border-right: 1px solid #ebedf0; + width: 280px; + overflow: auto; +} +.sidebar a { + font-size: 14px; + line-height: 30px; + display: block; + padding-left: 16px; + overflow: hidden; + color: #314659; + white-space: nowrap; + text-overflow: ellipsis; + border-left: 1px solid transparent; + transition: all 0.3s ease; + text-decoration: none; + background-color: transparent; + outline: none; + cursor: pointer; +} +.sidebar a:hover { + color: #1485e7; +} +.sidebar a.active { + color: #1284e7; +} + +.main { + flex: 1; + overflow: auto; + max-width: 100%; +} +.main p { + margin: 10px 0; +} + +.content { + box-sizing: border-box; + width: 100%; + padding: 10px 20px; +}/* + +Atom One Light by Daniel Gamage +Original One Light Syntax theme from https://github.com/atom/one-light-syntax + +base: #fafafa +mono-1: #383a42 +mono-2: #686b77 +mono-3: #a0a1a7 +hue-1: #0184bb +hue-2: #4078f2 +hue-3: #a626a4 +hue-4: #50a14f +hue-5: #e45649 +hue-5-2: #c91243 +hue-6: #986801 +hue-6-2: #c18401 + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #383a42; + background: #fafafa; +} + +.hljs-comment, +.hljs-quote { + color: #a0a1a7; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #a626a4; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e45649; +} + +.hljs-literal { + color: #0184bb; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #50a14f; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #c18401; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #986801; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #4078f2; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} +.highlight-code { + margin: 0; + background: #fff; +} +.highlight-code::after, .highlight-code::before { + width: 0; +} +.highlight-code code { + display: block; + background: #fff; + color: #314659; + line-height: 2; + border: 0; + box-shadow: none; + padding: 16px 32px; + border-radius: 2px; + font-size: 14px; +}.card { + position: relative; + display: inline-block; + width: 100%; + font-size: 14px; + color: #314659; + border: 1px solid #ebedf0; + border-radius: 4px; + margin-bottom: 60px; + margin-top: 20px; +} +.card.active { + border-color: #1284e7; +} + +.card-demo { + padding: 30px 24px; + color: #213649; + border-top: 1px solid #ebedf0; +} +.card-demo .box { + display: flex; + flex-wrap: wrap; +} +.card-demo .box > section { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; +} + +.card-title { + position: absolute; + margin-top: -10px; + margin-left: 14px; + font-size: 16px; + line-height: 1; + font-weight: 700; + padding: 0 10px; + background: #fff; +} + +.card-description { + padding: 12px 24px; +} + +.markdown-body { + font-size: 15px; + line-height: 1.7; +} +.markdown-body p, +.markdown-body ul, +.markdown-body ol { + margin: 10px 0; +} +.markdown-body ul, +.markdown-body ol { + padding-left: 30px; +} +.markdown-body code { + margin: 0 1px; + padding: 0.2em 0.4em; + margin: 0; + font-size: 85%; + background-color: rgba(27, 31, 35, 0.05); + border-radius: 3px; +} + +.card-actions { + position: relative; + border-top: 1px solid #ebedf0; + height: 36px; + text-align: center; + color: #d3dce6; + cursor: pointer; + transition: 0.2s; + user-select: none; +} +.card-actions:hover { + box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5); +} + +.icon-expand { + position: absolute; + left: 50%; + top: 50%; + margin-left: -8px; + margin-top: -8px; + width: 16px; + height: 16px; + opacity: 0.3; +} + +.card-code { + border-top: 1px solid #ebedf0; +} \ No newline at end of file diff --git a/index.html b/index.html index 1926050..3cf71f7 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,13 @@ Document - + +
- + - +