提交 9c3954ea 编写于 作者: fxy060608's avatar fxy060608

feat: createIntersectionObserver

上级 313f1354
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
*
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*
*/
export const initIntersectionObserverPolyfill = function () {
'use strict'
// Exit early if we're not running in a browser.
if (typeof window !== 'object') {
return
}
// Exit early if all IntersectionObserver and IntersectionObserverEntry
// features are natively supported.
if (
'IntersectionObserver' in window &&
'IntersectionObserverEntry' in window &&
'intersectionRatio' in window.IntersectionObserverEntry.prototype
) {
// Minimal polyfill for Edge 15's lack of `isIntersecting`
// See: https://github.com/w3c/IntersectionObserver/issues/211
if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
Object.defineProperty(
window.IntersectionObserverEntry.prototype,
'isIntersecting',
{
get: function () {
return this.intersectionRatio > 0
},
}
)
}
return
}
/**
* Returns the embedding frame element, if any.
* @param {!Document} doc
* @return {!Element}
*/
function getFrameElement(doc) {
try {
return (doc.defaultView && doc.defaultView.frameElement) || null
} catch (e) {
// Ignore the error.
return null
}
}
/**
* A local reference to the root document.
*/
var document = (function (startDoc) {
var doc = startDoc
var frame = getFrameElement(doc)
while (frame) {
doc = frame.ownerDocument
frame = getFrameElement(doc)
}
return doc
})(window.document)
/**
* An IntersectionObserver registry. This registry exists to hold a strong
* reference to IntersectionObserver instances currently observing a target
* element. Without this registry, instances without another reference may be
* garbage collected.
*/
var registry = []
/**
* The signal updater for cross-origin intersection. When not null, it means
* that the polyfill is configured to work in a cross-origin mode.
* @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}
*/
var crossOriginUpdater = null
/**
* The current cross-origin intersection. Only used in the cross-origin mode.
* @type {DOMRect|ClientRect}
*/
var crossOriginRect = null
/**
* Creates the global IntersectionObserverEntry constructor.
* https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
* @param {Object} entry A dictionary of instance properties.
* @constructor
*/
function IntersectionObserverEntry(entry) {
this.time = entry.time
this.target = entry.target
this.rootBounds = ensureDOMRect(entry.rootBounds)
this.boundingClientRect = ensureDOMRect(entry.boundingClientRect)
this.intersectionRect = ensureDOMRect(
entry.intersectionRect || getEmptyRect()
)
this.isIntersecting = !!entry.intersectionRect
// Calculates the intersection ratio.
var targetRect = this.boundingClientRect
var targetArea = targetRect.width * targetRect.height
var intersectionRect = this.intersectionRect
var intersectionArea = intersectionRect.width * intersectionRect.height
// Sets intersection ratio.
if (targetArea) {
// Round the intersection ratio to avoid floating point math issues:
// https://github.com/w3c/IntersectionObserver/issues/324
this.intersectionRatio = Number(
(intersectionArea / targetArea).toFixed(4)
)
} else {
// If area is zero and is intersecting, sets to 1, otherwise to 0
this.intersectionRatio = this.isIntersecting ? 1 : 0
}
}
/**
* Creates the global IntersectionObserver constructor.
* https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
* @param {Function} callback The function to be invoked after intersection
* changes have queued. The function is not invoked if the queue has
* been emptied by calling the `takeRecords` method.
* @param {Object=} opt_options Optional configuration options.
* @constructor
*/
function IntersectionObserver(callback, opt_options) {
var options = opt_options || {}
if (typeof callback != 'function') {
throw new Error('callback must be a function')
}
if (
options.root &&
options.root.nodeType != 1 &&
options.root.nodeType != 9
) {
throw new Error('root must be a Document or Element')
}
// Binds and throttles `this._checkForIntersections`.
this._checkForIntersections = throttle(
this._checkForIntersections.bind(this),
this.THROTTLE_TIMEOUT
)
// Private properties.
this._callback = callback
this._observationTargets = []
this._queuedEntries = []
this._rootMarginValues = this._parseRootMargin(options.rootMargin)
// Public properties.
this.thresholds = this._initThresholds(options.threshold)
this.root = options.root || null
this.rootMargin = this._rootMarginValues
.map(function (margin) {
return margin.value + margin.unit
})
.join(' ')
/** @private @const {!Array<!Document>} */
this._monitoringDocuments = []
/** @private @const {!Array<function()>} */
this._monitoringUnsubscribes = []
}
/**
* The minimum interval within which the document will be checked for
* intersection changes.
*/
IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100
/**
* The frequency in which the polyfill polls for intersection changes.
* this can be updated on a per instance basis and must be set prior to
* calling `observe` on the first target.
*/
IntersectionObserver.prototype.POLL_INTERVAL = null
/**
* Use a mutation observer on the root element
* to detect intersection changes.
*/
IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true
/**
* Sets up the polyfill in the cross-origin mode. The result is the
* updater function that accepts two arguments: `boundingClientRect` and
* `intersectionRect` - just as these fields would be available to the
* parent via `IntersectionObserverEntry`. This function should be called
* each time the iframe receives intersection information from the parent
* window, e.g. via messaging.
* @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}
*/
IntersectionObserver._setupCrossOriginUpdater = function () {
if (!crossOriginUpdater) {
/**
* @param {DOMRect|ClientRect} boundingClientRect
* @param {DOMRect|ClientRect} intersectionRect
*/
crossOriginUpdater = function (boundingClientRect, intersectionRect) {
if (!boundingClientRect || !intersectionRect) {
crossOriginRect = getEmptyRect()
} else {
crossOriginRect = convertFromParentRect(
boundingClientRect,
intersectionRect
)
}
registry.forEach(function (observer) {
observer._checkForIntersections()
})
}
}
return crossOriginUpdater
}
/**
* Resets the cross-origin mode.
*/
IntersectionObserver._resetCrossOriginUpdater = function () {
crossOriginUpdater = null
crossOriginRect = null
}
/**
* Starts observing a target element for intersection changes based on
* the thresholds values.
* @param {Element} target The DOM element to observe.
*/
IntersectionObserver.prototype.observe = function (target) {
var isTargetAlreadyObserved = this._observationTargets.some(function (
item
) {
return item.element == target
})
if (isTargetAlreadyObserved) {
return
}
if (!(target && target.nodeType == 1)) {
throw new Error('target must be an Element')
}
this._registerInstance()
this._observationTargets.push({ element: target, entry: null })
this._monitorIntersections(target.ownerDocument)
this._checkForIntersections()
}
/**
* Stops observing a target element for intersection changes.
* @param {Element} target The DOM element to observe.
*/
IntersectionObserver.prototype.unobserve = function (target) {
this._observationTargets = this._observationTargets.filter(function (item) {
return item.element != target
})
this._unmonitorIntersections(target.ownerDocument)
if (this._observationTargets.length == 0) {
this._unregisterInstance()
}
}
/**
* Stops observing all target elements for intersection changes.
*/
IntersectionObserver.prototype.disconnect = function () {
this._observationTargets = []
this._unmonitorAllIntersections()
this._unregisterInstance()
}
/**
* Returns any queue entries that have not yet been reported to the
* callback and clears the queue. This can be used in conjunction with the
* callback to obtain the absolute most up-to-date intersection information.
* @return {Array} The currently queued entries.
*/
IntersectionObserver.prototype.takeRecords = function () {
var records = this._queuedEntries.slice()
this._queuedEntries = []
return records
}
/**
* Accepts the threshold value from the user configuration object and
* returns a sorted array of unique threshold values. If a value is not
* between 0 and 1 and error is thrown.
* @private
* @param {Array|number=} opt_threshold An optional threshold value or
* a list of threshold values, defaulting to [0].
* @return {Array} A sorted list of unique and valid threshold values.
*/
IntersectionObserver.prototype._initThresholds = function (opt_threshold) {
var threshold = opt_threshold || [0]
if (!Array.isArray(threshold)) threshold = [threshold]
return threshold.sort().filter(function (t, i, a) {
if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
throw new Error(
'threshold must be a number between 0 and 1 inclusively'
)
}
return t !== a[i - 1]
})
}
/**
* Accepts the rootMargin value from the user configuration object
* and returns an array of the four margin values as an object containing
* the value and unit properties. If any of the values are not properly
* formatted or use a unit other than px or %, and error is thrown.
* @private
* @param {string=} opt_rootMargin An optional rootMargin value,
* defaulting to '0px'.
* @return {Array<Object>} An array of margin objects with the keys
* value and unit.
*/
IntersectionObserver.prototype._parseRootMargin = function (opt_rootMargin) {
var marginString = opt_rootMargin || '0px'
var margins = marginString.split(/\s+/).map(function (margin) {
var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin)
if (!parts) {
throw new Error('rootMargin must be specified in pixels or percent')
}
return { value: parseFloat(parts[1]), unit: parts[2] }
})
// Handles shorthand.
margins[1] = margins[1] || margins[0]
margins[2] = margins[2] || margins[0]
margins[3] = margins[3] || margins[1]
return margins
}
/**
* Starts polling for intersection changes if the polling is not already
* happening, and if the page's visibility state is visible.
* @param {!Document} doc
* @private
*/
IntersectionObserver.prototype._monitorIntersections = function (doc) {
var win = doc.defaultView
if (!win) {
// Already destroyed.
return
}
if (this._monitoringDocuments.indexOf(doc) != -1) {
// Already monitoring.
return
}
// Private state for monitoring.
var callback = this._checkForIntersections
var monitoringInterval = null
var domObserver = null
// If a poll interval is set, use polling instead of listening to
// resize and scroll events or DOM mutations.
if (this.POLL_INTERVAL) {
monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL)
} else {
addEvent(win, 'resize', callback, true)
addEvent(doc, 'scroll', callback, true)
if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {
domObserver = new win.MutationObserver(callback)
domObserver.observe(doc, {
attributes: true,
childList: true,
characterData: true,
subtree: true,
})
}
}
this._monitoringDocuments.push(doc)
this._monitoringUnsubscribes.push(function () {
// Get the window object again. When a friendly iframe is destroyed, it
// will be null.
var win = doc.defaultView
if (win) {
if (monitoringInterval) {
win.clearInterval(monitoringInterval)
}
removeEvent(win, 'resize', callback, true)
}
removeEvent(doc, 'scroll', callback, true)
if (domObserver) {
domObserver.disconnect()
}
})
// Also monitor the parent.
var rootDoc =
(this.root && (this.root.ownerDocument || this.root)) || document
if (doc != rootDoc) {
var frame = getFrameElement(doc)
if (frame) {
this._monitorIntersections(frame.ownerDocument)
}
}
}
/**
* Stops polling for intersection changes.
* @param {!Document} doc
* @private
*/
IntersectionObserver.prototype._unmonitorIntersections = function (doc) {
var index = this._monitoringDocuments.indexOf(doc)
if (index == -1) {
return
}
var rootDoc =
(this.root && (this.root.ownerDocument || this.root)) || document
// Check if any dependent targets are still remaining.
var hasDependentTargets = this._observationTargets.some(function (item) {
var itemDoc = item.element.ownerDocument
// Target is in this context.
if (itemDoc == doc) {
return true
}
// Target is nested in this context.
while (itemDoc && itemDoc != rootDoc) {
var frame = getFrameElement(itemDoc)
itemDoc = frame && frame.ownerDocument
if (itemDoc == doc) {
return true
}
}
return false
})
if (hasDependentTargets) {
return
}
// Unsubscribe.
var unsubscribe = this._monitoringUnsubscribes[index]
this._monitoringDocuments.splice(index, 1)
this._monitoringUnsubscribes.splice(index, 1)
unsubscribe()
// Also unmonitor the parent.
if (doc != rootDoc) {
var frame = getFrameElement(doc)
if (frame) {
this._unmonitorIntersections(frame.ownerDocument)
}
}
}
/**
* Stops polling for intersection changes.
* @param {!Document} doc
* @private
*/
IntersectionObserver.prototype._unmonitorAllIntersections = function () {
var unsubscribes = this._monitoringUnsubscribes.slice(0)
this._monitoringDocuments.length = 0
this._monitoringUnsubscribes.length = 0
for (var i = 0; i < unsubscribes.length; i++) {
unsubscribes[i]()
}
}
/**
* Scans each observation target for intersection changes and adds them
* to the internal entries queue. If new entries are found, it
* schedules the callback to be invoked.
* @private
*/
IntersectionObserver.prototype._checkForIntersections = function () {
if (!this.root && crossOriginUpdater && !crossOriginRect) {
// Cross origin monitoring, but no initial data available yet.
return
}
var rootIsInDom = this._rootIsInDom()
var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect()
this._observationTargets.forEach(function (item) {
var target = item.element
var targetRect = getBoundingClientRect(target)
var rootContainsTarget = this._rootContainsTarget(target)
var oldEntry = item.entry
var intersectionRect =
rootIsInDom &&
rootContainsTarget &&
this._computeTargetAndRootIntersection(target, targetRect, rootRect)
var rootBounds = null
if (!this._rootContainsTarget(target)) {
rootBounds = getEmptyRect()
} else if (!crossOriginUpdater || this.root) {
rootBounds = rootRect
}
var newEntry = (item.entry = new IntersectionObserverEntry({
time: now(),
target: target,
boundingClientRect: targetRect,
rootBounds: rootBounds,
intersectionRect: intersectionRect,
}))
if (!oldEntry) {
this._queuedEntries.push(newEntry)
} else if (rootIsInDom && rootContainsTarget) {
// If the new entry intersection ratio has crossed any of the
// thresholds, add a new entry.
if (this._hasCrossedThreshold(oldEntry, newEntry)) {
this._queuedEntries.push(newEntry)
}
} else {
// If the root is not in the DOM or target is not contained within
// root but the previous entry for this target had an intersection,
// add a new record indicating removal.
if (oldEntry && oldEntry.isIntersecting) {
this._queuedEntries.push(newEntry)
}
}
}, this)
if (this._queuedEntries.length) {
this._callback(this.takeRecords(), this)
}
}
/**
* Accepts a target and root rect computes the intersection between then
* following the algorithm in the spec.
* TODO(philipwalton): at this time clip-path is not considered.
* https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
* @param {Element} target The target DOM element
* @param {Object} targetRect The bounding rect of the target.
* @param {Object} rootRect The bounding rect of the root after being
* expanded by the rootMargin value.
* @return {?Object} The final intersection rect object or undefined if no
* intersection is found.
* @private
*/
IntersectionObserver.prototype._computeTargetAndRootIntersection = function (
target,
targetRect,
rootRect
) {
// If the element isn't displayed, an intersection can't happen.
if (window.getComputedStyle(target).display == 'none') return
var intersectionRect = targetRect
var parent = getParentNode(target)
var atRoot = false
while (!atRoot && parent) {
var parentRect = null
var parentComputedStyle =
parent.nodeType == 1 ? window.getComputedStyle(parent) : {}
// If the parent isn't displayed, an intersection can't happen.
if (parentComputedStyle.display == 'none') return null
if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {
atRoot = true
if (parent == this.root || parent == document) {
if (crossOriginUpdater && !this.root) {
if (
!crossOriginRect ||
(crossOriginRect.width == 0 && crossOriginRect.height == 0)
) {
// A 0-size cross-origin intersection means no-intersection.
parent = null
parentRect = null
intersectionRect = null
} else {
parentRect = crossOriginRect
}
} else {
parentRect = rootRect
}
} else {
// Check if there's a frame that can be navigated to.
var frame = getParentNode(parent)
var frameRect = frame && getBoundingClientRect(frame)
var frameIntersect =
frame &&
this._computeTargetAndRootIntersection(frame, frameRect, rootRect)
if (frameRect && frameIntersect) {
parent = frame
parentRect = convertFromParentRect(frameRect, frameIntersect)
} else {
parent = null
intersectionRect = null
}
}
} else {
// If the element has a non-visible overflow, and it's not the <body>
// or <html> element, update the intersection rect.
// Note: <body> and <html> cannot be clipped to a rect that's not also
// the document rect, so no need to compute a new intersection.
var doc = parent.ownerDocument
if (
parent != doc.body &&
parent != doc.documentElement &&
parentComputedStyle.overflow != 'visible'
) {
parentRect = getBoundingClientRect(parent)
}
}
// If either of the above conditionals set a new parentRect,
// calculate new intersection data.
if (parentRect) {
intersectionRect = computeRectIntersection(parentRect, intersectionRect)
}
if (!intersectionRect) break
parent = parent && getParentNode(parent)
}
return intersectionRect
}
/**
* Returns the root rect after being expanded by the rootMargin value.
* @return {ClientRect} The expanded root rect.
* @private
*/
IntersectionObserver.prototype._getRootRect = function () {
var rootRect
if (this.root && !isDoc(this.root)) {
rootRect = getBoundingClientRect(this.root)
} else {
// Use <html>/<body> instead of window since scroll bars affect size.
var doc = isDoc(this.root) ? this.root : document
var html = doc.documentElement
var body = doc.body
rootRect = {
top: 0,
left: 0,
right: html.clientWidth || body.clientWidth,
width: html.clientWidth || body.clientWidth,
bottom: html.clientHeight || body.clientHeight,
height: html.clientHeight || body.clientHeight,
}
}
return this._expandRectByRootMargin(rootRect)
}
/**
* Accepts a rect and expands it by the rootMargin value.
* @param {DOMRect|ClientRect} rect The rect object to expand.
* @return {ClientRect} The expanded rect.
* @private
*/
IntersectionObserver.prototype._expandRectByRootMargin = function (rect) {
var margins = this._rootMarginValues.map(function (margin, i) {
return margin.unit == 'px'
? margin.value
: (margin.value * (i % 2 ? rect.width : rect.height)) / 100
})
var newRect = {
top: rect.top - margins[0],
right: rect.right + margins[1],
bottom: rect.bottom + margins[2],
left: rect.left - margins[3],
}
newRect.width = newRect.right - newRect.left
newRect.height = newRect.bottom - newRect.top
return newRect
}
/**
* Accepts an old and new entry and returns true if at least one of the
* threshold values has been crossed.
* @param {?IntersectionObserverEntry} oldEntry The previous entry for a
* particular target element or null if no previous entry exists.
* @param {IntersectionObserverEntry} newEntry The current entry for a
* particular target element.
* @return {boolean} Returns true if a any threshold has been crossed.
* @private
*/
IntersectionObserver.prototype._hasCrossedThreshold = function (
oldEntry,
newEntry
) {
// To make comparing easier, an entry that has a ratio of 0
// but does not actually intersect is given a value of -1
var oldRatio =
oldEntry && oldEntry.isIntersecting ? oldEntry.intersectionRatio || 0 : -1
var newRatio = newEntry.isIntersecting
? newEntry.intersectionRatio || 0
: -1
// Ignore unchanged ratios
if (oldRatio === newRatio) return
for (var i = 0; i < this.thresholds.length; i++) {
var threshold = this.thresholds[i]
// Return true if an entry matches a threshold or if the new ratio
// and the old ratio are on the opposite sides of a threshold.
if (
threshold == oldRatio ||
threshold == newRatio ||
threshold < oldRatio !== threshold < newRatio
) {
return true
}
}
}
/**
* Returns whether or not the root element is an element and is in the DOM.
* @return {boolean} True if the root element is an element and is in the DOM.
* @private
*/
IntersectionObserver.prototype._rootIsInDom = function () {
return !this.root || containsDeep(document, this.root)
}
/**
* Returns whether or not the target element is a child of root.
* @param {Element} target The target element to check.
* @return {boolean} True if the target element is a child of root.
* @private
*/
IntersectionObserver.prototype._rootContainsTarget = function (target) {
var rootDoc =
(this.root && (this.root.ownerDocument || this.root)) || document
return (
containsDeep(rootDoc, target) &&
(!this.root || rootDoc == target.ownerDocument)
)
}
/**
* Adds the instance to the global IntersectionObserver registry if it isn't
* already present.
* @private
*/
IntersectionObserver.prototype._registerInstance = function () {
if (registry.indexOf(this) < 0) {
registry.push(this)
}
}
/**
* Removes the instance from the global IntersectionObserver registry.
* @private
*/
IntersectionObserver.prototype._unregisterInstance = function () {
var index = registry.indexOf(this)
if (index != -1) registry.splice(index, 1)
}
/**
* Returns the result of the performance.now() method or null in browsers
* that don't support the API.
* @return {number} The elapsed time since the page was requested.
*/
function now() {
return window.performance && performance.now && performance.now()
}
/**
* Throttles a function and delays its execution, so it's only called at most
* once within a given time period.
* @param {Function} fn The function to throttle.
* @param {number} timeout The amount of time that must pass before the
* function can be called again.
* @return {Function} The throttled function.
*/
function throttle(fn, timeout) {
var timer = null
return function () {
if (!timer) {
timer = setTimeout(function () {
fn()
timer = null
}, timeout)
}
}
}
/**
* Adds an event handler to a DOM node ensuring cross-browser compatibility.
* @param {Node} node The DOM node to add the event handler to.
* @param {string} event The event name.
* @param {Function} fn The event handler to add.
* @param {boolean} opt_useCapture Optionally adds the even to the capture
* phase. Note: this only works in modern browsers.
*/
function addEvent(node, event, fn, opt_useCapture) {
if (typeof node.addEventListener == 'function') {
node.addEventListener(event, fn, opt_useCapture || false)
} else if (typeof node.attachEvent == 'function') {
node.attachEvent('on' + event, fn)
}
}
/**
* Removes a previously added event handler from a DOM node.
* @param {Node} node The DOM node to remove the event handler from.
* @param {string} event The event name.
* @param {Function} fn The event handler to remove.
* @param {boolean} opt_useCapture If the event handler was added with this
* flag set to true, it should be set to true here in order to remove it.
*/
function removeEvent(node, event, fn, opt_useCapture) {
if (typeof node.removeEventListener == 'function') {
node.removeEventListener(event, fn, opt_useCapture || false)
} else if (typeof node.detatchEvent == 'function') {
node.detatchEvent('on' + event, fn)
}
}
/**
* Returns the intersection between two rect objects.
* @param {Object} rect1 The first rect.
* @param {Object} rect2 The second rect.
* @return {?Object|?ClientRect} The intersection rect or undefined if no
* intersection is found.
*/
function computeRectIntersection(rect1, rect2) {
var top = Math.max(rect1.top, rect2.top)
var bottom = Math.min(rect1.bottom, rect2.bottom)
var left = Math.max(rect1.left, rect2.left)
var right = Math.min(rect1.right, rect2.right)
var width = right - left
var height = bottom - top
return (
(width >= 0 &&
height >= 0 && {
top: top,
bottom: bottom,
left: left,
right: right,
width: width,
height: height,
}) ||
null
)
}
/**
* Shims the native getBoundingClientRect for compatibility with older IE.
* @param {Element} el The element whose bounding rect to get.
* @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.
*/
function getBoundingClientRect(el) {
var rect
try {
rect = el.getBoundingClientRect()
} catch (err) {
// Ignore Windows 7 IE11 "Unspecified error"
// https://github.com/w3c/IntersectionObserver/pull/205
}
if (!rect) return getEmptyRect()
// Older IE
if (!(rect.width && rect.height)) {
rect = {
top: rect.top,
right: rect.right,
bottom: rect.bottom,
left: rect.left,
width: rect.right - rect.left,
height: rect.bottom - rect.top,
}
}
return rect
}
/**
* Returns an empty rect object. An empty rect is returned when an element
* is not in the DOM.
* @return {ClientRect} The empty rect.
*/
function getEmptyRect() {
return {
top: 0,
bottom: 0,
left: 0,
right: 0,
width: 0,
height: 0,
}
}
/**
* Ensure that the result has all of the necessary fields of the DOMRect.
* Specifically this ensures that `x` and `y` fields are set.
*
* @param {?DOMRect|?ClientRect} rect
* @return {?DOMRect}
*/
function ensureDOMRect(rect) {
// A `DOMRect` object has `x` and `y` fields.
if (!rect || 'x' in rect) {
return rect
}
// A IE's `ClientRect` type does not have `x` and `y`. The same is the case
// for internally calculated Rect objects. For the purposes of
// `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`
// for these fields.
return {
top: rect.top,
y: rect.top,
bottom: rect.bottom,
left: rect.left,
x: rect.left,
right: rect.right,
width: rect.width,
height: rect.height,
}
}
/**
* Inverts the intersection and bounding rect from the parent (frame) BCR to
* the local BCR space.
* @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.
* @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.
* @return {ClientRect} The local root bounding rect for the parent's children.
*/
function convertFromParentRect(parentBoundingRect, parentIntersectionRect) {
var top = parentIntersectionRect.top - parentBoundingRect.top
var left = parentIntersectionRect.left - parentBoundingRect.left
return {
top: top,
left: left,
height: parentIntersectionRect.height,
width: parentIntersectionRect.width,
bottom: top + parentIntersectionRect.height,
right: left + parentIntersectionRect.width,
}
}
/**
* Checks to see if a parent element contains a child element (including inside
* shadow DOM).
* @param {Node} parent The parent element.
* @param {Node} child The child element.
* @return {boolean} True if the parent node contains the child node.
*/
function containsDeep(parent, child) {
var node = child
while (node) {
if (node == parent) return true
node = getParentNode(node)
}
return false
}
/**
* Gets the parent node of an element or its host element if the parent node
* is a shadow root.
* @param {Node} node The node whose parent to get.
* @return {Node|null} The parent node or null if no parent exists.
*/
function getParentNode(node) {
var parent = node.parentNode
if (node.nodeType == /* DOCUMENT */ 9 && node != document) {
// If this node is a document node, look for the embedding frame.
return getFrameElement(node)
}
// If the parent has element that is assigned through shadow root slot
if (parent && parent.assignedSlot) {
parent = parent.assignedSlot.parentNode
}
if (parent && parent.nodeType == 11 && parent.host) {
// If the parent is a shadow root, return the host element.
return parent.host
}
return parent
}
/**
* Returns true if `node` is a Document.
* @param {!Node} node
* @returns {boolean}
*/
function isDoc(node) {
return node && node.nodeType === 9
}
// Exposes the constructors globally.
window.IntersectionObserver = IntersectionObserver
window.IntersectionObserverEntry = IntersectionObserverEntry
}
import { initIntersectionObserverPolyfill } from './intersection-observer'
export interface RequestComponentObserverOptions {
selector?: string
rootMargin?: string
relativeToSelector?: string
}
function normalizeRect(rect: DOMRect) {
const { bottom, height, left, right, top, width } = rect || {}
return {
bottom,
height,
left,
right,
top,
width,
}
}
export function requestComponentObserver(
$el: HTMLElement,
options: UniApp.CreateIntersectionObserverOptions &
RequestComponentObserverOptions,
callback: WechatMiniprogram.IntersectionObserverObserveCallback
) {
// 为了摇树优化,不直接引入该polyfill
initIntersectionObserverPolyfill()
const root = options.relativeToSelector
? $el.querySelector(options.relativeToSelector)
: null
const intersectionObserver = new IntersectionObserver(
(entries) => {
entries.forEach((entrie) => {
callback({
intersectionRatio: entrie.intersectionRatio,
intersectionRect: normalizeRect(entrie.intersectionRect),
boundingClientRect: normalizeRect(entrie.boundingClientRect),
relativeRect: normalizeRect(entrie.rootBounds!),
time: Date.now(),
// dataset: normalizeDataset(entrie.target),
// id: entrie.target.id,
})
})
},
{
root,
rootMargin: options.rootMargin,
threshold: options.thresholds,
}
)
if (options.observeAll) {
;(intersectionObserver as any).USE_MUTATION_OBSERVER = true
const nodeList = $el.querySelectorAll(options.selector!)
for (let i = 0; i < nodeList.length; i++) {
intersectionObserver.observe(nodeList[i])
}
} else {
;(intersectionObserver as any).USE_MUTATION_OBSERVER = false
const el = $el.querySelector(options.selector!)
if (!el) {
console.warn(
`Node ${options.selector} is not found. Intersection observer will not trigger.`
)
} else {
intersectionObserver.observe(el)
}
}
return intersectionObserver
}
......@@ -38,3 +38,4 @@ export { getCurrentPageVm } from './helpers/utils'
export { handlePromise } from './helpers/api/promise'
export { invokeApi, wrapperReturnValue } from './helpers/interceptor'
export { requestComponentObserver } from './helpers/requestComponentObserver'
import { extend } from '@vue/shared'
import { ComponentPublicInstance } from 'vue'
import { extend, isFunction } from '@vue/shared'
import {
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-platform'
import { defineSyncApi } from '../../helpers/api'
import { getCurrentPageVm } from '../../helpers/utils'
import { RequestComponentObserverOptions } from '../../helpers/requestComponentObserver'
const defaultOptions = {
thresholds: [0],
initialRatio: 0,
observeAll: false,
}
interface Margins {
bottom?: number
left?: number
right?: number
top?: number
}
interface RelativeInfo {
selector: string
margins: Margins
export interface AddIntersectionObserverArgs {
reqId: number
component: ComponentPublicInstance
options: ServiceIntersectionObserverOptions
callback: WechatMiniprogram.IntersectionObserverObserveCallback
}
type ObserveResultCallback = (result: UniApp.ObserveResult) => void
interface requestComponentObserver {
export interface RemoveIntersectionObserverArgs {
reqId: number
reqEnd: boolean
res: UniApp.ObserveResult
component: ComponentPublicInstance
}
let reqComponentObserverId = 1
type ServiceIntersectionObserverOptions = UniApp.CreateIntersectionObserverOptions &
RequestComponentObserverOptions
const reqComponentObserverCallbacks: Record<number, ObserveResultCallback> = {}
const defaultOptions = {
thresholds: [0],
initialRatio: 0,
observeAll: false,
}
export const API_CREATE_INTERSECTION_OBSERVER = 'createIntersectionObserver'
const MARGINS = ['top', 'right', 'bottom', 'left']
UniServiceJSBridge.subscribe(
'requestComponentObserver',
({ reqId, reqEnd, res }: requestComponentObserver) => {
const callback = reqComponentObserverCallbacks[reqId]
if (callback) {
if (reqEnd) {
return delete reqComponentObserverCallbacks[reqId]
}
callback(res)
}
}
)
let reqComponentObserverId = 1
function normalizeRootMargin(margins: WechatMiniprogram.Margins = {}) {
return MARGINS.map(
(name) =>
`${Number(margins[name as keyof WechatMiniprogram.Margins]) || 0}px`
).join(' ')
}
class ServiceIntersectionObserver {
private _reqId?: number
private _options: UniApp.CreateIntersectionObserverOptions
private _component: any
private _pageId: number
private _relativeInfo: RelativeInfo[]
private _component: ComponentPublicInstance
private _options: ServiceIntersectionObserverOptions
constructor(
component: any,
component: ComponentPublicInstance,
options: UniApp.CreateIntersectionObserverOptions
) {
this._pageId = component.$page.id
this._component = component._$id || component // app-plus 平台传输_$id
this._options = extend({}, defaultOptions, options || {})
this._relativeInfo = []
this._pageId = component.$page && component.$page.id
this._component = component
this._options = extend({}, defaultOptions, options)
}
relativeTo(selector: string, margins: Margins) {
if (this._reqId) {
throw new Error(
'Relative nodes cannot be added after "observe" call in IntersectionObserver'
)
}
this._relativeInfo.push({
selector,
margins,
})
relativeTo(selector: string, margins?: WechatMiniprogram.Margins) {
this._options.relativeToSelector = selector
this._options.rootMargin = normalizeRootMargin(margins)
return this
}
relativeToViewport(margins: Margins) {
return this.relativeTo((null as unknown) as string, margins)
relativeToViewport(margins?: WechatMiniprogram.Margins) {
this._options.relativeToSelector = undefined
this._options.rootMargin = normalizeRootMargin(margins)
return this
}
observe(selector: string, callback: ObserveResultCallback) {
if (typeof callback !== 'function') {
observe(
selector: string,
callback: WechatMiniprogram.IntersectionObserverObserveCallback
) {
if (!isFunction(callback)) {
return
}
if (this._reqId) {
throw new Error(
'"observe" call can be only called once in IntersectionObserver'
)
}
this._options.selector = selector
this._reqId = reqComponentObserverId++
reqComponentObserverCallbacks[this._reqId] = callback
UniServiceJSBridge.publishHandler(
'addIntersectionObserver',
addIntersectionObserver(
{
selector,
reqId: this._reqId,
component: this._component,
options: this._options,
relativeInfo: this._relativeInfo,
callback,
},
this._pageId
)
}
disconnect() {
UniServiceJSBridge.publishHandler(
'removeIntersectionObserver',
{
reqId: this._reqId,
},
this._pageId
)
this._reqId &&
removeIntersectionObserver(
{ reqId: this._reqId, component: this._component },
this._pageId
)
}
}
export const createIntersectionObserver = defineSyncApi<
typeof uni.createIntersectionObserver
>(API_CREATE_INTERSECTION_OBSERVER, (context?, options?) => {
if (!context) {
context = getCurrentPageVm()
>('createIntersectionObserver', (context?, options?) => {
if (context && !context.$page) {
options = context
context = null
}
if (context) {
return new ServiceIntersectionObserver(context, options)
}
return new ServiceIntersectionObserver(context, options)
return new ServiceIntersectionObserver(getCurrentPageVm(), options)
})
......@@ -19,10 +19,7 @@
}"
class="uni-scroll-view-refresher"
>
<div
v-if="refresherDefaultStyle !== 'none'"
class="uni-scroll-view-refresh"
>
<div v-if="refresherDefaultStyle !== 'none'" class="uni-scroll-view-refresh">
<div class="uni-scroll-view-refresh-inner">
<svg
v-if="refreshState == 'pulling'"
......@@ -65,10 +62,12 @@
</uni-scroll-view>
</template>
<script>
import { passive } from '@dcloudio/uni-shared'
import scroller from '../../mixins/scroller/index'
import { disableScrollBounce } from '../../helpers/disable-scroll-bounce'
const passiveOptions = { passive: true }
const passiveOptions = passive(true)
// const PULLING = 'pulling'
// const REFRESHING = 'refreshing'
......@@ -185,14 +184,14 @@ export default {
this._scrollTopChanged(this.scrollTopNumber)
this._scrollLeftChanged(this.scrollLeftNumber)
this._scrollIntoViewChanged(this.scrollIntoView)
this.__handleScroll = function (e) {
this.__handleScroll = function(e) {
event.preventDefault()
event.stopPropagation()
self._handleScroll.bind(self, event)()
}
var touchStart = null
var needStop = null
this.__handleTouchMove = function (event) {
this.__handleTouchMove = function(event) {
var x = event.touches[0].pageX
var y = event.touches[0].pageY
var main = self.$refs.main
......@@ -255,7 +254,7 @@ export default {
}
}
this.__handleTouchStart = function (event) {
this.__handleTouchStart = function(event) {
if (event.touches.length === 1) {
disableScrollBounce({
disable: true,
......@@ -274,7 +273,7 @@ export default {
}
}
}
this.__handleTouchEnd = function (event) {
this.__handleTouchEnd = function(event) {
touchStart = null
disableScrollBounce({
disable: false,
......@@ -296,9 +295,7 @@ export default {
this.__handleTouchMove,
passiveOptions
)
this.$refs.main.addEventListener('scroll', this.__handleScroll, {
passive: false,
})
this.$refs.main.addEventListener('scroll', this.__handleScroll, passive(false))
this.$refs.main.addEventListener(
'touchend',
this.__handleTouchEnd,
......@@ -321,9 +318,7 @@ export default {
this.__handleTouchMove,
passiveOptions
)
this.$refs.main.removeEventListener('scroll', this.__handleScroll, {
passive: false,
})
this.$refs.main.removeEventListener('scroll', this.__handleScroll, passive(false))
this.$refs.main.removeEventListener(
'touchend',
this.__handleTouchEnd,
......@@ -331,13 +326,13 @@ export default {
)
},
methods: {
scrollTo: function (t, n) {
scrollTo: function(t, n) {
var i = this.$refs.main
t < 0
? (t = 0)
: n === 'x' && t > i.scrollWidth - i.offsetWidth
? (t = i.scrollWidth - i.offsetWidth)
: n === 'y' &&
? (t = i.scrollWidth - i.offsetWidth)
: n === 'y' &&
t > i.scrollHeight - i.offsetHeight &&
(t = i.scrollHeight - i.offsetHeight)
var r = 0
......@@ -381,7 +376,7 @@ export default {
this.$refs.content.style.webkitTransform = o
}
},
_handleTrack: function ($event) {
_handleTrack: function($event) {
if ($event.detail.state === 'start') {
this._x = $event.detail.x
this._y = $event.detail.y
......@@ -394,7 +389,7 @@ export default {
if (this._noBubble === null && this.scrollY) {
if (
Math.abs(this._y - $event.detail.y) /
Math.abs(this._x - $event.detail.x) >
Math.abs(this._x - $event.detail.x) >
1
) {
this._noBubble = true
......@@ -405,7 +400,7 @@ export default {
if (this._noBubble === null && this.scrollX) {
if (
Math.abs(this._x - $event.detail.x) /
Math.abs(this._y - $event.detail.y) >
Math.abs(this._y - $event.detail.y) >
1
) {
this._noBubble = true
......@@ -419,7 +414,7 @@ export default {
$event.stopPropagation()
}
},
_handleScroll: function ($event) {
_handleScroll: function($event) {
if (!($event.timeStamp - this._lastScrollTime < 20)) {
this._lastScrollTime = $event.timeStamp
const target = $event.target
......@@ -444,9 +439,9 @@ export default {
}
if (
target.scrollTop +
target.offsetHeight +
this.lowerThresholdNumber >=
target.scrollHeight &&
target.offsetHeight +
this.lowerThresholdNumber >=
target.scrollHeight &&
this.lastScrollTop - target.scrollTop < 0 &&
$event.timeStamp - this.lastScrollToLowerTime > 200
) {
......@@ -469,9 +464,9 @@ export default {
}
if (
target.scrollLeft +
target.offsetWidth +
this.lowerThresholdNumber >=
target.scrollWidth &&
target.offsetWidth +
this.lowerThresholdNumber >=
target.scrollWidth &&
this.lastScrollLeft - target.scrollLeft < 0 &&
$event.timeStamp - this.lastScrollToLowerTime > 200
) {
......@@ -485,7 +480,7 @@ export default {
this.lastScrollLeft = target.scrollLeft
}
},
_scrollTopChanged: function (val) {
_scrollTopChanged: function(val) {
if (this.scrollY) {
if (this._innerSetScrollTop) {
this._innerSetScrollTop = false
......@@ -498,7 +493,7 @@ export default {
}
}
},
_scrollLeftChanged: function (val) {
_scrollLeftChanged: function(val) {
if (this.scrollX) {
if (this._innerSetScrollLeft) {
this._innerSetScrollLeft = false
......@@ -511,7 +506,7 @@ export default {
}
}
},
_scrollIntoViewChanged: function (val) {
_scrollIntoViewChanged: function(val) {
if (val) {
if (!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(val)) {
console.group('scroll-into-view="' + val + '" 有误')
......@@ -546,7 +541,7 @@ export default {
}
}
},
_transitionEnd: function (val, type) {
_transitionEnd: function(val, type) {
this.$refs.content.style.transition = ''
this.$refs.content.style.webkitTransition = ''
this.$refs.content.style.transform = ''
......@@ -590,96 +585,4 @@ export default {
},
},
}
</script>
<style>
uni-scroll-view {
display: block;
width: 100%;
}
uni-scroll-view[hidden] {
display: none;
}
.uni-scroll-view {
position: relative;
-webkit-overflow-scrolling: touch;
width: 100%;
/* display: flex; 时在安卓下会导致scrollWidth和offsetWidth一样 */
height: 100%;
max-height: inherit;
}
.uni-scroll-view-content {
width: 100%;
height: 100%;
}
.uni-scroll-view-refresher {
position: relative;
overflow: hidden;
}
.uni-scroll-view-refresh {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.uni-scroll-view-refresh-inner {
display: flex;
align-items: center;
justify-content: center;
line-height: 0;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #fff;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.117647),
0 1px 4px rgba(0, 0, 0, 0.117647);
}
.uni-scroll-view-refresh__spinner {
transform-origin: center center;
animation: uni-scroll-view-refresh-rotate 2s linear infinite;
}
.uni-scroll-view-refresh__spinner > circle {
stroke: currentColor;
stroke-linecap: round;
animation: uni-scroll-view-refresh-dash 2s linear infinite;
}
@keyframes uni-scroll-view-refresh-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes uni-scroll-view-refresh-dash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 89, 200;
stroke-dashoffset: -35px;
}
100% {
stroke-dasharray: 89, 200;
stroke-dashoffset: -124px;
}
}
</style>
</script>
\ No newline at end of file
{
"private": true,
"name": "@dcloudio/uni-view",
"name": "@dcloudio/uni-core",
"version": "3.0.0",
"description": "@dcloudio/uni-view",
"description": "@dcloudio/uni-core",
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/dcloudio/uni-app.git",
"directory": "packages/uni-view"
"directory": "packages/uni-core"
},
"license": "Apache-2.0",
"bugs": {
......
export * from './util'
export * from './icon'
export * from './getRealRoute'
export * from './getWindowOffset'
export * from './bridge'
export * from './plugin'
export { getWindowOffset } from './helpers/getWindowOffset'
import { extend } from '@vue/shared'
import { getWindowOffset } from '../helpers/getWindowOffset'
import { getWindowOffset } from '../../helpers/getWindowOffset'
export function findUniTarget($event: Event, $el: HTMLElement): HTMLElement {
let target = $event.target as HTMLElement
......
import { passive } from '@dcloudio/uni-shared'
const LONGPRESS_TIMEOUT = 350
const LONGPRESS_THRESHOLD = 10
const passiveOptions = { passive: true } // TODO caniuse?
const passiveOptions = passive(true)
let longPressTimer = 0
......
uni-canvas {
width: 300px;
height: 150px;
display: block;
position: relative;
}
uni-canvas > canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
uni-checkbox-group[hidden] {
display: none;
}
.ql-container {
display: block;
position: relative;
box-sizing: border-box;
-webkit-user-select: text;
user-select: text;
outline: none;
overflow: hidden;
width: 100%;
height: 200px;
min-height: 200px;
}
.ql-container[hidden] {
display: none;
}
.ql-container .ql-editor {
position: relative;
font-size: inherit;
line-height: inherit;
font-family: inherit;
min-height: inherit;
width: 100%;
height: 100%;
padding: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-overflow-scrolling: touch;
}
.ql-container .ql-editor::-webkit-scrollbar {
width: 0 !important;
}
.ql-container .ql-editor.scroll-disabled {
overflow: hidden;
}
.ql-container .ql-image-overlay {
display: flex;
position: absolute;
box-sizing: border-box;
border: 1px dashed #ccc;
justify-content: center;
align-items: center;
-webkit-user-select: none;
user-select: none;
}
.ql-container .ql-image-overlay .ql-image-size {
position: absolute;
padding: 4px 8px;
text-align: center;
background-color: #fff;
color: #888;
border: 1px solid #ccc;
box-sizing: border-box;
opacity: 0.8;
right: 4px;
top: 4px;
font-size: 12px;
display: inline-block;
width: auto;
}
.ql-container .ql-image-overlay .ql-image-toolbar {
position: relative;
text-align: center;
box-sizing: border-box;
background: #000;
border-radius: 5px;
color: #fff;
font-size: 0;
min-height: 24px;
z-index: 100;
}
.ql-container .ql-image-overlay .ql-image-toolbar span {
display: inline-block;
cursor: pointer;
padding: 5px;
font-size: 12px;
border-right: 1px solid #fff;
}
.ql-container .ql-image-overlay .ql-image-toolbar span:last-child {
border-right: 0;
}
.ql-container .ql-image-overlay .ql-image-toolbar span.triangle-up {
padding: 0;
position: absolute;
top: -12px;
left: 50%;
transform: translatex(-50%);
width: 0;
height: 0;
border-width: 6px;
border-style: solid;
border-color: transparent transparent black transparent;
}
.ql-container .ql-image-overlay .ql-image-handle {
position: absolute;
height: 12px;
width: 12px;
border-radius: 50%;
border: 1px solid #ccc;
box-sizing: border-box;
background: #fff;
}
.ql-container img {
display: inline-block;
max-width: 100%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
height: 100%;
outline: none;
overflow-y: auto;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor > * {
cursor: text;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\2022';
}
.ql-editor ul[data-checked=true],
.ql-editor ul[data-checked=false] {
pointer-events: none;
}
.ql-editor ul[data-checked=true] > li *,
.ql-editor ul[data-checked=false] > li * {
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before,
.ql-editor ul[data-checked=false] > li::before {
color: #777;
cursor: pointer;
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before {
content: '\2611';
}
.ql-editor ul[data-checked=false] > li::before {
content: '\2610';
}
.ql-editor li::before {
display: inline-block;
white-space: nowrap;
width: 2em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-0;
}
.ql-editor ol li:before {
content: counter(list-0, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 2em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 2em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 2em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 2em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 4em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 4em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 4em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 4em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 8em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 8em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 8em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 8em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 10em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 10em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 10em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 10em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 14em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 14em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 14em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 14em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 16em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 16em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 16em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 16em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0, 0, 0, 0.6);
content: attr(data-placeholder);
font-style: italic;
pointer-events: none;
position: absolute;
}
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
pointer-events: none;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
@keyframes once-show {
from {
top: 0;
}
}
uni-resize-sensor,
uni-resize-sensor > div {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
uni-resize-sensor {
display: block;
z-index: -1;
visibility: hidden;
animation: once-show 1ms;
}
uni-resize-sensor > div > div {
position: absolute;
left: 0;
top: 0;
}
uni-resize-sensor > div:first-child > div {
width: 100000px;
height: 100000px;
}
uni-resize-sensor > div:last-child > div {
width: 200%;
height: 200%;
}
.uni-label-pointer {
cursor: pointer;
}
uni-movable-view {
display: inline-block;
width: 10px;
height: 10px;
top: 0px;
left: 0px;
position: absolute;
cursor: grab;
}
uni-movable-view[hidden] {
display: none;
}
uni-radio {
-webkit-tap-highlight-color: transparent;
display: inline-block;
cursor: pointer;
}
uni-radio[hidden] {
display: none;
}
uni-radio[disabled] {
cursor: not-allowed;
}
uni-radio .uni-radio-wrapper {
display: -webkit-inline-flex;
display: inline-flex;
-webkit-align-items: center;
align-items: center;
vertical-align: middle;
}
uni-radio .uni-radio-input {
-webkit-appearance: none;
appearance: none;
margin-right: 5px;
outline: 0;
border: 1px solid #D1D1D1;
background-color: #ffffff;
border-radius: 50%;
width: 22px;
height: 22px;
position: relative;
}
uni-radio:not([disabled]) .uni-radio-input:hover {
border-color: #007aff;
}
uni-radio .uni-radio-input.uni-radio-input-checked:before {
font: normal normal normal 14px/1 "uni";
content: "\EA08";
color: #ffffff;
font-size: 18px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -48%) scale(0.73);
-webkit-transform: translate(-50%, -48%) scale(0.73);
}
uni-radio .uni-radio-input.uni-radio-input-disabled {
background-color: #E1E1E1;
border-color: #D1D1D1;
}
uni-radio .uni-radio-input.uni-radio-input-disabled:before {
color: #ADADAD;
}
uni-radio-group {
display: block;
}
uni-radio-group[hidden] {
display: none;
}
uni-swiper-item {
display: block;
overflow: hidden;
will-change: transform;
position: absolute;
width: 100%;
height: 100%;
cursor: grab;
}
uni-swiper-item[hidden] {
display: none;
}
uni-switch {
-webkit-tap-highlight-color: transparent;
display: inline-block;
cursor: pointer;
}
uni-switch[hidden] {
display: none;
}
uni-switch[disabled] {
cursor: not-allowed;
}
uni-switch .uni-switch-wrapper {
display: -webkit-inline-flex;
display: inline-flex;
-webkit-align-items: center;
align-items: center;
vertical-align: middle;
}
uni-switch .uni-switch-input {
-webkit-appearance: none;
appearance: none;
position: relative;
width: 52px;
height: 32px;
margin-right: 5px;
border: 1px solid #DFDFDF;
outline: 0;
border-radius: 16px;
box-sizing: border-box;
background-color: #DFDFDF;
transition: background-color 0.1s, border 0.1s;
}
uni-switch[disabled] .uni-switch-input {
opacity: .7;
}
uni-switch .uni-switch-input:before {
content: " ";
position: absolute;
top: 0;
left: 0;
width: 50px;
height: 30px;
border-radius: 15px;
background-color: #FDFDFD;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
uni-switch .uni-switch-input:after {
content: " ";
position: absolute;
top: 0;
left: 0;
width: 30px;
height: 30px;
border-radius: 15px;
background-color: #FFFFFF;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
}
uni-switch .uni-switch-input.uni-switch-input-checked {
border-color: #007aff;
background-color: #007aff;
}
uni-switch .uni-switch-input.uni-switch-input-checked:before {
-webkit-transform: scale(0);
transform: scale(0);
}
uni-switch .uni-switch-input.uni-switch-input-checked:after {
-webkit-transform: translateX(20px);
transform: translateX(20px);
}
uni-switch .uni-checkbox-input {
margin-right: 5px;
-webkit-appearance: none;
appearance: none;
outline: 0;
border: 1px solid #D1D1D1;
background-color: #FFFFFF;
border-radius: 3px;
width: 22px;
height: 22px;
position: relative;
color: #007aff;
}
uni-switch:not([disabled]) .uni-checkbox-input:hover {
border-color: #007aff;
}
uni-switch .uni-checkbox-input.uni-checkbox-input-checked:before {
font: normal normal normal 14px/1 "uni";
content: "\EA08";
color: inherit;
font-size: 22px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -48%) scale(0.73);
-webkit-transform: translate(-50%, -48%) scale(0.73);
}
uni-switch .uni-checkbox-input.uni-checkbox-input-disabled {
background-color: #E1E1E1;
}
uni-switch .uni-checkbox-input.uni-checkbox-input-disabled:before {
color: #ADADAD;
}
uni-textarea {
width: 300px;
height: 150px;
display: block;
position: relative;
font-size: 16px;
line-height: normal;
white-space: pre-wrap;
word-break: break-all;
}
uni-textarea[hidden] {
display: none;
}
.uni-textarea-wrapper,
.uni-textarea-placeholder,
.uni-textarea-line,
.uni-textarea-compute,
.uni-textarea-textarea {
outline: none;
border: none;
padding: 0;
margin: 0;
text-decoration: inherit;
}
.uni-textarea-wrapper {
display: block;
position: relative;
width: 100%;
height: 100%;
}
.uni-textarea-placeholder,
.uni-textarea-line,
.uni-textarea-compute,
.uni-textarea-textarea {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
white-space: inherit;
word-break: inherit;
}
.uni-textarea-placeholder {
color: grey;
overflow: hidden;
}
.uni-textarea-line,
.uni-textarea-compute {
visibility: hidden;
height: auto;
}
.uni-textarea-line {
width: 1em;
}
.uni-textarea-textarea {
resize: none;
background: none;
color: inherit;
opacity: 1;
-webkit-text-fill-color: currentcolor;
font: inherit;
line-height: inherit;
letter-spacing: inherit;
text-align: inherit;
text-indent: inherit;
text-transform: inherit;
text-shadow: inherit;
}
/* 用于解决 iOS textarea 内部默认边距 */
.uni-textarea-textarea-fix-margin {
width: auto;
right: 0;
margin: 0 -3px;
}
.uni-async-error {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
color: #999;
padding: 100px 10px;
text-align: center;
}
.uni-async-loading {
box-sizing: border-box;
width: 100%;
padding: 50px;
text-align: center;
}
.uni-async-loading .uni-loading {
width: 30px;
height: 30px;
}
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -25,6 +25,6 @@
},
"dependencies": {
"safe-area-insets": "^1.4.1",
"vue-router": "^4.0.5"
"vue-router": "^4.0.6"
}
}
import { ComponentPublicInstance } from 'vue'
const WINDOW_NAMES = ['VUniLeftWindow', 'VUniTopWindow', 'VUniRightWindow']
export function isInWindows(vm: ComponentPublicInstance) {
while (vm) {
const name = vm.$options.name
if (name && WINDOW_NAMES.indexOf(name) !== -1) {
return true
}
vm = vm.$parent!
}
return false
}
import { ComponentPublicInstance } from 'vue'
import { getRealRoute } from '@dcloudio/uni-core'
export function findElem(vm: ComponentPublicInstance) {
return vm.$el
}
const SCHEME_RE = /^([a-z-]+:)?\/\//i
const DATA_RE = /^data:.*,.*/
......
export * from './getRealPath'
export * from './dom'
export { getBaseSystemInfo } from '../service/api/base/getBaseSystemInfo'
export { operateVideoPlayer } from '../service/api/context/operateVideoPlayer'
export {
addIntersectionObserver,
removeIntersectionObserver,
} from '../service/api/ui/intersectionObserver'
import {
requestComponentObserver,
AddIntersectionObserverArgs,
RemoveIntersectionObserverArgs,
} from '@dcloudio/uni-api'
import { findElem } from '../../../platform/dom'
export function addIntersectionObserver(
{ reqId, component, options, callback }: AddIntersectionObserverArgs,
_pageId: number
) {
const $el = findElem(component)
;($el.__io || ($el.__io = {}))[reqId] = requestComponentObserver(
$el,
options,
callback
)
}
export function removeIntersectionObserver(
{ reqId, component }: RemoveIntersectionObserverArgs,
_pageId: number
) {
const $el = findElem(component)
const intersectionObserver = $el.__io && $el.__io[reqId]
if (intersectionObserver) {
intersectionObserver.disconnect()
delete $el.__io[reqId]
}
}
<template>
<uni-video
:id="id"
v-on="$listeners"
>
<uni-video :id="id" v-on="$listeners">
<div
ref="container"
class="uni-video-container"
......@@ -10,11 +7,11 @@
@touchend="touchend"
@touchmove="touchmove"
@fullscreenchange.stop="onFullscreenChange"
@webkitfullscreenchange.stop="onFullscreenChange($event,true)"
@webkitfullscreenchange.stop="onFullscreenChange($event, true)"
>
<video
ref="video"
:style="{objectFit:objectFit}"
:style="{ objectFit: objectFit }"
:muted="muted"
:loop="loop"
:src="srcSync"
......@@ -39,85 +36,49 @@
@webkitendfullscreen="emitFullscreenChange(false)"
@x5videoexitfullscreen="emitFullscreenChange(false)"
/>
<div
v-show="controlsShow"
class="uni-video-bar uni-video-bar-full"
@click.stop
>
<div v-show="controlsShow" class="uni-video-bar uni-video-bar-full" @click.stop>
<div class="uni-video-controls">
<div
v-show="showPlayBtn"
:class="{'uni-video-control-button-play':!playing,'uni-video-control-button-pause':playing}"
:class="{ 'uni-video-control-button-play': !playing, 'uni-video-control-button-pause': playing }"
class="uni-video-control-button"
@click.stop="trigger"
/>
<div class="uni-video-current-time">
{{ currentTime|time }}
</div>
<div class="uni-video-current-time">{{ currentTime | time }}</div>
<div
ref="progress"
class="uni-video-progress-container"
@click.stop="clickProgress($event)"
>
<div class="uni-video-progress">
<div
:style="{width:buffered+'%'}"
class="uni-video-progress-buffered"
/>
<div
ref="ball"
:style="{left:progress+'%'}"
class="uni-video-ball"
>
<div :style="{ width: buffered + '%' }" class="uni-video-progress-buffered" />
<div ref="ball" :style="{ left: progress + '%' }" class="uni-video-ball">
<div class="uni-video-inner" />
</div>
</div>
</div>
<div class="uni-video-duration">
{{ (duration||durationTime)|time }}
</div>
<div class="uni-video-duration">{{ (duration || durationTime) | time }}</div>
</div>
<div
v-if="danmuBtn"
:class="{'uni-video-danmu-button-active':enableDanmuSync}"
:class="{ 'uni-video-danmu-button-active': enableDanmuSync }"
class="uni-video-danmu-button"
@click.stop="triggerDanmu"
>
{{ $$t("uni.video.danmu") }}
</div>
>{{ $$t("uni.video.danmu") }}</div>
<div
v-show="showFullscreenBtn"
:class="{'uni-video-type-fullscreen':fullscreen}"
:class="{ 'uni-video-type-fullscreen': fullscreen }"
class="uni-video-fullscreen"
@click.stop="triggerFullscreen(!fullscreen)"
/>
</div>
<div
v-show="start&&enableDanmuSync"
ref="danmu"
style="z-index: 0;"
class="uni-video-danmu"
/>
<div
v-if="centerPlayBtnShow"
class="uni-video-cover"
@click.stop
>
<div
class="uni-video-cover-play-button"
@click.stop="play"
/>
<p class="uni-video-cover-duration">
{{ (duration||durationTime)|time }}
</p>
<div v-show="start && enableDanmuSync" ref="danmu" style="z-index: 0;" class="uni-video-danmu" />
<div v-if="centerPlayBtnShow" class="uni-video-cover" @click.stop>
<div class="uni-video-cover-play-button" @click.stop="play" />
<p class="uni-video-cover-duration">{{ (duration || durationTime) | time }}</p>
</div>
<div
:class="{'uni-video-toast-volume':gestureType==='volume'}"
class="uni-video-toast"
>
<div class="uni-video-toast-title">
{{ $$t("uni.video.volume") }}
</div>
<div :class="{ 'uni-video-toast-volume': gestureType === 'volume' }" class="uni-video-toast">
<div class="uni-video-toast-title">{{ $$t("uni.video.volume") }}</div>
<svg
class="uni-video-toast-icon"
width="200px"
......@@ -131,10 +92,7 @@
/>
</svg>
<div class="uni-video-toast-value">
<div
:style="{width:volumeNew*100+'%'}"
class="uni-video-toast-value-content"
>
<div :style="{ width: volumeNew * 100 + '%' }" class="uni-video-toast-value-content">
<div class="uni-video-toast-volume-grids">
<div
v-for="(item,index) in 10"
......@@ -145,13 +103,8 @@
</div>
</div>
</div>
<div
:class="{'uni-video-toast-progress':gestureType=='progress'}"
class="uni-video-toast"
>
<div class="uni-video-toast-title">
{{ currentTimeNew|time }} / {{ durationTime|time }}
</div>
<div :class="{ 'uni-video-toast-progress': gestureType == 'progress' }" class="uni-video-toast">
<div class="uni-video-toast-title">{{ currentTimeNew | time }} / {{ durationTime | time }}</div>
</div>
<div class="uni-video-slots">
<slot />
......@@ -160,20 +113,19 @@
</uni-video>
</template>
<script>
import {
passive
} from '@dcloudio/uni-shared'
import {
subscriber,
interact
} from 'uni-mixins'
import {
supportsPassive
} from 'uni-shared'
import {
i18nMixin
} from 'uni-core/helpers/i18n'
const passiveOptions = supportsPassive ? {
passive: false
} : false
const passiveOptions = passive(false)
const GestureType = {
NONE: 'none',
......@@ -185,7 +137,7 @@ const GestureType = {
export default {
name: 'Video',
filters: {
time (val) {
time(val) {
val = val > 0 && val < Infinity ? val : 0
let h = Math.floor(val / 3600)
let m = Math.floor(val % 3600 / 60)
......@@ -220,7 +172,7 @@ export default {
},
danmuList: {
type: Array,
default () {
default() {
return []
}
},
......@@ -285,7 +237,7 @@ export default {
default: true
}
},
data () {
data() {
return {
start: false,
playing: false,
......@@ -311,41 +263,41 @@ export default {
}
},
computed: {
centerPlayBtnShow () {
centerPlayBtnShow() {
return this.showCenterPlayBtn && !this.start
},
controlsShow () {
controlsShow() {
return !this.centerPlayBtnShow && this.controls && this.controlsVisible
},
autoHideContorls () {
autoHideContorls() {
return this.controlsShow && this.playing && !this.controlsTouching
},
srcSync () {
srcSync() {
return this.$getRealPath(this.src)
}
},
watch: {
enableDanmuSync (val) {
enableDanmuSync(val) {
this.$emit('update:enableDanmu', val)
},
autoHideContorls (val) {
autoHideContorls(val) {
if (val) {
this.autoHideStart()
} else {
this.autoHideEnd()
}
},
srcSync (val) {
srcSync(val) {
this.playing = false
this.currentTime = 0
},
currentTime () {
currentTime() {
this.updateProgress()
},
duration () {
duration() {
this.updateProgress()
},
buffered (buffered) {
buffered(buffered) {
if (buffered !== 0) {
this.$trigger('progress', {}, {
buffered
......@@ -353,7 +305,7 @@ export default {
}
}
},
created () {
created() {
this.otherData = {
danmuList: [],
danmuIndex: {
......@@ -363,11 +315,11 @@ export default {
hideTiming: null
}
const danmuList = this.otherData.danmuList = JSON.parse(JSON.stringify(this.danmuList || []))
danmuList.sort(function (a, b) {
danmuList.sort(function(a, b) {
return (a.time || 0) - (a.time || 0)
})
},
mounted () {
mounted() {
const self = this
let originX
let originY
......@@ -385,7 +337,7 @@ export default {
ball.addEventListener('touchmove', touchmove, passiveOptions)
})
function touchmove (event) {
function touchmove(event) {
const toucher = event.targetTouches[0]
const pageX = toucher.pageX
const pageY = toucher.pageY
......@@ -406,7 +358,7 @@ export default {
event.stopPropagation()
}
function touchend (event) {
function touchend(event) {
self.controlsTouching = false
if (self.touching) {
ball.removeEventListener('touchmove', touchmove, passiveOptions)
......@@ -421,12 +373,12 @@ export default {
ball.addEventListener('touchend', touchend)
ball.addEventListener('touchcancel', touchend)
},
beforeDestroy () {
beforeDestroy() {
this.triggerFullscreen(false)
clearTimeout(this.otherData.hideTiming)
},
methods: {
_handleSubscribe ({
_handleSubscribe({
type,
data = {}
}) {
......@@ -447,27 +399,27 @@ export default {
this[type](options)
}
},
trigger () {
trigger() {
if (this.playing) {
this.$refs.video.pause()
} else {
this.$refs.video.play()
}
},
play () {
play() {
this.start = true
this.$refs.video.play()
},
pause () {
pause() {
this.$refs.video.pause()
},
seek (position) {
seek(position) {
position = Number(position)
if (typeof position === 'number' && !isNaN(position)) {
this.$refs.video.currentTime = position
}
},
clickProgress (event) {
clickProgress(event) {
const $progress = this.$refs.progress
let element = event.target
let x = event.offsetX
......@@ -482,25 +434,25 @@ export default {
this.seek(this.$refs.video.duration * progress)
}
},
triggerDanmu () {
triggerDanmu() {
this.enableDanmuSync = !this.enableDanmuSync
},
playDanmu (danmu) {
playDanmu(danmu) {
const p = document.createElement('p')
p.className = 'uni-video-danmu-item'
p.innerText = danmu.text
let style = `bottom: ${Math.random() * 100}%;color: ${danmu.color};`
p.setAttribute('style', style)
this.$refs.danmu.appendChild(p)
setTimeout(function () {
setTimeout(function() {
style += 'left: 0;-webkit-transform: translateX(-100%);transform: translateX(-100%);'
p.setAttribute('style', style)
setTimeout(function () {
setTimeout(function() {
p.remove()
}, 4000)
}, 17)
},
sendDanmu (danmu) {
sendDanmu(danmu) {
const otherData = this.otherData
otherData.danmuList.splice(otherData.danmuIndex.index + 1, 0, {
text: String(danmu.text),
......@@ -508,10 +460,10 @@ export default {
time: this.$refs.video.currentTime || 0
})
},
playbackRate (rate) {
playbackRate(rate) {
this.$refs.video.playbackRate = rate
},
triggerFullscreen (val) {
triggerFullscreen(val) {
const container = this.$refs.container
const video = this.$refs.video
let mockFullScreen
......@@ -546,29 +498,29 @@ export default {
this.emitFullscreenChange(val)
}
},
onFullscreenChange ($event, webkit) {
onFullscreenChange($event, webkit) {
if (webkit && document.fullscreenEnabled) {
return
}
this.emitFullscreenChange(!!(document.fullscreenElement || document.webkitFullscreenElement))
},
emitFullscreenChange (val) {
emitFullscreenChange(val) {
this.fullscreen = val
this.$trigger('fullscreenchange', {}, {
fullScreen: val,
direction: 'vertical'
})
},
requestFullScreen () {
requestFullScreen() {
this.triggerFullscreen(true)
},
exitFullScreen () {
exitFullScreen() {
this.triggerFullscreen(false)
},
onDurationChange ({ target }) {
onDurationChange({ target }) {
this.durationTime = target.duration
},
onLoadedMetadata ($event) {
onLoadedMetadata($event) {
const initialTime = Number(this.initialTime) || 0
const video = $event.target
if (initialTime > 0) {
......@@ -581,34 +533,34 @@ export default {
})
this.onProgress($event)
},
onProgress ($event) {
onProgress($event) {
const video = $event.target
const buffered = video.buffered
if (buffered.length) {
this.buffered = buffered.end(buffered.length - 1) / video.duration * 100
}
},
onWaiting ($event) {
onWaiting($event) {
this.$trigger('waiting', $event, {})
},
onVideoError ($event) {
onVideoError($event) {
this.playing = false
this.$trigger('error', $event, {})
},
onPlay ($event) {
onPlay($event) {
this.start = true
this.playing = true
this.$trigger('play', $event, {})
},
onPause ($event) {
onPause($event) {
this.playing = false
this.$trigger('pause', $event, {})
},
onEnded ($event) {
onEnded($event) {
this.playing = false
this.$trigger('ended', $event, {})
},
onTimeUpdate ($event) {
onTimeUpdate($event) {
const video = $event.target
const otherData = this.otherData
const currentTime = this.currentTime = video.currentTime
......@@ -646,10 +598,10 @@ export default {
duration: video.duration
})
},
triggerControls () {
triggerControls() {
this.controlsVisible = !this.controlsVisible
},
touchstart (event) {
touchstart(event) {
const toucher = event.targetTouches[0]
this.touchStartOrigin = {
x: toucher.pageX,
......@@ -659,8 +611,8 @@ export default {
this.volumeOld = null
this.currentTimeOld = this.currentTimeNew = 0
},
touchmove (event) {
function stop () {
touchmove(event) {
function stop() {
event.stopPropagation()
event.preventDefault()
}
......@@ -705,7 +657,7 @@ export default {
}
}
},
touchend (event) {
touchend(event) {
if (this.gestureType !== GestureType.NONE && this.gestureType !== GestureType.STOP) {
event.stopPropagation()
event.preventDefault()
......@@ -715,7 +667,7 @@ export default {
}
this.gestureType = GestureType.NONE
},
changeProgress (x) {
changeProgress(x) {
const duration = this.$refs.video.duration
let currentTimeNew = x / 600 * duration + this.currentTimeOld
if (currentTimeNew < 0) {
......@@ -725,7 +677,7 @@ export default {
}
this.currentTimeNew = currentTimeNew
},
changeVolume (y) {
changeVolume(y) {
const valueOld = this.volumeOld
let value
if (typeof valueOld === 'number') {
......@@ -739,19 +691,19 @@ export default {
this.volumeNew = value
}
},
autoHideStart () {
autoHideStart() {
this.otherData.hideTiming = setTimeout(() => {
this.controlsVisible = false
}, 3000)
},
autoHideEnd () {
autoHideEnd() {
const otherData = this.otherData
if (otherData.hideTiming) {
clearTimeout(otherData.hideTiming)
otherData.hideTiming = null
}
},
updateProgress () {
updateProgress() {
if (!this.touching) {
this.progress = this.currentTime / this.durationTime * 100
}
......
uni-scroll-view {
display: block;
width: 100%;
}
uni-scroll-view[hidden] {
display: none;
}
.uni-scroll-view {
position: relative;
-webkit-overflow-scrolling: touch;
width: 100%;
/* display: flex; 时在安卓下会导致scrollWidth和offsetWidth一样 */
height: 100%;
max-height: inherit;
}
.uni-scroll-view-content {
width: 100%;
height: 100%;
}
.uni-scroll-view-refresher {
position: relative;
overflow: hidden;
}
.uni-scroll-view-refresh {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.uni-scroll-view-refresh-inner {
display: flex;
align-items: center;
justify-content: center;
line-height: 0;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #fff;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.117647),
0 1px 4px rgba(0, 0, 0, 0.117647);
}
.uni-scroll-view-refresh__spinner {
transform-origin: center center;
animation: uni-scroll-view-refresh-rotate 2s linear infinite;
}
.uni-scroll-view-refresh__spinner > circle {
stroke: currentColor;
stroke-linecap: round;
animation: uni-scroll-view-refresh-dash 2s linear infinite;
}
@keyframes uni-scroll-view-refresh-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes uni-scroll-view-refresh-dash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 89, 200;
stroke-dashoffset: -35px;
}
100% {
stroke-dasharray: 89, 200;
stroke-dashoffset: -124px;
}
}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-mp-alipay/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return my.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-mp-baidu/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return swan.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -27,8 +27,8 @@ export { initMocks, initComponentInstance } from './runtime/componentInstance'
export { handleEvent } from './runtime/componentEvents'
export { $createComponent, $destroyComponent } from './runtime/component'
export {
initVueIds,
initRefs,
initVueIds,
initWxsCallMethods,
findVmByVueId,
} from './runtime/util'
......
export function getRealPath() {}
export function addIntersectionObserver() {}
export function removeIntersectionObserver() {}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-mp-qq/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return qq.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-mp-toutiao/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return tt.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-mp-weixin/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return wx.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -8,6 +8,10 @@
{
"find": "@dcloudio/uni-platform",
"replacement": "packages/uni-quickapp-webview/src/platform/index.ts"
},
{
"find": "@dcloudio/uni-mp-platform",
"replacement": "packages/uni-mp-core/src/platform/index.ts"
}
]
},
......
export {
getRealPath,
addIntersectionObserver,
removeIntersectionObserver,
} from '@dcloudio/uni-mp-platform'
export function getBaseSystemInfo() {
return qa.getSystemInfoSync()
}
export function getRealPath() {}
......@@ -4,23 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const NAVBAR_HEIGHT = 44;
const TABBAR_HEIGHT = 50;
const RESPONSIVE_MIN_WIDTH = 768;
const COMPONENT_NAME_PREFIX = 'VUni';
const PRIMARY_COLOR = '#007aff';
function debounce(fn, delay) {
let timeout;
const newFn = function () {
clearTimeout(timeout);
const timerFn = () => fn.apply(this, arguments);
timeout = setTimeout(timerFn, delay);
};
newFn.cancel = function () {
clearTimeout(timeout);
};
return newFn;
function passive(passive) {
return { passive };
}
function normalizeDataset(el) {
// TODO
return JSON.parse(JSON.stringify(el.dataset || {}));
}
function plusReady(callback) {
......@@ -33,26 +22,6 @@ function plusReady(callback) {
document.addEventListener('plusready', callback);
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (shared.isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
const BUILT_IN_TAGS = [
'ad',
'audio',
......@@ -128,6 +97,45 @@ function isNativeTag(tag) {
const COMPONENT_SELECTOR_PREFIX = 'uni-';
const COMPONENT_PREFIX = 'v-' + COMPONENT_SELECTOR_PREFIX;
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (shared.isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
function debounce(fn, delay) {
let timeout;
const newFn = function () {
clearTimeout(timeout);
const timerFn = () => fn.apply(this, arguments);
timeout = setTimeout(timerFn, delay);
};
newFn.cancel = function () {
clearTimeout(timeout);
};
return newFn;
}
const NAVBAR_HEIGHT = 44;
const TABBAR_HEIGHT = 50;
const RESPONSIVE_MIN_WIDTH = 768;
const COMPONENT_NAME_PREFIX = 'VUni';
const PRIMARY_COLOR = '#007aff';
exports.BUILT_IN_TAGS = BUILT_IN_TAGS;
exports.COMPONENT_NAME_PREFIX = COMPONENT_NAME_PREFIX;
exports.COMPONENT_PREFIX = COMPONENT_PREFIX;
......@@ -141,5 +149,7 @@ exports.debounce = debounce;
exports.isBuiltInComponent = isBuiltInComponent;
exports.isCustomElement = isCustomElement;
exports.isNativeTag = isNativeTag;
exports.normalizeDataset = normalizeDataset;
exports.passive = passive;
exports.plusReady = plusReady;
exports.stringifyQuery = stringifyQuery;
......@@ -20,6 +20,12 @@ export declare function isNativeTag(tag: string): boolean;
export declare const NAVBAR_HEIGHT = 44;
export declare function normalizeDataset(el: Element): any;
export declare function passive(passive: boolean): {
passive: boolean;
};
export declare function plusReady(callback: () => void): void;
export declare const PRIMARY_COLOR = "#007aff";
......
import { isPlainObject, isHTMLTag, isSVGTag } from '@vue/shared';
import { isHTMLTag, isSVGTag, isPlainObject } from '@vue/shared';
const NAVBAR_HEIGHT = 44;
const TABBAR_HEIGHT = 50;
const RESPONSIVE_MIN_WIDTH = 768;
const COMPONENT_NAME_PREFIX = 'VUni';
const PRIMARY_COLOR = '#007aff';
function debounce(fn, delay) {
let timeout;
const newFn = function () {
clearTimeout(timeout);
const timerFn = () => fn.apply(this, arguments);
timeout = setTimeout(timerFn, delay);
};
newFn.cancel = function () {
clearTimeout(timeout);
};
return newFn;
function passive(passive) {
return { passive };
}
function normalizeDataset(el) {
// TODO
return JSON.parse(JSON.stringify(el.dataset || {}));
}
function plusReady(callback) {
......@@ -29,26 +18,6 @@ function plusReady(callback) {
document.addEventListener('plusready', callback);
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
const BUILT_IN_TAGS = [
'ad',
'audio',
......@@ -124,4 +93,43 @@ function isNativeTag(tag) {
const COMPONENT_SELECTOR_PREFIX = 'uni-';
const COMPONENT_PREFIX = 'v-' + COMPONENT_SELECTOR_PREFIX;
export { BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, NAVBAR_HEIGHT, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, TABBAR_HEIGHT, TAGS, debounce, isBuiltInComponent, isCustomElement, isNativeTag, plusReady, stringifyQuery };
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
function debounce(fn, delay) {
let timeout;
const newFn = function () {
clearTimeout(timeout);
const timerFn = () => fn.apply(this, arguments);
timeout = setTimeout(timerFn, delay);
};
newFn.cancel = function () {
clearTimeout(timeout);
};
return newFn;
}
const NAVBAR_HEIGHT = 44;
const TABBAR_HEIGHT = 50;
const RESPONSIVE_MIN_WIDTH = 768;
const COMPONENT_NAME_PREFIX = 'VUni';
const PRIMARY_COLOR = '#007aff';
export { BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, NAVBAR_HEIGHT, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, TABBAR_HEIGHT, TAGS, debounce, isBuiltInComponent, isCustomElement, isNativeTag, normalizeDataset, passive, plusReady, stringifyQuery };
export function passive(passive: boolean) {
return { passive }
}
export function normalizeDataset(el: Element) {
// TODO
return JSON.parse(JSON.stringify((el as HTMLElement).dataset || {}))
}
export * from './constants'
export * from './debounce'
export * from './plusReady'
export * from './query'
export * from './dom'
export * from './plus'
export * from './tags'
export * from './query'
export * from './debounce'
export * from './constants'
......@@ -41,7 +41,8 @@
},
"devDependencies": {
"@types/mime": "^2.0.3",
"@types/sass": "^1.16.0"
"@types/sass": "^1.16.0",
"@vue/compiler-sfc": "^3.0.11"
},
"uni-app": {
"compilerVersion": "3.1.2"
......
......@@ -145,11 +145,11 @@ function resolveManifestFeature(
options: VitePluginUniResolvedOptions
): ManifestFeatures {
const features: ManifestFeatures = {
wx: true,
wxs: true, // 是否启用 wxs 支持,如:getComponentDescriptor 等(uni-core/src/view/plugin/appConfig)
promise: false, // 是否启用旧版本的 promise 支持(即返回[err,res]的格式)
longpress: true, // 是否启用longpress
routerMode: '"hash"', // 启用的 router 类型(uni-h5/src/framework/plugin/router)
wx: false,
wxs: true,
promise: false,
longpress: true,
routerMode: '"hash"',
}
const manifest = parse(
fs.readFileSync(path.join(options.inputDir, 'manifest.json'), 'utf8')
......
......@@ -30,7 +30,10 @@
"@dcloudio/uni-mp-polyfill": [
"packages/uni-mp-core/src/runtime/polyfill"
],
"@dcloudio/uni-platform": ["packages/uni-h5/src/platform/index.ts"]
"@dcloudio/uni-platform": ["packages/uni-h5/src/platform/index.ts"],
"@dcloudio/uni-mp-platform": [
"packages/uni-mp-core/src/platform/index.ts"
]
}
},
"include": [
......
......@@ -544,24 +544,24 @@
"@types/yargs" "^15.0.0"
chalk "^4.0.0"
"@microsoft/api-extractor-model@7.12.2":
version "7.12.2"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.12.2.tgz#d48b35e8ed20643b1c19d7a4f80c90c42dc7d1d8"
integrity sha512-EU+U09Mj65zUH0qwPF4PFJiL6Y+PQQE/RRGEHEDGJJzab/mRQDpKOyrzSdb00xvcd/URehIHJqC55cY2Y4jGOA==
"@microsoft/api-extractor-model@7.12.3":
version "7.12.3"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.12.3.tgz#bc21f2f4bf005b753b151c674752d84c676b17b0"
integrity sha512-lLy1UDJOkk7nuhSdAqjlULSd/yWNrSqDnUduwPwtmUoOX3QIfeDhlV5bKmq5Tw6RBq3ydgjasThyxfj1Og15MA==
dependencies:
"@microsoft/tsdoc" "0.12.24"
"@rushstack/node-core-library" "3.36.0"
"@rushstack/node-core-library" "3.36.1"
"@microsoft/api-extractor@^7.13.2":
version "7.13.2"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.13.2.tgz#c44762d27aee05c4da16c03fc8786bd0fa31c7eb"
integrity sha512-2fD0c8OxZW+e6NTaxbtrdNxXVuX7aqil3+cqig3pKsHymvUuRJVCEAcAJmZrJ/ENqYXNiB265EyqOT6VxbMysw==
version "7.13.3"
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.13.3.tgz#970de75bcc0b548b43139d787e382d2a38a9c849"
integrity sha512-hk40nqOk8QYs70SH5vAhTdPYrMUNm4ASNiPFoV9YiFGeiHkC0Ll5IvTtIhs3l2EjnaEjAJuZMgczT4ZlwB/CSQ==
dependencies:
"@microsoft/api-extractor-model" "7.12.2"
"@microsoft/api-extractor-model" "7.12.3"
"@microsoft/tsdoc" "0.12.24"
"@rushstack/node-core-library" "3.36.0"
"@rushstack/rig-package" "0.2.10"
"@rushstack/ts-command-line" "4.7.8"
"@rushstack/node-core-library" "3.36.1"
"@rushstack/rig-package" "0.2.11"
"@rushstack/ts-command-line" "4.7.9"
colors "~1.2.1"
lodash "~4.17.15"
resolve "~1.17.0"
......@@ -659,10 +659,10 @@
estree-walker "^2.0.1"
picomatch "^2.2.2"
"@rushstack/node-core-library@3.36.0":
version "3.36.0"
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.36.0.tgz#95dace39d763c8695d6607c421f95c6ac65b0ed4"
integrity sha512-bID2vzXpg8zweXdXgQkKToEdZwVrVCN9vE9viTRk58gqzYaTlz4fMId6V3ZfpXN6H0d319uGi2KDlm+lUEeqCg==
"@rushstack/node-core-library@3.36.1":
version "3.36.1"
resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.36.1.tgz#9c1a3d5b5379b8857f8e066f1491b89b9fa0d13e"
integrity sha512-YMXJ0bEpxG9AnK1shZTOay5xSIuerzxCV9sscn3xynnndBdma0oE243V79Fb25zzLfkZ1Xg9TbOXc5zmF7NYYA==
dependencies:
"@types/node" "10.17.13"
colors "~1.2.1"
......@@ -674,18 +674,18 @@
timsort "~0.3.0"
z-schema "~3.18.3"
"@rushstack/rig-package@0.2.10":
version "0.2.10"
resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.10.tgz#e861eb94953d8c22c509dc3e9d91d6f337eab3cd"
integrity sha512-WXYerEJEPf8bS3ruqfM57NnwXtA7ehn8VJjLjrjls6eSduE5CRydcob/oBTzlHKsQ7N196XKlqQl9P6qIyYG2A==
"@rushstack/rig-package@0.2.11":
version "0.2.11"
resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.2.11.tgz#b206f5979c7a04799f277083e585e932259a1fd2"
integrity sha512-6Q07ZxjnthXWSXfDy/CgjhhGaqb/0RvZbqWScLr216Cy7fuAAmjbMhE2E53+rjXOsolrS5Ep7Xcl5TQre723cA==
dependencies:
resolve "~1.17.0"
strip-json-comments "~3.1.1"
"@rushstack/ts-command-line@4.7.8":
version "4.7.8"
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.8.tgz#3aa77cf544c571be3206fc2bcba20c7a096ed254"
integrity sha512-8ghIWhkph7NnLCMDJtthpsb7TMOsVGXVDvmxjE/CeklTqjbbUFBjGXizJfpbEkRQTELuZQ2+vGn7sGwIWKN2uA==
"@rushstack/ts-command-line@4.7.9":
version "4.7.9"
resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.7.9.tgz#062aa16b6533af09125284516a774bf9a4d00291"
integrity sha512-Jq5O4t0op9xdFfS9RbUV/ZFlAFxX6gdVTY+69UFRTn9pwWOzJR0kroty01IlnDByPCgvHH8RMz9sEXzD9Qxdrg==
dependencies:
"@types/argparse" "1.0.38"
argparse "~1.0.9"
......@@ -795,9 +795,9 @@
"@types/node" "*"
"@types/fs-extra@^9.0.6":
version "9.0.9"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.9.tgz#11ed43b3f3c6b3490f1ef9bd17f58da896e2d861"
integrity sha512-5TqDycCl0oMzwzd1cIjSJWMKMvLCDVErle4ZTjU4EmHDURR/+yZghe6GDHMCpHtcVfq0x0gMoOM546/5TbYHrg==
version "9.0.10"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.10.tgz#8023a72e3d06cf54929ea47ec7634e47f33f4046"
integrity sha512-O9T2LLkRDiTlalOBdjEkcnT0MRdT2+wglCl7pJUJ3mkWkR8hX4K+5bg2raQNJcLv4V8zGuTXe7Ud3wSqkTyuyQ==
dependencies:
"@types/node" "*"
......@@ -924,50 +924,50 @@
"@types/node" "*"
"@typescript-eslint/parser@^4.12.0":
version "4.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.20.0.tgz#8dd403c8b4258b99194972d9799e201b8d083bdd"
integrity sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA==
version "4.21.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.21.0.tgz#a227fc2af4001668c3e3f7415d4feee5093894c1"
integrity sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA==
dependencies:
"@typescript-eslint/scope-manager" "4.20.0"
"@typescript-eslint/types" "4.20.0"
"@typescript-eslint/typescript-estree" "4.20.0"
"@typescript-eslint/scope-manager" "4.21.0"
"@typescript-eslint/types" "4.21.0"
"@typescript-eslint/typescript-estree" "4.21.0"
debug "^4.1.1"
"@typescript-eslint/scope-manager@4.20.0":
version "4.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz#953ecbf3b00845ece7be66246608be9d126d05ca"
integrity sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ==
"@typescript-eslint/scope-manager@4.21.0":
version "4.21.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz#c81b661c4b8af1ec0c010d847a8f9ab76ab95b4d"
integrity sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw==
dependencies:
"@typescript-eslint/types" "4.20.0"
"@typescript-eslint/visitor-keys" "4.20.0"
"@typescript-eslint/types" "4.21.0"
"@typescript-eslint/visitor-keys" "4.21.0"
"@typescript-eslint/types@4.20.0":
version "4.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.20.0.tgz#c6cf5ef3c9b1c8f699a9bbdafb7a1da1ca781225"
integrity sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w==
"@typescript-eslint/types@4.21.0":
version "4.21.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.21.0.tgz#abdc3463bda5d31156984fa5bc316789c960edef"
integrity sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w==
"@typescript-eslint/typescript-estree@4.20.0":
version "4.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz#8b3b08f85f18a8da5d88f65cb400f013e88ab7be"
integrity sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA==
"@typescript-eslint/typescript-estree@4.21.0":
version "4.21.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz#3817bd91857beeaeff90f69f1f112ea58d350b0a"
integrity sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w==
dependencies:
"@typescript-eslint/types" "4.20.0"
"@typescript-eslint/visitor-keys" "4.20.0"
"@typescript-eslint/types" "4.21.0"
"@typescript-eslint/visitor-keys" "4.21.0"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
semver "^7.3.2"
tsutils "^3.17.1"
"@typescript-eslint/visitor-keys@4.20.0":
version "4.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz#1e84db034da13f208325e6bfc995c3b75f7dbd62"
integrity sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A==
"@typescript-eslint/visitor-keys@4.21.0":
version "4.21.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz#990a9acdc124331f5863c2cf21c88ba65233cd8d"
integrity sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w==
dependencies:
"@typescript-eslint/types" "4.20.0"
"@typescript-eslint/types" "4.21.0"
eslint-visitor-keys "^2.0.0"
"@vitejs/plugin-vue-jsx@^1.1.2":
"@vitejs/plugin-vue-jsx@^1.1.3":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.3.tgz#426c68f8a367a603acb82fca6e2b12506ba9fc8e"
integrity sha512-R9wsuNDEKTDG5oXJaFictrw9E5uokniGzi6tvyO5Od02tE4TnOPfgY2BeHKB4f4ldgiZRMhdUhNEsgjoWnct6A==
......@@ -1003,17 +1003,6 @@
html-tags "^3.1.0"
svg-tags "^1.0.0"
"@vue/compiler-core@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.10.tgz#ced92120c6b9bab7b6c44dfe5e3e5cf2ea422531"
integrity sha512-rayD+aODgX9CWgWv0cAI+whPLyMmtkWfNGsZpdpsaIloh8mY2hX8+SvE1Nn3755YhGWJ/7oaDEcNpOctGwZbsA==
dependencies:
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/shared" "3.0.10"
estree-walker "^2.0.1"
source-map "^0.6.1"
"@vue/compiler-core@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.11.tgz#5ef579e46d7b336b8735228758d1c2c505aae69a"
......@@ -1025,14 +1014,6 @@
estree-walker "^2.0.1"
source-map "^0.6.1"
"@vue/compiler-dom@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.10.tgz#59d3597498e7d4b0b92f3886a823f99d5b08f1fe"
integrity sha512-SzN1li9xAxtqkZimR1AFU2t1N0vzsAJxR/5764xoS0xedwhUU9s8s+Tks2FNMLsXiqdkP2Qd4zAM+9EwTbZmRw==
dependencies:
"@vue/compiler-core" "3.0.10"
"@vue/shared" "3.0.10"
"@vue/compiler-dom@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.11.tgz#b15fc1c909371fd671746020ba55b5dab4a730ee"
......@@ -1041,7 +1022,7 @@
"@vue/compiler-core" "3.0.11"
"@vue/shared" "3.0.11"
"@vue/compiler-sfc@^3.0.10":
"@vue/compiler-sfc@^3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.11.tgz#cd8ca2154b88967b521f5ad3b10f5f8b6b665679"
integrity sha512-7fNiZuCecRleiyVGUWNa6pn8fB2fnuJU+3AGjbjl7r1P5wBivfl02H4pG+2aJP5gh2u+0wXov1W38tfWOphsXw==
......@@ -1071,35 +1052,30 @@
"@vue/compiler-dom" "3.0.11"
"@vue/shared" "3.0.11"
"@vue/reactivity@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.10.tgz#012830733291e60827f3b228d425ad53b83484ce"
integrity sha512-0GOSqlIv/a5wy4r6fAcdaglQ8v2sLYMRUpu49yK8Z2vHccK85Ym3R9C9K3vo6dfBRGbbCVvoKxYtQw49LvE8Ug==
"@vue/reactivity@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.11.tgz#07b588349fd05626b17f3500cbef7d4bdb4dbd0b"
integrity sha512-SKM3YKxtXHBPMf7yufXeBhCZ4XZDKP9/iXeQSC8bBO3ivBuzAi4aZi0bNoeE2IF2iGfP/AHEt1OU4ARj4ao/Xw==
dependencies:
"@vue/shared" "3.0.10"
"@vue/shared" "3.0.11"
"@vue/runtime-core@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.10.tgz#cb8730c0ec86ea5c1cfa701facc0a97bf59b15a2"
integrity sha512-qKhCOwHGff5YEdyClO1gf9Q9xgaPPz/qJ2GyzNZkPb00WcXJ3l+yTgHZWaSywRLs9GD1y9Ff3C0MIowzj95NHA==
"@vue/runtime-core@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.11.tgz#c52dfc6acf3215493623552c1c2919080c562e44"
integrity sha512-87XPNwHfz9JkmOlayBeCCfMh9PT2NBnv795DSbi//C/RaAnc/bGZgECjmkD7oXJ526BZbgk9QZBPdFT8KMxkAg==
dependencies:
"@vue/reactivity" "3.0.10"
"@vue/shared" "3.0.10"
"@vue/reactivity" "3.0.11"
"@vue/shared" "3.0.11"
"@vue/runtime-dom@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.10.tgz#80c6ee28caeabf74f31357d2c64d177945bd8a5f"
integrity sha512-8yRAALc/884UlYWY7hJImecvow1Cngbl2B6n0ThYTms08FVQ3W9tdW0MEvR3JVit06JyQLS1Qvwdn1PwNPPDqg==
"@vue/runtime-dom@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.11.tgz#7a552df21907942721feb6961c418e222a699337"
integrity sha512-jm3FVQESY3y2hKZ2wlkcmFDDyqaPyU3p1IdAX92zTNeCH7I8zZ37PtlE1b9NlCtzV53WjB4TZAYh9yDCMIEumA==
dependencies:
"@vue/runtime-core" "3.0.10"
"@vue/shared" "3.0.10"
"@vue/runtime-core" "3.0.11"
"@vue/shared" "3.0.11"
csstype "^2.6.8"
"@vue/shared@3.0.10":
version "3.0.10"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.10.tgz#5476d5615d01bf339c65c2e804f5909bbc27844a"
integrity sha512-p8GJ+bGpEGiEHICwcCH/EtJnkZQllrOfm1J2J+Ep0ydMte25bPnArgrY/h2Tn1LKqqR3LXyQlOSYY6gJgiW2LQ==
"@vue/shared@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.11.tgz#20d22dd0da7d358bb21c17f9bde8628152642c77"
......@@ -1174,9 +1150,9 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4:
uri-js "^4.2.2"
ajv@^8.0.1:
version "8.0.3"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.0.3.tgz#81f1b07003b329f000b7912e59a24f52392867b6"
integrity sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==
version "8.0.5"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.0.5.tgz#f07d6fdeffcdbb80485570ce3f1bc845fcc812b9"
integrity sha512-RkiLa/AeJx7+9OvniQ/qeWu0w74A8DiPPBclQ6ji3ZQkv5KamO+QGpqmi7O4JIw3rHGUXZ6CoP9tsAkn3gyazg==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
......@@ -1223,9 +1199,9 @@ anymatch@^2.0.0:
normalize-path "^2.1.1"
anymatch@^3.0.3, anymatch@~3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142"
integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==
version "3.1.2"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
......@@ -1393,9 +1369,9 @@ babel-preset-jest@^26.6.2:
babel-preset-current-node-syntax "^1.0.0"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
base64-js@^1.3.1:
version "1.5.1"
......@@ -1669,9 +1645,9 @@ camelcase@^6.0.0:
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
caniuse-lite@^1.0.30001181, caniuse-lite@^1.0.30001196:
version "1.0.30001205"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz#d79bf6a6fb13196b4bb46e5143a22ca0242e0ef8"
integrity sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==
version "1.0.30001207"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001207.tgz#364d47d35a3007e528f69adb6fecb07c2bb2cc50"
integrity sha512-UPQZdmAsyp2qfCTiMU/zqGSWOYaY9F9LL61V8f+8MrubsaDGpaHD9HRV/EWZGULZn0Hxu48SKzI5DgFwTvHuYw==
capture-exit@^2.0.0:
version "2.0.0"
......@@ -2214,9 +2190,9 @@ ecc-jsbn@~0.1.1:
safer-buffer "^2.1.0"
electron-to-chromium@^1.3.649:
version "1.3.705"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz#9729956782ce44cd93bdb4197818cff71f7d5e9d"
integrity sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==
version "1.3.709"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.709.tgz#d7be0b5686a2fdfe8bad898faa3a428d04d8f656"
integrity sha512-LolItk2/ikSGQ7SN8UkuKVNMBZp3RG7Itgaxj1npsHRzQobj9JjMneZOZfLhtwlYBe5fCJ75k+cVCiDFUs23oA==
elliptic@^6.5.3:
version "6.5.4"
......@@ -3256,9 +3232,9 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
kind-of "^6.0.2"
is-docker@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156"
integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.0.tgz#b037c8815281edaad6c2562648a5f5f18839d5f7"
integrity sha512-K4GwB4i/HzhAzwP/XSlspzRdFTI9N8OxJOyOU7Y5Rz+p+WBokXWVWblaJeBkggthmoSV0OoGTH5thJNvplpkvQ==
is-extendable@^0.1.0, is-extendable@^0.1.1:
version "0.1.1"
......@@ -3344,9 +3320,9 @@ is-plain-object@^3.0.0:
integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==
is-potential-custom-element-name@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397"
integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c=
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
is-reference@^1.2.1:
version "1.2.1"
......@@ -4155,9 +4131,9 @@ lint-staged@^10.5.3:
stringify-object "^3.3.0"
listr2@^3.2.2:
version "3.4.4"
resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.4.4.tgz#5bb5e0107cc9a8787dcfb5d302c88cbddcdba248"
integrity sha512-okQwtieCHDX5erlxcEn2xwNfVQhV+/YiD+U0v+6DQamXnknE7mc6B5fopHl96v1PuZjTpaoChctf96PB6K4XRg==
version "3.6.2"
resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.6.2.tgz#7260159f9108523eaa430d4a674db65b6c2d08cc"
integrity sha512-B2vlu7Zx/2OAMVUovJ7Tv1kQ2v2oXd0nZKzkSAcRCej269d8gkS/gupDEdNl23KQ3ZjVD8hQmifrrBFbx8F9LA==
dependencies:
chalk "^4.1.0"
cli-truncate "^2.1.0"
......@@ -5816,9 +5792,9 @@ supports-color@^7.0.0, supports-color@^7.1.0:
has-flag "^4.0.0"
supports-hyperlinks@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47"
integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
version "2.2.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"
integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==
dependencies:
has-flag "^4.0.0"
supports-color "^7.0.0"
......@@ -6220,19 +6196,19 @@ vlq@^0.2.2:
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==
vue-router@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.5.tgz#dd0a4134bc950c37aef64b973e9ee1008428d8fa"
integrity sha512-AQq+pllb6FCc7rS6vh4PPcce3XA1jgK3hKNkQ4hXHwoVN7jOeAOMKCnX7XAX3etV9rmN7iNW8iIwgPk95ckBjw==
vue-router@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.6.tgz#91750db507d26642f225b0ec6064568e5fe448d6"
integrity sha512-Y04llmK2PyaESj+N33VxLjGCUDuv9t4q2OpItEGU7POZiuQZaugV6cJpE6Qm1sVFtxufodLKN2y2dQl9nk0Reg==
vue@3.0.10:
version "3.0.10"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.10.tgz#b5d2801c6ac0e756c850ad7a8f9a78cbccbad02a"
integrity sha512-6arZ722uqIArSNUU94aqx0Pq0IMHFqYZuJ+U+q9HGdZZu11VFpyFP/L/hakijGFKp56Jr0yxJdWbDiJGWPxwww==
vue@3.0.11:
version "3.0.11"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.11.tgz#c82f9594cbf4dcc869241d4c8dd3e08d9a8f4b5f"
integrity sha512-3/eUi4InQz8MPzruHYSTQPxtM3LdZ1/S/BvaU021zBnZi0laRUyH6pfuE4wtUeLvI8wmUNwj5wrZFvbHUXL9dw==
dependencies:
"@vue/compiler-dom" "3.0.10"
"@vue/runtime-dom" "3.0.10"
"@vue/shared" "3.0.10"
"@vue/compiler-dom" "3.0.11"
"@vue/runtime-dom" "3.0.11"
"@vue/shared" "3.0.11"
w3c-hr-time@^1.0.2:
version "1.0.2"
......@@ -6396,14 +6372,14 @@ xtend@~3.0.0:
integrity sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=
y18n@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4"
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
version "4.0.2"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.2.tgz#c504495ba9b59230dd60226d1dd89c3c0a1b745e"
integrity sha512-DnBDwcL54b5xWMM/7RfFg4xs5amYxq2ot49aUfLjQSAracXkGvlZq0txzqr3Pa6Q0ayuCxBcwTzrPUScKY0O8w==
y18n@^5.0.5:
version "5.0.5"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
version "5.0.7"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.7.tgz#0c514aba53fc40e2db911aeb8b51566a3374efe7"
integrity sha512-oOhslryvNcA1lB9WYr+M6TMyLkLg81Dgmyb48ZDU0lvR+5bmNDTMz7iobM1QXooaLhbbrcHrlNaABhI6Vo6StQ==
yallist@^2.1.2:
version "2.1.2"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册