@ajaxjs/ui 1.0.7 → 1.1.2

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.
Files changed (66) hide show
  1. package/dist/components/form/FileUploader/FileUploader.js +104 -0
  2. package/dist/components/form/FileUploader/FileUploader.js.map +1 -0
  3. package/dist/components/form/FileUploader/FileUploader.less +55 -0
  4. package/dist/components/form/FileUploader/FileUploader.ts +121 -0
  5. package/dist/components/form/FileUploader/FileUploader.vue +26 -0
  6. package/dist/components/form/HtmlEditor/HtmlEditor.js +11 -4
  7. package/dist/components/form/HtmlEditor/HtmlEditor.js.map +1 -1
  8. package/dist/components/form/HtmlEditor/HtmlEditor.less +185 -5
  9. package/dist/components/form/HtmlEditor/HtmlEditor.ts +12 -4
  10. package/dist/components/form/HtmlEditor/HtmlEditor.vue +19 -19
  11. package/dist/components/widgets/ImageEnlarger.vue +77 -20
  12. package/package.json +7 -10
  13. package/.browserslistrc +0 -3
  14. package/.eslintrc.js +0 -25
  15. package/babel.config.js +0 -5
  16. package/dist/components/list/attachment-picture-list.js +0 -57
  17. package/dist/components/list/attachment-picture-list.js.map +0 -1
  18. package/dist/components/list/attachment-picture-list.ts +0 -57
  19. package/dist/components/list/list.js +0 -227
  20. package/dist/components/list/list.js.map +0 -1
  21. package/dist/components/list/list.ts +0 -261
  22. package/dist/components/widgets/AjAvatar.vue +0 -42
  23. package/public/favicon.ico +0 -0
  24. package/public/index.html +0 -24
  25. package/src/App.vue +0 -32
  26. package/src/assets/logo.png +0 -0
  27. package/src/components/form/AjSelect.vue +0 -33
  28. package/src/components/form/HtmlEditor/HtmlEditor.less +0 -165
  29. package/src/components/form/HtmlEditor/HtmlEditor.ts +0 -329
  30. package/src/components/form/HtmlEditor/HtmlEditor.vue +0 -70
  31. package/src/components/form/HtmlEditor/html-editor-HtmlSanitizer.js +0 -103
  32. package/src/components/form/TreeLikeSelect.vue +0 -125
  33. package/src/components/list/attachment-picture-list.ts +0 -57
  34. package/src/components/list/list.js +0 -227
  35. package/src/components/list/list.ts +0 -261
  36. package/src/components/widgets/AccordionMenu.vue +0 -138
  37. package/src/components/widgets/AdjustFontSize.vue +0 -66
  38. package/src/components/widgets/AjAvatar.vue +0 -42
  39. package/src/components/widgets/Article.vue +0 -49
  40. package/src/components/widgets/BaiduSearch.vue +0 -50
  41. package/src/components/widgets/Expander.vue +0 -65
  42. package/src/components/widgets/ImageEnlarger.vue +0 -42
  43. package/src/components/widgets/OpacityBanner.vue +0 -124
  44. package/src/components/widgets/ProcessLine.vue +0 -133
  45. package/src/globalDeclare/shims.d.ts +0 -4
  46. package/src/index.ts +0 -8
  47. package/src/main.ts +0 -12
  48. package/src/pages/Nav.vue +0 -23
  49. package/src/pages/common.less +0 -10
  50. package/src/pages/demo/Article.vue +0 -30
  51. package/src/pages/demo/Form.vue +0 -46
  52. package/src/pages/demo/Wdigets.vue +0 -168
  53. package/src/router/index.js +0 -39
  54. package/src/router/index.js.map +0 -1
  55. package/src/router/index.ts +0 -39
  56. package/src/shims-tsx.d.ts +0 -13
  57. package/src/shims-vue.d.ts +0 -4
  58. package/src/style/common-functions.less +0 -171
  59. package/src/style/reset.less +0 -18
  60. package/src/views/About.vue +0 -5
  61. package/src/views/Home.vue +0 -49
  62. package/src/views/desktop/Desktop.vue +0 -251
  63. package/src/views/desktop/Window.vue +0 -62
  64. package/src/views/desktop/desktop.md +0 -14
  65. package/tsconfig.json +0 -30
  66. package/vue.config.js +0 -17
