Browse Source

规范梳理

master
IQ 9 months ago
parent
commit
b5acb5a1b7
10 changed files with 227 additions and 0 deletions
  1. +5
    -0
      .idea/.gitignore
  2. +6
    -0
      .idea/compiler.xml
  3. +13
    -0
      .idea/icon.iml
  4. +10
    -0
      .idea/inspectionProfiles/Project_Default.xml
  5. +25
    -0
      .idea/jsonSchemas.xml
  6. +8
    -0
      .idea/modules.xml
  7. +6
    -0
      .idea/vcs.xml
  8. +62
    -0
      dist/js/aicon.js
  9. +68
    -0
      dist/js/icon.js
  10. +24
    -0
      package-lock.json

+ 5
- 0
.idea/.gitignore View File

@ -0,0 +1,5 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/

+ 6
- 0
.idea/compiler.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TypeScriptCompiler">
<option name="recompileOnChanges" value="true" />
</component>
</project>

+ 13
- 0
.idea/icon.iml View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

+ 10
- 0
.idea/inspectionProfiles/Project_Default.xml View File

@ -0,0 +1,10 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

+ 25
- 0
.idea/jsonSchemas.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JsonSchemaMappingsProjectConfiguration">
<state>
<map>
<entry key="package">
<value>
<SchemaInfo>
<option name="name" value="package" />
<option name="relativePathToSchema" value="http://json.schemastore.org/package" />
<option name="applicationDefined" value="true" />
<option name="patterns">
<list>
<Item>
<option name="path" value="tsconfig.json" />
</Item>
</list>
</option>
</SchemaInfo>
</value>
</entry>
</map>
</state>
</component>
</project>

+ 8
- 0
.idea/modules.xml View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/icon.iml" filepath="$PROJECT_DIR$/.idea/icon.iml" />
</modules>
</component>
</project>

+ 6
- 0
.idea/vcs.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 62
- 0
dist/js/aicon.js View File

@ -0,0 +1,62 @@
"use strict";
$(function () {
var layer = layui.layer;
layui.define(['layer'], function () {
$(".kicon").each(function () {
$(this).before('<i style="font-size:20px;width:50px; padding:0;cursor: auto;" class="layui-btn layui-btn-normal ' + $(this).val() + '"></i>');
});
$('.kicon').after('<button type="button" class="layui-btn layui-btn-normal kiconbtn">选择图标</button>');
$('.kiconbtn').on('click', function () {
layer.open({
type: 1,
title: false,
closeBtn: 1,
area: ['80%', '80%'],
shadeClose: true,
content: $(".kicon_k1")
});
$(this).prev().addClass('kicon_hv');
});
});
$.ajax({
url: "font_2031259_r19xlvvgown/iconfont.json",
dataType: "json",
async: true,
type: "POST",
success: function (r) {
var sz = r.glyphs;
for (var i = 0; i < sz.length; i++) {
$('#kicon_k1').append('<li><i class="icon iconfont icon' + sz[i]['font_class'] + '"></i><h3>' + sz[i]['name'] + '</h3></li>');
}
var kiconHv = $('.kicon_hv');
$('.kbanner_search_k1x .k2').on('click', function () {
var kiconK2 = $('#kicon_k2');
var kiconK2li = $('#kicon_k2 li');
kiconK2.html(' ');
var vval = $('.kbanner_search_k1x .k1').val();
var n;
for (var i = 0; i < sz.length; i++) {
n = sz[i]['name'] + sz[i]['font_class'];
if (n.indexOf(vval) > -1) {
kiconK2.append('<li><i class="icon iconfont icon' + sz[i]['font_class'] + '"></i><h3>' + sz[i]['name'] + '</h3></li>');
}
}
if (!kiconK2li.length) {
kiconK2.html('没有查询到您需要的图标');
}
else {
$('#kicon_k2 li').on('click', function () {
kiconHv.prev().addClass($(this).find('i').attr('class'));
kiconHv.val($(this).find('i').attr('class')).removeClass('kicon_hv');
layer.close(layer.index);
});
}
});
$('#kicon_k1 li').on('click', function () {
kiconHv.prev().addClass($(this).find('i').attr('class'));
kiconHv.val($(this).find('i').attr('class')).removeClass('kicon_hv');
layer.close(layer.index);
});
}
});
});

