@ajaxjs/ui 1.0.5 → 1.1.0

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 (53) hide show
  1. package/dist/components/form/HtmlEditor/HtmlEditor.js +69 -76
  2. package/dist/components/form/HtmlEditor/HtmlEditor.js.map +1 -1
  3. package/dist/components/form/HtmlEditor/HtmlEditor.less +5 -1
  4. package/dist/components/form/HtmlEditor/HtmlEditor.ts +78 -84
  5. package/dist/components/form/HtmlEditor/HtmlEditor.vue +19 -19
  6. package/package.json +7 -3
  7. package/.browserslistrc +0 -3
  8. package/.eslintrc.js +0 -25
  9. package/babel.config.js +0 -5
  10. package/public/favicon.ico +0 -0
  11. package/public/index.html +0 -24
  12. package/src/App.vue +0 -32
  13. package/src/assets/logo.png +0 -0
  14. package/src/components/form/AjSelect.vue +0 -33
  15. package/src/components/form/HtmlEditor/HtmlEditor.less +0 -161
  16. package/src/components/form/HtmlEditor/HtmlEditor.ts +0 -339
  17. package/src/components/form/HtmlEditor/HtmlEditor.vue +0 -70
  18. package/src/components/form/HtmlEditor/html-editor-HtmlSanitizer.js +0 -103
  19. package/src/components/form/TreeLikeSelect.vue +0 -125
  20. package/src/components/list/attachment-picture-list.ts +0 -57
  21. package/src/components/list/list.js +0 -227
  22. package/src/components/list/list.ts +0 -261
  23. package/src/components/widgets/AccordionMenu.vue +0 -138
  24. package/src/components/widgets/AdjustFontSize.vue +0 -66
  25. package/src/components/widgets/AjAvatar.vue +0 -42
  26. package/src/components/widgets/Article.vue +0 -49
  27. package/src/components/widgets/BaiduSearch.vue +0 -50
  28. package/src/components/widgets/Expander.vue +0 -65
  29. package/src/components/widgets/ImageEnlarger.vue +0 -42
  30. package/src/components/widgets/OpacityBanner.vue +0 -124
  31. package/src/components/widgets/ProcessLine.vue +0 -133
  32. package/src/globalDeclare/shims.d.ts +0 -4
  33. package/src/index.ts +0 -8
  34. package/src/main.ts +0 -12
  35. package/src/pages/Nav.vue +0 -23
  36. package/src/pages/common.less +0 -10
  37. package/src/pages/demo/Article.vue +0 -30
  38. package/src/pages/demo/Form.vue +0 -35
  39. package/src/pages/demo/Wdigets.vue +0 -168
  40. package/src/router/index.js +0 -39
  41. package/src/router/index.js.map +0 -1
  42. package/src/router/index.ts +0 -39
  43. package/src/shims-tsx.d.ts +0 -13
  44. package/src/shims-vue.d.ts +0 -4
  45. package/src/style/common-functions.less +0 -171
  46. package/src/style/reset.less +0 -18
  47. package/src/views/About.vue +0 -5
  48. package/src/views/Home.vue +0 -49
  49. package/src/views/desktop/Desktop.vue +0 -251
  50. package/src/views/desktop/Window.vue +0 -62
  51. package/src/views/desktop/desktop.md +0 -14
  52. package/tsconfig.json +0 -31
  53. package/vue.config.js +0 -17
