diff --git a/components/trigger/index.vue b/components/trigger/index.vue index 57cb3f2e2..8c4fa9dc7 100644 --- a/components/trigger/index.vue +++ b/components/trigger/index.vue @@ -324,35 +324,35 @@ export default { ...mouseProps, }, } - if (!this._component) { const div = document.createElement('div') this._component = new Vue({ - props: { - }, data () { - return {} + return { + popupProps: { ...popupProps }, + } }, el: div, render () { - const { $props } = this - const { popupStyle, popupEvents, ...otherProps } = $props + const { popupStyle, popupEvents, ...otherProps } = this.popupProps const p = { props: otherProps, on: popupEvents, ref: 'popup', style: popupStyle, } - return ($props.getContainer ? - {getComponentFromProp(self, 'popup')} - : null) + return ( + + {getComponentFromProp(self, 'popup')} + + ) }, }) + } else { + this._component.popupProps = popupProps } - Object.assign(this._component.$props, popupProps) - this._component.$forceUpdate() }, getContainer () { diff --git a/package-lock.json b/package-lock.json index 4e856c48c..030f137e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4965,6 +4965,15 @@ } } }, + "string_decoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4976,15 +4985,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", - "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -11360,6 +11360,15 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -11387,15 +11396,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringify-entities": { "version": "1.3.1", "resolved": "https://registry.npm.taobao.org/stringify-entities/download/stringify-entities-1.3.1.tgz",