+ 68
- 0
dist/js/icon.js View File

@ -0,0 +1,68 @@
"use strict";
$(function () {
var layer = layui.layer;
layui.define(['layer'], function () {
$(".kicon").each(function () {
$(this).before('<i style="font-size:20px;width:50px; padding:0;cursor: auto;" class="layui-btn layui-btn-normal ' + $(this).val() + '"></i>');
});
$('.kicon').after('<button type="button" class="layui-btn layui-btn-normal kiconbtn">选择图标</button>');
$('.kiconbtn').on('click', function () {
layer.open({
type: 1,
title: false,
closeBtn: 1,
area: ['80%', '80%'],
shadeClose: true,
content: $(".kicon_k1")
});
$(this).prev().addClass('kicon_hv');
});
});
var iconLiAppend = function (data, classc) {
if (classc === void 0) { classc = ''; }
for (var i = 0; i < data.length; i++) {
$('#kicon_k1').append('<li><i class="' + classc + data[i].title + '"></i><h3>' + data[i].title + '</h3></li>');
}
};
$.ajax({
url: "https://www.78305180.com/GetData/getDataPage2.html?key=123456",
dataType: "json",
async: true,
type: "POST",
success: function (r) {
var sz = r.data;
iconLiAppend(sz);
var kiconHv = $('.kicon_hv');
$('.kbanner_search_k1x .k2').on('click', function () {
var kiconK2 = $('#kicon_k2');
var kiconK2li = $('#kicon_k2 li');
kiconK2.html(' ');
var vval = String($('.kbanner_search_k1x .k1').val());
var n;
for (var i = 0; i < r.data.length; i++) {
n = sz[i].body + sz[i].title;
if (n.indexOf(vval) > -1) {
kiconK2.append('<li><i class="' + sz[i].title + '"></i><h3>' + sz[i].title + '</h3></li>');
}
}
if (!kiconK2li.length) {
kiconK2.html("没有查询到您需要的图标");
}
else {
kiconK2li.on('click', function () {
var classc = String($(this).find('i').attr('class'));
kiconHv.prev().addClass(classc);
kiconHv.val(classc).removeClass('kicon_hv');
layer.close(layer.index);
});
}
});
$('#kicon_k1 li').on('click', function () {
var classc = String($(this).find('i').attr('class'));
kiconHv.prev().addClass(classc);
kiconHv.val(classc).removeClass('kicon_hv');
layer.close(layer.index);
});
}
});
});

+ 24
- 0
package-lock.json View File

@ -0,0 +1,24 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@types/jquery": {
"version": "3.5.10",
"resolved": "https://registry.npmmirror.com/@types/jquery/download/@types/jquery-3.5.10.tgz",
"integrity": "sha512-w2qT5DFikh5TXrW/aOaCvCP8g2MMAfPXo3oeHR9v7dRuAZhu38PUWEkYrL4e9VRTcgZE4yER21AHndgpq2QPTQ==",
"requires": {
"@types/sizzle": "*"
}
},
"@types/layui-src": {
"version": "2.6.0",
"resolved": "https://registry.nlark.com/@types/layui-src/download/@types/layui-src-2.6.0.tgz",
"integrity": "sha1-Na4uImSijp9ddaaWMRwUZZm8Pes="
},
"@types/sizzle": {
"version": "2.3.3",
"resolved": "https://registry.npmmirror.com/@types/sizzle/download/@types/sizzle-2.3.3.tgz?cache=0&sync_timestamp=1637270814306&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fsizzle%2Fdownload%2F%40types%2Fsizzle-2.3.3.tgz",
"integrity": "sha1-/14vGQKWnTBSJaBHyKD9XJFc6+8="
}
}
}

Loading…
Cancel
Save