UNPKG

wecui

Version:

一款基于Vue2.x版本的移动端web组件

65 lines (61 loc) 1.41 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var fs = require('fs'); var path = require('path'); var resetion = { 'table': { 'border-collapse': 'collapse', 'border-spacing': '0', 'vertical-align': 'middle' }, 'table-cell': { 'text-align': 'left', 'font-weight': 'normal', 'vertical-align': 'middle', 'margin': '0', 'padding': '0' }, 'list': { 'list-style': 'none', 'margin': '0', 'padding': '0' }, 'font': { 'font-family': 'inherit', 'font-size': 'inherit', 'font-weight': 'inherit' }, 'boxModel': { 'margin': '0', 'padding': '0', 'width': 'auto', 'height': 'auto' } }; exports.default = { resetGlobal: function resetGlobal(platefprm) { return new Promise(function (resolve, reject) { var inputPath = path.resolve(__dirname, '../src/styles/reset.' + platefprm + '.css'); fs.readFile(inputPath, 'utf8', function (err, file) { if (err) { reject(err); } else { resolve(file); } }); }); }, resetNested: function resetNested(tags) { return new Promise(function (resolve, reject) { var result = {}; tags.forEach(function (tag) { Object.keys(resetion[tag]).forEach(function (prop) { result[prop] = resetion[tag][prop]; }); }); resolve(result); }); } };