@@ -1,251 +0,0 @@
1
- <template>
2
- <div>
3
-
4
- </div>
5
- </template>
6
-
7
- <script>
8
- // new Vue({
9
- // el: ".stage",
10
- // });
11
-
12
- // var box = aj(".window");
13
- // var dragBar = box.$("h1");
14
- // // 鼠标按下的函数
15
- // dragBar.onmousedown = function (oEvent) {
16
- // // 求出鼠标和box的位置差值
17
- // var x = oEvent.clientX - box.offsetLeft;
18
- // var y = oEvent.clientY - box.offsetTop;
19
-
20
- // // 鼠标移动的函数
21
- // // 把事件加在document上,解决因为鼠标移动太快时,
22
- // // 鼠标超过box后就没有了拖拽的效果的问题
23
- // document.onmousemove = function (oEvent) {
24
- // // 只能拖动窗口标题才能移动
25
- // if (oEvent.target != dragBar) {
26
- // // return;
27
- // }
28
-
29
- // // 保证拖拽框一直保持在浏览器窗口内部,不能被拖出的浏览器窗口的范围
30
- // var l = oEvent.clientX - x,
31
- // t = oEvent.clientY - y;
32
- // var doc = document.documentElement;
33
-
34
- // if (l < 0) {
35
- // l = 0;
36
- // } else if (l > doc.clientWidth - box.offsetWidth) {
37
- // l = doc.clientWidth - box.offsetWidth;
38
- // }
39
-
40
- // if (t < 0) {
41
- // t = 0;
42
- // } else if (t > doc.clientHeight - box.offsetHeight) {
43
- // t = doc.clientHeight - box.offsetHeight;
44
- // }
45
-
46
- // box.style.left = l + "px";
47
- // box.style.top = t + "px";
48
- // };
49
-
50
- // // 鼠标抬起的函数
51
- // document.onmouseup = function () {
52
- // document.onmousemove = document.onmouseup = null;
53
- // };
54
-
55
- // // 火狐浏览器在拖拽空div时会出现bug
56
- // // return false阻止默认事件,解决火狐的bug
57
- // return false;
58
- // };
59
-
60
- // var el = document.body,
61
- // mask = aj(".mask");
62
-
63
- // el.onmousedown = (e) => {
64
- // var startX = e.clientX,
65
- // startY = e.clientY;
66
- // // setXY.call(mask, startX, startY);
67
-
68
- // el.onmousemove = (e) => {
69
- // var x = e.clientX,
70
- // y = e.clientY;
71
- // // setSize.call(mask, x - startX, y - startY);
72
- // };
73
-
74
- // // 鼠标抬起的函数
75
- // el.onmouseup = () => {
76
- // // setSize.call(mask, 0, 0);
77
- // el.onmousemove = el.onmouseup = null;
78
- // };
79
-
80
- // return false;
81
- // };
82
-
83
- // // 判断浏览器是否缩放 getScreenScaleNum() == 100
84
- // function getScreenScaleNum() {
85
- // var e = 0,
86
- // i = window.screen;
87
-
88
- // return (
89
- // void 0 !== window.devicePixelRatio
90
- // ? (e = window.devicePixelRatio)
91
- // : ~this.ua.indexOf("msie")
92
- // ? i.deviceXDPI && i.logicalXDPI && (e = i.deviceXDPI / i.logicalXDPI)
93
- // : void 0 !== window.outerWidth &&
94
- // void 0 !== window.innerWidth &&
95
- // (e = window.outerWidth / window.innerWidth),
96
- // e && (e = Math.round(100 * e)),
97
- // (99 !== e && 101 !== e) || (e = 100),
98
- // e
99
- // );
100
- // }
101
- </script>
102
-
103
- <style lang="less" scoped>
104
- body {
105
- overflow: hidden;
106
- & > .stage {
107
- height: 96vh;
108
- background-color: #007cbf;
109
- width: 100%;
110
- }
111
-
112
- & > menu {
113
- width: 100%;
114
- height: 4vh;
115
- line-height: 4vh;
116
- box-sizing: border-box;
117
- position: fixed;
118
- bottom: 0;
119
- left: 0;
120
- margin: 0;
121
- border-top: 1px solid white;
122
- background-image: linear-gradient(
123
- 93deg,
124
- #d1ede9,
125
- #c1e9e3 3%,
126
- #b1e4dc 12%,
127
- #6ea0ce 90%,
128
- #2a5cbf
129
- );
130
- padding: 0;
131
- & > .button {
132
- margin-top: 5px;
133
- margin-left: 10px;
134
- cursor: pointer;
135
- width: 80px;
136
- height: 15px;
137
- font-size: 14px;
138
- line-height: 15px;
139
- padding: 5px 10px 3px;
140
- border-radius: 16px;
141
- border: 2px solid #ccc;
142
- position: relative;
143
- color: #fff;
144
- text-shadow: rgba(10, 10, 10, 0.5) 1px 2px 2px;
145
- text-align: center;
146
- vertical-align: middle;
147
- white-space: nowrap;
148
- text-overflow: ellipsis;
149
- overflow: hidden;
150
- background-color: rgba(60, 132, 198, 0.8);
151
- border-top-color: #8ba2c1;
152
- border-right-color: #5890bf;
153
- border-bottom-color: #4f93ca;
154
- border-left-color: #768fa5;
155
- box-shadow: rgba(66, 140, 240, 0.5) 0px 10px 16px;
156
- background-image: -webkit-gradient(
157
- linear,
158
- 0% 0%,
159
- 0% 90%,
160
- from(rgba(28, 91, 155, 0.8)),
161
- to(rgba(108, 191, 255, 0.9))
162
- );
163
- .glare {
164
- position: absolute;
165
- top: 0;
166
- left: 5px;
167
- -webkit-border-radius: 8px;
168
- -moz-border-radius: 8px;
169
- height: 1px;
170
- width: 90%;
171
- padding: 8px 0;
172
- background-color: rgba(255, 255, 255, 0.25);
173
- background-image: -webkit-gradient(
174
- linear,
175
- 0% 0%,
176
- 0% 95%,
177
- from(rgba(255, 255, 255, 0.7)),
178
- to(rgba(255, 255, 255, 0))
179
- );
180
- }
181
- }
182
- }
183
- }
184
-
185
- .window {
186
- width: 500px;
187
- height: 400px;
188
- background-color: #c3d8ed;
189
- position: fixed;
190
- padding: 1%;
191
- top: 10%;
192
- left: 10%;
193
- border-radius: 1%;
194
- border: 1px solid gray;
195
- border-top-color: white;
196
- box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
197
- box-sizing: border-box;
198
- & > header {
199
- background-image: line-gradient(to left, red, white);
200
- h1 {
201
- font-size: 1rem;
202
- }
203
-
204
- & > div {
205
- float: right;
206
- div {
207
- width: 15px;
208
- height: 10px;
209
- border: 1px solid gray;
210
- border-radius: 3px;
211
- padding: 5px;
212
- text-align: center;
213
- cursor: pointer;
214
- color: white;
215
- margin-left: 10px;
216
- font-size: 23px;
217
- line-height: 10px;
218
- float: left;
219
- background-image: -webkit-gradient(
220
- linear,
221
- 0% 0%,
222
- 0% 90%,
223
- from(rgba(220, 228, 236, 0.8)),
224
- to(rgba(185, 225, 255, 0.9))
225
- );
226
- text-shadow: 0 1px black, 1px 0 black, -1px 0 black, 0 -1px black;
227
- &.max {
228
- font-size: 14px;
229
- }
230
- }
231
- }
232
- }
233
-
234
- & > div {
235
- background-color: white;
236
- height: 96%;
237
- border: 1px solid #666;
238
- iframe {
239
- border: 0;
240
- width: 100%;
241
- height: 100%;
242
- }
243
- }
244
- }
245
-
246
- .mask {
247
- position: fixed;
248
- background-color: rgba(255, 255, 255, 0.5);
249
- border: 1px solid blue;
250
- }
251
- </style>
@@ -1,62 +0,0 @@
1
- <template>
2
- <div class="window">
3
- <header>
4
- <div>
5
- <div class="min" @click="min">&#8259;</div>
6
- <div class="max" @click="max">{{isMax ? '&#10696;' : '☐'}}</div>
7
- <div class="close">×</div>
8
- </div>
9
- <h1>{{title}}</h1>
10
- </header>
11
- <div>
12
- <iframe src="http://qq.com"></iframe>
13
- </div>
14
- </div>
15
- </template>
16
-
17
- <script lang="ts">
18
- /**
19
- * 展开闭合器
20
- */
21
- export default {
22
- data(): {} {
23
- return {
24
- title: "This is a windows",
25
- isMax: false,
26
- notMaxSize: { w: 0, h: 0 },
27
- notMaxXY: { x: 0, y: 0 },
28
- };
29
- },
30
- methods: {
31
- max(): void {
32
- if (!this.isMax) {
33
- this.notMaxSize.w = this.$el.clientWidth;
34
- this.notMaxSize.h = this.$el.clientHeight;
35
-
36
- setXY.call(this.$el, 0, 0);
37
-
38
- this.$el.style.height = "100%";
39
- this.$el.style.width = "100%";
40
- } else {
41
- setSize.call(this.$el, this.notMaxSize.h, this.notMaxSize.w);
42
- }
43
-
44
- this.isMax = !this.isMax;
45
- },
46
- // min() {},
47
- },
48
- };
49
-
50
- function setXY(x: number, y: number): void {
51
- this.style.left = x + "px";
52
- this.style.top = y + "px";
53
- }
54
-
55
- function setSize(h: number, w: number): void {
56
- this.style.height = h + "px";
57
- this.style.width = w + "px";
58
- }
59
- </script>
60
-
61
- <style lang="less" scoped>
62
- </style>
@@ -1,14 +0,0 @@
1
- ## 智能修改窗口的位置
2
- 调整浏览器尺寸后,窗体消失
3
-
4
- 出现这问题的原因也很简单,因为窗口的top、left的值是写死的,当浏览器的宽高小于窗口top、left时,必然会被隐藏掉。解决办法就是在调整浏览器尺寸的同时,把窗口的top、left也一起修改,但是具体要修改成多少呢?
5
-
6
-   经过自己的考虑和他人的指点,最终的解决办法就是按比例修改,也就是按当时窗口离左/右、上/下的距离与整个窗口大小的比例进行缩放,说的可能有点迷糊,不如看下修改公式吧:
7
-
8
-   top = 浏览器缩放前窗口上边距 / ( 浏览器缩放前高度 - 浏览器缩放前窗口高度 ) * ( 浏览器缩放后高度 - 浏览器缩放后窗口高度 );
9
-   left = 浏览器缩放前窗口左边距 / ( 浏览器缩放前宽度 - 浏览器缩放前窗口宽度 ) * ( 浏览器缩放后宽度 - 浏览器缩放后窗口宽度 );
10
-
11
-
12
- ##窗口超级预览
13
- 复制一份蓝色窗口到预览区,transform:scale()
14
- https://www.cnblogs.com/hooray/archive/2011/12/29/2305654.html
package/tsconfig.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "strict": false,
6
- "jsx": "preserve",
7
- "importHelpers": true,
8
- "moduleResolution": "node",
9
- "skipLibCheck": true,
10
- "esModuleInterop": true,
11
- "allowSyntheticDefaultImports": true,
12
- "sourceMap": true,
13
- "baseUrl": ".",
14
- "outDir": "./dist",
15
- "types": ["webpack-env"],
16
- "paths": {
17
- "@/*": ["src/*"]
18
- },
19
- "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
20
- },
21
- "include": [
22
- "src/**/*.ts",
23
- "src/**/*.tsx",
24
- "src/**/*.vue",
25
- "tests/**/*.ts",
26
- "tests/**/*.tsx"
27
- ],
28
-
29
- "exclude": ["node_modules", "dist"]
30
- }
package/vue.config.js DELETED
@@ -1,17 +0,0 @@
1
- var path = require("path");
2
-
3
- module.exports = {
4
- pluginOptions: {
5
- 'style-resources-loader': {
6
- preProcessor: 'less',
7
- patterns: [path.resolve(__dirname, './src/style/common-functions.less')]
8
- }
9
- },
10
- lintOnSave: true,
11
- devServer: {
12
- overlay: {
13
- warnings: true,
14
- error: true
15
- }
16
- }
17
- };