goodteditor-ui 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -4
- package/src/components/ui/FileSelector.vue +1 -0
- package/src/components/ui/Popover.vue +17 -11
- package/public/index.html +0 -29
- package/public/js.png +0 -0
package/package.json
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goodteditor-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"homepage": "https://goodt-ui.netlify.app/",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"serve": "vue-cli-service serve",
|
|
7
8
|
"build": "vue-cli-service build",
|
|
8
9
|
"lint": "vue-cli-service lint",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"deploy
|
|
10
|
+
"dev": "vue-styleguidist server",
|
|
11
|
+
"docs:build": "set NODE_ENV=development && vue-styleguidist build",
|
|
12
|
+
"docs:deploy": "npx netlify deploy --dir=docs --prod",
|
|
13
|
+
"notify": "node ./ci/teams-notify.js",
|
|
14
|
+
"publish": "npm publish && npm run docs:build && npm run docs:deploy && npm run notify"
|
|
12
15
|
},
|
|
13
16
|
"devDependencies": {
|
|
14
17
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
15
18
|
"@vue/cli-plugin-babel": "^4.5.11",
|
|
16
19
|
"@vue/cli-plugin-eslint": "^4.5.11",
|
|
17
20
|
"@vue/cli-service": "^4.5.11",
|
|
21
|
+
"axios": "^0.24.0",
|
|
18
22
|
"babel-eslint": "^10.1.0",
|
|
19
23
|
"eslint": "^6.7.2",
|
|
20
24
|
"eslint-plugin-vue": "^6.2.2",
|
|
@@ -97,17 +97,10 @@ export default {
|
|
|
97
97
|
default: false,
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
|
+
data() {
|
|
101
|
+
return { cssStyle: {} };
|
|
102
|
+
},
|
|
100
103
|
computed: {
|
|
101
|
-
cssStyle() {
|
|
102
|
-
const { zIndex, autoWidth } = this;
|
|
103
|
-
const obj = { zIndex };
|
|
104
|
-
const target = this.getTarget();
|
|
105
|
-
if (autoWidth && target) {
|
|
106
|
-
const b = target.getBoundingClientRect();
|
|
107
|
-
obj.width = `${b.width}px`;
|
|
108
|
-
}
|
|
109
|
-
return obj;
|
|
110
|
-
},
|
|
111
104
|
placement() {
|
|
112
105
|
const { position } = this;
|
|
113
106
|
const map = { t: Position.TOP, l: Position.START, r: Position.END, b: Position.BOTTOM };
|
|
@@ -146,7 +139,10 @@ export default {
|
|
|
146
139
|
},
|
|
147
140
|
],
|
|
148
141
|
});
|
|
149
|
-
this.$nextTick(() =>
|
|
142
|
+
this.$nextTick(() => {
|
|
143
|
+
this.calcStyle();
|
|
144
|
+
this.popper.update();
|
|
145
|
+
});
|
|
150
146
|
} else {
|
|
151
147
|
this.removeEventListeners();
|
|
152
148
|
this.destroyPopper();
|
|
@@ -172,6 +168,16 @@ export default {
|
|
|
172
168
|
window.removeEventListener('blur', this.onWinBlur);
|
|
173
169
|
document.removeEventListener('mousedown', this.onDocMouseDown);
|
|
174
170
|
},
|
|
171
|
+
calcStyle() {
|
|
172
|
+
const { zIndex, autoWidth } = this;
|
|
173
|
+
const target = this.getTarget();
|
|
174
|
+
const style = { zIndex };
|
|
175
|
+
if (autoWidth && target) {
|
|
176
|
+
const b = target.getBoundingClientRect();
|
|
177
|
+
style.width = `${b.width}px`;
|
|
178
|
+
}
|
|
179
|
+
this.cssStyle = style;
|
|
180
|
+
},
|
|
175
181
|
getTarget() {
|
|
176
182
|
let { target } = this;
|
|
177
183
|
return isElem(target) ? target : document.querySelector(target);
|
package/public/index.html
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<link rel="stylesheet" href="https://goodt-css.netlify.app/css/all.css" />
|
|
8
|
-
<link
|
|
9
|
-
rel="stylesheet"
|
|
10
|
-
href="https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css"
|
|
11
|
-
/>
|
|
12
|
-
<link
|
|
13
|
-
rel="stylesheet"
|
|
14
|
-
href="http://cdn.materialdesignicons.com/light/0.2.63/css/materialdesignicons-light.min.css"
|
|
15
|
-
/>
|
|
16
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<noscript>
|
|
21
|
-
<strong
|
|
22
|
-
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly
|
|
23
|
-
without JavaScript enabled. Please enable it to continue.</strong
|
|
24
|
-
>
|
|
25
|
-
</noscript>
|
|
26
|
-
<div id="app"></div>
|
|
27
|
-
<!-- built files will be auto injected -->
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
package/public/js.png
DELETED
|
Binary file
|