@ajaxjs/util 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![NPM](https://img.shields.io/npm/v/@ajaxjs/ui.svg?sanitize=true)](https://www.npmjs.com/package/@ajaxjs/ui)
1
+ [![NPM](https://img.shields.io/npm/v/@ajaxjs/util.svg?sanitize=true)](https://www.npmjs.com/package/@ajaxjs/util)
2
2
  [![Vue.js](https://img.shields.io/badge/Vue.js-2.6.14-brightgreen.svg?style=flat&logo=vuedotjs&logoColor=white)](https://vuejs.org)
3
3
  [![TypeScript](https://img.shields.io/badge/TypeScript-4.9.4-blue.svg?style=flat&logo=Typescript&logoColor=white)](https://www.typescriptlang.org/)
4
4
  [![License](https://img.shields.io/badge/license-Apache--2.0-green.svg?longCache=true&style=flat)](http://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -6,12 +6,12 @@
6
6
  [![QQ群](https://framework.ajaxjs.com/static/qq.svg)](https://shang.qq.com/wpa/qunwpa?idkey=3877893a4ed3a5f0be01e809e7ac120e346102bd550deb6692239bb42de38e22)
7
7
 
8
8
 
9
- # Simple Widget library
9
+ # JS Utils & a Simple Widget Library
10
10
 
11
11
  A few widgets, vue.js + typescript + less.js
12
12
 
13
- NPM: https://www.npmjs.com/package/@ajaxjs/ui
13
+ NPM: https://www.npmjs.com/package/@ajaxjs/util
14
14
 
15
15
  ## Install
16
16
 
17
- npm i @ajaxjs/ui
17
+ npm i @ajaxjs/util
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,wDAA2B;AAC3B,sDAA6B;AAC7B,8BAA4B;AAC5B,0CAA0C;AAE1C,aAAG,CAAC,MAAM,CAAC,aAAa,GAAG,KAAK,CAAC;AAEjC,IAAI,aAAG,CAAC;IACN,MAAM,EAAN,gBAAM;IACN,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAG,CAAC;CACpB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;AAAA,8CAAqB;AACrB,wDAA2B;AAC3B,sDAA8B;AAC9B,8BAA4B;AAC5B,0CAA0C;AAE1C,aAAG,CAAC,MAAM,CAAC,aAAa,GAAG,KAAK,CAAC;AAEjC,IAAI,aAAG,CAAC;IACN,MAAM,EAAN,gBAAM;IACN,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAG,CAAC;CACpB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import VueRouter from 'vue-router';
2
+ declare const router: VueRouter;
3
+ export default router;
package/dist/router.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const vue_1 = __importDefault(require("vue"));
30
+ const vue_router_1 = __importDefault(require("vue-router"));
31
+ // import Home from '../views/Home.vue'
32
+ vue_1.default.use(vue_router_1.default);
33
+ const routes = [
34
+ {
35
+ path: '/',
36
+ name: 'Home',
37
+ component: () => Promise.resolve().then(() => __importStar(require(/* webpackChunkName: "about" */ './pages/index.vue')))
38
+ }
39
+ ];
40
+ const router = new vue_router_1.default({
41
+ routes
42
+ });
43
+ exports.default = router;
44
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAqB;AACrB,4DAAmD;AACnD,uCAAuC;AAEvC,aAAG,CAAC,GAAG,CAAC,oBAAS,CAAC,CAAC;AAEnB,MAAM,MAAM,GAAuB;IACjC;QACE,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,GAAG,EAAE,mDAAQ,+BAA+B,CAAC,mBAAmB,GAAC;KAC7E;CACF,CAAC;AAEF,MAAM,MAAM,GAAG,IAAI,oBAAS,CAAC;IAC3B,MAAM;CACP,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,294 @@
1
+ :root {
2
+ --admin-main-color: #1e6bb8;
3
+ }
4
+
5
+ .aj-center-title () {
6
+ text-align : center;
7
+ font-size : 1.3rem;
8
+ font-weight : bold;
9
+ letter-spacing: 5px;
10
+ padding : 20px 0;
11
+ }
12
+
13
+ .aj-text-function() {
14
+ color : #333;
15
+ line-height : 160%;
16
+ margin : 15px 0;
17
+ font-size : .95rem;
18
+ letter-spacing: 1px;
19
+ text-align : justify;
20
+ }
21
+
22
+ .centerBody (@defaultWidth: 1300px) {
23
+ max-width: @defaultWidth;
24
+ margin : 0 auto;
25
+ width : 100%;
26
+ height : 100%;
27
+ }
28
+
29
+ .transition (@t) {
30
+ -webkit-transition: @t;
31
+ -moz-transition : @t;
32
+ -ms-transition : @t;
33
+ -o-transition : @t;
34
+ transition : @t;
35
+ }
36
+
37
+ .transition_withTransform (@t) {
38
+ -webkit-transition: -webkit-transform @t;
39
+ -moz-transition : -moz-transform @t;
40
+ -ms-transition : -moz-transform @t;
41
+ -o-transition : -o-transform @t;
42
+ transition : transform @t;
43
+ }
44
+
45
+ .transform (@t) {
46
+ -webkit-transform: @t;
47
+ -moz-transform : @t;
48
+ -ms-transform : @t;
49
+ -o-transform : @t;
50
+ -transform : @t;
51
+ }
52
+
53
+ .heightFx () {
54
+ .transition (300ms height ease-out);
55
+ }
56
+
57
+ .widthFx () {
58
+ .transition (200ms width ease-out);
59
+ }
60
+
61
+ .leftFx () {
62
+ .transition (200ms left linear);
63
+ }
64
+
65
+ // 解决使用CSS动画时闪烁的问题
66
+ // http://ued.taobao.com/blog/2012/01/chrome%E6%B8%B2%E6%9F%93transition%E6%97%B6%E9%A1%B5%E9%9D%A2%E9%97%AA%E5%8A%A8bug/
67
+ .fixTransitionFlash () {
68
+ backface-visibility : hidden;
69
+ -webkit-backface-visibility: hidden;
70
+ -moz-backface-visibility : hidden;
71
+ }
72
+
73
+ // 解决高度塌陷的问题 – 清除浮动 或叫 闭合浮动
74
+ // http://www.iyunlu.com/view/css-xhtml/55.html
75
+ // http://www.zhangxinxu.com/wordpress/2010/01/css-float%E6%B5%AE%E5%8A%A8%E7%9A%84%E6%B7%B1%E5%85%A5%E7%A0%94%E7%A9%B6%E3%80%81%E8%AF%A6%E8%A7%A3%E5%8F%8A%E6%8B%93%E5%B1%95%E4%BA%8C/
76
+ // 强制换行
77
+ .forceBreak () {
78
+ word-wrap : break-word;
79
+ word-break: break-all;
80
+ }
81
+
82
+ .giveHeight () {
83
+ overflow: hidden;
84
+ zoom : 1;
85
+ }
86
+
87
+ // 透明度
88
+ .imgOpacityShow (@time: 300ms) {
89
+ .transition (opacity @time ease-in);
90
+ }
91
+
92
+ // 旋转角度
93
+ .rotate (@ro: 30deg) {
94
+ .transform (rotate(@ro));
95
+ }
96
+
97
+ // 渐变
98
+ .gradient (@direction , @startColor , @endColor) {
99
+ background-image: -webkit-linear-gradient(@direction, @startColor, @endColor);
100
+ background-image: -moz-linear-gradient(@direction, @startColor, @endColor);
101
+ background-image: -ms-linear-gradient(@direction, @startColor, @endColor);
102
+ background-image: -o-linear-gradient(@direction, @startColor, @endColor);
103
+ background-image: linear-gradient(@direction, @startColor, @endColor);
104
+ }
105
+
106
+ // 渐变
107
+ .gradient (@direction , @startColor , @midColor , @endColor) {
108
+ background-image: -webkit-linear-gradient(@direction, @startColor, @midColor, @endColor);
109
+ background-image: -moz-linear-gradient(@direction, @startColor, @midColor, @endColor);
110
+ background-image: -ms-linear-gradient(@direction, @startColor, @midColor, @endColor);
111
+ background-image: -o-linear-gradient(@direction, @startColor, @midColor, @endColor);
112
+ background-image: linear-gradient(@direction, @startColor, @midColor, @endColor);
113
+ }
114
+
115
+ .fadeIn (@duration) {
116
+ animation : fade-in;
117
+ animation-duration: @duration;
118
+ -webkit-animation : fade-in @duration;
119
+ }
120
+
121
+ .fadeOut (@duration) {
122
+ animation : fade-out-hide;
123
+ animation-duration: @duration;
124
+ -webkit-animation : fade-out-hide @duration;
125
+ }
126
+ .aj-text-title {
127
+ letter-spacing: 2px;
128
+ margin: 10px;
129
+ }
130
+ .aj-text-function() {
131
+ color : #333;
132
+ line-height : 160%;
133
+ margin : 15px 0;
134
+ font-size : .95rem;
135
+ letter-spacing: 1px;
136
+ text-align : justify;
137
+ }
138
+
139
+ // 快速制作1px 表格边框,为需要设置的 table 元素加上 border 的class即可
140
+ .aj-table {
141
+ border : 1px lightgray solid;
142
+ border-collapse: collapse;
143
+ border-spacing : 0;
144
+
145
+ th {
146
+ background-color: #efefef;
147
+ letter-spacing : 3px;
148
+ }
149
+
150
+ td,
151
+ th {
152
+ border : 1px lightgray solid;
153
+ line-height: 160%;
154
+ height : 120%;
155
+ padding : 6px;
156
+ }
157
+
158
+ tr {
159
+ .transition (background-color 400ms ease-out);
160
+
161
+ &:nth-child(odd) {
162
+ background: #f5f5f5;
163
+ box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
164
+ }
165
+
166
+ &:hover {
167
+ background-color: #fbf8e9;
168
+ }
169
+ }
170
+
171
+ }
172
+
173
+ .aj-form-table {
174
+ border-collapse: collapse;
175
+ border-spacing : 0;
176
+
177
+ th {
178
+ background-color: #efefef;
179
+ letter-spacing : 3px;
180
+ }
181
+
182
+ td,
183
+ th {
184
+ line-height: 160%;
185
+ height : 120%;
186
+ padding : 10px 15px;
187
+ }
188
+
189
+ tr {
190
+ .transition (background-color 400ms ease-out);
191
+
192
+ &:nth-child(odd) {
193
+ background: #f5f5f5;
194
+ box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
195
+ }
196
+
197
+ &:hover {
198
+ background-color: #fbf8e9;
199
+ }
200
+ }
201
+ }
202
+
203
+ .aj-btn-base() {
204
+ min-height : 26px;
205
+ font-size : .8rem;
206
+ //line-height: 100%;
207
+ padding : .3em 2.3em;
208
+ margin : 10px auto;
209
+ color : #333;
210
+ letter-spacing : .3em;
211
+ border-radius : 4px;
212
+ border : 1px solid #ccc;
213
+ border-bottom-color: #B4B4B4;
214
+ box-shadow : 0 1px 3px rgba(0, 0, 0, 0.12);
215
+ text-shadow : 0 1px 0 rgba(255, 255, 255, 0.8);
216
+ background-color : lightgray;
217
+ background-repeat : repeat-x;
218
+ transition : background-image 0.5s linear 1s;
219
+ cursor : pointer;
220
+ outline : 0;
221
+ .gradient (to bottom, rgba(255, 255, 255, 1) 0%, rgba(239, 239, 239, 1) 60%, rgba(225, 223, 226, 1) 100%);
222
+
223
+ img {
224
+ vertical-align: middle;
225
+ }
226
+
227
+ &:hover {
228
+ color : black;
229
+ border-color: lighten(black, 65%);
230
+ }
231
+
232
+ &:active {
233
+ box-shadow : inset 0 3px 5px rgba(0, 0, 0, .2);
234
+ border-color: lighten(black, 55%);
235
+ }
236
+
237
+ &:focus {
238
+ border-color: lighten(black, 60%);
239
+ }
240
+
241
+ &:hover {
242
+ background-position: 0px -10px;
243
+ }
244
+ }
245
+
246
+ .aj-btnsHolder {
247
+ text-align: center;
248
+ padding : 2% 0;
249
+
250
+ button {
251
+ margin-right: 3% !important;
252
+ }
253
+ }
254
+
255
+ .aj-input-base() {
256
+ min-height : 25px;
257
+ font-size : .9rem;
258
+ border : 1px solid #abadb3;
259
+ // border-radius : 3px;
260
+ box-sizing : border-box;
261
+ background-color: white;
262
+ transition : border-color ease-in-out 200ms;
263
+ outline : 0;
264
+ padding : 2px;
265
+ vertical-align : middle;
266
+ color : #333;
267
+ // letter-spacing : 1px;
268
+
269
+ &:hover,
270
+ &:focus {
271
+ // box-shadow : 1px 2px 3px #e5e5e5 inset;
272
+ border-color: lighten(black, 45);
273
+ }
274
+ }
275
+
276
+ form.aj-form {
277
+ input[type=text], .form input[type=password], .form textarea{
278
+ .aj-input-base();
279
+ }
280
+ button {
281
+ .aj-btn-base();
282
+ }
283
+
284
+ select {
285
+ color: gray;
286
+ height: 25px;
287
+ border: 1px solid gray;
288
+ }
289
+
290
+ select:hover {
291
+ border-color: black;
292
+ }
293
+
294
+ }
@@ -0,0 +1,19 @@
1
+ /* AJAXJS Base CSS */
2
+ body,dl,dt,dd,ul,li,pre,form,fieldset,input,p,blockquote,th,td,h1,h2,h3,h4,h5{margin:0;padding:0;}
3
+ h1,h2,h3,h4,h5{font-weight: normal;}img{border:0;}ul li{list-style-type:none}.hide{display:none}
4
+ body {-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing: grayscale;
5
+ font-family: "Lantinghei SC", "Open Sans", Arial, "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif;}
6
+
7
+ /* a{text-decoration:none;color:#666;transition:color .4s ease-in-out;}
8
+ a:hover{color:#000;}
9
+ button{border:none;outline:0;cursor:pointer;letter-spacing:2px;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}
10
+ input[type=password],input[type=text],select,textarea{outline:0;-moz-appearance:none;} */
11
+
12
+ /* 手机端浏览器所显示的网页 CSS */
13
+ @media screen and (max-width:480px) {
14
+ * {
15
+ -webkit-tap-highlight-color: transparent; /* 很多 Android 浏览器的 a 链接有边框,这里取消它 */
16
+ -webkit-touch-callout: none; /* 在 iOS 浏览器里面,假如用户长按 a 标签,都会出现默认的弹出菜单事件 */
17
+ /* -webkit-user-select:none; */
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@ajaxjs/util",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Real ajaxjs ui library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/libs/common.d.ts",
7
7
  "homepage": "https://framework.ajaxjs.com/",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/lightweight-component/aj-widget"
10
+ "url": "https://github.com/lightweight-component/js-utils"
11
11
  },
12
12
  "bugs": {
13
- "url": "https://github.com/lightweight-component/aj-widget/issues"
13
+ "url": "https://github.com/lightweight-component/js-utils/issues"
14
14
  },
15
15
  "scripts": {
16
16
  "dev": "vue-cli-service serve",
17
17
  "build": "vue-cli-service build",
18
- "release": "tsc && xcopy src\\widget dist\\widget /s /y /d && copy src\\*.d.ts dist\\ && npm publish"
18
+ "release": "tsc && xcopy src\\widget dist\\widget /s /y /d && copy src\\*.d.ts dist\\ && xcopy src\\style dist\\style /s /y /d && npm publish"
19
19
  },
20
20
  "keywords": [
21
21
  "ajaxjs"