@@ -1,261 +0,0 @@
1
-
2
-
3
- // namespace aj.list {
4
- // /**
5
- // * 分页列表专用的结果数据
6
- // */
7
- // interface PageListRepsonseResult extends RepsonseResult {
8
- // /**
9
- // * 结果总数
10
- // */
11
- // total: number;
12
- // }
13
-
14
- // /**
15
- // * 列表数据
16
- // */
17
- // interface DataStore extends Ajax {
18
- // /**
19
- // * 是否分页,false=读取所有数据
20
- // */
21
- // isPage: boolean;
22
-
23
- // pageStart: number;
24
-
25
- // pageSize: number;
26
-
27
- // initPageSize: number;
28
-
29
- // total: number;
30
-
31
- // /**
32
- // * 请求结果
33
- // */
34
- // result: BaseObject[];
35
-
36
- // totalPage: number;
37
-
38
- // currentPage: number;
39
-
40
- // /**
41
- // * 默认的分页参数其名字
42
- // */
43
- // pageParamNames: string[];
44
-
45
- // /**
46
- // * 计算分页
47
- // */
48
- // count(): void;
49
- // }
50
-
51
- // /**
52
- // * 本地数据仓库
53
- // * 一般情况下不会单独使用这个组件
54
- // */
55
- // export var datastore = {
56
- // props: {
57
- // apiUrl: { type: String, required: true }, // JSON 接口地址
58
- // isPage: { type: Boolean, default: true },
59
- // initPageSize: { type: Number, required: false, default: 9 },
60
- // isAutoLoad: { type: Boolean, default: true },
61
- // baseParam: { type: Object, default() { return {}; } },
62
- // pageParamNames: { type: Array, default() { return ['start', 'limit']; } }, // 默认的分页参数其名字
63
- // onLoad: Function
64
- // },
65
- // data(this: DataStore) {
66
- // return {
67
- // result: [],
68
- // extraParam: {}, // 与 baseParam 合并后每次请求可发送的,可以修改的
69
- // pageSize: this.initPageSize,
70
- // total: 0,
71
- // totalPage: 0,
72
- // pageStart: 0,
73
- // currentPage: 0
74
- // };
75
- // },
76
-
77
- // methods: {
78
- // /**
79
- // * 分页,跳到第几页,下拉控件传入指定的页码
80
- // *
81
- // * @param this
82
- // * @param ev
83
- // */
84
- // jumpPageBySelect(this: DataStore, ev: Event): void {
85
- // let selectEl: HTMLSelectElement = <HTMLSelectElement>ev.target;
86
- // let currentPage: string = selectEl.options[selectEl.selectedIndex].value;
87
-
88
- // this.pageStart = (Number(currentPage) - 1) * this.pageSize;
89
- // this.getData();
90
- // },
91
-
92
- // /**
93
- // * PageSize 改变时候重新分页
94
- // *
95
- // * @param this
96
- // * @param ev
97
- // */
98
- // onPageSizeChange(this: DataStore, ev: Event): void {
99
- // this.pageSize = Number((<HTMLInputElement>ev.target).value);
100
- // this.count();
101
- // this.getData();
102
- // },
103
-
104
- // count(this: DataStore): void {
105
- // let totalPage: number = this.total / this.pageSize, yushu: number = this.total % this.pageSize;
106
- // this.totalPage = parseInt(String(yushu == 0 ? totalPage : totalPage + 1));
107
- // //@ts-ignore
108
- // this.currentPage = parseInt((this.pageStart / this.pageSize) + 1);
109
- // },
110
-
111
- // /**
112
- // * 前一页
113
- // *
114
- // * @param this
115
- // */
116
- // previousPage(this: DataStore): void {
117
- // this.pageStart -= this.pageSize;
118
- // //@ts-ignore
119
- // this.currentPage = parseInt((this.pageStart / this.pageSize) + 1);
120
-
121
- // this.getData();
122
- // },
123
-
124
- // /**
125
- // * 下一页
126
- // *
127
- // * @param this
128
- // */
129
- // nextPage(this: DataStore): void {
130
- // this.pageStart += this.pageSize;
131
- // this.currentPage = (this.pageStart / this.pageSize) + 1;
132
-
133
- // this.getData();
134
- // }
135
- // }
136
- // };
137
-
138
- // /**
139
- // * 列表控件
140
- // */
141
- // interface List extends DataStore, Vue {
142
- // /**
143
- // * 数据分页是否追加模式,默认不追加 = false。 App 一般采用追加模式
144
- // */
145
- // isDataAppend: boolean;
146
-
147
- // /**
148
- // * 到达底部是否自动加载下一页,通常在 移动端使用,这个应该是元素的 CSS Selector
149
- // */
150
- // autoLoadWhenReachedBottom: boolean;
151
- // }
152
-
153
- // Vue.component('aj-list', {
154
- // mixins: [datastore],
155
- // template: html`
156
- // <div class="aj-list">
157
- // <slot name="header" v-if="total != 0"></slot>
158
- // <ul v-if="showDefaultUi && (total != 0)">
159
- // <li v-for="(item, index) in result">
160
- // <slot v-bind="item">
161
- // <a href="#" @click="show(item.id, index, $event)" :id="item.id">{{item.name}}</a>
162
- // </slot>
163
- // </li>
164
- // </ul>
165
- // <div class="no-data" v-show="isPage && total == 0">未有任何数据</div>
166
- // <footer v-if="isPage" class="pager">
167
- // <a v-if="pageStart > 0" href="#" @click="previousPage">上一页</a>
168
- // <a v-if="(pageStart > 0 ) && (pageStart + pageSize < total)" style="text-decoration: none;">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</a>
169
- // <a v-if="pageStart + pageSize < total" href="#" @click="nextPage">下一页</a>
170
- // <a href="javascript:;" @click="getData"><i class="fa fa-refresh" aria-hidden="true"></i> 刷新</a>
171
- // <input type="hidden" name="start" :value="pageStart" />
172
- // 页数:{{currentPage}}/{{totalPage}} 记录数:{{pageStart}}/{{total}}
173
- // 每页记录数: <input size="2" title="输入一个数字确定每页记录数" type="text" :value="pageSize" @change="onPageSizeChange" />
174
- // 跳转:
175
- // <select @change="jumpPageBySelect">
176
- // <option :value="n" v-for="n in totalPage">{{n}}</option>
177
- // </select>
178
- // </footer>
179
- // <div v-show="!!autoLoadWhenReachedBottom" class="buttom"></div>
180
- // </div>
181
- // `,
182
- // props: {
183
- // showDefaultUi: { type: Boolean, default: true }, // 如果只是单纯作为分页组件,那么则不需要 UI
184
- // isShowFooter: { type: Boolean, default: true }, // 是否显示分页 UI
185
- // hrefStr: { type: String, required: false },
186
- // autoLoadWhenReachedBottom: { type: String, default: '' },
187
- // isDataAppend: { type: Boolean, default: false }
188
- // },
189
- // mounted(this: List): void {
190
- // this.isAutoLoad && this.getData();
191
-
192
- // // this.BUS.$on('base-param-change', this.onExtraParamChange.bind(this));
193
- // if (!!this.autoLoadWhenReachedBottom) {
194
- // // var scrollSpy = new aj.scrollSpy({ scrollInElement: aj(this.autoLoadWhenReachedBottom), spyOn: thish.$el.$('.buttom') });
195
- // // scrollSpy.onScrollSpyBackInSight = e => this.nextPage();
196
- // }
197
- // },
198
- // methods: {
199
- // getData(this: List): void {
200
- // this.lastRequestParam = {};
201
- // aj.apply(this.lastRequestParam, this.baseParam);
202
- // aj.apply(this.lastRequestParam, this.extraParam);
203
- // initPageParams.call(this);
204
-
205
- // xhr.get(this.apiUrl, this.onLoad || ((j: PageListRepsonseResult) => {
206
- // if (j.result) {
207
- // if (this.isPage && j.total === undefined)
208
- // aj.alert('JSON 缺少 total 字段');
209
-
210
- // if (j.total == 0 || j.result.length == 0)
211
- // aj.alert('没有找到任何记录');
212
-
213
- // this.result = j.result;
214
-
215
- // if (this.isPage) {
216
- // this.total = j.total;
217
- // this.count();
218
- // }
219
- // }
220
-
221
- // this.$emit('pager-result', this.result);
222
- // }), this.lastRequestParam);
223
- // },
224
-
225
- // /**
226
- // * 复位
227
- // *
228
- // * @param this
229
- // */
230
- // reset(this: List): void {
231
- // this.total = this.totalPage = this.pageStart = this.currentPage = 0;
232
- // this.pageSize = this.initPageSize;
233
- // },
234
-
235
- // onExtraParamChange(this: List, params: JsonParam): void {
236
- // aj.apply(this.extraParam, params);
237
-
238
- // this.pageStart = 0; // 每次 extraParam 被改变,都是从第一笔开始
239
- // this.getData();
240
- // }
241
- // },
242
- // watch: {
243
- // extraParam(this: List): void {
244
- // this.getData();
245
- // }
246
- // }
247
- // });
248
-
249
- // /**
250
- // * 生成分页参数的名字
251
- // *
252
- // * @param this
253
- // */
254
- // function initPageParams(this: List) {
255
- // let params: { [key: string]: number } = {};
256
- // params[this.pageParamNames[0]] = this.pageStart;
257
- // params[this.pageParamNames[1]] = this.pageSize;
258
-
259
- // this.isPage && aj.apply(this.lastRequestParam, params);
260
- // }
261
- // }
@@ -1,138 +0,0 @@
1
- <template>
2
- <ul class="aj-accordion-menu" @click="onClk">
3
- <slot></slot>
4
- </ul>
5
- </template>
6
-
7
- <script lang="ts">
8
- /**
9
- * 内部子菜单的高亮
10
- *
11
- * @param ev
12
- */
13
- function highlightSubItem(ev: Event) {
14
- let li: Element,
15
- el: Element = ev.target as Element;
16
-
17
- if (el.tagName == "A" && el.getAttribute("target")) {
18
- li = el.parentNode as Element;
19
- li.querySelectorAll("li").forEach((_el: Element) => {
20
- if (_el == li) _el.classList.add("selected");
21
- else _el.classList.remove("selected");
22
- });
23
- }
24
- }
25
-
26
- export default {
27
- methods: {
28
- onClk(ev: Event): void {
29
- let children: HTMLCollection = this.$el.children;
30
- highlightSubItem(ev);
31
- let _btn: Element = ev.target as Element;
32
-
33
- if (
34
- _btn &&
35
- _btn.tagName == "H3" &&
36
- (_btn.parentNode as Element).tagName == "LI"
37
- ) {
38
- _btn = _btn.parentNode as Element;
39
-
40
- for (let btn, i = 0, j = children.length; i < j; i++) {
41
- btn = children[i];
42
- let ul = btn.querySelector("ul");
43
-
44
- if (btn == _btn) {
45
- if (btn.className.indexOf("pressed") != -1) {
46
- btn.classList.remove("pressed"); // 再次点击,隐藏!
47
- if (ul) ul.style.height = "0px";
48
- } else {
49
- if (ul) ul.style.height = ul.scrollHeight + "px";
50
- btn.classList.add("pressed");
51
- }
52
- } else {
53
- btn.classList.remove("pressed");
54
- if (ul) ul.style.height = "0px";
55
- }
56
- }
57
- } else return;
58
- },
59
- },
60
- };
61
- </script>
62
-
63
- <style lang="less" scoped>
64
- // 折叠菜单 Accordion Menu
65
- .aj-accordion {
66
- & > li h3 {
67
- cursor: pointer;
68
- }
69
-
70
- .pressed {
71
- & h3 {
72
- color: black;
73
- }
74
- }
75
-
76
- & > li > ul {
77
- .transition (height .5s cubic-bezier(0, 1, 0.5, 1));;
78
- overflow: hidden;
79
- }
80
-
81
- ul {
82
- height: 0;
83
- }
84
- }
85
-
86
- .aj-accordion-menu {
87
- .aj-accordion ();
88
- overflow: hidden;
89
-
90
- & > li {
91
- border-top: 1px solid white;
92
- border-bottom: 1px solid lightgray;
93
-
94
- &.pressed {
95
- border-top: 0;
96
- border-bottom: 1px solid lightgray;
97
- box-shadow: inset 0px 10px 15px -15px gray;
98
-
99
- h3 {
100
- font-weight: bold;
101
- }
102
- }
103
-
104
- ul {
105
- li {
106
- // list-style-type: disc;
107
- padding-left: 15%;
108
-
109
- a {
110
- width: 100%;
111
- display: block;
112
- }
113
-
114
- &.selected {
115
- a {
116
- color: black;
117
- font-weight: bold;
118
- }
119
- }
120
- }
121
- }
122
-
123
- h3,
124
- li {
125
- padding: 5px 0 5px 15px;
126
- letter-spacing: 2px;
127
- line-height: 20px;
128
- color: #939da8;
129
- font-size: 12px;
130
-
131
- &:hover,
132
- a:hover {
133
- color: black;
134
- }
135
- }
136
- }
137
- }
138
- </style>
@@ -1,66 +0,0 @@
1
- <template>
2
- <div class="aj-adjust-font-size">
3
- <span>字体大小</span>
4
- <ul @click="onClk">
5
- <li><label><input type="radio" name="fontSize" /> 小</label></li>
6
- <li><label><input type="radio" name="fontSize" /> 中</label></li>
7
- <li><label><input type="radio" name="fontSize" /> 大</label></li>
8
- </ul>
9
- </div>
10
- </template>
11
-
12
- <script lang="ts">
13
- /**
14
- * 调整正文字体大小
15
- */
16
- export default {
17
- props: {
18
- articleTarget: { type: String, default: "article p" }, // 正文所在的位置,通过 CSS Selector 定位
19
- },
20
- methods: {
21
- onClk(ev: Event): void {
22
- let el: Element = ev.target as Element;
23
- let setFontSize = (fontSize: string): void => {
24
- document.body
25
- .querySelectorAll(this.$props.articleTarget)
26
- .forEach((p: HTMLParagraphElement) => (p.style.fontSize = fontSize));
27
- };
28
-
29
- if (el.tagName == "LABEL" || el.tagName == "INPUT") {
30
- if (el.tagName != "LABEL") el = el.parentNode as Element;
31
-
32
- console.log(el);
33
- if (el.innerHTML.indexOf("大") != -1) setFontSize("12pt");
34
- else if (el.innerHTML.indexOf("中") != -1) setFontSize("10.5pt");
35
- else if (el.innerHTML.indexOf("小") != -1) setFontSize("9pt");
36
- }
37
- },
38
- },
39
- };
40
- </script>
41
-
42
- <style lang="less" scoped>
43
- .aj-adjust-font-size {
44
- width: 210px;
45
- font-size: 0.8rem;
46
- padding: 2px 0;
47
-
48
- span {
49
- float: left;
50
- width: 35%;
51
- display: block;
52
- }
53
-
54
- ul {
55
- width: 65%;
56
- float: right;
57
- cursor: pointer;
58
-
59
- li {
60
- display: block;
61
- float: right;
62
- width: 33%;
63
- }
64
- }
65
- }
66
- </style>
@@ -1,42 +0,0 @@
1
- <template>
2
- <a :href="avatar" target="_blank">
3
- <img :src="avatar" style="max-width:50px;max-height:60px;vertical-align: middle;" @mouseenter="mouseEnter" @mouseleave="mouseLeave" />
4
- </a>
5
- </template>
6
-
7
- <script lang="ts">
8
- /**
9
- * 显示头像
10
- */
11
- export default {
12
- props: {
13
- avatar: {
14
- // 头像图片地址
15
- type: String,
16
- required: true,
17
- },
18
- },
19
- methods: {
20
- mouseEnter(): void {
21
- // @ts-ignore
22
- if (window.aj_avatar_imgUrl)
23
- // @ts-ignore
24
- window.aj_avatar_imgUrl = this.avatar;
25
- },
26
- mouseLeave(): void {
27
- // @ts-ignore
28
- if (window.aj_avatar_imgUrl)
29
- // @ts-ignore
30
- window.aj_avatar_imgUrl = null;
31
- },
32
- },
33
- };
34
- </script>
35
-
36
- <style lang="less" scoped>
37
- .aj-img-thumb img {
38
- max-width: 50px;
39
- max-height: 60px;
40
- vertical-align: middle;
41
- }
42
- </style>
@@ -1,49 +0,0 @@
1
- <template>
2
- <article>
3
- <h2>{{title}}</h2>
4
-
5
- <div class="toolbar">
6
- <span v-if="author">作者: {{author}}</span> &nbsp;
7
- <a :href="source" v-if="source" target="_blank">&#129109;来源</a>
8
- <FontSize style="float:right;clear:both"></FontSize>
9
- </div>
10
- <slot></slot>
11
- </article>
12
- </template>
13
-
14
- <script>
15
- import FontSize from './AdjustFontSize.vue';
16
-
17
- export default {
18
- props: {
19
- title: String, author: String, source: String
20
- },
21
- components: { FontSize }
22
- }
23
- </script>
24
-
25
- <style lang="less" scoped>
26
- article {
27
- & > p {
28
- .aj-text-function();
29
- text-indent: 2em;
30
- }
31
- & > img,
32
- & > p > img {
33
- max-width: 80%;
34
- margin: 0 auto;
35
- display: block;
36
- }
37
-
38
- h2 {
39
- .aj-text-title();
40
- }
41
-
42
- .toolbar {
43
- height: 15px;
44
- margin: 30px 0;
45
- font-size: 0.8rem;
46
- text-align: right;
47
- }
48
- }
49
- </style>
@@ -1,50 +0,0 @@
1
- <template>
2
- <form class="aj-widget-baidu-search" method="GET" action="http://www.baidu.com/baidu" onsubmit="//return g(this);">
3
- <input type="text" name="word" placeholder="请输入搜索之关键字" />
4
- <input name="tn" value="bds" type="hidden" />
5
- <input name="cl" value="3" type="hidden" />
6
- <input name="ct" value="2097152" type="hidden" />
7
- <input name="si" :value="getSiteDomainName" type="hidden" />
8
- <div class="searchBtn" onclick="this.parentNode.submit();"></div>
9
- </form>
10
- </template>
11
-
12
- <script lang="ts">
13
- /**
14
- * Baidu 自定义搜索
15
- */
16
- export default {
17
- props: {
18
- siteDomainName: String,
19
- },
20
- computed: {
21
- getSiteDomainName(): string {
22
- return this.siteDomainName || location.host || document.domain;
23
- },
24
- },
25
- };
26
- </script>
27
-
28
- <style lang="less" scoped>
29
- .aj-widget-baidu-search {
30
- padding: 0;
31
- margin: 0;
32
-
33
- input[type="text"] {
34
- border-radius: 5px;
35
- border: 1px solid gray;
36
- padding: 0 2px;
37
- height: 22px;
38
- }
39
-
40
- .searchBtn {
41
- background: url("data:image/gif;base64,R0lGODlhEAAQAGYAACH5BAEAAAAALAAAAAAQABAApgEAAOD3//n9/+3//936/xt7uX+x1KAQCyeHwsj1/6QcGZDd+fX+/+oOAFW05FCUxMXs+9P0/+T0+7fv/5rm/6fn/bHr/jCBugt0t0CKv47e+4fW9CaEv6fb8w9/weteSfkEAOsJC8xBKehVP+FZPxF1thZ4uMHx/1FBZQdssQ51uLrk9zlumyB3tDBRir3x/7nm+WK75DKb0z2k2XTG6mXD7Gq/6Euq20yk1EWp20ay5Umv4liw3dUcAKowMBqJycEzB8EqANoZACOa2KQNCp4NCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeWgACCDwUIhgaCiYoFNBQWFQs4F4qJBQsRAZkBFTwZlBcbEQMCpAMDCwiUBRQEpCcTCQEwN4iJHBYSAgmwBAEQObWCBRoBAi8JvQMdMsEAGTEQAQTJAw4qlAAmNSsM3RIOPyzYACUzOjY7Qx4uIQfjDykYGC0oHyAN7uOKCiMNQvn6BCkg0SNIkYCJFIgAAhChDyII9QUCADs=")
42
- no-repeat center;
43
- width: 25px;
44
- height: 25px;
45
- cursor: pointer;
46
- display: inline-block;
47
- vertical-align: bottom;
48
- }
49
- }
50
- </style>
@@ -1,65 +0,0 @@
1
- <template>
2
- <div class="aj-expander" :style="'height:' + (expended ? openHeight : closeHeight) + 'px;'">
3
- <div :class="expended ? 'closeBtn' : 'openBtn'" @click="expended = !expended;"></div>
4
- <slot></slot>
5
- </div>
6
- </template>
7
-
8
- <script lang="ts">
9
- /**
10
- * 展开闭合器
11
- */
12
- export default {
13
- props: {
14
- openHeight: { type: Number, default: 200 },
15
- closeHeight: { type: Number, default: 50 },
16
- },
17
- data(): any {
18
- return {
19
- expended: false,
20
- };
21
- },
22
- };
23
- </script>
24
-
25
- <style lang="less" scoped>
26
- .aj-expander {
27
- overflow: hidden;
28
- position: relative;
29
- clear: both;
30
- transition: height 200ms ease 0s;
31
-
32
- .mask-layer {
33
- position: absolute;
34
- bottom: 0;
35
- left: 0;
36
- height: 23px;
37
- width: 100%;
38
- background: -webkit-gradient(
39
- linear,
40
- center top,
41
- center bottom,
42
- from(transparent),
43
- to(white)
44
- );
45
- }
46
-
47
- .openBtn {
48
- background: url("https://ajaxjs.nos-eastchina1.126.net/images/openBtn.png");
49
- }
50
-
51
- .closeBtn {
52
- background: url("https://ajaxjs.nos-eastchina1.126.net/images/closeBtn.png");
53
- }
54
-
55
- .closeBtn,
56
- .openBtn {
57
- width: 45px;
58
- height: 32px;
59
- position: absolute;
60
- cursor: pointer;
61
- top: 0px;
62
- right: 0px;
63
- }
64
- }
65
- </style>